kilian@cray.com (Alan Kilian) (05/21/91)
It seems that A lot of people want to know about my first robot so I'll just post it rather that Email it to everyone. Here it is, enjoy. I constructed a robot in 1981-82-83 around my senior year in highschool. The platform came from a toy called a "Big Trax" (I think) It was a plastic housing with two motors and two independent gear reduction systems built in. The really neat thing about this gearbox was that each motor shaft has a magnet on it. The two motors and magnets were arranged like this: +----------+ +-+ +-+ +----------+ | | | | | | | | | | --+ | | +-- | | | Motor #1 ===== | | ===== Motor #2 | | | --+ | | +-- | | | | | | | | | | +----------+ +-+ +-+ +----------+ ^ ^ ^ | | | Motor Shaft | | | | Plastic gear | | Bar magnet The cool thing about this arrangement was that when both motors were going in the dame directions the magnets would attract each other with enough force to keep the motors synchronized and the platform would drive perfectly straight ahead. When the motors were turning opposite directions or when one motor was turning but the other motor was not the magnets did not exert enough force on each other to interfere with the other motor. It takes a little extra energy when in this configuration to overcome the attraction to the other magnet (Either stationary or turning in the opposite direction) but it was well worth it for the benefit of having your platform go really straight forwards or backwards. The platform was about 5" wide and 8" long It has two rubber tires from a model airplane about 4" in diameter and 1" wide. In the front was a hard rubber caster wheel. This platform could hold about 2 pounds so I didn't have too much weight to play with. The only sensor it had was a stepper motor on top with a pair or ultrasonic sensors on it. This was a 2.5" square perfboard with the ultrasonic driver and receiver on it. The board got +5Volts, Ground, Send_A_Pulse and Got_A_Pulse connections to it. 4 wires was about all I could get and still have the stepper motor able to rotate the board through 180 degrees. For the controls I used an RCA CDP1802 microprocessor and 256 Bytes of static RAM. There was an 8 bit parallel I/O chip and the processor could do a couple of bits of I/O itself. The stepper motor driver was 4 reed relays since I was not putting any real torque on the stepper motor I could run it with pretty low amperage and the steppers worked fine. They were driven off 4 bits of I/O from the CPU. The Send_A_Pulse and Got_A_Pulse lines were 2 more bits of I/O and the motors took 4 more bits of I/O. The motors had heftier relays driving them and they had transistors to drive the coils (Whew I had to design a real transistor current amplifier there and that was humbling). Add A few NiCad batteries and we were running. Oh, everything else was a "Simple matter of programming". You could get bytes into the 1802 by switching it into a DMA mode and setting toggle switches for the data and having the 1802 count the addresses for you one byte at a time. I had a clip that clipped onto the 1802 and connected to a hand held panel of 8 toggle switches that I used to load programs. Man those were the days. Loading program after program one byte at a time. First I didn't have the ultrasonic stuff and I loaded programs to do things like drive in a square and a circle and things like that. The trouble with that was I had spent about 4 months building a machine that could do some of the things the Big-Trax could do before I took it apart! I needed to get something built that was better just to satisfy myself that I could make a robot better than a $49.00 toy. So more software. The stepper motor controller was about 12 bytes for clockwise and another 12 bytes for counterclockwise. What a memory spendthrift I was in my earlier days! It took almost 30 bytes to get the range info from the ultrasonics board. Something like this: Start a timer in the I/O chip. Raise Send_A_Pulse. Lower Send_A_Pulse. Loop checking Got_A_Pulse until its True. Stop the timer in the I/O chip. Read the counter in the I/O chip. If it's a zero then we are close to a wall. The range sensing really left something to be desired. The 1802 was REALLY slow. Were talking about something like 100,000 instructions per second here. So the range want like this: Count Range 0 < 12 Inches 1 12 - 20 Inches 2 20 - 28 Inches 255 > 28 Inches (I couldn't send a loud enough pulse on 5Volts) So my software just looked if the count was zero and avoided walls really well. Now we were getting somewhere I had a robot that drove straight until the counter said zero and then looked left and then looked right and whichever count was larger it would drive that direction. If they were the same it would go right since it was already pointing that way. It didn't really know how far it was turning because it would just turn on the motors for a fixed amount of time and the turn amount depended on the surface it was driving on, but it worked. I was really proud of this and I played with it for many a battery cycle. That's about as far as that project went. The platform couldn't hold any more weight so It stalled there. Here are the things I wanted to add: - Low battery detection. When the batteries got low the CPU would go Splooie and sometimes leave a relay on for a while causing the robot to run donuts until the batteries got too low to hold the relay coil energized and then it was done. - Find a recharger. I had this great system where the robot would make a tone and the recharger would hear the tone and start a xenon strobe that the robot could use to navigate to the charger. This was from some book I read about robot building. I really wanted to do this one. That's about it for that robot. It was a great project and I really learned a million things from it. I should have saved it intact but there were just too many good parts in it. I do have the platform and the ultrasonic "head" so it still looks cool. That's a good way for a robot to die. Giving up it's organs so that other projects may live on. (Oh I'm just soooo deep tonight) I hope you enjoyed the story. -Alan Kilian -- -Alan Kilian kilian@cray.com 612.683.5499 Cray Research, Inc. | If god had meant us to use the metric system 655 F Lone Oak Drive | he would have given us ten finger and ten Eagan MN, 55121 | toes. The author of _Lighter Elements_