Robert L. Jordan
Youll remember Skatebot from the article in the July/August SRS Encoder. Well, since then we won a second (2nd) and third (3rd) place prize at the September 16, DPRG Roborama B biannual contest. This is really a "Part 2" article but I couldnt resist using the word "Won" in the title.
September 26 Skatebot was entered in the Dallas Personal Robotic Groups T-Time contest. This is the 3rd hardest of their 4 contests. In it Skatebot navigated three areas of a large 24 foot by 16 foot "T" shaped course area.
The BS2 and my 2 pound Skatebot won 2nd place right behind a robot weighing over 50 pounds and using a 486 Personal Computer! I likely missed first place because I did not have a cute body on top, and did not detect the finish line. These were options I should have included. My time for completions was actually faster than the 1st place winner.
By the way the "Borg" robot Tom K. & Dennis Draheim won 1st place with was way cool! It is a 15 inch ominous looking smoked plastic cube that actually would run in any polar direction with tracks that lifted up & down.
There are 3 ways to get started building a Robot (From DPRGs sayings)
I highly recommend you buy a "robot" kit that can be hacked. This is sort of in between the first and second method above. Although I have lots of experience, it is still good advice when building a robot. Hacking a kit or toy provides you a time savings in completed hardware, sub-systems, and design time. That is what I did when building the Skatebot.
Some robot fans tell me that the Basic Stamp 2 (BS2) from Parallax, Inc. is a too small a Microcontroller and that I should use a "Bigger" micro-controller or computer for my robots. Well the neighbor next door used to like to "kill ants with a sledge hammer", too. Use the right tool for the job. The way I see it if the BS2 will do the job, why complicate it with more horsepower and programming requirements. Easy choice dont you think?
Sorry for the messy looking bread boarded robot, but remember it won a second prize. Neat is good for show, messy is good for fast and experimental.
James Vroman wrote the winning code. He has a way of greatly simplifying things so even I can understand it.
The IR sensor array consists of three IR LEDs (QEC113) and two 38Khz IR Detectors (PNA 4602M-ND). You can get these from Digikey. These are the IR parts Parallax, Inc. uses on their BoE-Bot kit and are easy to use and very effective.
Notice in the first picture how the IR components are positioned. The left IF detector points to the left at about 45 degrees. The Right IR detector should be pointing directly to the right side. One IR LED points to the right, another 60 degrees toward the right on the front right corner, and the third to the left side about 45 degrees.
The reason for this positioning is due to it being a wall follower. Remember the course it was designed to win on is a large silhouette of a "T". That means it had to navigate both inside and outside turns. The IR LED on the front right was used as a look-ahead to make turning right on an outside turn faster. The IR LED directly to the right navigated a fixed distance from the wall by sensing a "too close" and a "too far" range. The IR LED facing front and left watched for walls in front. With it to the side a little, it did not over correct for a front wall when it was turning back toward the side wall.
In the Basic Stamp you just send a FREQOUT command to modulate the IR LEDs for a milli-second or so and then look for a low on the IR detectors. You can even look close or far by changing the 38 Khz to a value between about 37 Khz or 41 Khz, This is like turning down the sensitivity of the detector. By doing this James was able to "identify" a "too close" and a "too far" condition with his programming. This allowed the Skatebot to tell when it was just the right distance from the wall. Sort of a shaken but not stirred range to stay away from the wall. With a robot as fast as the Skatebot, it is critical that this "zone" be quick and easy to identify. James software with these IR devices worked very well!
James R. Vroman wrote the winning Skatebot software. You can download it here
Notice in the top view of the Skatebot, how the corners of the PCB are cut off at 45 degrees on the front. During the pre-contest testing it was navigating the walls so precisely that the corners were poking a small hole in the foam walls. When I adjusted the IR LED position to resolve this issue all ran OK. Because the judges could not see the walls well, and because they already had marks on them from my pre-testing, I cut off the corners so they could better see that the Skatebot was not touching the walls. It was just navigating very precisely and very closely to the wall. Should I call this a Judges Hack?
This figure reveals the copper side of the Printed circuit board (PCB). It is clean
and easy to work on. The circuitry is split into the RF receiver on the left and the two full H-Bridges on the right.
The custom IC that controls the H-Bridge is in the upper left corner of the picture. You can see on the right end of this IC, that the last two pins on each side - A,B,C, and D -route toward the right side of the PCB. These 4 leads connect through resistors to the transistors controlling the H-Bridge and motors.
If you cut the traces, shown with the "X", you can connect your micro controller to the H-Bridge control leads - a, b, c, & d - to control the H-Bridge and operate the motors. Remember these 4 leads are resistors in series with the H-Bridge control leads. As a result you (usually) do not need to further isolate your BS2 from the H-Bridge. Just connect these leads directly to the BS2 pins.
Solder wires from the resistor ends of the lands to a connector on the added PCB. These leads connect directly to the OEM-BS2 (Basic Stamp) for controlling the H-Bridge, which controls the motors.
The H-Bridge connections to the Basic Stamp-OEM are connected to the development PCB on top of the Skatebot with a polarized, 4 pin, female connector. Use the male connector on the PCB. Be sure to connect the grounds between your controller and this PCB.
The H-Bridge connections connect to the Basic Stamp 2 (BS2) "a" goes to BS2 pin P15, "b" goes to P14, "c" goes to P13, and "d" goes to P12. This will be wired through a connector to the PCB, usually. If you use the R/C - Robot switch option these connections will go through the 4P4T switch as well.
By installing a 4-pole-4-throw switch in the H-Bridge connections you can return the Skatebot to Remote Control (R/C). This is fun to play with, but also allows you to manually try things you are trying to program the robot to do. If you cant get it to do a sliding spin turn on the kitchen floor, chances are the software cant either. Saved James and I lots of time. Good programming stress reducer too!
Here is a schematic of how to use the switch.
The Skatebot proved to be everything I wanted it to be. This was only the third contest I have ever entered any robot in and it won an admirable 2nd place position.
James Vroman is a good friend to have when you are designing or coding a robot. You can contact him via his website James.Vroman.com
Dont be afraid to go against the trend on robot building. If you fail, that is what many probably expected anyway. Besides you learned more than the "standard" thinking guys. If you win you will be a hero! Well for at least 15 minutes you will.
A local After School/Home School teacher named Jim McMillan is planning on helping his students build 30 to 50 of these robots in the next 6 weeks. That will sure make you feel like a winner! Seeing the kids eyes pop open, when they cant easily catch this little sucker, makes the effort all worth while.
The first place winner of the T-Time contest is building a Skatebot. Now thats a compliment! Thanks Dennis. Oh Yea! I named my robot "Skatebot Won". Its an ego thing. Email me if you think I can help you or your robot.
Robert L. Jordan