Electronic – PIC H-Bridge: PWM doesn’t ground on 0 Duty cycle

h-bridgepwm

Good day everyone,

I am following this guide to build an H-Bridge: http://www.mcmanis.com/chuck/robotics/tutorial/h-bridge/bjt-use.html.
I finished building it and it works, exept if I want to use a PWM Pulse. I connected the ENA cable to the PWM port on the PIC. However, when I output a 0% duty cycle, the PWM port still has an voltage on it (1V), thus the DC Motor will not turn, because the PWM port doesn't ground the ENA signal.

Is there a flaw in the design? Should I use an extra NPN transistor connected to ground, with the base connected to ENA?

enter image description here

Best Answer

You didn't say what output you are using on what PIC. You may therefore be asking this output to sink too much current. Worst case you're running the PIC from 5 V. Driving the ENA output line low puts current thru two LEDs. These are likely IR LEDs inside opto-isolators, so let's say they drop 1.2 V. That leaves 3.8 V across each 470 Ω resistor, which means the current is 8.1 mA. Both those together require the PIC output to sink 16.2 mA.

Some can do that, some can't. Check the datasheet.

Also, this motor driver is intended for basic on/off forward/backward operation. The response to the ENA input will be quite slow. It is not meant to be switched "quickly", as is needed to support proportional drive via PWM.