Albert Einstein He developed the general theory of relativity, one of the two pillars of modern physics (alongside quantum mechanics).

The first integrated circuit invented by the engeneer Jack S. Kilby1 (1923-2005) contained only a few transistors. Texas Instruments.

DC motor control with a basic H-bridge

What do we need?

All the prices are low due to China purchase. It's up to you wait or not.

1. 2 x transistors BD140 (pack-10: 1€) LINK eBay
2. 2 x transistors BD139 (pack-10: 1€) LINK eBay
3. 2 x transistors BC547(pack-50: 1€) LINK eBay
4. 2 x 1k ohm resistences (pack-100: 1€) LINK eBay
5. 2 x 100 ohm resistences (pack-100: 1€) LINK eBay
6. 3 x double PCB connectors (pack-10: 1€) LINK eBay
7. Drilled PCB 5x7 (pack-5: 1€) LINK eBay
8. Wires, conectors, solder, soldering iron... (0€)


Whenever you want to control a DC motor you'll have tension problems between your microcontroller and your motors. Most of the microcontrollers operate at 5 volts and have very low current outputs. If we really want to use a motor with a voltage of 12 V and current up to 4 amps need something between the two sides. An H bridge, named for its H-shaped configuration is exactly what we need. An H-bridge is a configuration of 4 activated doors with small signals in pairs of two. Current will flow in the one direction or another depending of the switched "doors".


Step by step

2 PNP transistors are connected on the top of the 5x7cm PCB with equal distances from each other. Welded and cut left over wires. 2 BD139 NPN transistors are placed at the bottom of the board. Welde them like previous. 2 BC547 transistors are connected near the BD140 to make connection easier. Connect them through 2 resistors of 100 ohms each. All the connectors are placed and connected with two 1k ohm resistors to the two BC547 transistors bases. Wiring begins with thin wires. First GND is connected to the emitters of the transistors BD139. After, Vdd is connected to the emitters of the BD140 transisotres. Outputs to the board pins are connected and we are ready. To test the circuit I've made a small Arduino code to control rotation direction and speed with PWM signals

Building fotos

BD140 transistors

BD140 PNP transistors are placed on top of the PCB. In this case I've build two bridges H simultaneously.

BD139 transistors

BD139 NPN transistors are placed at the bottom of the board, weld and cut excess.

BC547 transistores and connectors

BC547 transistors are placed on top of BD140 to facilitate connection. They are welded together with the resistors and connectors.

Wires connections

All connections are done with fine wires, outputs, inputs and interconnects are finished.

You could download the test code here:

Connect the pins to the H-bridge module, upload the code to the arduino and see the results.

See other tutorial here: