The Parts

In this chapter we will list all of the parts required to build the robots used for the tutorials, including possible sources for those parts.

The brains of the robot will consist of a Raspberry Pi. You have two choices depending on the tradeoff you wish to make between performance and price:

 raspberrypi3 Raspberry Pi 3. This is the more expensive option, but will give you a lot more power. If you wish to add a camera at some point, then you should use one of these. You can get these at Amazon with free shipping (if you have Amazon Prime) for about $36. You will, of course, also need to add a micro SD card, but it has built in WiFi.
 raspberrpizero Raspberry Pi Zero W. This is the newest Raspberry Pi and costs a mere “$10”. Of course you cannot actually get one for that price. They have been generally unavailable but can now be usually be purchased for about $15 including shipping (which is still a fabulous deal). Although, technically, you can connect a camera to this one, I do not recommend it since it really doesn’t have the CPU power to process the images in real time. However, if you are looking to make a bunch of robots at the minimum cost, this is the ticket. You will, of course, need to add an micro SD card. This will bring the total cost to something close to $20.

The following set of parts are all 3D printed. You can download the STL files for these parts here.

partschassisrearpi3 Chassis rear for Raspberry Pi 3. Use this part if you are building a robot using the Pi 3.
partschassisfrontpi3 Chassis front for Raspberry Pi 3. Use this part if you are building a robot using the Pi 3.
partschassisrear Chassis rear for Raspberry Pi Zero. Use this part if you are building a robot using the Pi Zero.
partschassisfront Chassis front for Raspberry Pi Zero. Use this part if you are building a robot using the Pi Zero.
partsswivelwheelmount Rear swivel wheel mount.
partsencodercoupler This is the adapter which will connect the motor to the shaft encoder. You will need two of these.
partsarduinobordclamp This piece is used to clamp the Arduino board to the Raspberry Pi Zero board.
partsspacer This spacer is used when mounting the shaft encoders and the Arduino board. You will need six of these.

The following is the set of miscellaneous ‘off the shelf’ parts with links to where you might find them.transparent4

partsmotorcontroller Motor controller. This module uses PWM signals from the Arduino to control up to two motors.
partsirsensor IR Sensor. This is used to detect white and black lines. You will need two of these.
partsswivelwheel Swivel Wheel. This is used for the rear wheel of the robot.
transparent4partsmotor Drive Motor. Two of these motors are needed for the drive wheels. Different gear ratios for these motors are available. The most common is 1:48, however I prefer the 1:120 version. The robot will move slower, but it will be more controllable.
 partswheel Drive Wheel. You will need two of these to attach to the Drive Motors. You can purchase these separately from the motors, but you can also find them bundled with the motors.
 partsdupontcables 20 cm, 40 pin Male/Female Dupont Cable.

The next set of parts are needed for the Wheel Encoder board which provides the mechanism to measure the rotation and speed of the wheels

 partsencoderboard Encoder PC board. You will need two of these. This is a custom PC board. As discussed in the introduction, you can create the Wheel Encoder using a generic PC board and wiring it manually. However if you are going to want to make a number of these using a custom board like this is helpful. I do have a small number of these boards available and if there is enough interest, I can get more made. Contact me at robotics@gabysoft.com if you are interested.
 parts1x4rightangleheader 1×4 Right Angle Male Header. You will need two of these, one for each encoder.
 parts150kresistor 150K ohm pullup resistor. You will need four of these, two for each encoder.
 partsencoderpot Contineous rotation potentiometer. You will need four of these, two for each encoder.

The next set of parts are needed for the Arduino board which controls the motors and sensors and communicates with the Raspberry Pi via the serial port.

 partsarduinoboard Arduino PC board. This is a custom PC board. As discussed in the introduction, you can create the Arduino Board using a generic PC board and wiring it manually. However if you are going to want to make a number of these using a custom board like this is helpful. I do have a small number of these boards available and if there is enough interest, I can get more made. Contact me at robotics@gabysoft.com if you are interested.
 arduino  

Arduino Nano. This microcontroller is used to control the motors and sensors.

 partsvoltageregulator LD1085V50 Voltage Regulator. This converts the battery voltage (~8v) to the 5.0v needed by both the Raspberry Pi and the Arduino. It is capable of delivering a total of 3 amps.
partsheatsink Heat Sink. This attaches to the Voltage Regulator to provide cooling.
 partslevelshifter Bi-Directional Level Shifter. The Raspberry Pi uses 3.3v logic signals and the Arduino uses 5v logic signals. This module converts between the two.
parts2x3header 2×3 Female Header. You will need 10 of these.
 Capacitor 10 uf Ceramic Capacitor. You will need 2 of these.
 parts1x40femaleheader
1×40 Female Header
. You will need two of these.
 parts2x20femaleheader
2×30 Female Header
.
 parts5mmscrewterminal  

2 Pin 5mm Screw Connector.

 parts1x2maleheader  

1×2 Male Header.

 parts1x2jumper  

2.54mm Micro Jumper.

You will, of course need a number of bolts and nuts to hold the robot together. You can obtain this from a number of sources, including your local hardware store.

parts4-40-1-2screw 4-40 1/2 in. Machine Screw. You will need 4of these
parts4-40-1-1-8screw 4-40 1-1/4 in. Machine Screw. You will need 4 of these
parts4-40hexnut 4-40 Hex Nut. You will need 8 of these.
parts8-32-1-2screw 8-32 1/2 in. Machine Screw. You will need xxx of these.
parts8-32-1-4screw 8-32 1/4 in. Machine Screw. You will need xxx of these.
parts8-32locknut 8-32 Hex lock nut.
parts4-24-3-8machinescrew 4-24 3/8 in. Sheet Metal Screw. You will need xxx of these.

Finally you will need a battery to power your robot and I recommend using rechargeable batteries. You want around 7-8v. The best choice is a two cell LiPo battery. You can try using NiMh AA batteries, but I have found that their discharge characteristics are not ideal and can cause a brown out of the Raspberry Pi when motors are starting and drawing a lot of current.

Next: Configuring the Raspberry Pi