Line Follower Robot Using Arduino Uno and L298N
by ForbiddenBit_com in Circuits > Arduino
15404 Views, 6 Favorites, 0 Comments
Line Follower Robot Using Arduino Uno and L298N
Line Flower is a very simple robot ideal for beginner electronics.
How It's Working
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.
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
1x L298N
2x iR sensor
14x Wires
1x Plexi 10cmx17cm
4x TT motor
6x baterryl AA
1x Baterry holder
8x metal distance 10mm
Schema
Ir Sensor Configure
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