Line Follower without using micro controller

We can use three digital infrared sensors for detecting the black line which works on 5V supply. It is connected to the bottom of the bot and returns low if it detects black, and returns high if it detects white. The inputs from these sensors are given to a circuit made up of gates whose output is given to the motor driver L293D, so that it can drive the two motors.

Required Components:
1. 2. 3. 4. 5. 6. 7. Chassis Wheels Components like screws Motor 3 Digital Infra red sensors Logic gates (IC 7402, 7404, 7408, etc) L293D

Possible cases:


A) B) C) D) E)

All on the black line. Leftmost sensor, outside the black line. Left and middle sensors, outside the black line. Rightmost sensor, outside the black line. Right and middle sensors, outside the black line.

F) All outside the black line.

Table with all possible cases:
Case A B C D E F L 0 1 1 0 0 1 M 0 0 1 0 1 1 R 0 0 0 1 1 1 Type Straight Right Sharp Right Left Sharp Left Stop A 1 1 1 0 0 0 B 0 0 0 0 1 0 C 1 0 0 1 1 0 D 0 0 1 0 0 0 Left Wheel Forward Forward Forward Stopped Backward Stopped Right Motor Forward Stopped Backward Forward Forward Stopped

A, B, C, D are connected to Input 1, Input 2, Input 3, Input 4 of the L293D motor Driver. L, M and R are the inputs to the left sensor, middle sensor and the right sensor. We can to use Karnaugh map method to for finding the minimal circuit that can give the desired outputs for L, M and R as the inputs. Notice that there are many don’t cares while solving Karnaugh map. We can build the circuit using the IC’s 7402 (4 NOR gates), 7404 (6 NOT gates), 7408 (4 NAND gates). It’s better to build the circuit on a circuit board, than on a breadboard so that you won’t have loose connection problems.

How L293D Works:
The L293D IC, looks like this:

Vss is Logic Supply Voltage, i.e. 5V in this case. Vs is the Supply Voltage and that has to be given to the motor. This IC can take a maximum of 36V, so we can use all the motors which work below 36V. The Enable1 and Enable2 take by default 5V even if they are left open. So we need not connect them.

I think it costs about Rs. 80. This is how L293D works, If INPUT1 is 5V, then OUTPUT1 will be 9V. If INPUT2 is 5V, then OUTPUT2 will be 9V. If INPUT3 is 5V, then OUTPUT3 will be 9V. If INPUT4 is 5V, then OUTPUT4 will be 9V. The 5V logic coming out of the microcontroller becomes 9V when it comes out of the IC. The outputs of the motor driver are connected as follows: Output 1 – Connected to the positive of the Left motor Output 2 – Connected to the negative of the Left motor Output 3 – Connected to the positive of the Right motor Output 4 – Connected to the negative of the Right motor Hence, we have the 9V which can drive the motors.

This is how the circuit has to be connected. Those red circles are the motors whose shaft should be connected to the wheels. We have our bot ready.  Any queries, report to