# h bridge question

I just ran into this by accident, but apparently, an h bridge can run two independent motors at once. My question is tho, since the h bridge has a pin for ic power (+5v) and another on the opposite side for motor power, does the motor power pin power both motors? or does the ic power pin act as the motor power pin when working with two motors at once (im asking because it seems suspicious how these two are the only pins opposite each other, which differ in function according to this diagram: http://itp.nyu.edu/physcomp/images/labs/hbridge_labpinout.jpg )?

You are right - pin #8 on the L293 IC is for powering the motors. Those chips work like this - if you have enabled the specific “terminal” (1,2EN or 3,4 EN is high) and if you provide +5v to an A pin (1A, 2A, 3A, 4A) then current will flow from pin 8 to the respective Y terminal.
An example - 1,2EN is high, 1A is high, then 1Y will be providing power. If you put 1Y high and 2Y low then the current will flow from 1Y to 2Y and the motor (if it’s simple brushed DC) will turn in one direction. Doing the opposite - 2Y high, 1Y low - will turn the motor the other direction.
There is a severe limitation to how much current can flow through this chip - it is stated somewhere in the datasheet, but usually you can safely drive something small, without overheating and blowing it up.

yeah, thanks for clearing that up - ive been using h bridges to only half their ability apparently (literally), atleast now i know i can save some space when building ESC circuits…

btw - just an addon question - if two 5v motors will be driven through the single hbridge, should i supply 10v or 5 v to pin 8? (my guess is 5v, but just in case…)

Only the motor power pin is used to power the motors.

You should use 5V for 5V motors. That 5V will be applied to both motors (well…minus losses in the driver itself, which can be pretty significant). You will probably get more power out using 10V (or so) and using PWM at 50% duty cycle (or so) to get approximately 5V on average delivered to the motors.

Don’t freak out about applying 10V to 5V motors, as long as you don’t exceed an AVERAGE voltage of 5V you will be fine (motors are mostly destroyed by current, not voltage). 50% duty cycle X 10V → 5V average voltage.

Also, the datasheet lists the middle two pins on both sides of the hbridge as “heatsink/gnd” pins… I have always used these pins as gnd, but should I connect one to a metal plate or something?

Can’t hurt to connect to a metal plate…it will help remove heat away from the L293.

but should I connect one to a metal plate or something?

You should connect both of them to ground. You need both connections to handle the current inside the chip.

Then, if you want connect to a heat sink. In a PCB you would make this area large to take the heat away and maybe clamp a heat sink to it.

if you use a seperate power source for the motors than the one coming from the board, should you connect the gnd pins of the l293 differently ? and it is in that case still necessary to protect the board from voltage spikes with a capacitator ?

my example is here, itp.nyu.edu/physcomp/Labs/DCMotorControl
I was just wondering how to drive the motor using an external power supply.

thanks [ electro newbie btw ]

if you use a seperate power source for the motors than the one coming from the board, should you connect the gnd pins of the l293 differently ?

and it is in that case still necessary to protect the board from voltage spikes with a capacitator ?

Always a good idea, see:- De-coupling

and while you are at it:-
http://www.thebox.myzen.co.uk/Workshop/Motors_1.html

thanks!!!

This is an old topic, but I need to resurface it…

Only the motor power pin is used to power the motors.

You should use 5V for 5V motors. That 5V will be applied to both motors (well…minus losses in the driver itself, which can be pretty significant). You will probably get more power out using 10V (or so) and using PWM at 50% duty cycle (or so) to get approximately 5V on average delivered to the motors.

Don’t freak out about applying 10V to 5V motors, as long as you don’t exceed an AVERAGE voltage of 5V you will be fine (motors are mostly destroyed by current, not voltage). 50% duty cycle X 10V → 5V average voltage.

To what pin do I apply the PWM set to 50%? To the one of the logic pins?

You are going to pulse one of the logic pins. Do you have a data sheet for your H-bridge?

its the standard Texas Instruments L293NE or a Texas Instruments SN754410, forgot which one I had but they are identical… thanks for the reply, I figured it out while messing around last night…