Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key 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
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
    • Design Guides
      • WiFi & the IOT Design Guide
      • Microcontrollers Design Guide
      • State of the Art Inductors Design Guide
  • Women in Engineering

OBJECT-FOLLOWING ROBOT

By Prabakaran P.M

Summary:

Thinking of making robots, you might come up with ideas such as line tracking, obstacle avoider, anti-drop Robot, environment monitoring Robots, etc. But what we are going to make today, is a robot that follows an object, relentlessly. The basic function of this robot is simple: it follows you. It goes forward as you go forward; when you stop moving, it stops as well.

I used an Ultrasonic range sensor to identify the moving direction of the object. You can also add more number. The minimum number that will do the job is one. Here by measuring the pulse width of the echo pulse from ultrasonic sensor we can get the range of the object in front of the robot. Here we created an algorithm which will move the robot forward when the object is moving forward within the programmed range and backwards in the same manner. Here we will implement Software Pulse Width Modulation which can convert normal digital outputs to the PWM output pins of the Arduino.

 Prototype of Arduino based Object Following Robot

Fig. 1: Prototype of Arduino based Object Following 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. An Ultrasonic Sensor.

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

  5. Arduino IDE for the programming.

Block Diagram:

Block Diagram of Arduino based Object Following  Robot

Fig. 2: Block Diagram of Arduino based Object Following Robot

Description:

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. 

Installing the SoftPWM library:

Download this zipped file and unzip it under the library directory of the Arduino IDE folder. For example, for my computer’s setup, the directory is

XXXarduino-1.0.1libraries

After copying files across, the directory

XXXarduino-1.0.1librariesSoftPWM

Load the program code.ino after you save it onto your computer and open it in the Arduino IDE. (Link for code.ino is available at the bottom)

Coding description:

Setup and initializations:

SoftPWMBegin();

SoftPWMSet(pin, 0);

SoftPWMSetFadeTime(pin, rt, ft);

These are the functions used to initialize Software PWM in the Arduino. “pin” can be replaced with any pin number available on the Arduino board you are using. “rt” refers to the rising time of the starting of pulse which is represented in milliseconds and “ft” which refers to the falling time of the end of a pulse which is also represented in milliseconds.

Here, I used SoftPWM to reduce the speed of the Motor, as my motor RPM is high. If you have a less RPM motor you can use the normal digital output of the pins which is given as the comment in the code.

Algorithm:

Distance of the object is measured in centimeters.

if (cm < 25 && cm > 14) {

This condition is to move forward the robot when the object is in the range of 14 to 25 centimeters.

}

if (cm < 14 && cm > 12){

This condition is to make the robot stable when the object is in the range of 12 to 14 centimeters.

}

if (cm < 12 && cm > 2) {

This condition is to move backward the robot when the object is in the range of 2 to 12 centimeters.

}

if (cm > 25){

This condition is to stop the robot when the object is in the out of range i.e greater than 25 centimeters.

}

Circuit Diagrams

Circuit-Diagram-Arduino-Based-Object-Following-Robot

Project Video


Filed Under: Electronic Projects

 

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.

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!


Featured Tutorials

  • PS2 Keyboard To Store Text In SD Card Using Arduino Circuit Setup On Breadboard
    How To Use PS2 Keyboard To Store Text In SD Card Using Arduino- (Part 42/49)
  • Wireless Path Tracking System Using Mouse, XBee And Arduino Circuit Setup On Breadboard
    How To Make A Wireless Path Tracking System Using Mouse, XBee And Arduino- (Part 43/49)
  • How to Make a Wireless Keyboard Using Xbee with Arduino- (Part 44/49)
  • Making Phone Call From GSM Module Using Arduino Circuit Setup On Breadboard
    How to Make Phonecall From GSM Module Using Arduino- (Part 45/49)
  • How to Make a Call using Keyboard, GSM Module and Arduino
    How To Make A Call Using Keyboard, GSM Module And Arduino- (Part 46/49)
  • Receiving SMS Using GSM Module With Arduino Prototype
    How to Receive SMS Using GSM Module with Arduino- (Part 47/49)

Stay Up To Date

Newsletter Signup

Sign up and receive our weekly newsletter for latest Tech articles, Electronics Projects, Tutorial series and other insightful tech content.

EE Training Center Classrooms

EE Classrooms

Recent Articles

  • How to interface a DS18B20 temperature sensor with MicroPython’s Onewire driver
  • What is a low power design?
  • Renesas partners with Tata to accelerate progress in advanced electronics
  • STMicroelectronics’ new touchscreen controller for smartphones enables longer runtime
  • Samsung unveils ISOCELL image sensor with industry’s smallest 0.56μm pixel

Most Popular

5G 555 timer circuit 8051 ai Arduino atmega16 automotive avr bluetooth dc motor display Electronic Part Electronic Parts Fujitsu ic infineontechnologies integratedcircuit Intel IoT ir lcd led maximintegratedproducts microchip microchiptechnology Microchip Technology microcontroller microcontrollers mosfet motor powermanagement Raspberry Pi remote renesaselectronics renesaselectronicscorporation Research samsung semiconductor sensor software STMicroelectronics switch Technology vishayintertechnology wireless

RSS EDABOARD.com Discussions

  • How do you find the angle made by two isosceles triangles in a kite?
  • MWO - EM Structure missing
  • Effect of variable gain amplifier and LNA on the input RF signal's phase
  • HF preamplifier with threshold?
  • Does Monostable pulse stay HIGH whilst input pulse is HIGH?

RSS Electro-Tech-Online.com Discussions

  • Help wanted to power an AC120v induction motor ( edited from Brushless motor - thank you @SHORTBUS= )
  • NOR gate oscillator in LTspice not working
  • HELP NEEDED
  • intro to PI
  • Lighting a .010 green fiber optic with led
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • About Us
  • Contact Us
  • Advertise

Copyright © 2022 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 | Advertising | About Us

Search Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key 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
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
    • Design Guides
      • WiFi & the IOT Design Guide
      • Microcontrollers Design Guide
      • State of the Art Inductors Design Guide
  • Women in Engineering