Magic Smoke
   


Once the magic smoke comes out, things don't work any more.

John Kasunich
jmkasunich@fastmail.fm
GPG Key

Postings:

Index (titles only):

If you are into RSS, you can Subscribe to a syndicated feed.


Links


Friends


I Support

Individual Rights

Electronic Frontier Foundation


Powered by



       

Fri, 22 Feb 2008

Engineering Week Project

Every year, my employer holds a contest as part of National Engineers Week. Teams of employees design and build contraptions to complete some task, and on Friday of Engineers Week, we have a competition to see which one works best. As in prior years, I teamed up with a co-worker for the contest.

The task is different every year. This year, we needed to build a vehicle powered by the classic Victor rat-trap. The vehicle had several tasks to perform:

  1. Pop a balloon on the right edge of the 8 foot wide course, 15 feet from the start
  2. Pick up a 1-1/2" diameter steel washer one foot right of center, 24 feet from the start
  3. Pick up another washer at the center of the course, 30 feet from the start
  4. Pick up third washer one foot left of center, 36 feet from the start
  5. Pop a second balloon on the right edge of the course, 45 feet from the start
  6. Stop with all wheels on a 24 inch square of sheet steel, centered in the course, 55 feet from the start
Points are awarded for accomplishing each task, as well as for making it to the 30 and 50 foot marks. In addition, points are awarded to the three fastest times from start to the 50 foot line. And finally, a significant bonus goes to any design that is autonomous - that is, does not use remote control.

We quickly decided that we wanted to go for the autonomous bonus. If it wasn't for the strict weight constraints implied by rat-trap power, I would have used a laptop running EMC2's Hardware Abstraction Layer (HAL), which provides functional blocks such as encoder counters, etc. But we needed something lighter, so I ordered an inexpensive AVR microcontrollerboard. I also got some optical sensors that I hoped would be able to sense the black electrical tape that was going to outline the course. My plan was to make a tricycle shaped vehicle, with the front wheel powered by the rat trap, and the rear wheels turning encoders (made from old mice). The wide spacing of the rear wheels would allow fairly accurate navigation, and the optical sensors would provide additional guidance. The AVR would provide a control signal to a standard RC servo for steering.

My first mistake was not starting on the software side right away. Instead, I had fun with my newly CNC'ed Shoptask working on the rat-trap powered "engine". After the first week or so, I had the engine nearly complete, but work on the rest of the vehicle was had barely started. We had a frame but not much else.

About half of the allotted time had passed before we did the first tests. We improvised a pair of rear wheels, and tested the "engine". It managed to travel an underwhelming 25 feet before stopping. We knew that the improvised wheels had a lot of friction and the real ones would be better, but we had no idea how much better. We immediately started focusing on "less weight, less friction". The same day I tested the optical sensors. Although they do a fine job of differentiating between "something" and "nothing", they could not tell apart different kinds of "something". In particular, the difference between "floor" and "black electrical tape on the floor" was virtually non-existant.

With half the time gone, my trip to Wichita looming, the software not even started, and faced with much mechanical work to get the weight and friction down, I recuited another team member, a software engineer. Instead of using the AVR board with its learning curve, he planned to use a small board from one of our products, with his existing development environment. He began coding, while I worked on the rear wheels and encoders, and my other teammate worked on the frame, magnet assembly (for picking up washers), and other parts.

By Wednesday of E-Week, we had rear wheels with encoders. Test runs showed that the rat-trap could move the vehicle at least 60 feet at a nice pace. But time simply ran out to get the software working. By mid-day Thursday we all had to admit that autonomous wasn't going to happen, and drop back to radio control. The encoders came off to save weight and drag, and we concentrated on finishing up.

The Vehicle

First an overall view, as seen from behind at the starting line (click on pic to enlarge):

Across the back is a row of six magnets taken from scrapped hard-disks, to pick up the washers. On the right rear corner is the balloon popper - pushpins pressed into an upright strip of aluminum, and sharpened. The rear wheels are small and have O-ring "tires" because we thought we were going to be driving encoders from them. We needed many counts per inch and no slippage. If we had been doing RC control from the beginning I would have probably used CD-ROMs as wheels, they are light and have very low rolling resistance. In the center of the rear "axle" is a lever, connected to a tube running forward. The rule for awarding points for "all wheels on the metal plate" at the end of the course actually can be read as "nothing touching the floor outside the plate". So the RC servo on the left pulls a pin, the tube slides forward, and the rear wheels pop up off the floor. If we don't hit the plate centered, it won't matter - the magnets that are on the plate will hold the vehicle, and the ones hanging off the plate will be above the ground by the thickness of the plate.

Now a front right view, showing the rat-trap "engine".

The trap drives the large aluminum arm on top, which turns the large black (metal) gear through slightly less than half a revolution. The two stages of gears (salvaged from old printers) make the 3.3" diameter pulley at the front bottom turn about 3-1/2 revolutions. That winds up about 33" of 30AWG wire, which unwinds from the tapered threaded spool that drives the main wheel. The spool starts out large for good starting torque, like low gear in a car. Then it tapers to a smaller diameter, like upshifting for higher speed and better economy. The thread on the spool changes both diameter and pitch - cutting it was a fun exercise of EMC's G33 spindle synchronized motion. I'm planning a separate post about that, and maybe a video. I clearly had lots of fun with CNC - the trap arm, the wheel, the wire pulley, the bearing brackets, the cutouts in the plate that the trap is screwed to, the cutouts in the main frame rails, and the rear wheel mounts, were all done on my Shoptask in mill mode. The wire spool, several shafts and bushings, the groove in the wire pulley, and the rear wheels were also done on the Shoptask in lathe mode.

The Competition

I believe there were twelve teams signed up, but a couple dropped out. That left ten entries. We got photos of seven besides our own, here they are (click to enlarge):




Several competitors took advantage of a loophole in the rules that allowed you to recharge the rat-trap, using things like windshield wiper motors to pull a wire attached to the trap arm, etc. Not exactly the "green", energy efficient way to do things, but anticipated and allowed by the rulemakers. I was pleased to observe that our vehicle with its single "trap load" of energy was faster than all of the ones that recharged the trap.

The Results

We lost. Badly. Simple human error, based on a lack of practice runs. When you are driving a radio control vehicle that is coming towards you, the steering works one way. When the same vehicle is going away from you, the steering is reversed, because you are seeing it from the back instead of the front. My teammate was driving, and stood about two-thirds of the way down the course. He did great as the vehicle approached him - popped the first balloon, and got all three washers. But when it got close to him, instead of backing up as he did during practice, he stood still and turned around to track it. Turning around reversed the direction of the steering, and at a critical moment a few inches short of the second balloon, he turned right instead of left. The vehicle crashed into the balloon support, and we were out of the running.

Based on the performance of the other vehicles, we would have definitely been near the top if we had autonomous control - software simply doesn't make that kind of mistake. But we had too little time. I should have recruited the software guy a couple of weeks earlier. Oh well, that's how things go. It was still a lot of fun.

(posted: 22 Feb 2008 23:05) (permalink)