Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Designing Motor Driver Circuit

  1. Feb 1, 2010 #1
    Hey, i'm looking for some ideas how to design a motor driver for a pair of DC motors. They have a input variable voltage of 0v-3.3v. When the input voltage is half (about 1.6v) the motor should stop, but if it is any greater than 1.6v it will go forward, below 1.6 it will go backward. 0v should go backward at full speed, and 3.3v should go forward at full speed. I dont know why, but im having a real brain fart this morning and am looking for any general ideas, or what blocks i would need to do this (all i have so far is a voltage follower buffer from the power inputs)

    The micro would be varying the voltage to control the direction and speed, but would I need to use comparators to do this? I found an H bridge motor driver circuit, but it looks like that is controlled by PWM http://www.societyofrobots.com/schematics_h-bridgedes.shtml

    Any input is appreciated"[URL [Broken]
    Last edited by a moderator: May 4, 2017
  2. jcsd
  3. Feb 1, 2010 #2


    User Avatar

    Staff: Mentor


    Yes, you need to use PWM to vary the speed of the motor. Voltage variation is generally ineffective, and is not used. So just have your uC digitize the variable input voltage, and use that to control the PWM polarity and duty cycle.
    Last edited by a moderator: May 4, 2017
  4. Feb 1, 2010 #3
    i spoke to one of my professors today concerning it, he said that we were meant to try to use a window comparator, and then two op amps to vary the voltage potential on the two sides of the motor (a completely analog solution).

    It is a group project that we are making a line following robot, and the different group members have to output and take specified inputs. The specified input I get is a 0-3.3Vdc input. The important part is that my section of the project works stand alone, so that I can simulate inputs and show that my outputs are correct.

    I was told that most people get a 2nd micro, and use an ADC to make their own PWM output, and direction bit to control an H bridge, which is most likely what I will fall back on... if i have trouble with the window comparator. Google here I come.
  5. Feb 1, 2010 #4


    User Avatar

    Staff: Mentor

    Sounds like your prof isn't familiar with how to drive DC motors.... :rolleyes: or else he is thinking of something that I'm not understanding.

    If you would prefer to generate the PWM signals in a more analog fashion, you can use a technique that is used in switching power supply designs often. You can compare a triangle wave against the DC voltage level to give you a varying PWM signal that varies with the DC voltage.

    Draw a triangle wave, and then draw some horizontal lines through the tri wave. You can see that the higher the horizontal (DC) voltage is on the tri, the less time the tri is above it. If you square up the comparison of the tri wave and the DC voltage, you can see what kind of PWM waveforms you will get out of the copmarison.

    So now you can think of what kind of other circuitry you can add to the output of the tri vs DC comparator circuit, in order to generate the correct polarity PWM signal to your H-bridge motor drive circuit. At least your prof is right that you will need some window comparators... One for high input DC, one for low input DC, and one for the middle window area where you want the motor off...

    Can you post a block diagram of such a circuit?
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook