Course Module • Jillur Quddus
3. Build a Robot Car
Python Taster Course
Python Taster Course
Jillur Quddus • Founder & Chief Data Scientist • 1st November 2022
Back to Course Overview
Introduction
In this module we shall build a robot car in preparation for it to be programmed using Python so that it may follow simple and advanced instructions.
1. Hardware Requirements
You will require the following hardware components and tools to build our robot car.
1.1. Components
- BBC Micro:bit V2 (circa £15).
- Elecfreaks Ring:bit Car V2 (circa £22).
- Elecfreaks Ring:bit Car V2 Accessories Kit (circa £16).
1.2. Other Tools
- Small cross head screwdriver (included in the Elecfreaks Ring:bit Car V2 package if bought as a kit).
- 3 x AAA 1.5V Alkaline batteries.
- USB micro-B compatible data transfer USB cable.
2. Components Overview
The following table provides a brief overview of each of the major hardware components listed above.
Hardware Component | Description |
---|---|
Micro:bit V2 Vendor • Buy | The BBC Micro:bit is a pocket-sized computer that enables budding engineers and developers to learn how software and hardware work together. It has an LED light display, buttons, sensors and numerous input/output (I/O) features that, when programmed (using either Python, JavaScript or via a visual code builder), let it interact with the world around it. It can also be easily extended and used to control other devices such as the Elecfreaks Ring:bit Car. |
Ring:bit Car V2 Vendor • Buy | The Elecfreaks Ring:bit Car is a small DIY smart car that is controlled and driven by the BBC Micro:bit. The Ring:bit car extends the Micro:bit's three GPIO ports (3 pins), allowing different sensors and components to be easily attached to the Micro:bit. |
Ring:bit Car V2 Accessories Kit Vendor • Buy | The accessories kit includes dedicated modules designed for the Ring:bit car. The tracking module enables the detection of edges and black lines. The light bar module delivers full-colour LEDs. And the Sonar:bit module enables obstacle detection and avoidance. |
3. Assembly Instructions
Please follow the steps outlined in the following ordered subsections to assemble the Ring:bit car and to attach the tracking and Sonar:bit extension modules respectively.
3.1. Components List
Check that you have the following components, in the correct quantity, by laying them out on a table.
Component | Quantity |
---|---|
Micro:bit V2 | 1 |
Ring:bit Car V2 Board | 1 |
Front Board | 1 |
Back Board | 1 |
Base Board | 1 |
Side Board | 2 |
Expansion Board | 1 |
Wheel | 2 |
Binding Post | 1 |
360° Servo | 2 |
Castor Wheel | 1 |
Screw (Flat) | 5 |
Tapping Screw | 5 |
Rivet | 2 |
Screwdriver | 1 |
AAA 1.5V Alkaline battery | 3 |
USB micro-B compatible data transfer USB cable | 1 |
3.2. Servos and Wheels
- Place one of the servos into the pre-cut hole of one of the side boards, ensuring that the jump wires face the smaller end of the side board (as opposed to the larger end).
- Secure the servo to the side board using 2 x tapping screws.
- Gently slide a wheel onto the servo and use 1 x tapping screw to secure it into place.
- Repeat steps 1 - 4 for the other servo and side board.
3.3. Base Board
- Locate the castor wheel and base board.
- Secure the castor wheel to the base board using the 2 x rivets.
3.4. Car Chassis
- Connect the back board, the base board (that is attached to the castor wheel), the front board and the special expansion board to the left side board (that is attached to the servo and wheel) using the pre-cut holes.
- Connect the same boards to the right side board in order to form the chassis (or body) of our robot car.
3.5. Binding Post
- Unscrew the screw from the end of the binding post.
- Push the binding post through the pre-cut round hole of one of the side boards and into the opposite side board.
- Re-screw the screw into the end of the binding post in order to secure it into position.
3.6. Micro:bit Controller
- Place the Micro:bit V2 board on top of the Ring:bit V2 board.
- Use the 5 x screws (flat) to secure the Micro:bit V2 board to the Ring:bit V2 board.
3.7. Jump Wires
- Connect the right servo to the Ring:bit V2 board via the pins labelled 2VG, making sure that the ground wire (brown) is connected to the G pin (otherwise the servo and hence wheel will not work).
- Connect the left servo to the Ring:bit V2 board via the pins labelled 1VG, making sure that the ground wire (brown) is connected to the G pin (otherwise the servo and hence wheel will not work).
- Connect the special expansion board to the Ring:bit V2 board via the pins labelled 0VG, making sure that the ground wire (brown or black) is connected to the G pin (otherwise add-on modules such as the infrared tracking module connected to the special expansion board will not work).
- Place the Ring:bit V2 board onto the front board of the car body.
- Tidy the wires so that they are contained within the body of the Ring:bit car.
For further information regarding the Ring:bit's GVS pins, please refer to the next module of this taster course.
3.8. Base Ring:bit Car
The assembly of the base Ring:bit Car V2 is now complete!
3.9. Tracking Module
The optional tracking module is equipped with two infrared sensors that enables the Ring:bit Car to perform edge detection and thus follow a black-lined route.
To install the optional tracking module, please follow the ordered steps below.
- Place the tracking module on the special expansion board.
- Use the 2 x screws to secure the tracking module to the special expansion board.
3.10. Sonar:bit Module
The optional Sonar:bit module is an ultrasonic sensor that enables the Ring:bit Car to detect, and thus avoid, obstacles.
To install the optional Sonar:bit module, please follow the ordered steps below.
- Attach one end of the Sonar:bit board to the back board of the Ring:bit car using 2 x rivets.
- Attach the Sonar:bit ultrasonic sensor to the other end of the Sonar:bit board using the further 2 x rivets.
- Connect the Sonar:bit module to the Ring:bit V2 board via the pins labelled 0VG, making sure that the ground wire (brown or black) is connected to the G pin (otherwise the ultrasonic Sonar:bit module will not work).
3.11. Extended Ring:bit Car
The assembly of the Ring:bit Car V2, extended with the tracking module and the Sonar:bit module, is now complete!
Summary
In this module we have built a robot car in preparation for it to be programmed using Python so that it may follow simple and advanced instructions.
What's Next
In the next module we shall program our robot car to follow simple and advanced instructions including moving forwards and reversing, following black lines, moving towards bright light sources, and automatically detecting and avoiding obstacles.