The Adafruit motor shield is my favorite all time motor controller for use with robots. It’s ability to handle a pair of servos in addition to four bidirectional, PWM speed controlled DC motors makes it about as handy as can be.
After building a few of them, I managed to damage an H bridge chip while soldering. Ever since I have been using IC sockets, soldering those and then inserting the chip. If I manage to damage a chip now, I can replace it as simply as changing a battery; yank it out and insert a new one. There’s no unsoldering and burned fingers, solder suckers and wicks.
I also replaced the male Arduino interconnect pins (2×8 and 2×6 pin) with extra long legged female headers. If you want to grab a pin from the Arduino with the original mshield design, you either had to solder to the pin nub or install a wing shield to gain access to the pins.
The wing shield is a great idea, especially if you need to connect and disconnect stranded wires. For my uses though, just changing the headers gave me the same pin access while not adding an inch or so to the width of the Arduino ‘stack.’
At left is the standard motor shield with the male headers (they protrude through the bottom and plug into the Arduino)
At right is an Mshield with female headers instead of the male.
Also notice that I use IC sockets to install the chips. This makes them less likely to be damaged by solderingĀ and makes them easy to replace in case one (or more) get blown up. I have been known to kill a shield or two with a slip of the fingers…
I also change the aux power LED. Not that I don’t like the 3mm green one that comes with the kit, but to be able to tell the units apart from one another more easily. Besides, I’m already customizing the kit so why not go all the way?
Below is an example that uses the wing style screw shield to make the Arduino pins accessible. While it’s a handy thing to use, in a lot of cases its overkill, and it makes the circuit boards rather wider and more difficult to tuck into a convenient spot.
Like I said in the beginning, this is a great motor shield, and now you know how to make it just a little better. The female headers are available from most of the usual robotic stores (not Adafruit, oddly enough), and I got the 16 pin IC sockets at Radio Shack for about 20 cents each. The female headers are about two bucks.
You can find the Adafruit motor shield here.
I also use them slightly differently than some. I power my robots with either NiMh or LiPo battery packs and feed that straight to the aux power input screw terminals on the mshield. Spliced in is wire that take the higher voltage, run it through a 5v regulator. The output of the regulator is what powers the Arduino and the workings of the mshield. The shield can handle from 3.3 to 36 volts of aux power, but you will crater (blow up) one or both of the H bridges if you put more than 5v on their internal power pins. I have a few chips that look like someone went golfing on them and left a divot through their ineptitude. Not like I showed eptitude blowing up the chips…
You will need to download the Adafruit libraries in order to control the motors with your code, but the standard servo library built into the Arduino IDE are fine to use for servo activity. It’s a simple task, just unzip the library into a folder and copy it into the lib directory in the Arduino Program Files folder, restart the IDE and away you go.