AndyID Posted December 20, 2020 Share Posted December 20, 2020 This is an (updated) oldie but possibly still a goodie. DC motors produce a back EMF that is proportional to their speed. Various systems take advantage of that to determine speed and some of them block the current supplied to the motor and sense the motor's EMF. That's a sort of digital way of doing it but there is an analog way of doing it too, and it does not require any interruption of the motor current. The motor runs on "pure" DC. This is the general idea. OA1 and OA2 are operational amplifiers. Theses days they are cheap as chips and you can get four in a 14 pin dual in-line IC package. This circuit is bi-directional. As you swing the SPEED potentiometer the track voltage will be either positive or negative. OA1, OA2 and Power Amp will all be fed from plus and minus twelve volts but for clarity I left out the connections on the circuit diagram. OA1 and the Power Amp are the basic speed control. The negative input to OA1 is a "virtual earth". All that means is that OA1 will continually adjust its output voltage to maintain the same potential at its positive input. So, to produce a positive track voltage we actually have to drive the speed potentiometer towards the negative supply. The "feed-forward" bit or "positive feedback" if you prefer comes from OA2. It produces a voltage at its output that is proportional to the current supplied to the track. As the current increases it increases the current at the virtual earth (and hence the track voltage) to compensate for any reduction in speed as the motor load increases. Essentially it eliminates most of the motor's resistance. As motors don't all have the same resistance it is necessary to make the compensation for the resistance variable which is why it is adjustable. In practice it might just be low, medium and high. I'll add some over-current protection and more details if anyone actually finds this remotely interesting 6 3 Link to post Share on other sites More sharing options...
Stevebr Posted December 20, 2020 Share Posted December 20, 2020 This looks really interesting. Please continue 2 Link to post Share on other sites More sharing options...
CourthsVeil Posted December 20, 2020 Share Posted December 20, 2020 (edited) Yes - muchly interested! Pls go on. In fact I had tried something like this with a LM741 a few months ago. However, as a newbie to OpAmps, being unware of the need of a power stage (the LM741 does withstand no more than 25 mA, as I learned later), my test setup went away in blue smoke. So I need help to do another approach, me thinks. Edited December 20, 2020 by CourthsVeil 1 Link to post Share on other sites More sharing options...
AndyID Posted December 20, 2020 Author Share Posted December 20, 2020 Thanks to all for the interest. It's a bit more than forty years since I made one of these Please bear with me while I calculate the component values and do a bit of prototyping. I'll try to explain how I arrived at the values as I go along. The op-amp is a TL074CN 1 Link to post Share on other sites More sharing options...
PatB Posted December 21, 2020 Share Posted December 21, 2020 Excellent stuff. I probably spend more time breadboarding interesting, simple controller designs than I do actual railway modelling, so new possibilities are always intriguing. 1 Link to post Share on other sites More sharing options...
Theakerr Posted December 21, 2020 Share Posted December 21, 2020 How is the input speed controlled and what type of input is it? Specifically, does it have to be a 'pure' DC source or could it be PWM or some other type. For the latter I am thinking of input from say a Kent Panel controller or some of the Model Signal engineering controllers. Link to post Share on other sites More sharing options...
AndyID Posted December 21, 2020 Author Share Posted December 21, 2020 1 hour ago, Theakerr said: How is the input speed controlled and what type of input is it? Specifically, does it have to be a 'pure' DC source or could it be PWM or some other type. For the latter I am thinking of input from say a Kent Panel controller or some of the Model Signal engineering controllers. Speed is controlled by turning the potentiometer marked "SPEED" on the LHS of the diagram. When it's centered the output will be zero volts. Clockwise or anti-clockwise from there will supply positive or negative voltage to the track. The +12 V and -12 V supplies need to be smoothed so that they don't dip below 12 volts but if we add a few more components they could actually have a lot of ripple on them . The circuit will operate with higher supply voltages too. 15 volt rails might actually be better than 12 volt as they would allow the output to go all the way to 12 volts. I deliberately indicated 12 volts as I'm assuming most people would prefer to use a couple of 12 volt "bricks" and I don't want to encourage people to construct their own mains driven power supplies, although admittedly that is one of those "do as I say, not as I do" things. It will not work with a PWM supply. 1 Link to post Share on other sites More sharing options...
AndyID Posted December 22, 2020 Author Share Posted December 22, 2020 Here are the proposed values. They will likely change a bit when I test the circuit. Still some bits missing - over-current protection and probably several resistors and capacitors. 1 1 Link to post Share on other sites More sharing options...
RMweb Premium Dave John Posted December 22, 2020 RMweb Premium Share Posted December 22, 2020 TIP41/42 shows Ic max as 6A , so R3 should be 2R0 or larger ? Link to post Share on other sites More sharing options...
AndyID Posted December 22, 2020 Author Share Posted December 22, 2020 20 minutes ago, Dave John said: TIP41/42 shows Ic max as 6A , so R3 should be 2R0 or larger ? No, the primary function of R3 is to measure the current supplied to the track. OA2 is a differential amplifier with a gain of 10. If the controller was supplying 0.5A there would be 0.5 volts across R3. OA2 senses that and multiplies it by 10 to produce 5 volts at its output. a percentage of that is used to increase the the track voltage to cancel out the effect of the voltage lost across the motor's internal resistance. I plan to add some fold-back current limiting when I work out how to make it work In the meantime you could stick a thermistor in series with the output to limit the current. A 21W car filament bulb works quite well. I'm assuming the power supplies are only good for around one amp anyway so there's not much chance of fusing the TIPs but they do need to be mounted on heatsinks. Excessive temperature will destroy them. 1 Link to post Share on other sites More sharing options...
RMweb Premium Dave John Posted December 22, 2020 RMweb Premium Share Posted December 22, 2020 Ok, I thought you were using it to both measure and current limit. Link to post Share on other sites More sharing options...
AndyID Posted December 22, 2020 Author Share Posted December 22, 2020 11 hours ago, Dave John said: Ok, I thought you were using it to both measure and current limit. Ah yes. You could use an even lower resistance value and increase the gain of the differential amp. I picked one ohm because I happen to have some. If you halfed R3 you'd double R5 and R7 etc. 1 Link to post Share on other sites More sharing options...
CourthsVeil Posted December 22, 2020 Share Posted December 22, 2020 My, what a speedy follow up! Thanks a lot. Will try to realise it - have just to wait for the components (will be ordered after postal services have calmed down ...). Regards Armin 1 Link to post Share on other sites More sharing options...
Miss Prism Posted December 22, 2020 Share Posted December 22, 2020 23 hours ago, AndyID said: When it's centered the output will be zero volts. Clockwise or anti-clockwise from there will supply positive or negative voltage to the track. Ok, but what kind of pot gives the user an ergonomic indication that it is 'centred'? Link to post Share on other sites More sharing options...
Nimbus Posted December 22, 2020 Share Posted December 22, 2020 I recall prototyping something along these lines about 30 years ago. There was then a TDA-something from Thomson-CSF which was an integrated 741 plus power stage in a package with a heatsink. My feedback element used an operational transconductance amplifier, in an attempt to get an auto-adjust of the resistance compensation. As far as I recall, my tests with a nearly new Hornby Class 29 revealed it approximated zero velocity by vibrating back and forth by about 6mm. I was strangely delighted for the remainder of that afternoon! I eventually concluded that compensation ideally needed to counter wiring/track/wheel resistance for perfect compensation, and it would be difficult to pre-judge the variation over a layout. It's still in a cupboard somewhere... The Nim. Link to post Share on other sites More sharing options...
AndyID Posted December 22, 2020 Author Share Posted December 22, 2020 1 hour ago, Miss Prism said: Ok, but what kind of pot gives the user an ergonomic indication that it is 'centred'? One with a bloomin' great detent spring added on (It would not be difficult to add a LED that indicates track power off or on.) Link to post Share on other sites More sharing options...
RMweb Premium Dave John Posted December 22, 2020 RMweb Premium Share Posted December 22, 2020 Centre detent potentiometers are readily available Miss prism. Using a quality stereo audio type and paralleling up the two would reduce any tendency for wiper wear to affect output . 1 Link to post Share on other sites More sharing options...
Miss Prism Posted December 23, 2020 Share Posted December 23, 2020 Thanks. How insensitive is OA1 to any ripple on the + and - 12V rails? Link to post Share on other sites More sharing options...
AndyID Posted December 23, 2020 Author Share Posted December 23, 2020 27 minutes ago, Miss Prism said: Thanks. How insensitive is OA1 to any ripple on the + and - 12V rails? As long as the ripple is all above 12 volts it's not sensitive but you'll need to have constant 12 volt reference voltages on VR1. The version I made 40+ years ago only output one polarity and used a two pole switch at the track connection for direction control. You could also just connect one end of VR1 to zero volts and use a switch to connect the other end to plus or minus 12V. The single polarity version would still need plus and minus 12V (15V would be better) but one side would only need to be cable of delivering a small current - 100mA would probably more than enough. 1 Link to post Share on other sites More sharing options...
AndyID Posted December 23, 2020 Author Share Posted December 23, 2020 2 hours ago, Nimbus said: I recall prototyping something along these lines about 30 years ago. There was then a TDA-something from Thomson-CSF which was an integrated 741 plus power stage in a package with a heatsink. My feedback element used an operational transconductance amplifier, in an attempt to get an auto-adjust of the resistance compensation. As far as I recall, my tests with a nearly new Hornby Class 29 revealed it approximated zero velocity by vibrating back and forth by about 6mm. I was strangely delighted for the remainder of that afternoon! I eventually concluded that compensation ideally needed to counter wiring/track/wheel resistance for perfect compensation, and it would be difficult to pre-judge the variation over a layout. It's still in a cupboard somewhere... The Nim. I'm not sure how you could evaluate the motor resistance after it started, but these days you could do the whole thing with a micro-controller and sense the motor's resistance before it started. OA2 actually does a sort of transconductance thing. It measures a voltage which represents a current to produce a voltage which is converted into a current that feeds into a current summing node Link to post Share on other sites More sharing options...
AndyID Posted December 23, 2020 Author Share Posted December 23, 2020 (edited) 4 hours ago, CourthsVeil said: My, what a speedy follow up! Thanks a lot. Will try to realise it - have just to wait for the components (will be ordered after postal services have calmed down ...). Regards Armin Hi Armin, I think you were most interested in the power amp section. That's just one of many ways to do it. You could also use a NPN Darlington transistor and a PNP Darlington transistor. The slightly odd combination of PNP and NPN transistors I have used has a bit less voltage drop than Darlingtons. BTW, the collectors of the TIP transistors will electrically connect to the heatsink, but that's not a problem as both collectors are connected anyway. You can bolt both of the TIPs to a single heatsink without any electrical insulation. Cheers, Andy (Snow expected here on Friday.) Edited December 23, 2020 by AndyID Typo, as usual Link to post Share on other sites More sharing options...
DCB Posted December 23, 2020 Share Posted December 23, 2020 (edited) I am just a bit confused about the power unit required, presumably its a 12-0-12 volt three wire feed which are a bit rare on mode railway power supplies. Do you hay recommendations? I like the idea of putting a lolng extension lead between speed potentiometer and main unit as a walk about controller... Edited December 23, 2020 by DavidCBroad Link to post Share on other sites More sharing options...
AndyID Posted December 23, 2020 Author Share Posted December 23, 2020 58 minutes ago, DavidCBroad said: I am just a bit confused about the power unit required, presumably its a 12-0-12 volt three wire feed which are a bit rare on mode railway power supplies. Do you hay recommendations? I like the idea of putting a lolng extension lead between speed potentiometer and main unit as a walk about controller... Yes, three wire 12-0-12. You can do that with two 12 volt wall-worts as long as their outputs are floating. They need to be around 1 amp. You can also do it with a center-tapped secondary, a bridge rectifier, some bigish caps and two voltage regulators but only if you know what you are doing with 240 volts AC (it's "only" 120 here, but still potentially lethal.) I've not tried the long extension idea but it should work. It might need a couple of bypass capacitors to decouple electrical interference. It would also be best to use a lower resistance potentiometer. That would be less susceptible to interference. The circuit can be modified to work with a lower resistance speed control. Speed is determined by the current sourced or drained from the virtual earth. The ends of the VR1 could actually be at plus and minus 5 volts. You just need to scale R1 to source or sink the desired current. You can also leave out all the feed-forward stuff if you just want to use it as a plain DC controller. You get that if you simply remove VR2 but OA2 is useful as part of a way to prevent overload. I think I have a way to do that. It should be in the next version. Then, hopefully, I'll do some actual testing to find out if it actually works or if I'm talking complete nonsense (as has been known). 1 Link to post Share on other sites More sharing options...
AndyID Posted December 23, 2020 Author Share Posted December 23, 2020 Theoretically I've added some over-current protection in this version. It should "fold back" which means that in the event of a short-circuit it doesn't just keep pumping out a constant current. It actually reduces the current until the overload is removed. But be warned. This is a bit sketchy. I have not tested this so far. It might look a bit complicated but it really isn't. OA3 just inverts the output from OA2. OA4 trips if the current gets too far ahead of the voltage (assuming I got it right ) 1 Link to post Share on other sites More sharing options...
Stevebr Posted December 23, 2020 Share Posted December 23, 2020 This is looking pretty cool. Looks like a January project for me Link to post Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now