Line Follower Robot Arduino and L293D Shield

by ForbiddenBit_com in Circuits > Arduino

11889 Views, 2 Favorites, 0 Comments

Line Follower Robot Arduino and L293D Shield

Line Follower Robot Arduino And L293D Shield

Line Follower is a very simple robot ideal for beginner
electronics. The robot travels along the line using the iR sensor. The sensor has two diodes, one diode sends infrared light, the other diode receives the reflected light from the surface. When the infrared rays fall on the white surface, they are reflected back. When infrared light fall a black surface, the light is absorbed by the black surface and no rays are reflected back, so the photodiode does not receive any light. The sensor measures the amount of reflected light and sends the value to the arduino. There is a potentiometer on the sensor, with which we can adjust the sensitivity of the sensor.

Step 1: How It's Working

step 1.jpg

The robot travels along the line using the iR
sensor. The sensor has two diodes, one diode sends infrared light, the other diode receives the reflected light from the surface. When the infrared rays fall on the white surface, they are reflected back. When infrared light fall a black surface, the light is absorbed by the black surface and no rays are reflected back, so the photodiode does not receive any light. The sensor measures the amount of reflected light and sends the value to the arduino. There is a potentiometer on the sensor, with which we can adjust the sensitivity of the sensor.

Cdn

rysunek.jpg

Arduino now has to make decisions based on the data received from the
sensor, until the sensor detects no black line it will go forward. If the left sensor detects a black line, the robot turns right, and if the right sensor detects a black line, it turns left. The robot will stop when both sensors detect a black line at the same time.

List Element's

List elements:

1x Arduino Uno

2x ir sensor

1x L293D

4x TT motors

wires

1x plexi 10 cmx14 cm

8x metal distance 10 mm

1x battery holder (6 pieces )

6x battery AA

1x switch

Step 4: Ir Sensor Configure

bumbum.jpg

Now before turning on the power, check that you have connected everything correctly. Copy the program code and upload it to your arduino, then turn on the serial monitor (in Arduino IDE -> Tools -> Serial Monitor). Place your robot on the black line and set the potentiometer so that the sensor value shows ≈ 1023, and on the white
surface ≈ 33. Sketch ir configure download. Copy the code below and upload it to arduino. Have fun 🙂 Sketch download.