BUILT YOUR OWN H- BRIDGE CIRCUIT USING NPN TRANSISTER



            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 micro controller 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.


CIRCUIT:




PROGRAM CODE:

Here is the program for this project. i use energia software to program msp430 launchpad
to download energia software click the link bellow:
http://energia.nu/download/


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);
  }
}

                                                        
DIRECT CIRCUIT USE H BRIDGE WITH OUT PROGRAM:

                 Use the push button to control motor without controller. for that assemble the circuit bellow. for one button push motor rotate clock wise. for another button push motor rotate anti clock wise. don't push two button at same time.




                                                              Thank you for watching.

Comments

  1. Thank you for publishing this information. :)

    ReplyDelete
  2. brother my model is not working please help

    ReplyDelete
  3. hi divas
    Make sure your transistor are in working condition.and also check the circuit connection.

    ReplyDelete
  4. is speed control also possible , perhaps by pulsing the inputs?

    ReplyDelete
  5. hi Maxx. i didn't test that but i am sure speed control will work with pwm in this circuit.

    ReplyDelete
  6. MaxX you can control the speed by using variable resister

    ReplyDelete
  7. I am using tiva microcontroller tm4c123. will the same setup and program work. And give plz share the details. my email id is pranjalbhadti@gmail.com

    ReplyDelete
  8. Transistors i have are bs170 mosfet. will the same circuit be applicable. thankyou! look forward for your reply.

    ReplyDelete
  9. Sir what could the alternative of NPN TIP122 transistor?? Sir plz reply soon

    ReplyDelete

Post a Comment