Pages: [1]   Go Down
Author Topic: H-bridge power issue  (Read 1058 times)
0 Members and 1 Guest are viewing this topic.
Montreal
Offline Offline
Full Member
***
Karma: 4
Posts: 181
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I built an H-bridge with 4 transistors to control a DC motor, and it's working fine but there's a loss of power somewhere in the circuit and thus I'm not getting enough power for the motor. The transistors I'm using are PN2222A. In the attachment is schematic for half the H-bridge that seems to lose the power somewhere. If I connect the motor straight to 5V and GND it's fine. Any ideas how I should build the H-bridge to drive the motor that doesn't lose so much power?

I'm trying to learn the basics here so if someone could explain what's going on it would be nice (:

Thanks, Jarkko


* half-hbridge.jpg (163.42 KB, 1024x768 - viewed 23 times.)
Logged

Montreal
Offline Offline
Full Member
***
Karma: 4
Posts: 181
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I tried to also use L293D as well, but it has the same issue.
Logged

The Netherlands
Offline Offline
Edison Member
*
Karma: 50
Posts: 1708
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Did you take the voltage drop over the transistors in account ?
Logged

Have a look at "blink without delay".
Did you connect the grounds ?
Je kunt hier ook in het Nederlands terecht: http://arduino.cc/forum/index.php/board,77.0.html

The Netherlands
Offline Offline
Edison Member
*
Karma: 50
Posts: 1708
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The motor draws a current of 0,78125 A @ 5 volts, according to your drawing.
But it will need more to start.
Your transistors and the L293D aren't capable of that.

If i read correct earlier today, those transistors can handle 800 mA.
Wrong, that's the 2N2222, the PN2222A is supposed to do 1 A.
So that could be OK.

The L293D can handle 600 mA.
Logged

Have a look at "blink without delay".
Did you connect the grounds ?
Je kunt hier ook in het Nederlands terecht: http://arduino.cc/forum/index.php/board,77.0.html

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27352
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Each transistor will have 0.5 to 0.7V drop across it.
If you want less drop, try a PNP transistor for the top.
Or switch to logic level, very low Rds P-channel MOSFETs for the top and N-channel MOSTETs for the bottom.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Montreal
Offline Offline
Full Member
***
Karma: 4
Posts: 181
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I wasn't aware of the voltage drop caused by transistors. I measured that for motor it's 4.08V, so ~0.5V/transistor. I tried to change the motor supply voltage to 9V to compensate the drop, but it's still exactly the same 4.08V?! Why is this?

What kind of voltage drop PNP transistors have?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27352
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Do you have a spec on your motor?

Drop across the PNP will depend on the transistor.
Generally, PNPs are used to source current into the motor while NPN sinks current from the motor.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Montreal
Offline Offline
Full Member
***
Karma: 4
Posts: 181
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm using this motor in my prototype.

Here's a little video of the prototype in action that I'm currently controlling manually:

Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27352
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Its rated 70mA-350mA, 3.7V.
You have a bunch of other stuff in your video, and you appear to be powering from USB, which has 500mA limit from a PC.
To get the higher currents for the motor, you need a better transistor:
IC = 150mA, IB = 15mA
IC = 500mA, IB = 50mA   << you have to drive the base with more current to get this kind of level.
Find better transistors that will let more current flow with lower base current. Or use logic level, low Rds MOSFETs.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6637
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You might just get that circuit to work if you replace the transistors with high gain low saturation voltage ones such as ZTX851, do away with the base resistor on the upper transistor, reduce the base resistor on the lower transistor to 220 ohms, and add flyback diodes. But you risk overloading the Arduino output pin. Far better to use a motor driver chip such as this one http://uk.farnell.com/vishay-siliconix/si9986cy-t1-e3/ic-buffered-h-bridge-1a-13-2v/dp/1612431. It has low voltage drop, so it should work OK with a 5V supply.

The L293D might also work, but it will need a supply voltage of 7 to 8V because of its voltage drop. Also the motor stall current is a bit too much for it. Another possibility is to use a L298N-based motor driver board (available inexpensively via eBay), however once again you will need to supply 7 to 8V because of its voltage drop.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Offline Offline
Jr. Member
**
Karma: 1
Posts: 83
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If he uses an NPN transistor for the top, he will have it operating as "emitter follower" which says essentially the emitter will follow the base at 0.7V less.  So if the Arduino output is 4 Volts, the best that poor top transistor can do is 3.3V.  This is why most H-bridges use a PNP pair on the top side.  If you switch to MOSFET's you still need P-Channel devices because with N-Channel, you can't get the Gate higher enough to turn it on without elaborate conversion tricks.  --Rob
Logged

0
Offline Offline
Shannon Member
****
Karma: 214
Posts: 12424
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The sort of circuit you want with discrete BJTs is something like this:



Note PNP for top-side drivers, diode bridge to stop inductive spikes burning things out,
driver stage transistors to allow 2-wire control and increase current gain.  The values
of R5 and R6 are selected according to the supply voltage, load and gain of the transistors
to put them into saturation for desired loads.

With good transistors (ie modern super-beta devices) you can get saturation losses of 0.1V
or so for small motors (compared to ~2V for a darlington H-bridges like the L293/L298D),
meaning higher currents can be countenanced without heatsinking.
Logged

[ I won't respond to messages, use the forum please ]

Pages: [1]   Go Up
Jump to: