0% found this document useful (0 votes)
19 views8 pages

Ijsrmjournal, Paper ID-3098-Arduino Based Automatic Vehicle Control

This document describes a system to automatically control a vehicle using Arduino and sensors to avoid obstacles and accidents. An Arduino Mega is programmed to follow a path, while ultrasonic sensors detect obstacles and the Arduino adjusts the vehicle's speed based on the distance to obstacles. A GSM module can also send messages in critical situations.

Uploaded by

Ernest Chiwale
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views8 pages

Ijsrmjournal, Paper ID-3098-Arduino Based Automatic Vehicle Control

This document describes a system to automatically control a vehicle using Arduino and sensors to avoid obstacles and accidents. An Arduino Mega is programmed to follow a path, while ultrasonic sensors detect obstacles and the Arduino adjusts the vehicle's speed based on the distance to obstacles. A GSM module can also send messages in critical situations.

Uploaded by

Ernest Chiwale
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

International Journal of Scientific Research and Management (IJSRM)

||Volume||09||Issue||03||Pages||EC-2021-573-580||2021||
Website: www.ijsrm.in ISSN (e): 2321-3418
DOI: 10.18535/ijsrm/v9i3.ec02

Arduino Based automatic Vehicle Control


R.Deepalaxmi1*, R.Arthi2, E.Malini2, M.Raghul2
1
Associate Professor, Department of EEE,
Sri Sivasubramaniya Nadar College of Engineering
Kalavakkam 603110, Chengalpattu District,
Tamilnadu, India
2
Final year students, Department of EEE,
Sri Sivasubramaniya Nadar College of Engineering
Kalavakkam 603110, Chengalpattu District,
Tamilnadu, India

Abstract:
The objective of this research is to develop a system to keep the vehicle secure and protect it by the
occupation of the intruders. The aim is automatically controlling the speed of vehicle and accident
avoidance using arduino and ultrasonic sensors. Arduino mega 2560 is used to create the path through
programing. The programed path is fed into the Arduino which is followed by the vehicle. Whenever any
obstacle is detected by the running vehicle, depends on distance automatically control the speed of vehicle.
The ultrasonic sensor system continuously sends signals and monitors any car or other obstacles are in
front of vehicle. The distance up to which ultrasonic sensor can work may be up to 4 m. When any
obstacle or vehicle is detected by ultrasonic sensor system, it will send signal to the embedded board. After
receiving this signal embedded board sends a signal to the motor to reduce the vehicle speed automatically
which can control vehicle speed immediately. Vehicle is controlled automatically without any manual
operation when the obstacle is at 4 m distance away from the front vehicle. In critical cases, if vehicle is
met into accident GSM send a message to the user.

Keywords: Arduino mega 2560, automatic vehicle control, Infrared Sensor (IR) sensor, Ultrasonic sensor
Global System for Mobile communication (GSM)
1. Introduction automatic vehicle, to make the automatic vehicle
An automatic vehicle control system is designed to moving from a starting position to a destination
reduce the severity of an accident. Also known as position without hitting obstacles. This proposed
pre-crash system, forward collision warning system algorithm handles two different objectives which are
or collision mitigating system. It uses radar and the path safety and the path length. Finally, code
sometimes laser sensors to detect an imminent crash. results show that the developed approach is a good
Once the detection is done, it takes action alternative to obtain the adequate path.
autonomously without any driver input (by braking).
The main objectives of this research work are as
The path planning problem is one of the most follows. To design a program-based path
interesting research topics. The aim of the path following vehicle using Arduino mega 2560 with
planning is to search a safe path for the automatic collision avoidance system.
vehicle. Also, the path is required to be optimal. In
this project work, an algorithm is developed based To develop an automatic speed control of
on free segments. Also, a turning point strategy for vehicle and accident avoidance.
solving the problem of path planning in a static To design a path for the automatic vehicle using
environment is presented. The aim of the turning Arduino mega 2560.
point approach is to search a safe path for the
To develop a prototype for the proposed model.
R.Deepalaxmi, IJSRM Volume 09 Issue 3 March 2021 [www.ijsrm.in] EC-2021-573
Section 2 describes the components and their Shaft Type 6mm Dia 23 mm
specifications of the proposed model.section 3 shaft Length
illustrates the software implementation of automatic
vehicle using Arduino mega 2560.section elucidates Maximum ~3 Kg-cm at 12V
the hardware implementation of the proposed Torque
model.section 5 briefs about the conclusions and RPM 100 RPM at 12V
future scope.
Weight 130 Gms
2. Components
Solar panel Max Load ~330mA at
The term solar panel is used colloquially for a photo- Current 12V
voltaic (PV) module. Photo-voltaic cells
use sunlight as a source of energy and generate
direct current electricity. A collection of PV modules
is called a PV Panel, and a system of panels is an
Array. Arrays of a photovoltaic system supply solar
electricity to electrical equipment. The figure 1
shows the solar panel.The specifications of solar
panel is represented in table 1 .
Table 1 Specifications of solar panel
Voltage 12 V
Power 2 Watts

