Skip to content

PruthuviDe/Arduino-Line-Following-Obstacle-Avoiding-Robot

Repository files navigation

arduino Arduino Line Following And Obstacle Avoiding Robot

The goal of this project is to build and develop a robot car using Arduino, that is able to follow a line, avoid obstacles if found while following the line and then come back to the original path. In this repository will be provided the whole code used to achieve the goal, the circuit diagram, and the libraries used for the Robot. About the hardware part: has been used an Arduino Uno as board, a Sensor Shield v5.0 and an L298N Dual Bridge, both optional, used to manage cables of wheels. A servo motor to rotate the ultrasonic sensor, an ultrasonic sensor to measure the distance from obstacles and two infrared sensor to track the line. If you wish to implement the code available in this repository make sure to tune parameters of the delay() functions in the code. Since the delay changes basing on the voltage of your batteries and the quality of your sensors, more or less delay will be needed to perform actions like a turn or any other movement.

  • Requirement for Line Following And Obstacle Avoidance (remove Ultrasonic sensor for Line Follower):

    • x1 Arduino Uno
    • x2 Infrared Sensor (x3 ~ x5 for more accurate when tracking line and get back when move out from the track)
    • x1 9V Battery (or x2 Power Cell 18650 2000mAh) (or at least x4 Duracell AA 1.5V)
    • x1 9V Battery Clip (or Battery Box 18650 2 Cell (have switch)) (or Battery Box for AA Battery 4 Cell)
    • x1 Ultrasonic Sensor HC-SR04
    • x1 Motor Driver DC L298N
    • x1 Holder for Ultra Sonic Sensor HC-SR04 (or you can glue sensor to robot)
    • x1 Servo SG90 (for calculate the safest path to avoid obstacle) (optinal)
    • ~20-30 male-male jumper wires
    • ~20-30 male-female jumper wires
    • x1 Switch (if you don't buy a battery box have switch)
    • x1 Chassis (or DIY)
    • x2 Motor DC motor 12V
    • x2 Wheel

    Project Simulation

    Schematics and circuit diagrams

    schematic-arduino-line-following-robot-sheet-u-Nr-Cjg-Bi-Re-1-cleanup

    Special Thanks

References

https://create.arduino.cc/projecthub/embeddedlab786/line-follower-robot-d22d06

About

Arduino based(Arduino Uno ATmega328p) Line Following and Obstacle Avoiding Robot

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published