Electronic – DC Motor giving poor output waveform – how to fix

dc motorh-bridge

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

Best Answer

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.