Figure 2: DC gear motor


Sensor
A sensor is a device, module, machine, or subsystem
whose purpose is to detect events and send the
information to other electronics, a computer
processor. A sensor is always used with other
electronics.
Figure 1: Solar panel (a) Ultrasonic Sensor (HC-SR04)
Motor Ultrasonic sensors measure distance by using
DC motor is any of a class of rotary electrical ultrasonic waves. The sensor head emits an
motors that converts direct current electrical energy ultrasonic wave and receives the wave reflected back
into mechanical energy. Nearly all types of DC from the target. Ultrasonic Sensors measure the
motors have some internal mechanism, either distance to the target by measuring the time between
electromechanical or electronic, to periodically the emission and reception. The figure 3 depicts the
change the direction of current in part of the motor. ultrasonic sensor. The specifications of ultrasonic
DC motors were the first form of motor widely used, sensor is given in table 3 .
as they could be powered from existing direct- Table 3 Specifications of ultrasonic sensor
current lighting power distribution systems. The
figure 2 depicts the DC gear motor. The Power +5V DC
specifications of DC gear motor is represented in Supply
table 2 . Quiescent <2mA
Current
Table 2 Specifications of DC gear motor
Effectual Angle <15°
Motor Type DC with Gear Box, Ranging 2cm – 400
Metal Gears Distance cm
Trigger Input 10uS
Base Motor DC 3000 RPM Pulse width

R.Deepalaxmi, IJSRM Volume 09 Issue 3 March 2021 [www.ijsrm.in] EC-2021-574


Dimension 45mm x GSM is a mobile communication modem; it stands
20mm x for global system for mobile communication
15mm (GSM). GSM is an open and digital cellular
technology used for transmitting mobile voice and
data services operates at the 850MHz, 900MHz,
1800MHz and 1900MHz frequency bands. The
figure 4 depicts the GSM module. The specifications
of GSM module is given in table 6.
Table 6 Specifications of GSM module
Weight 40 gm
Input Voltage 9V-12V DC
Dimensions 100 x 53 x 15
Figure 3: Ultrasonic sensor (L x W x
H)mm.
(b) IR Sensor
An infrared sensor is an electronic device that emits
in order to sense some aspects of the surroundings.
An IR sensor can measure the heat of an object as
well as detects the motion. These types
of sensors measure only infrared radiation, rather
than emitting it that is called a passive IR sensor.
The specifications of IR sensor is given in table 4. Figure 4: GSM module
Table 4 Specifications of IR sensor Arduino
Operating Voltage 3.0V – 5.0V Arduino refers to an open-source electronics
platform or board and the software used to program
Detection range 2cm -30cm
it. Arduino boards are able to read inputs - light on a
Current Consumption 3.3V : ~23 Ma sensor, a finger on a button, or a Twitter message -
5.0V : ~43 mA and turn it into an output - activating a motor,
Active output level Outputs Low turning on an LED, publishing something online.
logic level when
obstacle is Arduino Mega 2560
detected. The Arduino Mega 2560 is a microcontroller board
based on the ATmega2560 (datasheet). It has 54
digital input/output pins (of which 14 can be used as
(c) Vibration Sensor (SW-420) PWM outputs), 16 analog inputs, 4 UARTs
A vibration sensor is a transducer used to detect (hardware serial ports), a 16 MHz crystal oscillator,
abnormal vibration of an industrial machine that a USB connection, a power jack, an ICSP header,
may be indicative of mechanical problems. The and a reset button. The figure 5 depicts the pin
piezo vibration sensor or charge mode accelerometer configuration of ARDUINO Mega 2560 board.
measures vibration based on the piezoelectric effect.
The specifications of vibration sensor is given in
table 5.
Table 5 Specifications of vibration sensor
Operating voltage 3.3V / 5V
Interface Digital
Size L: 40mm
W: 20mm
H: 10mm
Weight 4.3g

