How to Make a Robot That Avoids Obstacles and Line Follower

by cristinepotu7171 in Circuits > Arduino

759 Views, 2 Favorites, 0 Comments

How to Make a Robot That Avoids Obstacles and Line Follower

ocolitorul.jpg
Obstacle Avoiding Robot Tutorial
in this tutorial we see how to make a robot that avoids obstacles and line tracker with ultrasonic sensor, Arduino UNO and infrared mode

Supplies

xczxc.jpg
86b82cf4525bc903dbe08a3b50bf47eed4fa476d_original.jpeg
eng_pl_2WD-210mm-Car-Chassis-Robot-Platform-2-Wheels-2-Motors-Set-Arduino-566_1.jpg
l298n-punte-h-dubla-dual-h-bridge-motor-dcsteppe.jpg
download (1).jpg
download (8).jpg
1k-ohm-resistor__05927.1532890549.jpg

1.Arduino UNO board

2.Infrared module x2

3.Car kit Arduino

4.LM298n DC Motor dual bridge

5.Ultrasonic sensor HC-SR04

6.led

71k resistor

Schematic Diagram

OCOLITOR SCFHEMA.png
Make the connections of the components according to the diagram below


Construction and Wiring

IMG_20220527_133037.jpg
IMG_20220527_133033.jpg
IMG_20220527_132831.jpg
IMG_20220527_132828.jpg
IMG_20220527_132812.jpg
In this step we assemble the kit, mount the Arduino board on the chassis and make the connection according to the electrical scheme.


Upload the Software in Arduino Board

OCOLITORU.png
downloadV.png
OCOLITORU2.png
in this step we download Visuino and install. We make adjustments according to the texts in the photos. Attached is the code in Visuino and sketch format.

The car did not move straight and I had to set different values ​​in 'Analog value' '. You can change the values ​​depending on how your car is moving. Values ​​are defined with the red arrow in the attached pictures. Change the value until the car goes straight


Start the Robot

IMG_20220527_132726.jpg
IMG_20220527_132734.jpg
IMG_20220527_133037.jpg
Finally we power the device.

Install the batteries and switch the power button to ON. The robot should follow the path you have drawn (see video) and avoid obstacles in its path.
I hope you enjoy this tutorial, good luck everyone!