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:
|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.|
|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.
The following is the set of miscellaneous ‘off the shelf’ parts with links to where you might find them.
|Motor controller. This module uses PWM signals from the Arduino to control up to two motors.|
|IR Sensor. This is used to detect white and black lines. You will need two of these.|
|Swivel Wheel. This is used for the rear wheel of the robot.|
|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.|
|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.|
|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
|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 email@example.com if you are interested.|
|1×4 Right Angle Male Header. You will need two of these, one for each encoder.|
|150K ohm pullup resistor. You will need four of these, two for each encoder.|
|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.
|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 firstname.lastname@example.org if you are interested.|
Arduino Nano. This microcontroller is used to control the motors and sensors.
|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.|
|Heat Sink. This attaches to the Voltage Regulator to provide cooling.|
|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.|
|2×3 Female Header. You will need 10 of these.|
|10 uf Ceramic Capacitor. You will need 2 of these.|
1×40 Female Header. You will need two of these.
2×30 Female Header.
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.
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.