The following lists all of the parts except for the laser cut frame and 3D printed ball bearing holder. If you have a local hackerspace or Fab Lab, you're in luck. If not, companies like Pololu and Ponoko will do it for you, but I have not tested the designs with either of them.
- Raspberry Pi Model A+ - $20
- Pi Camera - $30
- 2 Spring RC SM-S4303R Servos - $26
- WiFi dongle
- Daughter board PCB - $3
- Pololu 5V Step-Up/Step-Down Voltage Regulator S7V7F5 - $5
- 4-AA Battery Holder - $1
- 8-pin DIP socket
- 10 position socket
- 2 position, 2.54 mm terminal block
- ATtiny85 - $2
- 16 mm ball bearing - $1
- 3/8" #6 pan head screws
- 3/8" #4 pan head screws
- 7/16" 4-40 F-F standoffs
- 5/16" 4-40 machine screws
- 4-40 machine hex nuts
- 2-56 machine hex nuts
- 5/16" 2-56 machine screws
- .1" header header
- .1" short
- 10K resister 0805 package
- .1 uF capacitor 0805 package
- MicroSD card
- Rechargable AA batteries - Eneloop or other ~2000 mAh batteries
Very useful items:
The robot frame is a modification of the awesome SumoBot Jr.. I've made the following modifications to the original design:
- Changed screw hole locations to mount a Raspberry Pi Model A
- Added a mount for a Pi Camera up front
- Added more room for batteries and enlarged the servo hole slightly
- Modified the wheels to screw into the servo horn rather than directly attaching (not completely sure that this is an improvement)
The dxf
containing the laser cutter pattern was created in
QCad. I cut the pattern in 5 mm birch plywood using a Full
Spectrum laser cutter. The Full Spectrum driver isn't smart about which lines to cut
first like the Epilog and Universal Laser drivers, so it has the cuts divided
into "first" and "second" passes.
First, order a PCB from OSH Park.
IMPORTANT: I messed up the drill size for the 4-40 mounts, so the mounting holes on the daughterboard need to be manually enlarged with a 7/64" drill bit. Don't worry, I left clearance.
Solder the surface mount parts first. For the 10K resisters, make sure that you have the orientation correct (same direction as silkscreen label). You'll see what I mean.
The remaining components are fairly straightforward to solder since they're through-hole. I didn't solder in the ISP connector, since I programmed the ATtiny85 chips before plugging them into the board.
See the ATtiny85 program for build and programming instructions.
- Build a
nerves_rpi_elixirbot_defconfig
configuration of Nerves . ./nerves-env.sh
in the Nerves directory- Go here and run
make
One thing I learned on this project was that the Raspberry Pi does not support clock stretching on the I2C bus. Apparently, this was well documented, but I hadn't seen it beforehand. The I2C code on the ATtiny85 does stretch the clock, so if you rebuild this exactly, you will see I2C errors. With work, it may be possible to fix the clock stretching issue, but if I were to do this project again, I would look at another part besides the ATtiny85 or see if the RPi's PWM support is improved.