Thursday, April 14, 2011

Arduinos, toys, robots, oh my!

I've discovered the Arduino. This is a totally cool "open source electronic prototyping" board. Basically a microcontroller which can be programmed from a PC using a "sketch" which is written much like a C++ program. It makes creating cool stuff like flashing lights, robots, distance sensor projects, clocks, etc. a lot easier.

One of the things I love doing is getting motorized toys from the thrift store and then repurposing them for my projects. I'm a lot like Sid on Toy Story but without the evil bent.

I wanted my first semi-advanced Arduino project to be an obstacle avoiding robot. I looked around at the various hobby type sites and I could get a chassis made for robot experiments for somewhere around $50. Then I'd need a motor controller board since the Arduino UNO can't put out that kind of current on its digital pins. But heck, I thought there are a lot of motorized toys out there. All I need is something I can get that moves, then stick the UNO on it.

My first attempt was a Tyco Air Rebound. It's an R/C car which is made to go fast and very rugged. Got it at the thrift store for about $7. The biggest criteria is that it has two independent drive wheels. That way I can turn it by controlling the direction of the wheels. This makes the 'bot turn a lot sharper than front wheel steering.

Turns out the Air Rebound was not the most suitable. The reason is it's made to go FAST. My robot has to go slow enough to avoid obstacles not run headlong into them all the time. But the Air Rebound was good training. I was able to identify the radio circuits and the motor controllers. After that it's just a matter of attaching wires to the motor controller inputs (radio outputs) for fwd and reverse on the right and left wheels. Each of these outputs is then connected to a digital output pin on the Arduino UNO and using pulse width modulation (PWM) I can control the motor speed.

My next toy was a Cybox robot from Sharper Image. Again about $7 at the thrift store. This robot has a two wheeled base and the gear ratios looked more promising. After disassembling the Cybox I again was able to locate the motor controller and map the four inputs controlling the direction of each of the two drive wheels. This chassis proved to be just what I needed for a slow moving platform that I could mount my servo and IR distance sensor on.

The programming for the Cybox robot was inspired by another robot which I found at I used that code to get started and built a bit more on top of it. I added some LEDs for effects and the finished project can be seen in two Youtube videos.


The only problem with the Weeniebot is it's mobility. It has to operate on a hard, fairly smooth floor. I wanted more. So I again returned to the thrift store. This time I found a nice four wheel drive R/C car with the transmitter included. On top of this it was just $3.00!! Much to my joy and surprise when I got it home I found that it worked just fine. Now I had a dilema, I really liked playing with this car but to make it into a bot I have to tear it apart. Well, it turns out that turning this one into a bot presented some additional challenges.

I will continue this as the story plays out. For now the second bot is still in development.