Hello Readers, welcome to my Blog - A Blog For Bloggers By A Blogger. I'm Arun, an entrepreneur Blogger from India.

Line Follower Robot with ATmega16 using Analog IR Sensor

42951
2
Mark as Favourite

 The Line follower robot is a mobile machine that can detect and follow the line drawn on the floor. Generally, the path is predefined and can be either visible like a black line on a white surface with a high contrasted color or it can be invisible like a magnetic field. Therefore, this kind of Robot should sense the line with its Infrared Ray (IR) sensors that installed under the robot. Line follower robot is a useful robot that is used in ware houses, industries, and stores etc, where it follows a dedicated path.

In this project, we will learn How to design a line follower robot with AVR ATmega16 microcontroller using Analog IR Sensor. This robot is an automatic robot i.e no manual control is needed. The robot automatically follows a line without any deviation from the line. The robot changes its direction incase it deviates from the line. Generally, the line is of black color on white surface or white line on black surface. To detect white and black color, we will use IR sensor because white surface reflects IR rays and black surface absorbs IR rays. In this way, the output of IR sensor defers in black and white surface. In our case, we will use a black line on white surface.

Here, we will use three analog IR sensors. All the three sensors will be placed in the front side of the robot and all will be pointing downward. One sensor will be placed above the black line and the other two will be on left and right side of middle sensor. The output of the IR sensor changes when the sensors moves from white surface to black surface or from black surface to white surface and this change will be detected by the microcontroller. But the outputs of the three analog IR sensors are analog in nature, so these signals cannot be processed directly by the microcontroller. For this, we will use the ADC of the ATmega16 microcontroller to convert the analog signals to digital values. After converting the analog signals of analog IR sensors to digital values, the ATmega16 microcontroller will compare the sensor values with a reference value(3V in our case) to know the position of the sensors.

When the position of the middle IR sensor is above the black line, the ATmega16 microcontroller will send the forward control signal to the DC motor driver (L293D) of the robot to move the robot in forward direction and when the left sensor is above the black line, the ATmega16 microcontroller will send the left control signal to the DC motor driver (L293D) of the robot to move the robot in left direction and when the right sensor is above the black line, the ATmega16 microcontroller will send the right control signal to the DC motor driver (L293D) of the robot to move the robot in right direction. The above processes of ADC conversions, sensors output comparison and robot control continues. In this way, the robot follows the black line.

Softwares Required

Hardwares Required

Name / Unit Price Quantity Total Price
AVR Trainer Board-100 with ATmega16
Rs. 700.00
1pc
Rs.700.00
AVR USB Programmer
Rs. 350.00
1pc
Rs.350.00
Analog IR Sensor
Rs. 30.00
3pc
Rs.90.00
DC Motor Driver
Rs. 200.00
1pc
Rs.200.00
Robot V 4.1
Rs. 330.00
1pc
Rs.330.00
1 to 1 Connector-Female to Female
Rs. 4.00
10pc
Rs.40.00
10 to 10 FRC Female to Female Connector
Rs. 15.00
2pc
Rs.30.00
12V, 1A DC SMPS Adaptor
Rs. 130.00
1pc
Rs.130.00
TOTAL Rs.1870.00

Circuit Diagram

Line-Follower-Robot-with-AVR_ATmega16_Microcontroller_-using-Analog-IR-Sensor_Circuit_Diagram1

Video

Connection Guide

