You'll need the following materials (per robot):
50-60 sq. in. 0.093 in. thick Acryllic COST: $2.50
Optical Mouse (the really old kind that you can get for 3 bucks on amazon. You'll need one for each robot) COST: $3
Two motors (we used compact Sparkfun motors with attached gearboxes. We used a direct drive so motors with an appropriate speed are a must) COST: ~$3 each
One 9V battery COST: ~$1
About 4 in. of 1 in. wide balsa wood. COST: negligible
2 small (~1 in.) L-brackets COST: negligible
Arduino COST: $3 for chip, $25 for full board
an nRF24 radio chip COST: $3
an H-Bridge COST: $1
Total cost (approx.) = $16.50 + Arduino
Laser Cutter/Bandsaw/Hacksaw (in theory you only need one, but doing the whole thing with a hacksaw would be awful)
An assortment of wires
Some small (#2 - #4) screws, washers, and lock-washers
Heat shrink tubing
Accelerant for the glue
Below is the frightening visage of a completed swarmbot in all its operational glory.
Step 1: Getting Your Acrylic Parts
We made three panels for the top, left and right sides that were joined at box joints. We then added structural pieces similar to a raspberry pi's case between the left and right sides. (first picture)
Additionally, we chose to cut our wheels out of acrylic, and included a number of spacers to ensure that the body of the swarm bot wouldn't interfere with the motion of the wheels. If you decide to cut your wheels this way as opposed to using wheels from a kit, be sure that you've thought about how you want to connect these wheels to your motor shafts. Keeping in mind the tolerances of the laser cutter this might not be the best way to go. Alternatively adding some hot glue to the junction between the wheel and motor shaft should be a decent temporary fix.
For this step we chose to use a laser cutter with appropriate tolerances on all pieces. I've attached some images of the cut acryllic below and for reference, each swarm bot is about 3x4 in.
After getting all of the pieces cut, the assembly of the basic frame is pretty straightforward, just use super glue and accelerant to make sure the joints are nice and tight (Super glue is really what you want to use here, it'll make a real chemical bond between the plastic and stay strong for far longer than any other glue would.)
Step 2: Prepare the Mice
Lucky for us, another fantastic piece of technology buried away in mice is the optical encoder that tracks the mouse's actual position. The digital handshake to communication with the mouse is pretty convoluted, but there's a good explanation of how to interface with the mice, as well as all of the reasons why mice are the best cheap sensor packs around here: http://playground.arduino.cc/componentLib/Ps2mouse
For our purpose we want to take the bottom portion of the mouse, use a bandsaw, or other cutting implement to cut away the sides. Then, to make sure that the camera chip is properly optically isolated we want to cover the top in electrical tape. Make sure that the area between the lens and the LED isn't obscured because then your measurements will lose all accuracy.
Additionally, if you have them, now is the time to attach the teflon pad to the bottom of the mouse to ensure smooth travel.
Step 3: Optional: Clean Up the Mouse Connection
Firstly you want to expose the end of the wire and twist the strands together. You then want to run a bead of solder along the stranded core to tin the wire. Once that's done you want to take a piece of solid core wire and solder it in line with the tinned stranded core ends of the mouse cord.
Once the solid core wire is soldered on to the cord wrap the connection up with some heat shrink tubing to make sure it stays like that. Pictures below show a typical PS2 connector, but the wires are exactly the same for a USB mouse.
Note: Important, depending on where you get your mouse the color coding may change. Even worse, most mice use the same four colors (green, blue, white, and orange) though they use them with different conventions. Remember to feel your mouse's chip when you plug it in to make sure nothing is getting hot.
Step 4: Mounting the Motors and Wheels
You should solder leads onto your motors at this point. Since you are starting to close off parts of the swarm bot it will be extremely difficult to solder these leads on later.
Since the motor is only mounted on one side we decided to use a combination of a washer and a lock washer to make sure that the motor would be mounted securely. We later discovered that the lock washer wasn't even needed, and the mounting of the motor was fairly secure without it.
If you a directly mounting the wheel onto the shafts as we did here think very carefully about the diameter and thickness of your spacers. If the diameter is too small the wheel will wobble pretty extremely. While the shafts are not extremely long, consider the length of the particular screws you're using to mount the wheel. You can add smaller spacers to the outside of your wheel to make sure that the screws go an appropriate distance into the shaft without damaging the motor.
Step 5: Mount the Mouse to the Underside of the Robot
It might seem strange to design a robot that has such a large surface directly contacting the ground, but the mouse encoders have to be a very particular distance from the ground or else their accuracy falls dramatically. Placing a teflon pad on the front of the mouse away from the actual encoder is a reasonable alteration, but it's near the limit of what the encoders can robustly take.
There are a few important points here. Firstly the distance between the motors should be just about the width of a 9V battery. This makes an extremely convenient placement location for what would otherwise be a very difficult to place component. Secondly try to keep the vertical overhead of your joints as minimal as possible. You would like to be able to fit your circuitry components within the robot, so maintaining as much clearance as possible is a must.
If you want to be able to accurately detect turning you should place the lens of the encoder as far away from the pivot point of the wheels as possible. You might want to consider actually putting the mouse in backwards, though the swapping of coordinate directions is confusing enough to make that non-ideal.
We used two L-brackets for the back joint sealed with hot glue which worked extremely well. We then made more minimal balsa wood and cardstock brackets in the front, making sure to seal the break of the balsa wood. These braces were all attached using hot glue, though there is probably a better way of attaching them, precision is hard when you didn't design the parts.
Step 6: Optional: Adding Treads
We used a spongy kind of grip tape this time around that worked absolutely fantastically. We added some hot glue around the edges to make sure that the treads would stay on. Important to make sure there isn't too much slack around the edges or else your path will be way off.
Step 7: Plugging Everything
Below you should see a fritzing diagram of how exactly to connect up all the components. The chip with seven leads coming out of it is the nRF24 chip, and the chip with only three leads is the mouse encoder. The mouse encoder will vary from mouse to mouse so the only way to get that one figured out is by guess and check. The mouse should turn on, the led should then get dim, when you move the mouse it should get bright again, and the camera chip shouldn't get hot. Also something should come out over Serial. If all of those criteria are fulfilled your mouse is hooked up correctly.
As far as software goes, both on the electrical side and on the twitter to master computer side there are a few great resources that should be able to help you out:
http://playground.arduino.cc/componentLib/Ps2mouse (for the mouse, same as before)
http://maniacbug.wordpress.com/2011/11/02/getting-started-rf24/ (use to hook it up, but maniac bug's library is extremely spotty)
http://playground.arduino.cc/InterfacingWithHardware/Nrf24L01 (the radio library we switched to that solved our problems)
https://github.com/WestfW/OptiLoader (For efficiently bootloading your own chips, if they're 328's and not 328P's)
https://github.com/SwarmBots?source=c (All the code that was actually used for the project, though the documentation could be better)
Step 8: Mass Produce and Celebrate
Also, don't forget to celebrate, because when those guys move for the first time it's really exciting.