Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Sensor Series
      • 3D Printing
      • AI
      • ARDUINO Compatible Coding
      • Audio Electronics
      • Battery Management
      • Beginners Electronics Series
      • Brainwave
      • Digital electronics (DE)
      • Electric Vehicles
      • EMI/EMC/RFI
      • EVs
      • Hardware Filters
      • IoT tutorials
      • LoRa/LoRaWAN
      • Power Tutorials
      • Protocol
      • Python
      • RPI Python Programming
      • Sensors
      • USB
      • Thermal management
      • Verilog
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
  • Guest Post Guidelines
  • Advertise
  • Subscribe

Line Following Robot

By Ashutosh Bhatt January 17, 2014

This circuit describe a simple line following robot which a you can easily make in your homes because it does not contains any complex digital circuitry and this can be made without using any microcontroller.  In this circuit the robot the will follow a white line on black surface. This simple circuit is made with the help of single IC that is L293D and few more commonly known components.

[[wysiwyg_imageupload:11363:]]

Fig. 1: Prototype of Line Following Robot Circuit on Breadboard


In this circuit we are using L293D IC as a motor diver IC to control the movements of motors and we are using LDR’s as a sensor which will sense the path for the robot to follow.  Before understanding the working lets understand the working of individual components.

1.LDR which is working as a sensor here. LDR is basically made up of semiconductor material. Semiconductor material has energy band where electrons and holes exist. These are present on valence band and the conduction band. For conduction to take place electrons must exist in conduction band. Bur energy gap prevents the electrons from moving into conduction band. Therefore electrons need energy to reach to conduction band. And this energy is provided in the form of electrical energy by connecting a power supply to the semiconductor material. The number of electrons present in the conduction band and energy gap will give you the resistance of the material. Similar phenomenon happen in LDR when light fall on LDR, Due to light energy electrons move to conduction band causing resistance to decrease.

In short LDR can be define as- LDR is a device whose sensitivity depends upon the intensity of light falling on it. The resistance of LDR decreases when intensity of light falling on it increases and vice versa (resistance increases when intensity of light falling on it decreases). In dark or in absence of light, LDR exhibits a resistance in the range of mega ohms,  which decreases to few hundred ohms in presence of bright light.

2. L293D– It is a motor driver IC which is used to drive the motor on either direction. L293D comes in 16 pin dual inline package. And can drive two sets of DC motor with the help of single IC which can be move independently according to the input provided. It works on the theory of H bridge which permit voltage to flow in either direction in clockwise or anti clockwise direction. Pin diagram of L293D is as follows-

L293D Pin Diagram

Fig. 2: Pin Diagram of L293D 

From the pin diagram you can see that it has two enable pin that is pin 1 and pin 9. For rotating the DC motor enable pin should be high. For example if you want to rotate the left motor than enable pin 1 should be high. Similarly for right motor pin 9 should be high. And if any of the pin is low than that motor will not work and if both the pins are low robot will stop moving.

L293D contain four input pin 2 pin for controlling each motor. Like pin 2 and pin 7 are on left side and control the rotation of the left  motor and pin 15 and pin 10 are on right side and they control the rotation of right motor. And there outputs pin are pin 3 and 6 for left motor and pin 11 and pin 14 for right motor. Following table shown below will help to you know in which direction motor will rotate when logic 0 and logic 1 is provided on the pins.

Pin 2

Pin 7

Motor Rotation

Logic 1

Logic 0

Clockwise Direction

Logic 0

Logic 1

Anticlockwise Direction

Logic 0

Logic 0

No rotation

Logic 1

Logic 1

No rotation

 

3. LED stands for light emitting diode. It is made up of semiconductor device which emit different light source as its output. LED  is a semiconductor diode that emits narrow-spectrum light when electrically biased in the forward direction of the p-n junction. When LED is switch on in this electronics combines with hole and the device release energy in the form of light.

4. Motors – You can use two 200rpm DC motors and it should be connected with wheel for moving the robot. in place of motor  I have used LED.

Working of circuit is very simple consider two cases-

1. Case 1 when sensor is placed on black line –  As we know in dark LDR has very high resistance in the range of  M ohms. Now if we want to calculate the voltage at this point. Suppose resistance of LDR is 1M ohms.

Than voltage at this point is –

= 5*20*1000/((20*1000)+(1*1000000) V

= approx 0V

2. Case 2 when sensor is placed on white line- At this time light fall on LDR and its resistance is very low. Suppose it may be 1 or 2 ohms.

Then voltage at this point is-

= 5*1*1000000/((20*1000)+(1*1000000))

= approx 5V

So from the above calculation it is clear that when robot is on black line it will give you logic 0 and when it on white line it will give you logic 1. And from the circuit diagram you can see that this pin is connected to enable pin of L293D IC pin number 1 and 9 and from above it is clear that when this pins are high then only motors will rotate according to the table show below.

While soldering the sensor (LED + LDR) make sure there wire will long enough because they have to look at the line which robot will flow else it will create a problem in following a path. And cover the LDR and LED properly and pair them together -so that light of the room will not affect its working.

Circuit Diagrams

Line-following-robot-Circuit-Diagram

Project Components

  • L293D
  • LDR
  • LED
  • Resistor

Project Video


Filed Under: Electronic Projects
Tagged With: L293D, ldr, line follower robot, robot
 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

Submit a Guest Post

submit a guest post

EE TECH TOOLBOX

“ee
Tech Toolbox: Power Efficiency
Discover proven strategies for power conversion, wide bandgap devices, and motor control — balancing performance, cost, and sustainability across industrial, automotive, and IoT systems.

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS EDABOARD.com Discussions.

  • What is the frequency changing when I change the W?
  • PDKs setup for Virtuoso
  • Why do expensive synchronous rectifier controllers exist?
  • improving in delivering a signal from source to load
  • rechargeable battery and simple alkaline battery in one single product

RSS Electro-Tech-Online.com Discussions

  • Manually actuate fuel tank selector solenoid
  • JLCPBC are using a different shipping company = less $$$$$$$$
  • Help please! BLDC driver circuit using the IR2136s and the STP80NF06 MOSFETS
  • need two ICs
  • MLT-8530 Buzzer on ESP32: Why Is the Sound Output Lower Than Expected?

Featured – Real Time Hardware Filter Design

  • Practical implementation of bandpass and band reject filters
  • Practical application of hardware filters with real-life examples
  • A filter design example
  • Types of filter responses
  • What are the two types of hardware filters?
  • What are hardware filters and their types?

Recent Articles

  • GigaDevices introduces 32-bit MCUs with integrated DSP and FPU support
  • Grinn introduces 8-core SBC supporting AI-ready embedded development
  • EPC’s 100 kHz BLDC inverter supports high-efficiency motion control
  • Melexis announces 5 W smart driver to supports sensorless FOC operation
  • STMicroelectronics’ motion sensor simplifies industrial IoT system design

EE ENGINEERING TRAINING DAYS

engineering
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Sensor Series
      • 3D Printing
      • AI
      • ARDUINO Compatible Coding
      • Audio Electronics
      • Battery Management
      • Beginners Electronics Series
      • Brainwave
      • Digital electronics (DE)
      • Electric Vehicles
      • EMI/EMC/RFI
      • EVs
      • Hardware Filters
      • IoT tutorials
      • LoRa/LoRaWAN
      • Power Tutorials
      • Protocol
      • Python
      • RPI Python Programming
      • Sensors
      • USB
      • Thermal management
      • Verilog
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
  • Guest Post Guidelines
  • Advertise
  • Subscribe