Go Down

Topic: H-bridge failed! (Read 497 times) previous topic - next topic

Tom-4

May 10, 2020, 10:25 am Last Edit: May 10, 2020, 11:37 am by Tom-4
Hello everyone, as my circuit describes itself, nothing is so complicated. A simple H-bridge circuit which controlled by arduino nano, two digital pins and two pwm pins.
My problem is, when I powered the circuit, I got a short between 12V and GND... by troubleshooting I found that Q2 is  shorted, so I threw the whole board and soldered a new one, but, I got the same thing again!

Can someone tell me where's my wrong?

P.S. Q1 and Q2 are IRF4905
    Q3 and Q4 are IRLZ44
    T1 and T2 are BC548
    T3 and T4 are 2N3906


EDITED.
I used a simple code as a beginning.

Code: [Select]

#define S1_pin 2
#define S2_pin 3
#define PWM1_pin 5
#define PWM2_pin 6

void setup() {
  Serial.begin(9600);
  pinMode(S1_pin, OUTPUT);
  pinMode(S2_pin, OUTPUT);
  pinMode(PWM1_pin, OUTPUT);
  pinMode(PWM2_pin, OUTPUT);
  digitalWrite(S1_pin,LOW);
  digitalWrite(S2_pin,LOW);
  delay(25);
  analogWrite(PWM1_pin, 255);
  analogWrite(PWM2_pin, 255);

void loop() {
  }

 


Regards,
Tommy

MarkT

#1
May 10, 2020, 11:28 am Last Edit: May 10, 2020, 11:29 am by MarkT
Circuit is wrong.  Q2 is wired to 12V, so it will pull the Arduino pin up to 11.3V or so, not good news, though R4 probably saved the Arduino from instant failure.

Where did you find this circuit?
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Tom-4

I just made it myself based on many circuits which found in datasheet. But I didn't understand where's the wrong in connecting Q2 to 12V. Arduino pin isn't connected to Q2, but to T2.
Q2 Vgs is -11.981v according to simulator which I tested the circuit with before building.

MarkT

Whoops, I meant T3, the PNP device which is shorting the Arduino pin to 12V via 150 ohms.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Tom-4

First of i reattached the schematic, I just noticed that it was on 2 pages.

Whoops, I meant T3, the PNP device which is shorting the Arduino pin to 12V via 150 ohms.
Am I shorting it?
 

MarkT

Do you understand about Vbe voltage drop being about 0.7V?

Anyway the circuits just wrong.  Typically the lower n-channel MOSFET would be logic-level and driven
direct.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

wvmarle

Yes, that's a short to 12V.

A BJT transistor looks a bit like two diodes in opposite direction. So the EB junction of T3 (and T4) is like a diode pointing towards the Arduino. The second diode would be the CB junction. An NPN is likewise but in the opposite direction.

Drop T3 and T4, connect the gate of Q3 and Q4 to the Arduino pin directly. The IRLZ44N will be fully on at 5V on the gate.

Note that Q1 and Q2 are slow to turn off, as the gate is discharged through R5. It will turn on fast, as it's charged through T1 with no current limiting resistance.

Q3 and Q4 will switch faster as the gate is charged and discharged though just a 150R resistor, after correcting the circuit.
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.

Tom-4

Do you understand about Vbe voltage drop being about 0.7V?
Ya ya... now I got what you mean... It was so stupid to use PNP transistor which leads Ib to arduino output pin!

Typically the lower n-channel MOSFET would be logic-level and driven direct.
Can N-ch mosfet with Vgs 5V control 12V load?

Anyway the circuits just wrong
Is it correct now?
New schematic below

MarkT

#8
May 10, 2020, 12:05 pm Last Edit: May 10, 2020, 12:06 pm by MarkT
Ya ya... now I got what you mean... It was so stupid to use PNP transistor which leads Ib to arduino output pin!

Can N-ch mosfet with Vgs 5V control 12V load?
Absolutely, the source-drain voltage is what matters for the load.
Quote
Is it correct now?
New schematic below
No, even more disasterous error, you've shorted the gates to ground!  And you've used an emitter follower which is not needed at all, nor is it a switching circuit.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Tom-4

Drop T3 and T4, connect the gate of Q3 and Q4 to the Arduino pin directly. The IRLZ44N will be fully on at 5V on the gate.
Thank you for your reply. I thought of doing this but as datasheet paragraph says, at 5V on Vgs, the mosfet can't drive 12V load with full amperage. the current will be limited.
One more thing, in my plan Im not going to use IRLZ44N, not IRL4905 neither! they suck! But as they are DIP components so I can use them as far as I'm testing circuits home.
Can you please chech the 2nd schematic and tell me what do you think?
Thank you in advanced.

Tom-4

Absolutely, the source-drain voltage is what matters for the load.No, even more disasterous error, you've shorted the gates to ground!  And you've used an emitter follower which is not needed at all, nor is it a switching circuit.
So just controlling the two n mosfet gates direct like this?

wvmarle

Yes, but do bring back the pull-down resistors on the gate. Don't ever leave a gate floating (and they will be when the Arduino is powered down or just starting up).
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

#12
May 10, 2020, 12:51 pm Last Edit: May 10, 2020, 12:53 pm by TomGeorge
Hi,
Ops schematic.


It would be preferable if you exported your schematics as jpg.

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

Wawa

The gate of Q1 is pulled down strongly with the force of a hard driven transistor,
but pulled up weakly with a 4k7 resistor.

Would be better to even that out somewhat.
Change R5 to 470 ohm (or 1k), and R1 to 4k7 (or 10k).
Same for the other side.
Leo..

raschemmel

#14
May 10, 2020, 10:13 pm Last Edit: May 10, 2020, 10:20 pm by raschemmel
Silly question but why is there no motor shown in the schematic ?



Go Up