GSM (800A)

R.Deepalaxmi, IJSRM Volume 09 Issue 3 March 2021 [www.ijsrm.in] EC-2021-575


Figure 5: ARDUINO Mega 2560 board int trigPin1 = 11; // Trigger
Relay int echoPin1 = 12; // Echo
A relay is an electrically operated switch. It consists
of a set of input terminals for a single or multiple int trigPin2 = 42; // Trigger
control signals, and a set of operating contact int echoPin2 = 43; // Echo
terminals. Relays are switching that open and close
circuits electromechanically or electronically. Relays long x,y,cm;
control one electrical circuit by opening and closing void setup()
contacts in another circuit. The figure 6 depicts the
pin diagram of relay. The specifications of relay is {
given in table 7.
Serial.begin (9600);
Table 7 Specifications of relay
pinMode(trigPin1, OUTPUT);
Voltage 5V
pinMode(echoPin1, INPUT);
Rated Load 7A/250V
Number of Pins 5 pinMode(trigPin2, OUTPUT);
Contact SPDT
Switching capacity 7A pinMode(echoPin2, INPUT);
pinMode(trigPin3, OUTPUT);
delay(100);
}
void loop()
{
Figure 6: Pin diagram of relay
if(cm1<=20)
{
3. Software Implementation
This section illustrates the software implementation Serial.print(cm1);
of automatic vehicle control using Arduino Mega
2560. Serial.print("cm");

Program Used To Avoid Collision Serial.println();


The components which are controlled by this code }
are:
if(cm2<=20)
 Ultrasonic sensor
{
 Vibration sensor
Serial.print(cm2);
 GSM module
Serial.print("cm");
 Buzzer
Serial.println();
 Relay circuit
}
Program
delayMicroseconds(250);
#include <SoftwareSerial.h>
digitalWrite(trigPin3 , LOW);
SoftwareSerial mySerial(9,10);//tx,rx
delayMicroseconds(5);
int vib_pin1=4;
digitalWrite(trigPin3 , HIGH);
int led_pin=13;
delayMicroseconds(10);
int vib_pin2=5;

R.Deepalaxmi, IJSRM Volume 09 Issue 3 March 2021 [www.ijsrm.in] EC-2021-576


digitalWrite(trigPin3 , LOW); {
pinMode(echoPin3 , INPUT); max1 = a;
if(cm3<=20) min1 = b;
{ }
Serial.print(cm3); else
Serial.print("cm"); {
Serial.println(); max1 = b;
} min1 = a;
delayMicroseconds(250); }
digitalWrite(trigPin4 , LOW); if (c > d) // 2
delayMicroseconds(5);
digitalWrite(trigPin4 , HIGH); else
delayMicroseconds(10); max0 = max2;
digitalWrite(trigPin4 , LOW); if (min1 < min2) // 4
if(cm4<=20) min0 = min1;
{ else
Serial.print(cm4); min0 = min2;
Serial.print("cm"); if((min0<10)&&(min0>= 0))
Serial.println(); {
} digitalWrite(led, HIGH);
if( ( val1 == 1) &&( val2 == 1 ) ) }
{ if((min0<20)&&(min0>= 10 ))
digitalWrite(led_pin,HIGH); {
SendMessage(); delay (1000);
delay(2000); }
} Code Description
The above code is used to detect and to warn the
else obstacle to move away from the path, if the obstacle
digitalWrite(led_pin,LOW); isn’t moving away from the path of the vehicle using
the relay circuit, the movement of the vehicle is
delay(100); stopped.
} By the use of relay circuit we are avoiding the
void max4(int a, int b, int c, int d) collision and warning sound is also given by the
vehicle, to make the obstacle to move away from the
{ path of the vehicle.
int min0, max0, max1, max2, min1, min2; An 24V Intermittent Buzzer is used as horn to warn
the obstacle, with the help ultrasonic sensor(HC-
if (a > b) // 1
SR04) the distance between the obstacle is been

R.Deepalaxmi, IJSRM Volume 09 Issue 3 March 2021 [www.ijsrm.in] EC-2021-577


measured and further calculate in centimeters and int a=digitalRead(ir1);
then the calculated value is compared with the
predetermined value. if (a == HIGH)

duration= pulseIn(echoPin1,HIGH); {
count1++;
cm= (duration /2) / 29.1;
if(cm4<=20): Serial.print("Count: ");
Serial.println(count1);

If the calculated value is less than the delay(135);


predetermined value, the Intermittent Buzzer is }
triggered using the relay circuit until the obstacle
moves away from the path of the vehicle, if still the int b=digitalRead(ir2);
obstacle is on the path of the vehicle and the obstacle if (b == HIGH)
become closer to the vehicle, the complete motion of
the vehicle is stopped by triggering the relay circuit {
where the overall supply to motor is stopped.
count2++;
3.3 Program Used To Determine The Path
Serial.print("Count: ");
3.3.1 Components
The components which are controlled by this code Serial.println(count2);
are:
delay(135);
 IR sensor
}}
 Motor
