H-bridge circuit can not only be built with MOSFET transistors bu also with bipolar BJT transistor. Here I wanted to post about BJT based H-bridge circuit to drive motors which can be useful in robotics.
The H-bridge circuit is constructed using two 2N2907 p-channel transistors Q1 and Q2, four 2N2222 n-channel transistors Q3,Q4,Q5 and Q6. These transistors requires 5mA to 10mA to work efficiently so 1kohm resistor is used at the bases of transistors. The guide on current sensor for motors with arrduino can be used to automatically disconnect the motor if the current exceeds a preset value in order to protect the motor electronics around the motor. Along with current sensor we also need to use a relay or an optocoupler to disconnect the motor automatically with commands from Arduino. The guide relay with Arduino and optocoupler with Arduino has schematic and code which can be useful if does not know how to connect them or it is their first time using a relay or an optocoupler. In the above BJT H-bridge four 1N4148 switching diodes D1,D2,D3 and D4 are connected across the core four transistors Q1, Q2,Q3 and Q4 to protect them from back emf in motors electronics. The two SDPT switch are the two inputs that can control the motor speed direction.
Direction Control with BJT H-bridge
Forward Direction
If the upper switch is closed, low switch is open, then the motor will rotate in forward direction(clockwise) as shown below.
The current flow is as shown in the circuit diagram.Backward Direction
If the lower switch is closed, upper switch is open, then the motor will rotate in backward direction(anti-clockwise) as shown below.
Stop
When both switches are simultaneously open or closed then the motor will stop from rotating.
This can be easily designed for four motors on home made PCB and then used in robotic car based on arduino. While you interested in home made PCB, you might want to look at the guides on drilling PCB at home and tinning PCB at home because these contain useful information for diy PCB drilling and tinning.
Speed Control with BJT H-bridge
To control the speed of the motor we just need to vary the power applied. So for forward direction for example, the power is applied at the lower switch. If we could the switch on/off fast the motor will rotate according to the duty cycle and frequency of switching. There are many way we can apply PWM signal to the circuit. One can build and use 555 timer PWM generator circuit, use op-amp to generates square wave signal. The typical way however is to use miroprocess or microcontroller board like Arduino.
The below video demonstrates how by apply PWM signal from a signal generator turns the switch rapidly such the the motor still runs. Square wave means that the duty cycle is 50%.