The step-by-step connection guide for Line Follower Robot with ATmega16 using Analog IR Sensor is as follows:

  • Insert the DC Pin of 12V, 1A DC Adapter to the DC Socket of AVR Trainer Board-100.

    Steps - 1 ( 0f 11 )

  • Connect PortB header of AVR Trainer Board-100 with Input header of DC Motor Driver with a 10 to 10 FRC Female Connector.

    Steps - 2 ( 0f 11 )

  • Connect the 12V pin of PWM & Motor Voltage header of DC Motor Driver with the 12V header of AVR Trainer Board-100 with a 1 to 1 Connector.

    Steps - 3 ( 0f 11 )

  • Connect the Robot connector to the Output header of the DC Motor Driver.

    Steps - 4 ( 0f 11 )

  • Switch off the Mode Switch of DC Motor Driver.

    Steps - 5 ( 0f 11 )

  • Connect the VCC and GND pins of three Analog IR Sensor with 5V and GND header pins of AVR Trainer Board-100 with 1 to 1 connectors.

    Steps - 6 ( 0f 11 )

  • Connect the O/P pins of left, front and right Analog IR Sensor with PA0, PA1 and PA2 pins of PortA header of AVR Trainer Board-100 with 1 to 1 Connectors.

    Steps - 7 ( 0f 11 )

  • Connect the ISP header of AVR Trainer Board-100 with AVR USB Programmer header of AVR USB Programmer with a 10 to 10 FRC Female Connector.

    Steps - 8 ( 0f 11 )

  • Connect the AVR USB Programmer to the PC/Laptop's USB Port directly or with the help of USB AM-AF Cable.

    Steps - 9 ( 0f 11 )

  • Download Line Follower Robot with ATmega16 using Analog IR Sensor Hex file to AVR Trainer Board-100 with the help of SinaProg Hex downloader and AVR USB Programmer.

    Steps - 10 ( 0f 11 )

  • Switch on the power with the help of Power Switch of AVR Trainer Board-100 and see the output.

    Steps - 11 ( 0f 11 )

  • Insert the DC Pin of 12V, 1A DC Adapter to the DC Socket of AVR Trainer Board-100.

    Steps - 1 ( 0f 11 )

  • Connect PortB header of AVR Trainer Board-100 with Input header of DC Motor Driver with a 10 to 10 FRC Female Connector.

    Steps - 2 ( 0f 11 )

  • Connect the 12V pin of PWM & Motor Voltage header of DC Motor Driver with the 12V header of AVR Trainer Board-100 with a 1 to 1 Connector.

    Steps - 3 ( 0f 11 )

  • Connect the Robot connector to the Output header of the DC Motor Driver.

    Steps - 4 ( 0f 11 )

  • Switch off the Mode Switch of DC Motor Driver.

    Steps - 5 ( 0f 11 )

  • Connect the VCC and GND pins of three Analog IR Sensor with 5V and GND header pins of AVR Trainer Board-100 with 1 to 1 connectors.

    Steps - 6 ( 0f 11 )

  • Connect the O/P pins of left, front and right Analog IR Sensor with PA0, PA1 and PA2 pins of PortA header of AVR Trainer Board-100 with 1 to 1 Connectors.

    Steps - 7 ( 0f 11 )

  • Connect the ISP header of AVR Trainer Board-100 with AVR USB Programmer header of AVR USB Programmer with a 10 to 10 FRC Female Connector.

    Steps - 8 ( 0f 11 )

  • Connect the AVR USB Programmer to the PC/Laptop's USB Port directly or with the help of USB AM-AF Cable.

    Steps - 9 ( 0f 11 )

  • Download Line Follower Robot with ATmega16 using Analog IR Sensor Hex file to AVR Trainer Board-100 with the help of SinaProg Hex downloader and AVR USB Programmer.

    Steps - 10 ( 0f 11 )

  • Switch on the power with the help of Power Switch of AVR Trainer Board-100 and see the output.

    Steps - 11 ( 0f 11 )

Downloads

Line Follower Robot with ATmega16 using Analog IR Sensor
  • Rs.300
  • 0 downloads 269 Kb
  • Price In

Post a Comment

    • OmarSherif
      i want to combine between the line follower and Android Mobile Controlled in one robot , has the ability to follow the line or can be controlled wireless , but there is a problem the 2 projects have different clocks what can i do ??
      2017-05-13 01:09:00
      Reply
    • Fahimuddin,
      How can i make best programmer in EMBEDDED SYSTEM, Plz provide me suggesstion,
      2017-07-14 15:25:57
      Reply