Professional Documents
Culture Documents
Simulation Studies On Line Light and Human Followi
Simulation Studies On Line Light and Human Followi
Research Article
Keywords: Mobile Robot, Arduino, Infra-Red Sensor, Black Path, LDR, etc.
DOI: https://doi.org/10.21203/rs.3.rs-2076251/v1
License: This work is licensed under a Creative Commons Attribution 4.0 International License.
Read Full License
Page 1/25
Abstract
This technical paper describes about the robots which follows the path, light and human gestures and
their simulation using Arduino and Proteus. The line following robot is constructed to proceed in a
predefined path using IR sensor. The light following robot is designed to follow the light source LDR, the
light dependent resistor. The human following robot traces the human heat and moves in the direction of
human motion or gesture by means of IR, the infra-red sensor. Their applications involve in the fields of
remote sensing, mobile communications and biomedical instrumentation and so on. The key merits
include its’ lightweight, automated, cheap, easy to use, etc. Here the Proteus schematic has been drawn
and its simulation uses Arduino software.
1. Introduction
A robot is defined as an automated virtual agent/machine that is capable of replicating and performing
several tasks. The main utility of a robot is task automation and this aspect of it can be exploited in
various sectors like military, healthcare and industries and has endless applications. This research paper
gives a detailed schematic in Proteus platform and the complete coding in arduino for the three robots
namely, path following, light source following and the human gesture following robots. IR Sensors
mounted on the line following the robot are used to detect the black or white line to define the path. Light
following robot senses light emitted by the LDR and follows the light source. It uses a microcontroller for
processing the sensory signals and responds by controlling the motors in the direction of the light source.
Human following robot can sense obstacles and human movements automatically and follow or avoid
them within a specific range.
Table.1
Page 2/25
Type of robot/actions performed Components used
Multi-Cell Battery
Driver - L293D
Resistors
Resistor
Geared Motors
Driver- L293D
Switch
Servo Motor
IR Sensor
Driver- L293D
Ultrasonic Sensor
Variable Resistor
To facilitate the movement of robots, a path like a black line on a white surface or vice versa, has been
used. Here, IR sensors are used to sense this path, then process the robot to follow the path. As shown in
Fig.1, sensors are used to identify the line. The signal fetched from the sensor is sent to the Arduino UNO
microcontroller in order to process it and define the steps.
The circuit diagram depicting the line following robot is given below in Fig.2. It constitutes an operational
amplifier which receives signals from the IR LED and a photodiode. A +5V biasing supply is given.
According to the output LED emits light.
Page 3/25
In the Proteus schematic, all the required components are picked up and wire connected. The required
program coding is uploaded in the arduino and the path is defined and compiled. The code in the Arduino
IDE is debugged, and the motors starts rotating left and right alternatively.
When the LDR mounted on the robot detects a light incident on it, its resistance changes which trigger the
servo motors which make the robot to move. The robot moves as long as it senses or detects the light.
Similarly, for the light following robot in the Proteus schematic, all the required components are picked up
and wire connected. The required program coding is uploaded in the arduino and the path is defined and
compiled.
After the debugging, the left motor starts running forward (like a front wheel) when the source light is
approaching LDR and the right motor runs backward (like a rear wheel) when the LDR is away from the
source light.
In this human following robot, two IR sensors are used to detect the motion of human body or simply
gesture signals can be detected by the IR sensors and the ultrasonic sensor is to calculate the distance of
the robot from the human body. The two IR sensors and the ultrasonic sensor sense the presence of the
human body and move towards its direction.
If the left IR sensor detects the motion, then the robot moves towards the left and if the right IR sensor
detects the motion, then the robot moves towards the right. The circuit diagram for the human following
robot bas been given underneath in Fig.7. It includes two IR sensors for detecting the human motion,
ultrasonic sensor to measure the distance of robot from the human beings, arduino as a microcontroller,
a driver unit L298 and motors for front wheels and rear wheels.
3. Algorithm Interpretation
Line following robot:
1. Start
4. When both the signals are high (1), use the digitalWrite command in order to move forward.
Page 4/25
5. When the left signal is high (1) and the right signal is low (0), turn left while and turn right in the
opposite scenario.
6. The actuator stops the movement when both the LS and RS signals are low.
7. Stop
1. Start
2. Set the output pins in the setup () function
3. First read the Left Steering, Right Steering and Forward Steering in the loop () function
4. If LMRead value is greater than the Tolerance Value while the RMRead and FMRead are less than the
Tolerance Value, it is made the robot to move left
5. If FMRead and RMRead value is greater than Tolerance Value and the LMRead value is less than the
Tolerance Value, it is made the robot move right
6. If the LMRead and RMRead value is less than Tolerance Value and FMRead value is greater than the
tolerance value, it is made the robot to move forward.
7. The above commands have kept working as long as the light persists on the LDR.
8. Stop
1. Start
2. We set the output pins in the setup () function
3. We read the right_value and left_value in the loop () function
4. If both right_value and left_value is 1 and the distance is between 10 to 30 units then it moves
forward
5. If right_value is 0 while left_value is 1, then it turns right
6. If right_value is 1 while right_value is 0, then it turns left
7. If both right_value and left_value 1, then the robot stops
8. Stop
4. Codes In Arduino
The microcontroller Arduino UNO is programmed with the following instructions:
Page 5/25
void setup ()
void loop() {
//motor 1
analogWrite (11,255);
//motor 2
analogWrite (10,255);
Page 6/25
{
//motor 1
analogWrite (11,255);
//motor 2
analogWrite (10,255);
//motor 1
analogWrite (11,255);
//motor 2
analogWrite (10,255);
//motor 1
Page 7/25
digitalWrite (13, LOW);
analogWrite (11,255);
//motor 2
analogWrite (10,255);
#include<Servo.h>
Servo MyServo ;
int sp=12;
int butState;
Page 8/25
int FS = A0; //Forward Sensor
void setup() {
Serial.begin(9600);
pinMode(M1,OUTPUT);
pinMode(M2,OUTPUT);
pinMode(M3,OUTPUT);
pinMode(M4,OUTPUT);
pinMode(butpin,INPUT);
MyServo.attach(sp);
digitalWrite (E1, HIGH); //These pins are always High in H-Bridge so those were made 'High'
digitalWrite(E2,HIGH);
void loop() {
// Light Following
butState = digitalRead(butpin);
if(butState == LOW) {
LMRead = analogRead(LS);
RMRead = analogRead(RS);
FMRead = analogRead(FS);
Page 9/25
if (LMRead >a && RMRead<a && FMRead<a)
Page 10/25
digitalWrite(M4,LOW); //RM pin 4
else
MyServo.write(angle);
Page 11/25
digitalWrite(M1,LOW); //left motor pin1
// Light Avoiding
if(butState == HIGH)
Page 12/25
MyServo.write(angle+60); // Moving Servo to 120 Degree
else if((FMRead >a && RMRead>a && LMRead<a) || (FMRead <a && RMRead>a && LMRead>a) ||
(FMRead >a && RMRead<a && LMRead>a) || (FMRead >a && RMRead>a && LMRead>a))
MyServo.write(angle);
}
Page 13/25
}
#include<Servo.h>
#include<AFMotor.h>
#define LEFT A0
#define RIGHT A3
AF_DCMotor Motor1(1,MOTOR12_1KHZ);
AF_DCMotor Motor2(2,MOTOR12_1KHZ);
AF_DCMotor Motor3(3,MOTOR34_1KHZ);
AF_DCMotor Motor4(4,MOTOR34_1KHZ);
Servo myservo;
long time;
void setup()
Serial.begin(9600);
myservo.attach(10);
myservo.write(pos);
delay(15);
Page 14/25
}
myservo.write(pos);
delay(15);
myservo.write(pos);
delay(15);
pinMode(RIGHT, INPUT);
pinMode(LEFT, INPUT);
pinMode(trigpin, OUTPUT);
pinMode(echopin, INPUT);
void loop()
Serial.print("R= ");
Serial.print(Right_Value);
Serial.print(" L= ");
Page 15/25
Serial.print(Left_Value);
Serial.print(" D= ");
Serial.println(distance);
ward();}
delay(50);
long read_cm(){
digitalWrite(trigpin, LOW);
delayMicroseconds(2);
digitalWrite(trigpin, HIGH);
delayMicroseconds(10);
return time / 29 / 2;
Motor1.setSpeed(120);
Motor1.run(FORWARD);
Motor2.setSpeed(120);
Page 16/25
Motor2.run(FORWARD);
Motor3.setSpeed(120);
Motor3.run(FORWARD);
Motor4.setSpeed(120);
Motor4.run(FORWARD);
Motor1.setSpeed(120);
Motor1.run(BACKWARD);
Motor2.setSpeed(120);
Motor2.run(BACKWARD);
Motor3.setSpeed(120);
Motor3.run(BACKWARD);
Motor4.setSpeed(120);
Motor4.run(BACKWARD);
Motor1.setSpeed(200);
Motor1.run(FORWARD);
Motor2.setSpeed(200);
Motor2.run(FORWARD);
Motor3.setSpeed(100);
Motor3.run(BACKWARD);
Motor4.setSpeed(100);
Page 17/25
Motor4.run(BACKWARD);
Motor1.setSpeed(100);
Motor1.run(BACKWARD);
Motor2.setSpeed(100);
Motor2.run(BACKWARD);
Motor3.setSpeed(200);
Motor3.run(FORWARD);
Motor4.setSpeed(200);
Motor4.run(FORWARD);
Motor1.setSpeed(0);
Motor1.run(RELEASE);
Motor2.setSpeed(0);
Motor2.run(RELEASE);
Motor3.setSpeed(0);
Motor3.run(RELEASE);
Motor4.setSpeed(0);
Motor4.run(RELEASE);
5. Conclusion
Page 18/25
Here in all the simulation, a + 5V power source has been used in order to power the DC motors/Servo
motors of the robots as well as the device driver units. In all the simulation works carried out here, the
motors run according to the directions it is intended to. In human following robot, the IR sensor detects
the presence/absence of human beings which has been shown by either ‘0’ or ‘1’in the test flag. The
distance covered by the robots is directly proportional to speed. These types of robots find its application
in various applications such as transportation services, industrial uses such as pick and place facility or
moving payload from a source to destination, healthcare sectors such as providing medicines to COVID-
19 positive patients, military operations, etc. When actually implemented in real life, there will be some
practical faults like inconsistent power supply, wear and tear of moving parts, might be less efficient than
the expected results and hardware flops.
6. Declarations
Ethical Approval:
As this research work does not include any real time data and its related parameters, it is not necessary to
provide an ethical approval certificate at present. Only simulation work has been carried out and virtual
running of servo motors has been observed when IR sensor detects the presence of a human body. In
addition, no harm incurred to the human beings when IR sensor are likely to get in touch them directly or
indirectly.
Note: PIR sensors are used in thermal sensing applications, such as security and motion detection. The
Passive Infrared (PIR) sensor is used to detect the presence of human in real time. Moreover, this sensor
detects the human only if they are in motion. Every human radiates some amount of infrared energy of
specific wavelength range. The absorbed incident radiation changes the temperature of a material.
As this research work cited in the manuscript is only intended for education purpose and all the authors
are accountable to disclose details of any and all interests that are relevant to this study and there in no
such conflicts with their roles and responsibilities in a grant selection process.
Authors' Contributions:
In this particular manuscript, G D Anbarasi Jebaselvi has acted as a Corresponding Author and gave this
idea and wrote the main research contents, R. Narmadha helped in Codings, Vishwajeet Anand and
Harshit Tathagat contributed their efforts in paperwork and also in figures.
Funding:
Page 19/25
The article processing fee has not been given and We didn’t receive any funding from our Institution for
publication and solely it’s authors’ interest to publish this article in your esteemed journal.
The availability of data and materials have been obtained by referring a few technical articles and papers
which are listed in the references. Since we have used Proteus Schematic, all the schematics of the
required experimentation have been drawn, codes written in Arduino, complied, debugged and verified for
its output.
7. References
1. Jagruthi Chaudhari, Asmita Desari, Gavarskar, ‘Line Following Robot Using Arduino for Hospitals’,
2nd International Conference on Intelligent Communication and Computational Techniques ICCT,
2019.
2. Mehran Pakdaman; M. Mehdi Sanaatiyan; Mahdi Rezaei Ghahroudi, 'A Line Follower Robot from
design to Implementation: Technical issues and problems’ The 2nd International Conference on
Computer and Automation Engineering, ICCAE, 2010
3. Md Takiul Hasan Sakib, ‘Line Following Robot Using Arduino’, December 2019
4. Yosuke Nagumo, Akihisa Ohya ‘Human following behavior of an autonomous mobile robot using
light-emitting device’, Proceedings of 10th IEEE International Workshop on Robot and Human
Interactive Communication, DOI: 10.1109/ROMAN.2001.981906
5. Jishnu S1, Diwakar Babu Y1, Sampath Kumar, ‘Human following robot’, International Advanced
Research Journal in Science, Engineering and Technology, Vol. 8, Issue 7, July 2021, DOI:
10.17148/IARJSET.2021.8751
6. Utsho A Arefín, Md. Hasib Iqbal, Maksuda Jahan, ‘Design & Implementation of Light Following
Robot’, Project Report, DOI: 10.13140/2.1.3301.9209, March 2014
7. Gandla, Mano Tejaswini, Human Following Robot (May 15, 2021). Available at SSRN:
https://ssrn.com/abstract=3917847 or http://dx.doi.org/10.2139/ssrn.3917847
Figures
Page 20/25
Figure 1
Figure 2
Page 21/25
Figure 3
Figure 4
Page 22/25
Figure 5
Page 23/25
Figure 6
Figure 7
Page 24/25
Figure 8
Page 25/25