Introduction: How to Make a Robot That Avoids Obstacles and Line Follower

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

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

Step 1: Schematic Diagram

Make the connections of the components according to the diagram below


Step 2: Construction and Wiring

In this step we assemble the kit, mount the Arduino board on the chassis and make the connection according to the electrical scheme.


Step 3: Upload the Software in Arduino Board

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


Step 4: Start the Robot

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!