Go Down

Topic: PNP transistor in H bridge not closing (Read 571 times) previous topic - next topic

TomGeorge

Looking at the drawing from TomGeorge (post#10), I would suggest
1k for R1,R2,  10k for R3,R4,R11,R12,  and 220ohm for R5,R6.
I think we all have to give TomGeorge some karma for all these clear drawings he puts on this website.
Leo..
No, thank ExpressPCB....
Everything runs on smoke, let the smoke out, it stops running....

lukasz_b_g

So I built the schematic, and used the proposed resistor values.

It works,but the PNP's aren't closing, ie. the voltage drops to 0.4V, not to 0. This makes the NPN transistors heat slightly.

I could just stick some radiators on them, but I'd rather not. What should I change to make the PNP's close completely?

wvmarle

1) are you absolutely sure they're connected the correct way? Mind that the collector and emitter are reversed polarity compared to the NPNs. Double check spec sheets and so.

2) disconnect R3 or R4, then Q5 resp. Q6 should be very much closed. If not, repeat with R2 and R1, disconnecting the base of the transistor should totally close them. If still not closed, those PNPs are toast (which can very well be the case as you used to have them the wrong way around).
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

TomGeorge

#18
Jul 16, 2017, 06:26 pm Last Edit: Jul 16, 2017, 06:28 pm by TomGeorge
Hi,
What voltage, where are you measuring it.
There will be some volt drop due to the nature of BJTs.
What  do you mean by closing?
The transistors are being switched ON or OFF.
What outputs from the Arduino do you have when you measure the voltage?

Does the motor run?

Thanks.. Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

lukasz_b_g

Yes, the motor does run.

When I say closing I mean turning off.

I'm measuring the 0.4V on the collector of the PNP.

When it's on it's at 23.8V, and when it's off it's at 0.4V. I think this is what is causing the NPN to heat up.

My transistors weren't backwards in the circuit, they were backwards only in my schematic.

I checked to see if the transistors are broken, by measuring the resistance between each of the leads, and they seem ok. Anyway, if I change them out for different ones, the same happens.

And just to clarify, the 11V for the arduino comes directly from 3 Li-ion batteries, and the 24 comes from a boost converter, hooked up to the same batteries.

wvmarle

That 0.4V you're measuring is the voltage drop of the NPN that's in series with it (Q3 when probing Q5; Q4 when probing Q6). Perfectly normal, and of course that's what causes heat. The same should happen to the PNP transistors which handle the same current and will have about the same voltage drop, so dissipate the same amount of power.

How much current does that motor draw? Multiply that number by 0.4 (the voltage drop) and you have the heat in Watt.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

lukasz_b_g

The motor draws 0.41A, as printed on the datasheet, but I found it draws up to 0.5A.

BD137's are pretty big transistors, and it's getting rather warm. 0.16W seems a bit low, but maybe, that doesn't explain why the PNP's aren't heating, but ok. So I should just slap a radiator on the back and hope for the best?

TomGeorge

Hi,
Can you post the test code you are using please?
Are you using PWM?

Tom.... :)
Everything runs on smoke, let the smoke out, it stops running....

wvmarle

That current draw is probably without load. The moment you start putting a load on a DC motor the current increases. Start-up current can also be a multiple of the constant current.

Spec sheet gives 0.5V for both transistors, so both should be dissipating about 250 mW at your 0.5A current. That shouldn't make them too hot indeed. Both transistors should be taking approximately same amounts of heat.

Another thing, maybe the base current is an issue, as Wawa mentioned in #11.
To switch 500 mA you need at the very least a 5 mA base current, up to 20 mA according to the spec sheet. For larger currents, the required base current goes up fast, and your Arduino can't deliver that (the 220R resistor limits current to just over 20 mA). You may need a second transistor, Darlington configuration, to supply enough base current, and help reducing the heat.

If you have them available, maybe you could consider replacing your transistors with MOSFETs instead. They're generally better at switching larger currents.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

lukasz_b_g

I'm not yet using PWM, but I will be.
My code:
Code: [Select]
int npn1 = 12;
  int pnp1 = 2;
  int npn2 = 9;
  int pnp2 = 5;
  int power = 6;
  int gnd = 8;

void setup()
{
  pinMode(power, OUTPUT);
  pinMode(gnd, OUTPUT);
  pinMode(npn1, OUTPUT);
  pinMode(pnp1, OUTPUT);
  pinMode(npn2, OUTPUT);
  pinMode(pnp2, OUTPUT);
  pinMode(13, OUTPUT);
  digitalWrite(power, HIGH);
  digitalWrite(gnd, LOW);
}

void loop()
{
  digitalWrite(npn1, HIGH);
  digitalWrite(pnp2, HIGH);
  digitalWrite(13, HIGH);
  delay(5000);
  digitalWrite(npn1, LOW);
  digitalWrite(pnp2, LOW);
  digitalWrite(13, LOW);
  delay(1000);
  digitalWrite(npn2, HIGH);
  digitalWrite(pnp1, HIGH);
  digitalWrite(13, HIGH);
  delay(5000);
  digitalWrite(npn2, LOW);
  digitalWrite(pnp1, LOW);
  digitalWrite(13, LOW);
  delay(1000);

}


At the moment it's on an arduino UNO, with the transistors firing in pairs, as to make the motor spin.

I'm using the built-in LED on pin 13 of the uno to signal when the motor should be on.

Below I attached some pictures of the bread board, I don't know if they'll help.

Wawa

To switch 500 mA you need at the very least a 5 mA base current, up to 20 mA according to the spec sheet.
A switching BD137 needs more like 50mA base current for 500mA collector current.
Anything less will not fully saturate the transistor, and it will heat up more.
Impossible with an Arduino pin, so you have to compromise.

What OP is trying to build is discrete L293D chip.
Leo..

TomGeorge

Hi,
What  is the  POWER pin doing?

Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

lukasz_b_g

It will power a radio receiver, it's not connected yet, but this H bridge will land inside an RC car.

Wawa

A modern mosfet based driver is smaller/lighter and runs cooler.
Like this one.
Leo..

wvmarle

Still quite big!
I'm working with MOSFETs quite literally the size of a grain of rice, SMD devices, yet able to switch 5-6A.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Go Up