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