Pages: [1]   Go Down
Author Topic: Running DC Motor with H-Bridge Circuit  (Read 1244 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all,

I'm trying to use the following circuit diagram (picture attached) to run a 12v DC motor in alternating directions, controlled by an Arduino board. The circuit works well when either side of the transistor pair is attached to the motor independently, however, when the circuit is fully wired so that both transistor pairs are attached to the motor, it doesn't run and at least one transistor begins to put off a none-too-pleasant odor. I've looked over the diagram and my wiring several many times at this point and I cannot seem to figure out why this would be happening.

Does anyone have any idea where the problem may lie?

One note about the diagram: I have followed it faithfully except for the device between the H-bridge and the Arduino board. I have omitted this element and am sending a 5v signal directly from the Arduino board via digitalWrite(). I am also not using the capacitor attached to the power source the diagram calls for. Here is the full testing code I'm using, which should cause the motor to run in one direction:


const int transPin2 = 2;
const int transPin4 = 4;

void setup() {
  pinMode(transPin2, OUTPUT);
  pinMode(transPin4, OUTPUT);

}

void loop() {
  digitalWrite(transPin2, HIGH);
  digitalWrite(transPin4, LOW);
 
}


Thanks for any tips or help identifying what I'm overlooking.


* H_Bridge2.jpg (28.78 KB, 799x417 - viewed 48 times.)
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 201
Posts: 8653
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It is my impression that a HIGH voltage in the base of a P-channel MOSFET will turn it OFF.  That would mean that turning Q4 on would turn Q1 off.  Similarly turning Q3 on would turn Q2 off.  If both outputs are LOW the two upper transistors are ON and both lower transistors are OFF.  Similarly, if both outputs are HIGH the two lower transistors are ON and both upper transistors are OFF.

The problem comes when one output is HIGH and the other is LOW.  This will cause a direct short through Q1/Q3 or Q2/Q4.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

0
Offline Offline
Tesla Member
***
Karma: 141
Posts: 9470
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Simple internet h-bridge diagrams don't seem to actually work in real life. I don't know how the control chip works, but sounds like control lines to the transistors may have some floating voltage causing the short circuit condition. The PNP transistors may be the ones getting overheated (that has been my experience in my brief DIY h-bridge tinkering) and subsiquently damaged.
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

United Kingdom
Offline Offline
Tesla Member
***
Karma: 223
Posts: 6593
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

For that to work, you need to connect the gate of each P-channel mosfet to the gate of the N-channel mosfet on the same side of the bridge, not to the one on the opposite side as you have now. So each output of the driver chip will drive one of the mosfet pairs.
« Last Edit: November 20, 2012, 05:20:10 am by dc42 » 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.

Pages: [1]   Go Up
Jump to: