Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • 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
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe

ARDUINO BASED PHOTOVORE ROBOT

By Prabakaran P.M September 8, 2024

Summary:

Sometimes Electronics hobbyist gets ideas to build robots from animals in nature. There are robot dogs, robot snakes, robot birds, and even robotic insects! In this project, you will build a robot of your own which will automatically drive chases a light source, mimicking a behavior called photo-taxis, seen in some insects and flowers. This is a robot that chases light, for this to work, the robot needs at least two lights detecting sensors, out in front and spaced apart from each other.

Prototype of Light Following Arduino Robot

Fig. 1: Prototype of Light Following Arduino Robot

Description:

Prerequisites & Equipment:

You are going to need the following:

  1. An Arduino Board or Arduino clone(Here is a guide if you need)

  2. Two DC Motors.

  3. A 5v TTL -UART Bluetooth module.

  4. Robot chassis and wheels which suit your chassis size and motor size.

  5. Arduino IDE for the programming.

Working Principle:

Arduino Clone is used here to read the Light intensity of these two Photoresistors and make a comparison and drive the robot in the direction of light. For example, if both photoresistors are getting the same lighter, then the robot should drive straight. If the right photoresist or get more light than right robot should turn towards the right.

Another specialty of this design is by using the same code and some modifications in the hardware we can make the robot avoid objects, by means of bending down the Photoresistor to the ground so that we can make use of shadows of the object to avoid the object by avoiding darkness.

This Photovore robot can also be changed to Photophobe robot by simply reversing the connection of motors i.e. right motor connection to the left and reversing the positive and negative terminals also.

Block Diagram of Light Following Arduino Robot

Fig. 2: Block Diagram of Light Following Arduino Robot

The sensor we are using here is a light dependent resistance (LDR) which exhibits Photoconductivity. Its resistance increases with the decrease in light intensity and vice versa. To use them as a sensor we have to measure the voltage drop across the LDR. Because the change in resistance means a change in voltage.

Two different voltage divider principle ways to implement this one is Voltage increases with Light. (R*Vin)/(R+Rphoto) = Vout

Circuit Diagram of Light Sensitive Voltage Divider Network

Fig. 3: Circuit Diagram of Light Sensitive Voltage Divider Network

Another one is Voltage decreases with Light. (Rphoto *Vin)/(R+Rphoto) = Vout

Circuit Diagram of Dark Sensitive Voltage Divider Network

Fig. 4: Circuit Diagram of Dark Sensitive Voltage Divider Network

Three steps are there to determine what resistor we should use for R. To do this, we first need to measure the resistance across the Photoresistor in two situations using a multimeter. The first situation is the darkest light of the Robot. The second situation is the brightest light of the Robot. Now, we need to multiply both resistance values, finding the square root of the total will give the value of the resistor you should use.

Hardware assembly:

Make the circuit as is given by the circuit diagram. Make the robot assembly with your selected parts and connect the motors to the circuit. Optocouplers are used to safeguard the Arduino from High voltage risks.

Code description:

void setup() {

sensorValue1 = analogRead(LDR1);

sensorValue2 = analogRead(LDR2);

LEFT = sensorValue1/100;

RIGHT = sensorValue2/100;

NLEFT = LEFT;

NRIGHT = RIGHT;

}

The above part of the code is to measure the normal light intensity and storing that value for future comparison and making the robot stable.

The below conditions are used to navigate the Robot:

if ((LEFT == NLEFT) && (RIGHT == NRIGHT))

Condition to compare present LDR values to the normal LDR values, to stop the robot when there is no change.

if ((LEFT > NLEFT) && (RIGHT > NRIGHT)&&(RIGHT == LEFT))

Condition to move the robot forward if both the LDR values are increased.

if ((RIGHT > LEFT)&&((LEFT > NLEFT) || (RIGHT > NRIGHT)))

Condition to move the robot Right if both the LDR values are increased.

if ((LEFT > RIGHT)&&((LEFT > NLEFT) || (RIGHT > NRIGHT)))

Condition to move the robot Left if both the LDR values are increased.

You may also like:


  • What are the top development boards for AI and ML?

  • What are different types of industrial robots?

  • What are LoRa gateways and what types are available?

  • What battery chemistries are used in electric vehicles?

  • What are the different types of EV charging connectors?

  • What are the components of robotic arms and industrial robots?

Circuit Diagrams

Circuit-Diagram-Arduino-Based-Light-Following-Robot

Project Video


Filed Under: Electronic Projects

 

Next Article

← Previous Article
Next Article →

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



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

EE TECH TOOLBOX

“ee
Tech Toolbox: Internet of Things
Explore practical strategies for minimizing attack surfaces, managing memory efficiently, and securing firmware. Download now to ensure your IoT implementations remain secure, efficient, and future-ready.

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

  • Voltage mode pushpull is a nonsense SMPS?
  • Input impedance matching network
  • High Side current sensing
  • The comparison of different Tcl script checkers
  • Reducing "shoot-through" in offline Full Bridge SMPS?

RSS Electro-Tech-Online.com Discussions

  • Back to the old BASIC days
  • Parts required for a personal project
  • PIC KIT 3 not able to program dsPIC
  • Failure of polypropylene motor-run capacitors
  • Siemens large industrial PLC parts

Featured – RPi Python Programming (27 Part)

  • RPi Python Programming 21: The SIM900A AT commands
  • RPi Python Programming 22: Calls & SMS using a SIM900A GSM-GPRS modem
  • RPi Python Programming 23: Interfacing a NEO-6MV2 GPS module with Raspberry Pi
  • RPi Python Programming 24: I2C explained
  • RPi Python Programming 25 – Synchronous serial communication in Raspberry Pi using I2C protocol
  • RPi Python Programming 26 – Interfacing ADXL345 accelerometer sensor with Raspberry Pi

Recent Articles

  • What is AWS IoT Core and when should you use it?
  • AC-DC power supply extends voltage range to 800 V DC
  • Infineon’s inductive sensor integrates coil system driver, signal conditioning circuits and DSP
  • Arm Cortex-M23 MCU delivers 87.5 µA/MHz active mode
  • STMicroelectronics releases automotive amplifiers with in-play open-load detection

EE ENGINEERING TRAINING DAYS

engineering

Submit a Guest Post

submit a guest post
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • DesignFast
  • 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
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • 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
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe