Introduction
As part of the UCL EEE Scenario B project, our 5-person team was tasked with engineering a fully autonomous maze-solving robot. The team divided responsibilities across code architecture, motor control, wheel encoders, and sensor integration. My primary role was Sensor Systems Lead, who was responsible for designing, prototyping, and integrating the hardware interface that allowed the robot to sense rigid side walls and detect upcoming obstacles using tactile and optical sensors.
Ultimately, our robot was one of only 3 out of 17 teams to achieve 100% completion of the maze.
Circuits
To detect physical collisions with side walls, I designed a microswitch sensing circuit using normally open (NO) pushbuttons in a pull-down configuration. When the bumper made contact with a wall, the digital input pin on the Arduino Mega registered 5V (HIGH). When unpressed, the pull-down resistor held the pin at 0V (LOW).
For non-contact front obstacle detection, I designed an optical sensing system using paired TSUS5202 IR LEDs and BPW41N photodiodes. Current to the TSUS5202 IR LED was limited using a calculated series resistor derived from the forward voltage and current spec sheet limits to ensure continuous operation without thermal degradation. Instead of a basic voltage divider, the photodiode was biased using a 2N3906 PNP BJT transistor circuit. Incident light on the reverse-biased photodiode generates a proportional photocurrent. The PNP transistor amplifies this base current by its current gain. This provided a clear 0V to 5V analog signal to the Arduino Mega, scaled linearly with the optical power reflected from obstacles after calibration.
Challenges
Integrating both microswitch pull-down networks and BJT-amplified photodiode circuits alongside the motor drivers and encoder wiring on a shared breadboard led to severe space constraints. The complex web of jumper wires meant accidental disconnections occurred frequently during movement, causing mysterious signal drops or total sensor failure. I refactored the breadboard layout into modular power/ground rails and color-coded signal pathways. Establishing strict wiring protocols drastically cut down debugging time during test runs






_4YUDWziWQ8.png?auto=compress%2Cformat&w=48&h=48&fit=fill&bg=ffffff)

_Ujn5WoVOOu.png?auto=compress%2Cformat&w=40&h=40&fit=fillmax&bg=fff&dpr=2)


Comments