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.
Friday, March 2, 2007
Sunday, February 18, 2007
Robots!
Each of us seeks out and pursues activities we enjoy. One of my hobbies during the past year has been designing and building a robot. One option would have been to start with a simple, straightforward weekend project that resulted in a scurrying, line following floor bot. Instead, I decided to start with a six legged 18 Degrees of Freedom (DOF) hexapod. It was initially overwhelming, but I've learned a great deal thus far and it's been a blast.
3D design
Like many people I have ideas about things I'd like to build or invent. I even had a little book filled with sketches of my ideas but I was painfully aware I couldn't actually create any of them. Have you ever seen a commercial advertising to "inventors" where a man states "The Clapper! That was my idea! Why, oh why, didn't I get a patent?!" Let's leave the topic of obvious, intellectually corrupt "idea" patents alone for now and agree that it's not enough just to have an idea, one must be able to bring that idea to life. The man couldn't have invented the Clapper because he couldn't have built it - that would require working knowledge of electronic design and (I suspect) band-pass filters as well as a lab to build a prototype in.
To build new, interesting, and useful things one needs skills in several fields. So, my goal with this project is to learn everything necessary to build the robot and, by extension, other things I might want to build in the future. Of course, if I had just wanted a hexapod I would have bought one from Lynxmotion - but that's not the point at all. Robotics fascinates me because it's an intersection of mechanical engineering, electronic design and software development. I have a degree in Computer Science, but my limited knowledge of mechanical engineering, computer design, micro controller programming, and electronics is entirely self taught. I've found I learn much more quickly when I have a concrete goal to work towards, so that's what this robot is to me - an excuse to learn.
I bought the robot design from Phil at PDJ Inc. and will modify it where I find appropriate. The model above was created from the 2D CAD drawings on the CD from PDJ. I wanted to ensure everything fit together properly and made sense - plus, it was a good exercise in learning something about 3D modeling. I'm building the robot out of quarter inch ABS sheet on my CNC mill. Modifications I'll have to perform include splitting the body sections into multiple pieces due to the smaller size of my mill, modifying the toes to not be so "hook" like and adding supports in a few areas. My ultimate goal for the project is to enable the robot to operate wirelessly over a 2GHz RS-232 bridge and to include a controllable wireless camera.
To build new, interesting, and useful things one needs skills in several fields. So, my goal with this project is to learn everything necessary to build the robot and, by extension, other things I might want to build in the future. Of course, if I had just wanted a hexapod I would have bought one from Lynxmotion - but that's not the point at all. Robotics fascinates me because it's an intersection of mechanical engineering, electronic design and software development. I have a degree in Computer Science, but my limited knowledge of mechanical engineering, computer design, micro controller programming, and electronics is entirely self taught. I've found I learn much more quickly when I have a concrete goal to work towards, so that's what this robot is to me - an excuse to learn.
I bought the robot design from Phil at PDJ Inc. and will modify it where I find appropriate. The model above was created from the 2D CAD drawings on the CD from PDJ. I wanted to ensure everything fit together properly and made sense - plus, it was a good exercise in learning something about 3D modeling. I'm building the robot out of quarter inch ABS sheet on my CNC mill. Modifications I'll have to perform include splitting the body sections into multiple pieces due to the smaller size of my mill, modifying the toes to not be so "hook" like and adding supports in a few areas. My ultimate goal for the project is to enable the robot to operate wirelessly over a 2GHz RS-232 bridge and to include a controllable wireless camera.
Saturday, February 17, 2007
Will's Pinewood Derby Car
So, I live above Joel - a guy I've known and worked with for years. His son, Will, is a Cub Scout and this year was his first "Pinewood Derby". In a nut shell, a pine block is carved to look like a car. Wheels are stuck on and the car is shoved down a long, sloped track where gravity decides the winner. For more information, see the Wikipedia article.
Will is eight, so it's understood there is going to be a lot of parental involvement. The rules state the child must understand each step in the building of the car, but the kids aren't expected to wield power saws. The race is really a competition amongst fathers. The obvious political analogy here is that the children are like puppet states assisted by the "super powers" of their parents. Instead of being supplied with weapons and advisers, the children are supplied with race cars and helpful cues when to put it on the track. Most parents use regular wood working tools and sandpaper to make the block of wood car-like. For Will's car, Joel and I decided to take a more precise approach and used my CNC mill. I had some fear that this would spark an arms race among the parents the likes of which has never been seen, but that only lasted for a few seconds. "I thought it would be fun" is how most wars start and this one is no different. This was my first job involving surface milling and 3D design. Everything up to this point has been simple extrusions and 2D contour milling paths. We started working on this one week before the race.
Will wanted the car to look like his favorite Pokémon toy.
We decided to make the car a head with wheels and Joel wanted fire coming out of the front. I constructed the model using the Pokémon head as a visual guide. I think I made a fantastic looking alligator - it was necessary for the toy shape to be elongated. The milling was done in two parts - half on one side, then the block was flipped over the other half was milled out. I built the model for one side, then mirrored it for the other. We ran out of time for detailed fire, so Joel decided to carve it in later. That's the long tab you see in the front of the car. It is not in fact a massive tongue. Sorry to disappoint all the Kiss fans. Maybe for next year's car.
The end result was workable, but less than fantastic. There's an obvious seam which is likely a result of not having the proper tools to get a common starting point (an edge finder) and instead using what was on hand (an aspirin I found on the floor). The error here was purely cosmetic and was easily sanded out.
The milling job took four and a half hours for each side, so nine hours total. The amount of time required is a combination of my not knowing what I was doing and being stuck with the tools I happened to have. The largest end mill I had was a 3/16" and job would have gone much faster if I had a larger diameter mill on hand. I finished the milling operation at 7 am on Saturday morning. The race was on Sunday at noon. Joel, Julie, and I started working on the finishing touches Saturday night at 6 pm. The finished product turned out very well, I think.
Working on the car was a lot of fun. I learned a lot about surface creation and milling. Having a deadline always speeds up learning. I'm glad Joel invited me to be involved.
Will is eight, so it's understood there is going to be a lot of parental involvement. The rules state the child must understand each step in the building of the car, but the kids aren't expected to wield power saws. The race is really a competition amongst fathers. The obvious political analogy here is that the children are like puppet states assisted by the "super powers" of their parents. Instead of being supplied with weapons and advisers, the children are supplied with race cars and helpful cues when to put it on the track. Most parents use regular wood working tools and sandpaper to make the block of wood car-like. For Will's car, Joel and I decided to take a more precise approach and used my CNC mill. I had some fear that this would spark an arms race among the parents the likes of which has never been seen, but that only lasted for a few seconds. "I thought it would be fun" is how most wars start and this one is no different. This was my first job involving surface milling and 3D design. Everything up to this point has been simple extrusions and 2D contour milling paths. We started working on this one week before the race.
Will wanted the car to look like his favorite Pokémon toy.
Conveniently, the head of this toy tore right off and reattached with ease. Despite what you might assume, the Pokémon in question is actually red, not silver. This is what we're actually going for -
We decided to make the car a head with wheels and Joel wanted fire coming out of the front. I constructed the model using the Pokémon head as a visual guide. I think I made a fantastic looking alligator - it was necessary for the toy shape to be elongated. The milling was done in two parts - half on one side, then the block was flipped over the other half was milled out. I built the model for one side, then mirrored it for the other. We ran out of time for detailed fire, so Joel decided to carve it in later. That's the long tab you see in the front of the car. It is not in fact a massive tongue. Sorry to disappoint all the Kiss fans. Maybe for next year's car.
3D model
Once the model was complete the tool paths were created and then it was off to the mill, which is conveniently located in a large cardboard box in my living room. Will and Joel's other children came up to see the mill in action and I think Will had a good understanding of what steps were involved. Lauren, Joel's nine year old daughter, understood every step very well and had even done some 3D modeling of her own in the past.
The end result was workable, but less than fantastic. There's an obvious seam which is likely a result of not having the proper tools to get a common starting point (an edge finder) and instead using what was on hand (an aspirin I found on the floor). The error here was purely cosmetic and was easily sanded out.
The milling job took four and a half hours for each side, so nine hours total. The amount of time required is a combination of my not knowing what I was doing and being stuck with the tools I happened to have. The largest end mill I had was a 3/16" and job would have gone much faster if I had a larger diameter mill on hand. I finished the milling operation at 7 am on Saturday morning. The race was on Sunday at noon. Joel, Julie, and I started working on the finishing touches Saturday night at 6 pm. The finished product turned out very well, I think.
Majesty.
The car could be improved in several ways. It should have won first, but was beaten out by several others. I'm not sure how the other cars were able to go so fast but I distinctly heard a sonic boom at one point. There is clearly some pinewood derby warp drive technology that we have yet to master. Joel did a great job carving fire into the front of the car, but it would have been neat to have approached the milling operation from three sides and created the fire surface with the mill.Joel formed the horns out of sanded dowels. Will and Lauren helped paint the car and picked out the color. Julie, Joel's wife, did a fantastic job of paining the eyes and adding shading. Joel dremeled out indentations in the bottom of the car so we could hot glue lead weights I sawed in half in order to get the car up to the maximum weight. Thankfully we have a business partner, Eddie, who has mastered the ordeal of Pinewood car races. He advised us the two most important things were to make the car as heavy as possible (5 oz. limit by the rules) and to use a solid lubricant like graphite to make the wheels spin as easily as possible. Joel used a dremel tool with a polishing attachment as a gear to rapidly spin the wheels in order to polish the axles.
The end result? Will won 1st place in his age group and 5th place over all.
The end result? Will won 1st place in his age group and 5th place over all.
Working on the car was a lot of fun. I learned a lot about surface creation and milling. Having a deadline always speeds up learning. I'm glad Joel invited me to be involved.
Labels:
charlizard,
cnc,
cnc mill,
pinewood derby,
Pokémon,
taig
Subscribe to:
Posts (Atom)