Electronic – How many control pins needed for L298N H-Bridge

h-bridgel298motor

I have a simple robot with two DC motors. Using the L298N Dual H-Bridge, what's the minimum number of control pins I can use to give me forward, back and turn?

Here's a typical setup for the chip. It looks like I'll need 6 control lines to control 2 motors.

If I tied Ven high and relied on the "C=D Fast Motor Stop" when idle would this be bad?

http://letsmakerobots.com/files/userpics/u4107/L298N.png
http://letsmakerobots.com/files/userpics/u4107/L298N.png

Best Answer

With two pins you have full control. This allows both forward, reverse and stop. if you want to allow coasting, you will need three pins to bring Ven low. If you do not need fast stop, you could use an XOR to control the Ven from the 2 control lines. When they are equal drive t low. Then it has forward reverse and coast.

If you hold Ven High when you decide to stop moving it will full brake. If you use a simple XOR gate to do the Ven signal then you can only coast. It is decided based on what you want the motor to do. If you need the option, use three lines. from a micro this is almost no cost.