My first H-bridge
April 20, 2011 12 Comments
While working on my latest autonomous tank project, something very annoying happened: I needed to control 2 motors for the turret and the firing of the gun, BUT out of the 3 completely different motor controllers that I had laying around (a L293D based one, a pololu serial controller and a micro RC ESC) NONE was working… !!!
This was so frustrating, that it forced me to want to build my very first H-Bridge from scratch. This is something I had always avoided, thinking that “I had better things to do”, ie spend time on higher level stuff …
I started with this schema, taken from the Internet and slightly modified (it initially used 2.2KOhms resistors, but on all the other sites people were using 1K, as a better compromise):
The big advantage for me, was its small parts count and the fact that I had everything readily available.
So let’s build the prototype:
Now let’s quickly add on the same stripboard, another TIP120 for the gun fire control. NO H-Bridge, just a simple transitor as the gun motor can only spin in one direction…
- quick and easy to build
- these TIP120 darlington transitor are quite inefficient
- MOST IMPORTANT : the motor and logic voltage are the SAME !
So, if your MCU controlling this is a 3V3 one, then the max voltage for your motors will be 3.3Volts… Or alternatively, it won’t be able to completely “open” the darlington transistors.
In my case, I had a 12V voltage for the motors, and a 3.3V FEZ Domino. When I “opened” the bridge, the motor would receive only around 25% of te voltage/power available…
I tried to “fix” this, by regulating the motor’s power to 5V by using a L7805 IC:
(don’t forget the capacitors I’ve just spend a few hours trying to understand why my circuit didn’t work ! lol… )
This kind of worked, as in 100% of 5V was giving better results than 25% of 12V, but I had to use a 5V Arduino instead of my 3.3V FEZ board, and was still frustrated by not being able to spin the motor as fast as I should…