Line Follower Robot using PIC Microcontroller

Summary of Line Follower Robot using PIC Microcontroller


A Line Follower Robot using a PIC16F877A follows a contrasting line using two IR sensors and two DC gear motors controlled via an L293D motor driver. The IR sensors feed digital signals to the PIC (high on white, low on black). The PIC processes sensor inputs and drives the L293D inputs to control motor direction and keep the robot on track. The L293D is powered directly from the 5V supply since the PIC cannot source motor current. Tutorials for PIC basics and programming are referenced but not repeated.

Parts used in the Line Follower Robot:

  • PIC16F877A microcontroller (40-pin)
  • Two IR sensors
  • Two DC gear motors
  • L293D motor driver module
  • 5V power supply
  • Connecting wires and PCB/breadboard

Line-Follower-Robot-using-PIC-Microcontroller

A Line Follower Robot is a simple yet fascinating robot for most students/hobbyists to build. In this tutorial we will learn How a Line Follower Robot Works and how we can build one using the PIC Microcontroller PIC16F877A. PIC16F877A is a 40-pin Multipurpose MCU from Microchip, we have used this IC in our complete PIC tutorial series. If you are new, here you might want to a look at these PIC tutorials to learn the basic of this IC and how to upload programs to the microcontroller. Since we have already covered this information in our tutorials we will skip them in the explanation below.

Line-Follower-Robot-using-PIC-Microcontroller-circuit-diagram

The circuit employs two IR sensors and a pair of DC gear motors along with a motor driver module as shown above. The Motor driver module used in this project is L293D, we will need a motor driver because the output pin of the PIC Microcontroller cannot source enough current for the motors to drive. This module will be powered directly from the power source (5V) as shown in the circuit. The module has four pins (two for each motor) which are connected to the PIC to control the direction of the motors. We also have two IR sensors which act as an input to the PIC microcontroller.  These sensors will go high (1) if they are over a white surface and will go low(0) when over a black surface.

for more detail:Line Follower Robot using PIC Microcontroller

Quick Solutions to Questions related to Line Follower Robot:

  • How does the Line Follower Robot detect the line?
    The robot uses two IR sensors that go high over white surfaces and low over black surfaces, providing inputs to the PIC microcontroller.
  • Can the PIC16F877A drive the motors directly?
    No, the PIC cannot source enough current for the motors, so an L293D motor driver module is used.
  • What role does the L293D motor driver play?
    The L293D receives control signals from the PIC and supplies the required current and direction control to the two DC gear motors, powered by the 5V supply.
  • What happens to the IR sensors over black and white surfaces?
    The IR sensors output high (1) when over white and low (0) when over black.
  • What power voltage is used for the motor driver module?
    The motor driver module is powered directly from the 5V power source.
  • Which microcontroller is used in this Line Follower Robot project?
    The project uses the PIC16F877A microcontroller.
  • How many motors and sensors are used in the project?
    The project uses two DC gear motors and two IR sensors.
  • Do I need prior PIC tutorials to build this project?
    The article references prior PIC tutorials for basics and programming and skips repeating that information, implying prior tutorials are helpful.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter