A few weeks ago I found a WALL-E toy robot at a yard sale for $1. I bought it thinking it would be cool to put a couple motors and a micro controller in it to create a cute little autonomous robot.
The first challenge was finding a couple of motors that I could hack into it. I had some motors, with gear reduction built in, left over from some Rumble Robots. After a couple hours of hardware hacking, I managed to get them installed driving the two separate tracks. Next I need some sensors and what better place to put them than in those cute little binocular eyes WALL-E has! I figured that a Parallax PING ultrasonic sensor would work so I removed the sensor drivers from the PCB and installed them in the eyes. I used the existing wires that were there for the LEDs to get the signal down to the body where I connected them to the PBC. Unfortunately, in the process of removing the drivers I damaged the PCB. My solution was to solder the wires to another PING sensor and then block the signal from their on board drivers by mounting it against a wall inside the body. It worked! Problem solved. It now had motors and a sensor.
Next came the H-bridge that was required to drive the motors. I decided to build one myself with some transistors I had salvaged from a Roomba Robot main board. I bread boarded the circuit up and it worked first try! Great! Then I transferred the whole circuit to a perfboard and it also worked! Now I had a way to drive the motors. Next came the installation of the micro controller. I connected the Arduino and the H-bridge to the motors and wired everything up. After uploading some code I gave it a test on the bench and it worked fine. Now all I had to do was finish putting the battery and everything inside the body and I would be finished.
Enter the Gremlins…..
For reasons I could not figure out, the H-bridge failed. It had one set of transistors that simply refused to work. This meant that one of my motors would not run in reverse. After a few hours of troubleshooting I gave it up and called it a day… 11 hours at the bench is enough!
The next morning I looked over the H-bridge some more. I replaced a few transistors but it still refused to work. OK, time for plan B. In true hardware hacker form, I made a trip to the Dollar Store in search of some kind of RC toy that had motors that went forward and reverse. Why? Because inside that toy would be an H-bridge to hack into my robot! Well I scored two RC cars for $5 each. Perfect! I brought them home and opened them up. Sure enough, there were my hackable H-bridges. After a bit more hardware hacking I had them installed. That took care of that Gremlin!
Oh but there’s always another Gremlin… they come in pairs I think.
My motors weren’t spinning up right. They would start to spin then stop. Very odd. As I was working this problem I was on an IRC chat on Savage Circuits and a buddy there, Roy Eltham, reminded me that I needed to give the motors their own power supply separate from the Arduino. DUH! I was so frazzled at this point in the build that I didn’t even think of this very obvious fact! So I added another 9v battery. Now the motors had one and the Arduino had one. Success!! It finally worked!!
Thanks for the reminder Roy. 🙂
This project took a lot longer than I EVER had estimated!! Thanks to the Gremlins it was the first one since I’ve been doing a Hack A Week that went past my deadline by two full days! In the end, I learned a thing or two and made it all work.
Enjoy the video, and Keep On Hackin!
@Dino, I know this may be a little outdated now, I have been working on converting a wire controlled tracked rover to an autonomous bot but I have been having a few problems tracking down a known working circuit for a homemade H-Bridge. I have found various ones on the interwebs but I just cannot seem to get them to work.
By ‘work’, I mean I am using a fairly old program called Crocodile Technology 1.6, you may of heard of it. I’m using it to ’emulate’ the circuits that I find online, but it doesn’t give the result I’m hoping for.
I have found and tested a circuit using NPN transistors (2N2222A) on a breadboard, but nothing happened 🙁
I have just ordered a few different transistors in the hopes that they will work better, 2N3904, 2N3906, BC557 and BC547 varieties.
Would you mind posting your schematics for your H-Bridge?
I really don’t want to go to the extreme of buying and destroying a couple of RC cars, besides that will go against my learning experience 😀