Bluetooth Controlled Obstacle Avoiding Line Following Robot
You didn’t come this far to stop


Demo Video Down Below!
Project Description
All the nitty gritty details (I know youre just gonna skim through lol)


How does it Maneuver?
Line Following with IR Sensors
At the heart of this robot’s navigation system are two Infrared (IR) sensors, carefully positioned below and beside each front wheel. These sensors act like the robot’s eyes, constantly scanning the ground for the black track line it must follow.
The track itself is a narrow black strip on a lighter-colored surface, and the sensors work on the principle of light reflection. Here's how it works:
White or light-colored surfaces reflect IR light.
Black or dark-colored surfaces absorb IR light.
Each sensor emits infrared light and reads the reflection. If a sensor detects low reflection, it assumes it's above the black line. If the reflection is high, it's over the background.
Turning Mechanism:
When the robot moves forward along the track:
The line stays between the two sensors.
Both left and right motors stay active, moving the robot forward.
Now, suppose the line bends right:
The right IR sensor moves over the line and detects low reflection.
A signal is immediately sent to the Arduino microcontroller.
The Arduino responds by:
Spinning the right-side wheels backward.
Spinning the left-side wheels forward.
This creates a smooth pivot to the right until the line is centered again between the sensors.
The same principle works in reverse for left turns. This logic enables the robot to precisely follow curves and corners in real time
Modules Used
Parts used to bring it to life


The L293D Motor Driver
Elephant in the Room!
The L293D motor driver shield acts as an interface between the Arduino and the motors, providing bidirectional control for up to four DC motor or two stepper motors and two Servo Motors simultaneously. The shield is equipped with the L293D IC, which contains two H-bridge circuits capable of driving motors with voltages up to 36V and currents up to 600mA per channel.


Using the HC-06 Bluetooth Module
The HC-06 module only can be a slave. This makes it only useful for say connecting a notebook as a master to a robot with a slave module e.g. for a wireless serial bridge.
I integrated an HC-06 Bluetooth module to receive commands wirelessly from my Android device using a custom control app (as demonstrated in the video below).


Using the Ultrasound Sensor
I used an ultrasonic sensor module to detect obstacles in front of the robot. The sensor continuously emits ultrasonic pulses and waits for their reflection. By measuring the time between emission and the returning echo, it calculates the distance to the nearest object. If an object is detected within a 30 cm threshold, the robot automatically begins to reverse to avoid a collision.
Everyone's Favourite!
Demo Video!
