There are currently 0 users and 1 guest online.
Quickster, the CD-bot
Submitted by Ro-Bot-X on January 27, 2008 - 6:44pm.
I wanted a simple and easy to build platform, to test out mapping and object finding. The robot sould be able to look around for some type of objects, go pick them up and deliver them to specific points on the map. These delivery points have to be recognized by the robot and marked on the map. Eventualy this code will be ported to another robot.
One day I was emptying a plastic CD box at work and thought that it would make a nice robot. I took it home and started to take measurements to see how can I make a robot that would be able to do something similar with I-Create robot that Admin used for mapping. After some time I decided that I should write down how I want it to behave. Here is what I wrote:
I got some double sided tape (the one that looks a little spongy) and I cut 2 pieces at one servo lenght. I taped together the scanning servo to one of the driving servos and after that to the other driving servo, making sure the driving servos are horizontal and the scanning servo is vertical and all the axles are oriented in the same direction. I measured the total width of the 3 servos and marked a transparent CD (one of those transparent plastic CDs that you can find in the CD box at the bottom) and cut 2 equal sides off, to make room for the wheels. The result was a rectangle with 2 round edges and with a hole in the middle. I used that to mark the perfboard and cut it so it was a little longer than one half of the chassis CD. Then I cut out a small piece to have room for the vertical servo to get in. The result was something like a horse shue... (see the picture above) then I cut 3 pieces of double sided tape and taped the servos to the chassis CD in a way that the axles would be in the center axis of the CD. Using tie wraps I tied the servo leads in front of the robot so they don't get loose under the wheels.
Chosing the right diameter for the wheels was a pain. I looked around for plastic jar lids, bottle caps, anything that would be round and a 'nice size diameter". I finaly got 2 bottle caps, a little under 50 mm diameter. I added a piece of ruber from an bycicle inner tube and it had almost 51 mm in diameter. That made about 160 mm circumference. Divided by 32 I got 5 mm, so I made a round wheel encoder with 32 stripes that fit the inside of the bottle cap. To make the encoder disc I used a post script template and GhostScript program to print it out to the laser printer on a piece of photo paper. I found the template on the Seattle Robotics Society website.
Trying to screw the bottle caps to the big round servo horns I found out that the servo horn will go too much inside the bottle cap and I will not be able to install the wheel on the servo. So I cut 2 round pieces of 4 mm thick plywood and used them as washers between the bottle cap and the servo horn. After I screw them together, I cut a hole in the center of the encoder disc and superglued it to the inside of the wheel. You can see the wheels here:
At first I wanted to use one of the kitchen cabinets door buttons but I found out that it is too tall. So, I looked around to find a small ball with a hole in it. I found my whife's beads box and got a nice 12 mm diameter bead. I drilled 4 small holes and using a paper clip, I attached the bead to one of the round ends of the chassis CD. I had to cut a piece out to make the bead go through the CD a little, to have it at the right height.
In the back of the chassis, right over the caster bead I installed the batteries box using a piece of velcro. This way I can remove it to charge the batteries. Hopefully I will build a charger station to charge them on the robot.
I cut 2 semi circles out of the round transparent CD box case to make room for the wheels. Then I drilled holes for the standoffs in the CD box case and in the chassis CD, just behind the servos, near the batteries box. After making the electronics board, I drilled a few more holes in the case, to make room for the IR sensors and IR LEDs. I drilled a hole for the ON/OFF switch and installed it on the top of the case.
This is the longest step. I took me several days to complete. Here is the schematic and a PCB that I draw just to see if it can be done similar to the perf board that I used. What you see on the schematic is the second version of the robot, with a slave motor controller. In order to free up some memory space on the ATmega168 I decided to use a ATtiny26 that I had around to drive the servos and check the encoders. The two microcontrollers are connected through the I2C interface. The ATtiny is not yet installed on the perf board. The socket that you will see on the perf board was for an onboard MAX232 that I ended up not using since I have a small interfaceboard.
I cut the perf board round to match the CD roundness in the front. In the back I cut out a piece where the scanning servo will be monted. Then I started to add components. The first thing I did was to install the 4 QRD1114 photoreflective sensors for the wheel encoders. I had to fiddle a little with the position to be close enough to the encoder disc (somewhere in between 5 and 10 mm). Then I started to solder the parts on the perf board, the IC sockets first, then the resistors, capacitors, pin headers, jumper wires, LEDs and IR proximity sensors, the crystal, the 5 pin sockets... Then I started to make connections using solder, between the pads on the perfboard for the close parts that needed to be connected together. Then I started to make the power and ground bus using solid insulated wire, a little thicker than the wirewrap wire. After that, I started to make longer connections between parts, using wirewrap wire. At the end, I wished that I had made a home made PCB... You can see the electronics board here:
Assembling the robot.
After all this hard work I started to put it all together. First I mounted the Electronics board just under the Scanning Servo mounting holes and used 2 M3 screws to hold it in place. Then I mounted the wheels (no screws yet) and then I plugged all the wires into the electronics board. Then I mounted the top case holding it in place with 2 short standoffs (they will be used latter for AVRcam add-on). Then I made a quick Lego Mount for the Sharp IR sensor and screwed it on top of the Scanning servo small round servo horn. All done! Here it is:
For the ease of programming I have decided that I will use the Arduino environment. So I have built the DAPA programmer using instructions from the Arduino website. I have attached it to the board and to the laptop and tryed to upload the bootloader without much success. Looking around I found the folder where the bootloaders are located and used the command line to uploade it. I think i managed to do it, because the status LED was flickering at startup. However I could not upload any sketch from Arduino environment. After some digging, I found that I could use my STK200/300 programmer with the command line loader. So I have compiled the simplest "Blinking LED" sketch and uploaded it. It worked! But that was without the bootloader, so I was back at fiddling with the bootloader. Bootloader uploaded fine but no sketch would upload using the bootloader. I wanted the bootloader to work so I can use Bluetooth to upload sketches. But in the end I gave up on it. I takes a lot of program space so there is little room left for the mapping stuff. Oh well, can't have it all right now...
Here comes the hard part. Well, at least for me. I am used to Basic, so Arduino is a lean transition to C language. I have made the first test sketches to see if the encoders work. But something happened when I tryed to upload them, my Mega8 did not work anymore... I hope I can get anoter one soon, hopefully a Mega168. Maybe this one will work with the bootloader...
(work in progress...)