Electronic – Using L293 H-Bridge to drive DC motor with PWM


I want to drive an DC motor with ability both to change direction, and torque. Obvious solution: PWM + H-Bridge. I've been planning to use a PSoC4 for controller, and L293DNE for the H-bridge, which seems like a pretty standard choice. I've been pondering choosing some circuit to drive power supply with PWM, but reading the L293DNE datasheet, I saw it has 'Enable' pins – 1,2EN, 3,4EN.

enter image description here

Can I just drive the EN pin with PWM signal to achieve variable torque/speed, or will that cause problems, e.g. faster overheating or something like that? Are there other caveats I should consider (e.g. 'fast motor stop' instead of just 'power disconnected' resulting in some weird dutycycle:torque curve?) Should I add some more circuitry besides what's pictured if I drive 'EN' with PWM?

Best Answer

You will experience some significant performance issues if you were to use the EN for PWM.

If you look at the datasheet, especially the part you provided in the OP:

enter image description here

the EN pin doesn't just stop sourcing/sinking power (ie the FET's are not gated), it creates a "Fast motor Stop" condition which basically means BothTop or BothBottom switches are enabled. This essentially shorts out the machine windings and it rapidly stops the rotor.

As a result if you were to use such a pin for PWM you would be continuously stopping