When I'm not dancing and partying - which isn't often - I busy myself by doing things. As mentioned, one of the things I have been doing is cooking up mechanical horrors in the meager lab I call my apartment. The year of on again/off again work on an overly ambitious robotics project has yielded a single leg, merely one of six that the culmination of my efforts shall wield in precise, mechanized glory. I wanted to build a single leg and test it before proceeding with the other five.
To recap, here's the entire robot design as it exists now. Modifications will be made in the future, but nothing so earth shattering as to invalidate this basic design. Except for the cannon. And wings.
What we're going to be looking at now is a single leg from the left side of the robot.
The leg was constructed on my CNC mill out of quarter inch black ABS plastic I bought from Ridout. The plastic was annoyingly textured on one side and really can't be described as quarter inch. The dimensions are more accurately described as .24" "kinda". It varies over the sheet, which is really only annoying when leaving flash around a cut-out part. Flash is the small amount of plastic you should intentionally leave around a part so it as it's being cut out it doesn't go sailing across the room. Sometimes the flash was thin enough to be torn by hand, other times I had to bear down with all my might with a box cutter. Those NASA safety posters I'm exposed to daily have had zero impact.
If you're curious as to what the blue part is I think it's called a "toe spur". One of the design modifications I plan on making will eliminate it. I couldn't find the original part I milled out, but I just so happened to make one out of machinable wax when I was playing around with it. Machinable wax is harder and more stable than candle wax and can be melted down and reused, so it's inexpensive to use it in testing. So, the blue part you see is actually made of wax.
A few parts on the leg had to be glued together. For that I used ABS weld, also available at RPlastics.com. The can is covered with skulls and crossbones, so I'm assuming one shouldn't drink it. I live in unnatural fear of harmful chemicals, so I bundle up like a hazmat worker and step out on my landing before I open the jar (with tongs). The remarkable thing is not that I do this, but that I wonder why the neighbors walk quickly and nervously away when I wave at them.
Each leg is built around three GWS S03TXF servos. A servo is a small, self-contained motor that is very convenient to use. PDJ, Inc. specified the GWS S03TXF model in the plans that came with the design drawings. They're powerful, inexpensive, and they fit so that works for me. I'm controlling the servos with an AVR Atmel ATMega16 microcontroller. A microcontroller is a circuit chip that works like a small computer. It has its own memory and can load and execute programs written for it. I wrote a fairly straightforward program in C to control all six legs. The timing for the servos gave me fits, though, and I wound up spending a week debugging the program. If you're interested in programming AVRs in C (and how could you not be?) I strongly suggest getting a copy of Win-AVR (if you're on Windows, of course) at AVR Freaks, a copy of
Embedded C Programming And The Atmel AVR, which you'll have to pay for (it's expensive, but good) and especially the free VMLAB AVR development environment and simulator. I've used several similar products and this one blows them all away. It does everything and helped me quickly fix the problems with my program.
The servos generate a lot of electrical noise, so I have them on a power circuit separate from the microcontroller. I'm planning on running the robot's servos off a Ni-MH battery pack and the control logic off a single 9v battery.
The user (myself) controls the leg with a Windows program I wrote in C#. The dials can be turned from 0 to 100 which corresponds to the minimum and maximum angles of the leg servos.
The data is sent down using a simple protocol (one byte for the servo ID, one byte for the number) over RS-232. RS-232 is an old, standard communications protocol that uses serial ports. My Dell doesn't actually have a serial port, but I've had no trouble using the USB->Serial converter cables I bought on Tiger Direct. When the user (again, just me) mouses over a dial the corresponding servo turns yellow in the interface. It's those little touches that keep me from being confused at 3am when I'm trying to diagnose a problem. When the dial is turned the leg dutifully responds. The cat has never been so terrified.
No comments:
Post a Comment