After getting all excited about the Robomower, I took a step back and decided that before I could seriously think about building something big and heavy to drive around with an Arduino (and I’m not even mentioning the part about something that could be incredibly hazardous!), I figured I’d better hone my chops on something a little smaller, and something less likely to inflict serious damage through fire, electrocution or just plain blade-related maiming.
Thus came the concept for the Robodozer.
This project is largely based on this Instructable, which I think really does a great job of showing what the Arduino can accomplish with a well-stocked spares box.
After looking around locally for the Tamiya RC Bulldozer kit mentioned in the Instructable, I gave up and ordered it on-line. Assembling the kit was a fun evening project that I shared with my five year-old daughter, who later stated that the experience was “Way more fun than watching TV!” Following the lead of the Instructable, I left off the dozer blade, which simplified the assembly process.
After ordering the Dozer kit, I discovered that the majority of the components that I was interested in are actually available separately at what would amount to a slightly reduced cost. However, there are some parts missing that I think are useful; A (wired) remote control/battery case and a wood chassis are the main items. For my next robot based on this platform, I’ll probably go ahead and just get the parts, since the Robodozer will be shedding the remote early on, and the chassis is something that I could fabricate fairly easily.
Okay, after assembling the dozer kit, the next step was to figure out how to get the Arduino to drive two motors. After Googling around for a while, I settled on the L298 driver chip, since it can drive two DC motors at up to 2 Amps. Other chips out there top out at around 600ma to an Amp, and I’d rather start out with a little more headroom than that. The Instructable uses one of the many pre-built boards on the market, but I wanted to design and build this one myself, just for the fun on it, and so I could hopefully learn something.
So, some more Googling, and a not insignificant headache later, I discovered that there are very few easily discoverable tutorials on setting this kind of thing up. So I went back to first principles, and looked at the l298’s data sheet. It turns out to actually be pretty straightforward to get the L298 to run two motors. The obvious method to power the motors is to use the same 2 “AA” batteries that powered the motors when they were part of the bulldozer kit. Trouble is, 2 double-a’s provide 3VDC (1.5V X 2 in series). The L298, however, requires a minimum of 5VDC on the supply line. Okay, so off to Radio Shack for a 4 AA battery case (4 AA’s in series provides a nominal 6VDC). The diodes which are there to prevent back-EMF damage to the L298 (and possibly the Arduino), were the final hurdle. I started by installing a single pair (eventually four pairs will be needed) just to make sure it would work. It did – sort of. I whipped up a quick Arduino sketch which rolled the robot forward for 1 second, paused for 1 second, then went in reverse for 1 second. It worked fine when there were no diodes, but with the single pair installed, the robot would roll forward for one second, wait for more than one second, then roll backward for less than one second. I removed the diodes, and it worked again perfectly, but I’m not comfortable running the robot without the back EMF protection. More importantly, I’m not happy not knowing why it isn’t working! More to come on this one next time I’m home…