I’ve already shown how a PICAXE can be used to build a simple Robot. I know that this blog is really meant to be aimed at Raspberry Pi users but the techniques would be similar. As a result, I thought it’s worth uploading the photographs that show the robot being constructed. If I can get the technical Lego back from my son, it might be possible to rebuild using the Raspberry Pi, and even extend the functions to make more of it!
The original blog post shows the robot in action.
The chassis is constructed using a variety of beams and plates along with a couple of gear trains. You’ll need:
- 8 x 1 beams (4x)
- 8 x 2 plates (1x)
Once the chassis is assembled, it’s time to start putting together the gear mechanisms on top.
Assemble the wheels and beams to the main part of the chassis. Remember to tuck the axles carefully into the chassis and check that these rotate freely. You may need to adjust the position of the wheels to help this along.
The standard Lego motors are rated at 4.5v. A couple of volts seems to be lost across the output transistors in the motor driver so it’s safe to use a higher voltage power supply. Add 24 tooth spur gears to the motor shafts.
Fit the Lego motors and prepare to start joining the chassis together using various plates. The overall speed reduction is based on a worm/wheel mechanism (1:24) combined with a simple spur gear mechanism (1:3). The overall reduction is therefore 1:72 which seems adequate for this weight of vehicle.
The LDR modules are easily made with a 2×2 block, a 2×2 plate, a 5mm drill bit, some wire and a hot glue gun. These can be used with the analog inputs to aid navigating around a black line drawn on the ground.
The light module is created from a Superflux LED embedded within the 2×2 block. There’s also a 180Ω resistor hidden in there. The transparent blocks spread the light out a bit more and the cap makes a really pleasing looking light. I’ve used it in the final model to indicate that it has bumped into something.
The overall wiring for the PICAXE motor control board. There are two pairs of cables for the motors, one output for the LED, two digital inputs for the bumpers and two analog inputs for the LDR sensors.
Once the project is built, it’s necessary to write a control program. The algorithm is featured on the original page. I would suggest start by using just the bumpers and then work towards using the analog inputs.