Generally, line follower robot is microcontroller-based. Here we describe a line follower robot without microcontroller for those who are not familiar with microcontrollers. It is a simple project, which can be taken up as a classroom assignment. It lays the foundation for building your own behaviour-based (simulated) robot. The robot uses interfaces for the sensors to make the behaviour of the robot as versatile as possible. Two light detectors are mounted at the front of the robot. Also, a path is provided for the robot to follow—either a black track (using black colour tape) on a white floor or a white track on a black floor.
Fig. 1 shows the circuit of the line follower robot. It comprises two TCRT5000L reflective optical sensors (IC1 and IC2), inverter 74LS04 (IC3), motor driver L293D (IC4), regulator 7805 (IC5) and a few discrete components.
TCRT5000L optical sensors are used as line follower robot sensors. The TCRT5000L reflective sensor includes an infrared emitter and photo-transistor in a leaded package. The sensor and its internal details are shown in Fig. 2.
When an object comes in the sensing area, the emitted IR light reflects off the object back to the photo-transistor. So the amount of light energy reaching the detector increases. This change in light energy or photo-current is used as the input signal to activate the motors of the line follower robot.
The collector current of the photo-transistor is also dependent on the distance of the object’s reflector surface from the sensor. The intensity of the reflected signal returning to the detector depends on the surface over which the robot moves. White surface reflects maximum infrared signal, while black surface absorbs maximum infrared signal.
Motor driver L293D is interfaced with sensors and controls the 12V geared DC motors M1 and M2. The L293D is a quadruple high-current, half-H driver. It is designed to provide bidirectional drive current of up to 600 mA at 4.5V to 36V. The device is designed to drive inductive loads such as motors as well as other high-current/high-voltage loads in positive-supply applications.
The motor drivers are enabled in pairs. When enable input pins 1 and 9 of IC4 are high, the associated drivers for M1 and M2 are enabled and their outputs pin 3 and 6, and pins 11 and 14, respectively, are active and in phase with the inputs.
With the proper data inputs, each pair of drivers forms an H-bridge reversible drive suitable for motor applications. Motors M1 and M2 rotate in forward direction (say clockwise) when both the sensor outputs are low.
If you want the robot to follow a black track (made using black-colour tape) on a white floor, you need to connect jumpers SJ1 and SJ2 to B terminals as shown in Fig. 1. The robot will move as follows: When the left sensor, say IC2, detects the black track, the robot turns left. When the right sensor, say, IC1, detects the black track, the robot turns right. When both the sensors are in white surface then, the robot moves in forward direction.
If you want the robot to follow a white track change the jumpers’ positions towards W terminals. As the reflector sensor moves on the black surface, the emitted signals are absorbed by the black surface and both the inverters (N1 and N2) invert to low. These low signals are fed to the motor driver L293D and the robot moves forward. When the left sensor, say IC2, detects the white track, the robot turns left. When right sensor, say IC1, detects the white track, the robot turns right. When both the sensors are in black surface then the robot moves in forward direction.
The circuit is powered by a 12V DC battery. IC 7805 is used to provide regulated 5V supply to the circuit. Capacitor C1 bypasses the ripples from the regulated supply. LED1 acts as the power-‘on’ indicator and resistor R7 limits the current through LED1.
Construction and testing
An actual-size, single-side PCB for the line follower robot is shown in Fig. 3 and its component layout in Fig. 4.
The sensors sections should be separated from the main PCB by cutting along the dotted lines. Right and left sensors should be mounted on the front of the robot with both the sensors facing towards the ground. Distance between the right and left sensors should be aligned properly as per the width of the track on the ground.
Download PCB and Component Layout PDFs: click here