Learn-Arduino-via-simulations

LIne following robot

Making a simple line following differential drive robot using the theory learnt in last tutorial

Electrical Components used:

  1. IR Sensor- It will act as an input device for us which will detect the color of the ground.
    1. Crux- When the sensor is above a white surface, it will give a HIGH signal and when it is above a black surface, it will give a low signal.
    2. The sensors will be placed at the front side of the robot facing the ground: image
  2. Two DC Motors to drive the wheel.
  3. Arduino UNO Board
  4. L298 Motor Driver

For other components used, you may refer to the following slide made by Robotics Club, IITD: RW on Line following robot

Circuit

  1. IR Sensor has 3 pins
    1. Connect Vcc to 5V of arduino
    2. Connect GND to ground of arduino
    3. Connect SIG(Signal pin) to any of the digital pin of arduino
  2. The connections of other electronics are already covered in the previous tutorial: DC Motor Speed Control

Concept:

  1. When both left and right sensor senses white then robot move forward.(Both wheels move with same speed) image
  2. If left sensor comes on black line then robot turn left side.(speed of right wheel will be more than speed of left wheel) image
  3. If right sensor sense black line then robot turn right side until both sensor comes at white surface. When white surface comes robot starts moving on forward again. image
  4. If both sensors comes on black line, robot stops.

image

Code: That’s your next assignment ;)