/*
 Relay circuit if(count1==15)
3.3.2 Program {
int ir1=7;
digitalWrite(led1,HIGH);
int ir2=8;
}
int led1=12;
if(count2==20)
int led2=13;
{
int count1=0;
digitalWrite(led1,LOW);
int count2=0;
}
if(count1==30)
void setup()
{
{
digitalWrite(led1,HIGH);
Serial.begin(9600);
}
pinMode(ir1, INPUT);
if(count2==40)
pinMode(ir2, INPUT);
{
}
digitalWrite(led1,LOW);
}
void loop()
if(count1==45)
{
R.Deepalaxmi, IJSRM Volume 09 Issue 3 March 2021 [www.ijsrm.in] EC-2021-578
{ {
digitalWrite(led1,HIGH); digitalWrite(led1,LOW);
} }
if(count2==60) Thus, the path following algorithm with collision
avoidance is developed. The advantage of the
{ developed algorithm is that the automatic vehicle
digitalWrite(led1,LOW); always move from the initial position to the target
position safely, and also without any accidents.
}
4. Hardware Implementation
if(count1==60) This section explains the design and implementation
{ of hardware setup of automatic vehicle control using
Arduino Mega 2560.
digitalWrite(led1,HIGH);
Relay Circuit
} The figure 7 depicts the relay circuit. The relay
circuit is used to stop the motor or to indicate any
if(count2==80)
vehicle is in the path (with an horn sound).
{
digitalWrite(led1,LOW);
}
}
digitalWrite(led1,HIGH);
}
else
Figure 7: Relay circuit
In figure 9, gsm module and vibration sensors are
used to indicate if there is any emergency situation
Collision Avoidance System like the vehicle is crashed. It intimates the situation
The collision avoidance system is shown in figure 8. by sending a message to the user.
The ultrasonic sensors are connected to arduino
mega 2560 board. The algorithm for collision
avoidance is uploaded in the arduino mega 2560
board.

Figure 9: GSM module and vibration sensors


Thus the hardware setup for automatic vehicle
control is successfully implemented using Arduino
Mega 2560.
5. Conclusion And Scope
Figure 8: Collision avoidance system The project “Automatic Vehicle Control” using
arduino Mega 2560, ultrasonic sensors, IR sensor
GSM Module has been successfully designed and tested.

R.Deepalaxmi, IJSRM Volume 09 Issue 3 March 2021 [www.ijsrm.in] EC-2021-579


Integrating features of all the hardware components successfully implemented.
have been used. Presence of every module has been
reasoned out and placed carefully thus contributing The advantages such as low cost, less complexity,
to the best working of the unit. Secondly, using easy speed control, reliable and easy to impleme
highly advanced IC’s and with the help of
growing technology the project has been
Abdullahi Badamasi / conference paper / IEEE /
11th International conference on Electronics,
Reference Computer and Computation (ICECCO)2014.
[1] “Path planning of line follower robot”, by [3] Text books: Arduino: 2019 Beginner’s Guide to
Mustafa Engin and Dilsad Engin / conference Learn Arduino Programming Step by Step
paper / IEEE / 5th European DSP Education and Dexter Pearson.
Research Conference (EDERC)2012.
[4] Sensors and Microsystems: AISEM 2009
[2] “working principle of Arduino”, by Yusuf Proceedings (page:47/367).

R.Deepalaxmi, IJSRM Volume 09 Issue 3 March 2021 [www.ijsrm.in] EC-2021-580

You might also like