Robotics: Unmanned Ground Vehicle Project - How to Build a Steering Mechanism...Or Not (Part 6 - The H-Bridge Driver)
Posted on 2011-02-08 @ 21:38:12 by r00t - Read the parent: Unmanned Ground Vehicle Project - How to Build a Steering Mechanism...Or Not (Part 5 - Limit Switches)

In order for the Arduino I am using to command the steering motor to move left and right, I need to control the motor with a circuit known as an "h-bridge". Basically, this is a circuit that switches current to the motor to make it rotate in one direction or the other, at will (it also allows for easy speed control via PWM - but we won't need that here).

H-bridge circuits come in all manner of styles: Simple DPDT switches wired properly, like in my testing controller I found at Goodwill, are easy, cheap, and robust - but can't be easily controlled with the Arduino. It's possible to wire a relay or two which could be controlled by the Arduino to act as an h-bridge; you can do the same with discrete transistors or MOSFET devices as well. Instead of these options, though, I chose a more compact solution. This is a special purpose-built IC designed to handle the details, while having the current capacity to drive the motor I am using - the L298:

Questions or Comments?

But there's a catch, which is why there are extra parts in that picture: The L298 doesn't have standard 0.1 inch pin spacing, meaning it can't be fitted on a breadboard or soldered onto a standard perfboard; it's designed to be mounted on a custom etched PCB. I might try my hand at PCB etching at a later point in this project, but right now I am wanting a "rolling chassis", so I needed some way to test this device using a breadboard, then later mount it to a custom perfboard.

Enter JRHackett's L298 Adaptor; the two small green PCBs in the photo above show that they're not much bigger than the L298. Mr. Hackett gives a good description of their utility and how to assemble them (using male headers like in the picture above). For $2.55 each (at the time of this writing), they're an excellent deal.

I didn't follow JRHackett's soldering directions exactly. I felt that if I did, there wouldn't be enough room on the output side to get my soldering iron and solder in to attach the header pins on that side (where the outputs are). Instead, I fit the headers into a small breadboard to act as a jig, spaced the same amount as the board. I then soldered the header on the output side, using a small jeweler's loupe to verify the solder joints as I went. Once that was done, I removed the board from the breadboard jig, installed the L298, flipped it over, and used the channel in the center of the breadboard to hold the L298 while I soldered the pins:

Questions or Comments?

Questions or Comments?

Questions or Comments?

I then flipped it over, put it back in place on the breadboard and soldered the remaining header, completing the adapter:

Questions or Comments?

Questions or Comments?

It was very quick and easy, and only took about 20 minutes or so to solder the whole thing together (which taking pictures and verifying the joints with the loupe). The construction is very solid, and still allows for adding a heat sink. What's nice about the adapter, is that it arranges the input and sense pins on one side, and the outputs on the other, which should make the perfboard layout super-easy. I really love these adapters; if you plan on using an L298 in your own creations, and don't want to bother with a custom PCB, these adapters are very handy to have. Mr. Hackett was very professional and prompt with responses to email, and had the boards out to me very quickly; if this were Ebay, he'd have a "AAA+++ Super Seller" rating from me!

Thank you Mr. Hackett for these boards!

My next steps are to layout and test the L298 with the steering motor, both under "manual" control as well as with my Arduino. Once that is done, I plan on transferring the circuit to a perfboard for mounting on the UGV (Unmanned Ground Vehicle). Likely it will be placed inside a small project box to help protect it from the elements.

Then it's time to work on the rear drive motors!

Share This Article


Questions or Comments?

If you have any questions or comments about this article, please contact me...

0 comment(s) posted
Post New Thread