Saturday, October 2, 2010

Robot Redux

After many months of inactivity, Alan and I have restarted the robot project. If you recall, we wanted to build a robot that would balance on two wheels and could be controlled by a remote. Last time we succeeded in building a robot that could travel about horizontally on three wheels (actually two wheels and a caster). But it didn't have enough power to do a wheelie. In our attempts to increase the power by increasing the voltage of the battery pack I think we managed to burn out one of the motors. It began to lose power so that the robot could not drive straight. Since one goal of the project was to see how cheaply we could build such a robot, the motors we used in Rev 1 were very cheap. This time around we decided to rebuild the original design with better motors. Below is a picture of the new Rev 2. Notice how small the motors are! They are actually more powerful than the last ones. I put a quarter on top of the right motor to give you a sense of scale:


And here is a picture of the internals showing all the breadboard wiring. In this picture, the robot is plugged into my PC via the USB port. That's how we download new software and upload performance data:


Here's a close-up of some of the breadboard wiring:


Here's a video of Rev 2 showing it being successfully driven around our kitchen right after we finished building it. We initially set the power level at only 25% of full throttle to make sure we didn't burn anything out right away, so the vehicle can move faster than this, but not a lot faster:



Even though we bought more powerful motors, this version is still nowhere near powerful enough to do a wheelie. Not even close. My goal for this round is to experiment with the balancing logic, even if the vehicle has to be manually helped to an upright position.

The big issue is still whether we can balance at all using this design. Because we were going for a cheap design, the current vehicle has no encoders to determine wheel movement and no gyro to determine rotation rate. The only sensor is an inexpensive 3 axis accelerometer (the MMA7260Q). This is a configuration that conventional wisdom says cannot be made to balance successfully. We will probably succeed only in proving the conventional wisdom, but I want to give it a go, anyway.

After these photos were taken, last week Alan wired up the accelerometer to the Arduino microprocessor board. Unfortunately, I forgot to add a line in the software to set the ADC circuit to the right mode so I burned out that part of the microprocessor. The rest of it still works, but it cannot do any analog-to-digital conversions. So I couldn't start work on the balancing software. I ordered a replacement chip which arrived this week. It's going to be a bit of a pain for Alan, because he will have to practically disassemble the thing to replace the CPU. Hopefully this weekend we can do the repair and we'll be back in business.