Introduction: 413: the XKCD Hamsterbot

Picture of 413: the XKCD Hamsterbot

Project & Deliverable Overview
Who: Audrey and Miles

What: Making the XKCD “New Pet” with an Arduino

Why: Because we have to do an Arduino project for Ms. Earnhart's Engineering Design class, and we’re big fans of XKCD and robots.

Description of Objectives

Construct, wire and code a functioning and driveable version of the XKCD “New Pet” Robot, minus the camera and autonomy. The robot will be able to drive on land and (hopefully) water. It is meant to be something funny and cool to watch and play around with for anyone who likes robotics and/or is a fan of the XKCD webcomic. This device will be awesome!

Description of Deliverable

Fully driveable robot encased in a large (~12”) Ferret exercise ball or similar plastic ball. The main body will consist of a flat wooden disk with four arms extending out below the disk. The arduino and battery arrays will be mounted to the top of the board and the omni wheels and servos will be mounted to the arms. It will be run by an arduino and at least two 9 volt batteries/AA battery arrays. Motion will be achieved using 4 continuous rotation servos and omni wheels which will turn the plastic ball that the robot is inside of. It will be controlled by an RC transmitter connected to the arduino and will be able to drive on land and (hopefully) water.

Important Note

While trying to complete this project for class, we ordered an RC receiver and transmitter to let us, you know, control the robot. Although we are publishing this Instructable because our class project is done, the RC components have still not arrived in the mail, after several weeks. We plan on completing the project as soon as we get the necessary components, and will post it here, but for now the robot just drives randomly and is not controllable.

Step 1: Obtain Materials

Arduino Uno

12" plastic (ferret) ball

3" Tetrix Omni Wheels (x4)

RC transmitter and receiver

Continuous rotation servo motors (x4)

1/4in plywood

Assorted fasteners and wires

AA Batteries (x10)

Step 2: Construct Base

Picture of Construct Base

Construct circular base using a cutting implement. I used a bandsaw with a circle cutting jig so I could easily make a perfect circle by hand. You could also conceivably use something like a laser cutter, CNC mill or other advanced means.
After cutting out your base, (or at the same time if you use CNC), you need to drill a series of .25 inches holes in the base. The first four are made .78 inches from the center of the piece in each cardinal direction so they form a sort of plus sign. The next holes are made in line with the first and center and .5 inches from the first set of holes.

The next holes are .375 inches and are drilled about .5 inches from the midpoint of each set of holes drilled. These holes are for running wires and really can be placed anywhere that is convenient for wiring.

To drill the next sets of holes (for mounting the Arduino) we found it easiest to set the Arduino on the base, trace it, and then use a pencil or other marking instrument to mark the hole positions. If you CNC the base then taking measurements is your friend. Drill out the holes with a 7/64 drill bit.

Step 3: Servo Arms

Picture of Servo Arms

The next step is to the construct the servo holding arms, of which there are four (the following information is mainly for our specific servo arms but can apply to any arms you design). We 3D printed ours which I would highly suggest but doing so means that you may have to do a bit of touchup work. The CAD files are included in this Instructable, but they are designed to hold our specific servos. I you use different servos, you may have to design different arms. If you do not 3D print them, print out an image of the arms you made with a 1:1 ratio then glue the picture over the material you wish to cut them out of. Then just follow the lines.

After you have cut out (or 3D printed) your piece you need to drill out the holes. With your cut out you just drill with a 7/64 drill bit in the appropriate spots, and if you are touching up a 3D printed you will want to drill through the existing holes as 3D printing isn’t always perfect. You next need to drill out the mounting holes in the servo arms. These are .5 inch mounting holes in the top part of the arm. They are .5 inches away from each other and (insert actual measurements here) from the end.

Once you have all these holes drilled out, you can actually attach the servos to the arms.

Step 4: Servo Horn Modification

Picture of Servo Horn Modification

Most servos come with "horns" to attach them to various pieces. You will need to modify the servo horns by drilling holes that fit the screws used for mounting your wheels. We had to make (insert measurement here) holes. This was done using a x-y positioning clamp and a drill press. Align the servo horn so the servo horn is concentric with the wheel and mark the center of the mounting holes on the servo horn. Drill out the holes on these marks. You will need to go slow because the drill bit will want to align into the pre-made holes in your servo horn (if there are ones). Going slow allows the drill bit to make its own path.

Step 5: Assemble

You can now mount all of these pieces together! At this point you should have a base, with an arduino and four mounting arms attached. Your four servos are attached to the arms and the omni wheels are attached to those servos.

Step 6: Wiring (Power)

Picture of Wiring (Power)

Above is a picture of the wiring that will need to be done on this bot. In the next step, you will have to run signal wires from the PWM ports on the Arduino to the RC receiver and each of the servos. However, the more difficult task will be power. We did many calculations on how much voltage and current would be running through each wire, and concluded that we needed 4 AAs to power the servos and 4 AAs to power the Arduino. Arduino battery packs are actually pretty easy to find, so we just purchased the one above. However, making the battery pack for the servos is more complicated. First, we got a battery holder for 4 AAs. It had a place to clip on wires, but all the clip-ons we could find had the wrong gauge wire, 22 instead of the necessary 20, so we cut those and soldered 20 gauge in their place. Next, those 2 20-gauge wires need to be split into 4 22-gauge wires each, running in parallel, making a positive and a ground for each servo. There is a choice here of whether to use solid core or stranded wire, because solid core connects easily to the PWM but is difficult to solder in parallel. We actually split up the stranded 20-gauge wire into 4 branches, twisted and soldered each of them around a solid core wire, and them stuck them all together at the end. We don't have that much experience with soldering, so if anyone has a better solution, please let us know! In the end, we stuck everything on the base, plugged the wires into the PWM coming from the motors, did a little cable management, and it ended up like the picture about. Attach your Arduino to the base and you battery pack to the Arduino and you can go ahead and power up!

Step 7: Wiring (Signal)

Picture of Wiring (Signal)

You got to power up in the previous step, but nothing should move yet. You need PWM signal from the Arduino board. Luckily, the signal wires are far easier to manage than the power ones - simply run 22 gauge wire from the signal line on the motor's PWM cable to the corresponding ports on the Arduino. Make sure to pick ports that are PWM compatible - denoted on the board with a tilde (~). We labeled our motors after the cardinal directions, and paired them up N=11, S=10, E=6, W=5. After wiring, take everything down to your base securely (and if you're us, color-coded!).

Step 8: Code!....or Not

Aaaaannnnddddd it still won't move. You need code. This unfortunately, is where the Instructable ends for now. I don't have any functioning RC code to give you because our transmitter/receiver package never arrived (see the intro for more details), but I whipped you up some neat test code so you can see your bot run around a bit. If you have more success than I did locating RC controls, I recommend using this Sparkfun article to modify the code. Good luck, and I'll see you soon once I can complete this Instructable!

Comments

tomatoskins (author)2015-03-12

This would be awesome to see a video of this thing moving!

About This Instructable

1,749views

10favorites

License:

Add instructable to: