This is a very simple robot to make, with cheap components:
- 1 x Launchpad MSP430: $4.30 (plus shipping)
- 2 x cheap Hobbyking.com servos: $1.98 (plus shipping), easily modified for full rotation.
- 2 x wheels. I 3D printed mine, but you can make these from many other things
- 2 x light sensitive resistors (LDR). Â < 1 USD each.
- A battery pack with 3 rechargeable AA NiMH batteries, totalling 3.6 volts (Don’t use alkaline!)
The Energia-sourcecode is available here. I had to update this from C-code and the online IDE I had made (Inventortown). But since I took down Inventortown, I’ve made new code in Energia, but it’s untested. The pinout for example is definitely wrong, but hopefully it can be a basis for you to tweak.
Program the Launchpad, connect one servo to pin P1.0, one to P1.1. Connect the two resistors in series with VCC and GND in each and, and connect the middle point of them to P1.5. Then connect the power to the servos and to the VCC/GND of the Launchpad. Add a power switch for convenience. 3 x NiMH AA make 3.6 Volt which is fine for the Launchpad. If you use Alkaline batteries, the voltage may be too high, and Alkalines aren’t very good for robots anyway.
Servos have three connectors. The darkest on one side is ground and connects to ground (-) on the battery and ground on the launchpad. The middle is power and connects to the battery (+) and VCC on the launchpad. The third one (sometimes white or some other light colour) is the signal, connecting to P1.0 and P1.1 as mentioned above. You need to modify the servos for full rotation. This involves connecting it to a signal that centers it (90 degrees), opening it up, removing the gears, soldering the stick that goes into the potentiometer so that it won’t rotate any more, making the hole of the outer gear bigger, so it won’t stick to the pin but rotate freely, putting the gears back together. There are many videos on youtube for this, and it’s done in 5 minutes. It gives you a simple controllable gear motor at a low price.
This robot can be modified for example to a line (black tape) following robot, quite easily.
To assemble the robot, use for example double sided tape. Start with the battery holder on the bottom. Then tape the servos onto this. Then tape the Launchpad onto the servos. Done.
Here’s the video: