For schematics and code, check out the revobots page here. For video of the bot, look here.
Well folks, it is about time I wrapped up REVOBots, which turned out to be just as much work as expected; which is to say that it took more time and effort that I had planned. And as expected, attendance dropped off towards the end of the semester as our project based classes go into full swing and spring (and the opportunity to lounge around outside) starts to warm up the weather.
REVOBots 5 ended up being an explanation about some code that I wrote, and an introduction to EagleCAD. I have attached the code to the revobots 6 pdf because if fits in better there.
REVOBots 6 was a build day dedicated to making the revobots go. There were two critical failures on my part before revobots 6:
- Did not spec out the motors/H-bridges properly. The motors turn out to run at 3V, while the H bridges run at 5- ~30 V.
- Did not order parts early enough
That said, the bots still work at 5 volts, albeit with a drastically shorter motor life. But operating at 5V this seemed to cause too much of a current drain on the power supply, so we got some weird twitchy behavior during the class. Since then I have developed a cheap fix using two 2n3906 NPN transistors, and a smattering of decoupling caps.
What is a decoupling cap though? Doesen’t the five dollar arduino already have them?
The answer to the second question is yes, but the cap was not big enough. The problem the circuit was having was that the batteries were trying to output a constant voltage. This means that as current demands changed in the circuit, the battery had to adjust the output current. With the microcontroller taking only a few miliamps, the circuit is not drawing much power. BAM! Motor turns on and what happens? The battery needs to supply more current, but can’t. Then the mcu shuts down as it looses power, sending a short pulse to the motor. So bigger decoupling caps were needed to smooth out the power supply, which the caps do by charging up to 5V, and then discharging if the voltage drops due to sudden current demand.
So the symptoms were: mcu turning on and off, which I could tell because the status LED I had attached was flickering.
The prescribed cure was: Find all the capacitors on my floor, and stick them across the power rails.
Result: REVOBot works! Check it out here! (In this video it is running away from light because I have the motors running in reverse).