Need DC motor bipolar variable speed controller

Discussion in 'The Projects Forum' started by Sverk, Aug 4, 2013.

  1. Sverk

    Thread Starter New Member

    Aug 4, 2013
    5
    0
    Hi,
    What would be a simple low cost circuit to run a small 12V DC motor, less than 1 amp ?
    It should be bi-directional, with speed controlled with a bipolar input voltage.
    I see that there are several ICs that control motors with an H-bridge, but they are just on-off.
    PWM is needed I guess, what would be a good IC for that?
    Or better, is there an IC that does both, I mean, voltage in - power out to the motor?
    Advice please!
     
  2. LDC3

    Active Member

    Apr 27, 2013
    920
    160
    I think that the H-bridge ICs are also designed for PWM, but I could be wrong. Anyway, you could AND the output of the IC with your PWM signal to drive the transistors.
     
  3. Sverk

    Thread Starter New Member

    Aug 4, 2013
    5
    0
    Well yes, but what I have is an analog signal that first needs to be converted to a PWM signal, right? How?
     
  4. GopherT

    AAC Fanatic!

    Nov 23, 2012
    6,069
    3,839
    This is normally done by putting the analog input into one comparitor pin and a triangle wave (generated with a pair of op amps) into the other input on a comparitor. The comparitor will generate a PWM output that you can amplify with a Mosfet H-bridge.

    That does not get you a reverse direction though. For that, you will need some additional AND gates and comparitors. I am not exactly sure what you will need with the current project description.

    The easier option is to use a Microcontroller.
     
  5. Sverk

    Thread Starter New Member

    Aug 4, 2013
    5
    0
    Yes, thanks! That makes sense. But also quite a lot of components ...
    Controlling a motor with an analog signal would seem to be (or to have been) a very common task, thus I'd expect there would be ICs that could do it all, but perhaps not?

    My project entails that the motor is geared down, moving the bridge in a model railroad turntable. Stopping positions will be marked by a LED at the perifery and the moving bridge will have a pair of phototransistors close together that detect the stopping place LED and home in to center and lock on it. The motion will be quite fast at first and then slow down during the centering Phase.

    A microcontroller? Well, yes, but I thought a simple IC or two would be better for now.
     
  6. LDC3

    Active Member

    Apr 27, 2013
    920
    160
    Here is a circuit that uses a 555 timer to create your PWM. The minimum parts needed is the 555 timer, 2 resistors (1 pot), and 3 capacitors.
     
  7. Sverk

    Thread Starter New Member

    Aug 4, 2013
    5
    0
    Thanks for the 555 as PWM controller application !
    It will of course require additional circuitry to make i work bidirectionally, but might be worth trying somehow.
    I think I should think it through again what I relly need it to do so as not to make it more perfect than necessary.
    Since I have been away from electronics for many years the 555 app note is generally useful to me as a reminder what this od standard can be used for,.
    Thanks for all the group support!
     
  8. tubeguy

    Well-Known Member

    Nov 3, 2012
    1,157
    197
    Is this a ready made turntable, or are you going to build it from scratch?
    Have you considered how to apply power to the rails and the sensor? Slip rings, powered circular rails(s) (which the turntable would rotate on,) or contacts are options.

    Do you want the turntable to be set up so you can align either end to a given track - such as for turning the engine around ?

    How do you want to select a particular turntable position ?
     
    Last edited: Aug 5, 2013
  9. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,812
    834
    Hi! Model railroader here, although I never built a turntable. But, I found this article, which addresses the requirements you have outlined. I found it by searching for "model railroad turntable indexing". The article is here: Model Railroad Turntable
     
  10. Sverk

    Thread Starter New Member

    Aug 4, 2013
    5
    0
    Hi! Here is my plan:
    The turntable will not be a visible part of the layout, it won't be for looks. Only serve in a singel-ended stage yard, connecting six incoming tracks. Using a turntable at the end of the tracks will provide loco runaround via other incoming tracks -- saves a couple of feet compared to having another yard ladder there. Importantly, it will also provide turning of steam locos.
    I will build it using a scrapped LP record player for its good bearing and the 30 cm disk, on top of which I will place a piece of track.
    I want to avoid slip contacts and will try to make the connections to the moving bridge by means of a ribbon cable, 6 to 8 leads wide. Rotation will be restricted to about a 240 deg range, thus the cable could be loosely curled up under the disk. Or if that won't work, as a last resort I could run the cables straight up to an overhead connector -- less convenient to operate of course.
    The article you referred to is very interesting reading, a real great project!
    In my case it would be overkill though.
    Its optical centering device is very similar to what I figure, however I will reverse it, put the sensors on the bridge.
    Thus I will select position with a rotary switch that simply turns on the LED at the desired track, or at 180 deg from it for turning the loco. With another switch I will start the motion in the right direction and wait for the LED to be found.
    On the underside, the disk has a nice ring about halfway in on which the drive belt used to run. I will mount a geared down small motor with a rubbery wheel (Lego!), gently pushing against the ring to drive the disk.
    It will be a while before I get this far and can get serious about the electronics.
    Some thoughts for now:
    For track power reversal I will use a DPDT relay, thrown when any of the other-end track positions are selected, by OR-ing the LEDs.
    For sensor I mean to use a pair of phototransistors, and read them with opamps in a differential circuit to get an analog bipolar error signal.
    With a small motor I figure a somewhat sturdy audio power IC with heatsinking could perhaps be sufficient to drive it in DC mode, without PWM. A too dirty fix?
     
Loading...