Wall Following Robot
Built a fully functional wall-following robot in a first-year group project at UCL, integrating a Nucleo board for real-time control and an Arduino for distance tracking. Wheel encoders measured distance covered, while ultrasonic sensors enabled the robot to maintain a consistent offset from the wall using efficient logic-based decision-making.
Calculates Distance Travelled
The robot tracked its movement in real-time using wheel encoders. The Arduino processed this data and displayed the total distance covered on an OLED screen, giving us continuous feedback throughout its journey.
Avoids corner walls
Equipped with front and side ultrasonic sensors, the robot detected approaching corners or narrow spaces. It adjusted its path instantly to avoid collisions and stay aligned with the wall.
Adaptable design
The robot's modular wiring and open layout made it easy to tweak, troubleshoot, and iterate. The system could be expanded with new logic or components in minutes, making it highly adaptable to different layouts and experiments.
Design stage
The creation of the wall-following robot started more with an idea than a project plan. I'd been watching how robot vacuum cleaners move, the way they stick to walls so precisely really caught my attention. I thought it'd be a fun challenge to try and see if we could do the same ourselves. I knew from the beginning that I wanted us to utilize a variety of sensors, not for the sake of complexity, but to actually observe how things such as ultrasonic sensors and encoders interact within a real-time system.
​
We started experimenting with layouts, where each sensor would be positioned for the best coverage. The 10 cm away from the wall was our sweet spot, and from there we mapped out the control logic. I was keen on using encoders not just for mobility but to keep track of distance traveled, so we also added an OLED display and handled that part using the Arduino. Whilst the Nucleo board handled the core logic and decision-making.


Hardware Assembly
We needed the design to be easy to tweak, especially if we wanted to add things as we went. So we laser-cut an acrylic base and drilled holes for just the essentials — the motors and the castor wheel. Most of the plate was left empty on purpose. That gave us room to mount the batteries, microcontrollers, and the OLED screen without having to constantly reshuffle everything.
​
The open space made it simple to move things around or test out new setups. It wasn’t the cleanest build, wires were everywhere, but it let us experiment freely. If something didn’t work, we could fix it quickly without starting over. That flexibility turned out to be one of the best decisions we made.




Electronics and prototyping
Once the hardware was sorted, we moved on to assembling the electronics. That’s when we hit a small roadblock — the libraries for the OLED screen didn’t work the same way on the Nucleo board as they did on the Arduino. Rather than waste time trying to rewrite everything, we decided to split the workload. One microcontroller would handle the control logic, and the other would take care of the signal processing and the display. The wiring was done as per as the electronics schematic diagram.
​
In the end, we got the robot working just in time for the deadline. It wasn’t perfect, but it ran well enough.

The main components used were as follows:
-
2x Microcontroller Unit (Nucleo + Arduino)
-
2x Ultrasonic Sensors
-
1x Motor Driver Module
-
1x LCD display
-
2x DC motors with encoders
-
1x breadboard
-
20x Jumper Wires



Video Demonstration
The following video shows a physical demonstration as well as a 3d representation to understand the robot better.
Credits: Aditya Bishnoi