Introduction: BUILD YOUR OWN H- BRIDGE CIRCUIT USING NPN TRANSISTOR
Hi everyone .here i am showing my project building H-bridge circuit to control the dc motor rotation direction. In this circuit i am using 4 NPN TIP122 transistors. here i am using msp430 to produce two control inputs to access the h bridge circuit. you can use what ever microcontroller u have. just produce 0,1 bit to rotate motor in clockwise direction. 1,0 bits to rotate in counter clockwise direction and 0,0 bits to stop the motor and you can use this circuit in robot making,rc,etc to control dc motor direction of rotation. let us see the build.
Step 1: Watch the Video
In this video i used msp430 launchpad to control our h bridge circuit. the program simply produce 0,1 bit when button is not pressed. if the button is pressed it will produce 1, 0 bit output at P1.0 and P1.6. These signal control the motor rotation direction.
Step 2: Circuit Diagram:
In this diagram you can see that q1,q2,q3,q4 transistors. when P1.0 is high then the Transistor q1 and q2 on . the q2 and q3 transistor remain in off state because the P1.6 is low. then the current flow direction positive to q1 transistor and flow through motor on end and gets out motor other end and flow through q4 transistor then grounded. so the motor rotate in one direction. When P1.6 is high and P1.0 low then the transistors q2 and q3 on then the current flow through the q2 and q3 so the current flow opposite to previous one so the motor rotate opposite direction.
if you want to use the code used in this video for msp430 then it is in bellow:
Here is the program for this project. i use energia software
to program msp430 launchpad
to download energia software click the link bellow:
const int buttonPin = PUSH2; // the number of the pushbutton pin
const int motorPin1 = P1_0;
const int motorPin2 = P1_6;
// the number of the LED pin
// variables will change:
int buttonState = 0; // variable for reading the pushbutton status
void setup() {
pinMode(motorPin1, OUTPUT);
pinMode(motorPin2, OUTPUT);
// initialize the pushbutton pin as an input:
pinMode(buttonPin, INPUT_PULLUP);
}
void loop(){
// read the state of the pushbutton value:
buttonState = digitalRead(buttonPin);
// check if the pushbutton is pressed.
// if it is, the buttonState is HIGH:
if (buttonState == HIGH) {
digitalWrite(motorPin1, HIGH);
digitalWrite(motorPin2, LOW);
}
else {
digitalWrite(motorPin1, LOW);
digitalWrite(motorPin2, HIGH);
}
}
Step 3: Circuit Diagram for Control Motor Without Microcontroller
In this circuit diagram i used the push buttons to control motor without controller. if one push button is pressed then motor rotate clock wise direction. if another button is pressed then the motor rotate anti clock wise direction. don't push two button at same time.
Thank you for watching
11 Comments
1 year ago
I have not built this circuit, nor done the theory, but I am a bit nervous about the 'high' and 'low' transistor bases being tied together at the same voltage. Maybe the Darlington pairs help out here, but I still think that it's an unnecessary risk/abuse forcing them to the same potential. At the least I would prefer some resistance between them.
8 years ago
It is a good instructable, but you should also include diodes for reverse emf protection.
Reply 8 years ago on Introduction
Thank you friend. i will add diodes in my instructable
Reply 5 years ago
so, where is diodes? :)
3 years ago
Reply 1 year ago
Not needed for the TIP122
Reply 1 year ago
The TIP122 already have the protection diode built-in.
4 years ago
Please explain, Why not use 2 lelay's instead of transistors ?
5 years ago
your program can not run for me why??
7 years ago
Hi, you have to fixe a mistake in the second line : q1 and q4
8 years ago on Introduction
Very usefull, Thank you! :)
Reply 8 years ago on Introduction
Thank you friend