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

Motor controller circuit only half works!

  1. Apr 1, 2012 #1
    So I am trying to make a motor controller circuit. The idea is, that when the polarity is in one direction, the motor turns one way (which you can vary the speed) and when the polarity is switched, it turns the other way (which again, you can vary the speed). Also LED lights illuminate brighter based on how fast the motor is going.

    The thing is. When the battery is in one polarity, the circuit works EXACTLY how I want it to. You can vary the speed, and the LED dims when the motor gets slower. But when I switch the polarity, and the other half of the circuit is at play it does not work so well. Basically the motor is either "on or off" and there is very little room to vary the speed. Also the light doesn't dim.

    Here is an image of my circuit...
    http://img442.imageshack.us/img442/3249/motorcontroller.gif [Broken]
    So basically the RED circuit works EXACTLY how I want it to, but the BLUE circuit has the problems I described.

    It would be EXTREMELY helpful if someone could tell me why this doesn't work. Also keep in mind I am new to this so try and dumb it down a bit! :]

    Last edited by a moderator: May 5, 2017
  2. jcsd
  3. Apr 1, 2012 #2
    It would help if you could post voltages at the nodes in both the red circuit and blue circuit.
  4. Apr 1, 2012 #3
    What happens if you reverse the polarity of the LED in the blue circuit?

    Also in the top circuit the PNP collector is connected to 9V and the cathode of the blue LED is tied to ground, but in the lower circuit both the collector of the PNP transistor and the cathode of the blue LED are tied to ground. Perhaps if you showed the wiring to all the nodes instead of using 9V and gnd, it might be more obvious.
    Last edited: Apr 1, 2012
  5. Apr 1, 2012 #4
    I will try and get the voltages today.

    The LED light behaves the same as the motor. It brights up when the motor is on and goes out when it isn't on. But there is hardly a gradient between off and fully on. The motor and LED bright up very quickly giving little control over the speed/brightness.
  6. Apr 1, 2012 #5
    I thought it would be confusing if I just switched the polarity without switching the grounds to +9V. The LED in the blue circuit should be +9V. Guess I missed that one! :p
  7. Apr 1, 2012 #6
    With this circuit I get about the same voltages but opposite sign when the polarity of the battery is reversed, but I don't see much speed variation. What is the purpose of the 560 ohm resistor? How much current does the motor draw?

    Attached Files:

  8. Apr 1, 2012 #7
    I put the 560 resistor there for when the potentiometer is at zero there is still something there to limit the current to the base of the PNP transistor.

    As for the motor, the specs say at no load it draws 270mA. The circuit I have has very nice speed control when the battery is in one direction (RED circuit) but very poor speed control when the battery is in the other.

    (If need be I can take a video)
  9. Apr 1, 2012 #8
    Why isn't there a 560 resistor in series with the base of the NPN transistor then? Try your circuit with the changes I made to it and see if it works any better. Note, the 500 ohm resistor in my circuit represents the motor. Given the value of 270 mA for no load motor current, it should be about 33 ohms.

    You also might try putting a forward biased diode in series with each collector. In other words with the NPN transistor the diode would have the cathode connected to the collector but with the PNP, the anode would be connected to the collector. This should prevent the forward biasing of the C-B junction when the voltage across that transistor is reversed.
  10. Apr 1, 2012 #9
    You're right there should definitely be a resistor there. I think I put one there at one point but later I forgot why and removed it haha.

    Would the diodes really do anything though? Because when the polarity is reversed it will apply an opposite voltage to the base of the transistor, so the transistor wouldn't conduct current regardless right?

    What are the differences between your circuit and the one I have? I went to go change it but everything seemed to be pretty much the same. (I am probably overlooking something.)

    I really appreciate your help thus far :]

    The voltage between the base of the PNP transistor and +9 volts at the battery starts out at around 6 when the motor is off and the potentiometer is at full resistance. When I turn the potentiometer slightly the voltage doesnt move, then all of a sudden the motor kicks on as I am turning the potentiometer and the voltage drops and stays around 3.4 volts. From this point on if I move the wiper any more, the voltage remains the same. (Meaning there is a very small window that actually had a "gradient" effect from OFF to full ON. Why isn't the potentiometer changing voltage smoothly and throughout the whole range of motion of the wiper?

    Also the LED "fades" on. It doesn't just switch on when I complete the circuit.
    Last edited: Apr 1, 2012
  11. Apr 1, 2012 #10
    Let's consider the red circuit. The NPN transistor is functioning normally. When the voltages are reversed, the collector of a PNP transistor acts like the emitter and the emitter like the collector. In other words what you have is as if your PNP transistor had its emitter connected to 9 V and the collector connected to the motor. The major difference is that the transistor has much less gain in this configuration. A diode in the collector circuit will prevent that from happening.

    The differences are that in my circuit the polarity of the blue LED is reversed and that the collectors of the two transistors are tied together to Vcc and the bottom side of both LEDs are tied to ground. In your red circuit, the one that is working, the two collectors are tied together and the bottom side of both diodes are connected to ground just like my circuit. But in the blue circuit the PNP collector is tied, not to VCC but to ground along with the bottom of the LED.
  12. Apr 1, 2012 #11
    I have tied the collectors together and fixed the LED orientation and sadly it did not fix the problem :[. The potentiometer seems to have no effect on the speed anymore. I also do not have diodes at the moment (unless LED's would work..)

    I am trying to troubleshoot this. I am confused about these results.
    -When I disconnect the wire coming from the battery and going to the potentiometer (R1 in your circuit) the motor still runs.
    -I then disconnect the LED and the motor picks up speed a lot.
    -If I leave the LED and disconnect the transistor entirely (remove it) then the motor drastically reduces speed.
    -If I disconnect both at once then the motor goes off.
    (All this is done while the wire to the pot is disconnected.)

    Also now my RED circuit has the same problem as the blue since I connected the collectors. I put the collector back the way it was and the RED works again. I am so confused as to why this is happening! :\
    Last edited: Apr 1, 2012
  13. Apr 1, 2012 #12
    I really do think the transistor that should be off is leaking current and that the collector diodes will help.
  14. Apr 1, 2012 #13
    I will try using collector diodes later when I get home. (I dont have normal diodes at the moment so I will use LEDs.)
  15. Apr 1, 2012 #14
    So I put in collector diodes (I used LED's) and these were my results.

    The diodes had a small effect on the red circuit, the circuit still works exactly how I want it to except the motor seems to have SLIGHTLY less power.

    The blue circuit would not work at all. I removed the diode attached to the NPN collector (And replace it with just a wire) and it worked again.

    This doesn't make any sense to me, that would mean the NPN transistor is conducting, and is vital for the blue circuit to work. (Since blocking the collector caused it to not work entirely)

    The main problem is that the potentiometer simply is not changing the voltage at the motor. With the red circuit, the voltage at the motor is variable with respect to the wiper. But with the blue, it is constant at around 1.1V.
  16. Apr 1, 2012 #15
    I would like to see your circuit as it is now. Could you please draw out the schematic and post it.

  17. Apr 1, 2012 #16
    Well I keep making these changes and then switch it back. For example, when I connected the two collectors together, my red circuit didn't work too well anymore so I switched it back. I tried putting the diodes in, it made my blue circuit not work anymore so I switched it back. So now it is pretty similar to the original.

    I can make a video if need be.
  18. Apr 10, 2012 #17
    I thought I would report back to this thread. I have figured out the problem finally!

    The collector diodes were definitely good advice as I did that and it stopped the back leakage through the NPN.

    But the problem was the potentiometer! Eventually the thing just went out completely and I put another one in there and now the whole circuits works perfectly!

    Thanks SO MUCH for all your help! :D
  19. Apr 10, 2012 #18
    Congratulations! But how was it that the potentiometer worked okay with the red circuit but not with the blue circuit?
  20. Apr 10, 2012 #19
    I know once I shorted it by mistake (Puff of smoke came out of it) and I thought "it works okay still, I will continue to use it." Not a good idea.

    What is probably happening is this potentiometer has a much slower control than the previous one. (It is a screw type, I need to turn the screw many times with a screwdriver to vary the resistance) What was happening before was the blue circuit didn't have much control over the speed while the red circuit had more control. The potentiometer I had before was much faster, meaning a small twist and the resistance increased by a few thousand ohms. While this new one, I need to turn the screw many times to have an increase of the same amount. So the blue circuit STILL has less control, but since the potentiometer is much slower the motor isn't turning on so quickly and it is much less noticeable.

    I also stopped the leakage current, maybe that did something too.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook