The Autonomous Mine-Rescue Buggy was developed as coursework for the Embedded C for Microcontrollers module. It is a PIC-based vehicle that reads coloured waypoints, executes the mapped manoeuvre, and returns home by replaying the command log in inverse. The system uses a TCS3471 colour sensor over I²C, RGB to HSV classification, PWM motor control, wall-alignment, and turn calibration.
Note: The outcome was influenced not only by control logic but also by hardware limitations. In particular, the low-grade components caused variability in performance: the motors produced slightly different outputs, leading to a tendency for the buggy to drift left or right. This required continual adjustment of power delivery and calibration routines to maintain a straight path and reliable navigation.
Sensor: The colour sensor reads RGBC values, adjusts with a white reference, converts to HSV, and matches to preset colour ranges.
Control: Wheels run on PWM with side-specific tuning. The buggy reduces drift by bumping the wall before and after each card, then moves in fixed steps.
State: Each move is logged. On the finish card, the log is replayed in reverse so the buggy returns to the start.
Modes: Accuracy mode (power≈25) for careful runs, and Speed mode (power≈60) for faster but less precise runs.
| Colour | Instruction |
|---|---|
| Red | Turn right 90° |
| Green | Turn left 90° |
| Blue | Turn 180° |
| Yellow | Reverse 1 square, turn right 90° |
| Pink | Reverse 1 square, turn left 90° |
| Orange | Turn right 135° |
| Light blue | Turn left 135° |
| White | Finish — return home |
| Black | Wall detected — return sequence |