2
\$\begingroup\$

I am trying to make a DC motor controller with an H-bridge and PWM powered. The circuit diagram for the motor controller is:

circuit diagram

The inputs can obviously only be on 1 at a time to prevent short circuit. I am connecting the motor across where the two open circuit nodes, and if I measure the voltage across these two nodes without any motor connected the output is basically just the 5V PWM signal amplified to 12V - which is what I want. The problem arises when I connect the motor across:

oscilloscope output

Yellow curve is the input, blue curve is the motor output. As it can be seen, it is somewhat okay when the input is HIGH, but when the input is LOW, the voltage across the motor is zero for a little while, and after a bit of time it is then non-zero, even though the input is 0. Should be noted that the other input is grounded. Does anyone have any idea on how to mitigate or remove this non-zero period where it should be zero? Thanks

\$\endgroup\$
9
  • \$\begingroup\$ Is that the same in the other direction? It really looks like the bridge is staying half on. \$\endgroup\$
    – R Drast
    Commented Apr 10, 2015 at 11:41
  • \$\begingroup\$ Let me try and set it up again and I'll post the picture. Do you mean if I ground input 1 and try input 2 instead? \$\endgroup\$
    – Martin
    Commented Apr 10, 2015 at 11:48
  • \$\begingroup\$ It seems to do the same \$\endgroup\$
    – Martin
    Commented Apr 10, 2015 at 12:06
  • \$\begingroup\$ What about with a resistive load instead of a motor, what is the waveform then? What about with no input, does it stay at 50% across the motor? You might just be looking at the CEMF of the motor. \$\endgroup\$
    – R Drast
    Commented Apr 10, 2015 at 12:12
  • \$\begingroup\$ Tried both a 10k and 470k instead of motor, it outputs the amplified squarewave too (imgur.com/QrrBG7I). With no input at all, the output is 0. I did think I was having some EMF action going on, but is there any way to counteract or mitigate it? \$\endgroup\$
    – Martin
    Commented Apr 10, 2015 at 12:20

3 Answers 3

2
\$\begingroup\$

I think you will find that the "0V" portion is not really 0V but actually -0.7V (you can see on the image it is somewhere below 0V, check the scope setup to be sure) and that is the back-EMF spike from the motor's inductance turning on the MOSFET's body diode.

V = -L * dI / dT

As the body diode limits the voltage (a good thing, it could be a few hundred volts otherwise, and destroy the transistors!) the pulse width lasts until the current has fallen to 0. This pulse width will depend on the motor inductance and the current; it probably increases as you load the motor.

Then, with both transistors off, you see the voltage generated by the motor. The only way to eliminate this is to stop the motor - it is proportional to speed. So again, as you load the motor you will slow it, and see the reduction in generated voltage.

You could even sample this voltage during the PWM "off" period to measure the actual motor speed.

The initial peak and decay on the "high" portion of the waveform is again related to the motor's inductance - when the MOSFETs first turn on, the inductance presents a high impedance, so the supply is lightly loaded and the voltage across the motor is high. As the motor current increases, the voltage drops.

If you can see this peak and decay on the incoming power supply, you can improve performance by adding decoupling or using a lower impedance PSU. If you can't, that suggests some voltage is being dropped across the MOSFETs, and you can improve performance using FETs with lower ON resistance.

\$\endgroup\$
0
\$\begingroup\$

When it is not connected to a motor the output voltage is ok,but when it is connecting to a motor the voltage drop means,the motor is not getting required current. So change mosfets to higher current ratings.

\$\endgroup\$
2
0
\$\begingroup\$

The inputs to the bipolar transistors are reversed. I'm assuming everything is n channel and npn. when each bipolar transistor turn on, in your schematic, the mosfet it's controling turns off. unless the top 2 mosfets are p channel, then it should work and I can't help.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.