Final Project
Final Project
BELAGAVI
A
PROJECT REPORT
ON
“Arduino based Automatic Vehicle Speed Control System”
Submitted in partial fulfillment of the requirements of the degree of
BACHELOR OF ENGINEERING
in
ELECTRONICS AND COMMUNICATION ENGINEERING
For the academic year
2022-23
by
DEPARTMENT OF
ELECTRONICS AND COMMUNICATION ENGINEERING
HKBK COLLEGE OF ENGINEERING
[Link].22/1, Opposite, Manyata Tech Park Rd, NAGAWARA,
BENGALURU -560045
HKBK COLLEGE OF ENGINEERING
[Link].22/1, Opposite, Manyata Tech Park Rd, Nagawara, Bengaluru-560045
Department of Electronics and Communication Engineering
Certificate
Certified that the project work entitled ‘Arduino based Automatic Vehicle Speed Control System’ is a
bonafide work carried out by Mr. Ritesh Shankar, USN 1HK19EC068, in partial fulfilment for the award of the
degree of Bachelor of Engineering in Electronics and Communication Engineering of the Visvesvaraya
Technological University, Belagavi, during the year 2022-23. It is certified that all corrections/suggestions indicated
for the Internal Assessment have been incorporated in the report deposited in the departmental library. The project
report has been approved as it satisfies the academic requirements in respect of project work prescribed for Bachelor
of Engineering Degree.
External Viva
Name of the Examiners Signature with date
1.
2.
ABSTRACT
Nowadays in fast moving world all the peoples are not have self-control. Such peoples are
driving vehicles in a high speed in restricted areas like (school, parks, hospitals, hills area,
Highways and in speed limited areas etc.) so that accidents are occurred more frequently.
Because of this we lost our valuable life by making small mistakes while driving like high speed
driving in restricted area, do not view the signboards which are placed by the Highway
Department on the road. So in order to avoid such kind of accidents and to control their vehicle
speed in restricted area like (school, parks, hospitals, hills area, Highways and in speed limited
areas etc.) speed limit area, we can develop a system which can limits the speed of vehicle
according to the speed limit of that particular area. So to intimate the driver about the zones and
the speed limit, the project has an aim to control the speed of any vehicle automatically by means
of using RF technology.
ACKNOWLEDGEMENT
I am grateful to the Director, Mr. C. M. Faiz Mohammed, for having provided me with
excellent facilities in the college during my course.
I am indebted to the Principal, Dr. Tabassum Ara, for facilitating a congenial academic
environment in the College.
I am grateful to the Professor and HOD, Dr. Latha R for his kind support, guidance and
motivation during the B.E Degree Course and especially during the course.
I thank my Guide Prof. Sathish K, Assistant Professor for his valuable guidance, suggestions
and encouragement throughout my project.
I would also thank to our project coordinators, Dr. Venkatesan C, Professor and Prof. Suhas A
R Assistant Professor, for their continuous support and encouragement.
I also thank all the staff members of the Department Electronics and Communication
Engineering and all those who have directly or indirectly helped me with their valuable
suggestions in the successful completion of this project report.
RITESH SHANKAR
(1HK19EC068)
RITU RAJ
(1HK20EC401)
VENKATA SURESH PODILI
(1HK19EC089)
SHAIK MAHAMMAD IMRAN
(1HK20EC402)
Chapter 1
INTRODUCTION
In today’s fast moving world, as the rate of accidents is increasing day by day,
speed of vehicles should be controlled as much as possible. Most of the accidents
occurred in India are results of lack of speed control and violating the road rules.
For this reason, different speed limits are put to decrease accidents. Unfortunately,
drivers usually do not take these speed limits seriously and ignore them. Road
accidents can be prevented by adopting measures such as Traffic management,
improving quality of road infrastructure and safer vehicles. To Ensure decline in
accidents and to improve road safety, speed control techniques such as speed
control in school and hospital zones by using RF [Link] fast moving
world’s, accidents are mostly occurs due to breaking the rules of the road and over
speeding. The accidents rates are increasing year to year by more vehicles onto
ground and heavy traffic. The government has taken to many steps to prevent this
kind of things, but it is not enough. Most of the manufactures has developed a laser
based control system but its cost is too high. But there is problem using this system
is that whenever human crosses the road it cannot detect properly so we develop a
new system to control these things in a simple way using IR module which has
some drawbacks that is it can work under line of sight. So we can chose RF
module.
The RF transmitter is placed in the speed limit areas and RF receiver is placed in
the system which is placed inside the vehicle. RF transmitter transfers the
information about the speed of the zone to the receiver which is interfaced with
microcontroller. The current speed will be sensed by the proximity sensor using dc
motor that also sends information to controller. The controller compares both the
speeds, if speed of vehicle is greater than speed limit of the area then message is
given to the driver through LCD Display to reduce the speed. And if driver does not
decreases the speed, the control transfers automatically.
Chapter 2
LITERATURE REVIEW
India is a populous developing country with a low per capita income. Vehicle usage
for transportation has risen in recent years, and road safety is still an issue, with
over 4000 persons dead and almost 10,000 wounded annually due to traffic
accidents. Over speeding of vehicles on highways is the leading cause of accidents
and fatalities, according to statistics. As a policymaker, it is a challenge for all
national leaders to give prompt attention to this growing issue. As a result, the study
is required to determine a feasible remedy to this oversight.
Currently, speed guns are utilized in Pakistan to detect vehicle speed. These
guns function in segregation and can detect the speed of vehicles located in front of
a camera. The technology is designed to track a vehicle’s speed even while it is out
of view of the camera. In the current system, someone must always monitor the
speed and then notify the traffic wardens, who will manually generate a citation for
the violating car. The suggested approach can create an invoice to penalize cars that
exceed speed limits without the assistance of traffic officials.
To overcome these problems, several techniques have been used to provide
smart ways to control and manage traffic systems. Each of these solutions has taken
its own path towards managing, controlling, and solving traffic problems. One of
the major causes of accidents is speeding, which increases the risks of a crash and
injuries. In view of this, many attempts have been made to find a well-organized
and reliable means to monitor speeding. This research is aimed at developing an
over speeding detection system that can perform reliable speed detection. Since the
over speeding detection system functions on a radio frequency, vehicle-related data
is thus easier to collect. It can also be inferred that the IoT, as one of the
innovations for the detection of speeding vehicles, would allow data to be
conveniently transmitted and that this technique can be built into roads in the
future.
[1]. In September 2009, the European Union (EU) approved the IoT Strategic
Research Roadmap, proposed by the Cluster of European Research Projects
(CERP). The Cluster of European Research Projects on the Internet of Things
(CERP-IoT) promotes and shares research projects and relevant research findings
on the IoT, highlighting the implementation of sensor technologies such as the
Intelligent Transport System (ITS) , family-domain smart eHealth/mHealth,
wearable sensing and computing devices, green buildings, smart homes, smart
cities, and many more. The report formally proposes a new communication
dimension for Information and Communication Technologies (ICT) that is
maintained anytime and anyplace by anything and anyone, providing any service
within any network. In fact, this is an extension and further development of the
contact paradigm “anytime-anywhere-anyone”. These ventures shall be considered
multiple IoT-related programs in nearly 20 areas funded in the EU Seventh
Framework Program (FP7) public tender announcement.
[2].Isong et al. proposed an approach to automatically monitor drinking-and-driving
and speeding on South Africa’s roads without having to deploy a manual system.
They employed the IoT, vehicular ad-hoc networks (VANETs), and cloud
computing to bring this innovation to the transportation sector. In recent years, the
VANET concept has received considerable attention from researchers in the field. It
uses powerful technology that can support an ITS. It has been implemented to
increase road safety, boost driver visibility, and improve transportation quality
through the provision of real-time road traffic information. It is also used to
enhance the entertainment system of a vehicle in motion for the comfort of
passengers. VANETs currently use dedicated short-range communication (DSRC),
which is the IEEE 802.11p standard for improving road safety and remote traffic
control.
[3]. In modern civilization, transportation plays a key role in the economic
development and success of a country. Today, control systems can manage certain
situations, but not very effectively, because they require constant input from
humans. There is a need for a system with regular satellite updates so that traffic
can be managed smoothly. This could be done using IoT /internet protocols for
transmitting data. A unified server must be framed, so all humans can see after a
complete traffic review. Diversion routes and waiting times would be calculated
based on traffic density.
[4]. In this authors suggested a new approach for handling a traffic grid that uses an
IoT definition. Intelligent traffic controllers are framed with devices such as the
PiCamera, Raspberry Pi, IR sensors, and radio frequency identification (RFID). IR
sensors is used to determine the traffic density. RFID technology is also utilized to
provide a green path (zero traffic) for emergency vehicles. This research suggests
two types of machine management: manual (with human intervention) and
automated (without human intervention).
[5]. Jain et al. developed a speed detection system that uses a radar gun or speed
gun to calculate a vehicle’s speed, and if it exceeds the maximum limit, specifics of
the vehicle are transmitted to the nearest control room. Speed is monitored by
means of micro-electromechanical system (MEMS)-based sensors.
[6]. A proposed automatic license plate recognition (ALPR) algorithm uses the
Hough transform to detect license plates by tracing the edges of the plates. This
transformation is a memory- and time-consuming process. Furthermore, in this
wavelength-based technique, high-frequency coefficients are used to precisely
detect license plates. Nevertheless, this algorithm does not perform efficiently.
[7]. Sawicki et al. presented the use of RADAR for vehicle speed calculation. A
RADAR works on the principle of bouncing a radio signal back from a moving
object and the receiver receives the reflected signal. The receiver RADAR
calculates vehicle speed on the basis of calculated difference in frequency. Given
the high cost and susceptibility to target identification error, RADAR has not
received widespread implementation for vehicles speed monitoring.
[8]. Song et al. presented a genetic programming approach for detecting vehicle
speed.
[9]. Lin et al. used an approach of imaging geometry, blur extent in the image and
camera pose to calculate vehicle speed.
[10]. Rad et al. used an approach of computer vision techniques for speed
measurement. These approaches suffer issues such as number plate occlusion,
headlight occlusion, and/or being costly.
[11]. Xiao built an intelligent traffic monitoring system that relies on automated
detection of vehicles. However, in adverse weather conditions, this automated
image-based identification of vehicle license plates has a low recognition rate.
Research and design demonstrate that it is feasible and affordable to build an
intelligent traffic monitoring system based on the IoT. An intelligent traffic
monitoring system based on the IoT has a range of benefits, such as low cost, high
reliability, and robustness to adverse weather conditions. Furthermore, it would also
have a wide range of uses and would be easy to enforce.
[12]. In this, authors have developed an intelligent automatic luminous control
system for streetlights according to the intensity of light in the environment. The
system is intelligent enough to identify between day and night to switch mode of
the system accordingly. This system has been equipped with surveillance system
using cameras to control the traffic on road. This system translates audio-free video
into text data to extract knowledge about the vehicle. The model presented here is
related to controlling the traffic to avoid traffic jam and congestions. This does not
offer the speed monitoring feature which is important to enforce the traffic rules.
Chapter 3
The diagram shown above “Fig. 2” is the receiver section of the system. The
receiver is used to acquire an information from the transmitter. Based on the
information it received, it controls the speed of the vehicle. The receiver modules
consists of RF receiver, LCD display, Bluetooth module, Motor driver and DC
motor. LCD is used to shows the information about the speed of vehicle. Bluetooth
is use to control the movement of the vehicle in front, Back, Right and Left.
3.2 WORKING:
When the vehicle enters in the normal area it’s speed does not decrease and it goes
normally means there is a no action is required. Whenever it enters, the transmitter
module just send an information to the receiver that contains how much speed a
vehicle can go inside the speed limited region.
The signal is basically analog in nature that will be converted into digital so only
the microcontroller able to process the signal. The microcontroller compares both
the signals. In this there are two cases: 1) If speed of vehicle is less than the speed
limit of road, then no action required, vehicle goes normally.2) If speed of vehicle
is greater than the speed limit of the road zone then the actual speed of vehicle and
speed of that zone is displayed on LCD Display also the message is given to the
driver to reduce the speed below the limit. If speed change is occur within
minimum time period then it is ok. But, if driver does not reduce the speed below
speed limit of that zone then our system will work automatically means the vehicle
can goes with speed limit of that zone.
3.3 HARDWARE REQUIREMENTS
POWER:
The Arduino Uno can be powered via the USB connection or with an external power
supply. The power source is selected automatically.
External (non-USB) power can come either from an AC-to-DC adapter (wall-wart)
or battery. The adapter can be connected by plugging a 2.1mm center-positive plug
into the board's power jack. Leads from a battery can be inserted in the Gnd and Vin
pin headers of the POWER connector.
The board can operate on an external supply of 6 to 20 volts. If supplied with less
than 7V, however, the 5V pin may supply less than five volts and the board may be
unstable. If using more than 12V, the voltage regulator may overheat and damage the
board. The recommended range is 7 to 12 volts.
The power pins are as follows:
VIN- The input voltage to the Arduino board when it's using an external power
source (as opposed to 5 volts from the USB connection or other regulated power
source). You can supply voltage through this pin, or, if supplying voltage via the
power jack, access it through this pin.
5V-This pin outputs a regulated 5V from the regulator on the board. The board can
be supplied with power either from the DC power jack (7 - 12V), the USB connector
(5V), or the VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins
bypasses the regulator, and can damage your board. We don't advise it.
3.3V- A 3.3 volt supply generated by the on-board regulator. Maximum current draw
is 50 mA.
GND-Ground pins.
MEMORY
The ATmega328 has 32 KB (with 0.5 KB used for the bootloader). It also has 2 KB
of SRAM and 1 KB of EEPROM (which can be read and written with the EEPROM
library).
OVERVIEW
The TX is an ASK transmitter [Link] TX is designed specifically for remote-
control , wireless mouse and car alarm system operating at 315/433.92 MHz. The RX
is a miniature receiver module that receives On-off keyed ( OOK )modulation signal
and demodulated to digital signal for the next decoder stage. The RX is designed
specifically for remote-control and wireless security receiver operating at
315/434Mhz. UART TTL o/p - Baud Rate – 9600
FEATURES
Input Power supply - 5 Volts
Compatible for Both RF 433/ 315 MHz
Interface upto 8 Bit Data.
UART TTL o/p - Baud Rate - 9600
Package Includes with RF Tx Rx.
Indicating LED's.
High quality PCB FR4 Grade with FPT Certified.
RF-Tx
The transmitter/receiver (Tx/Rx) pair operates at a frequency of 433Mhz. An RF
transmitter receives serial data and transmits it wirelessly through RF through its
antenna connected to pin 4. The transmission occurs at the rate of 1Kbps -10Kbps
RF-RX
The transmitted data is received by an RF receiver operating at the same frequency
as that of the transmitter. The RF module is often used along with a pair of
encoder/decoder. The encoder is used for encoding parallel data for transmission feed
while reception is decoded by a decoder.
LCD is a type of display used in digital watches and many portable computers. LCD
displays utilize to sheets of polarizing material with a liquid crystal solution between
them. An electric current passed through the liquid causes the crystals to align so that
light cannot pass through them. LCD technology has advanced very rapidly since its
initial inception over a decade ago for use in lap top computers. Technical
achievements has resulted in brighter displace, higher resolutions, reduce response
times and cheaper manufacturing process.
The liquid crystals can be manipulated through an applied electric voltage so that
light is allowed to pass or is blocked. By carefully controlling where and what
wavelength (color) of light is allowed to pass, the LCD monitor is able to display
images. A backlight provides LCD monitor’s brightness.
Over the years many improvements have been made to LCD to help enhance
resolution, image, sharpness and response times.
One of the latest such advancement is applied to glass during acts as switch allowing
control of light at the pixel level, greatly improving LCD’s ability to display small-
sized fonts and image clearly.
Other advances have allowed LCD’s to greatly reduce liquid crystal cell response
times. Response time is basically the amount of time it takes for a pixel to “change
colors”, in reality response time is the amount of time it takes a liquid crystal cell to
go from being active to inactive.
The ability to display numbers, characters and graphics. This is in contrast to LEDs,
which are limited to numbers and a few characters.
An intelligent LCD display of two lines, 20 characters per line that is interfaced to
the pic16f72 microcontroller.
Incorporation of a refreshing controller into the LCD, thereby relieving the CPU to
keep displaying the data. Ease of programming for characters and graphics.
Most of the LCD modules conform to a standard interface specification. A 14-pin
access is provided having eight data lines, three control lines and three power lines.
The connections are laid out in one of the two common configurations, either two
rows of seven pins, or a single row of 14 pins.
One of these pins is numbered on the LCD’s printed circuit board (PCB), but if not, it
is quite easy to locate pin1. Since this pin is connected to ground, it often has a
thicker PCB track, connected to it, and it is generally connected to metal work at
same point.
PIN DESCRIPTIONS: -
While Vcc and Vss provide +5V and ground respectively, Vee is used for controlling
LCD contrast.
RS Register Select: -
There are two very important registers inside the LCD. The RS pin is used for their
selection as follows.
If RS=0, the instruction command code register is selected, allowing the user to send
a command such as clear display, cursor at home, etc.
If RS=1, the data register is selected, allowing the user to send data to be displayed
on the LCD.
R/W, read/write: -
R/W input allows the user to write information to the LCD or read information from
it.
EN, enable: -
The LCD to latch information presented to its data pins uses the enable pin. When
data is supplied to data pins, a high–to-low pulse must be applied to this pin in order
for the LCD to latch in the data present at the data pins. This pulse must be a
minimum of 450 ns wide.
D0 – D7: -
The 8–bit data pins, DO – D7, are used to send information to the LCD or read the
contents of the LCD’s internal registers.
To display letters and numbers, we send ASCII codes for the letters A–Z, a-z
numbers 0-9 to these pins while making RS=1.
There are also instruction command codes that can be sent to the LCD to clear the
display or force the cursor to home position or blink the instruction command codes.
We also use RS = 0 to check the busy flag bit to see if the LCD is ready to receive
information. The busy flag is D7 and can be read when R/W=1 and RS=0, as
follows: if R/W = 1, RS = 0. When D7= 1 (busy flag = 1), the LCD is busy taking
care of internal operations and will not accept any information.
(when charging) or by the stored potential chemical energy (available to drive a load)
when the battery is discharging.
Sl.
Pin Name Pin Description
No
This is the Power supply pin of the module. You can connect 5
1 VCC
V from the Arduino UNO to this pin.
RXD is the receive pin of the module. You will send the
4 RXD
commands to the module via this RXD pin. Connect TXD Pin
of the MCU (Arduino UNO PIN 1)
The KEY pin enables you to put the HC-05 Bluetooth module in
5 KEY
AT command mode.
The STATE pin tells the Arduino UNO whether the HC-05 is
connected to a Bluetooth device or not. The STATE pin will be
6 STATE
high when it is connected to a Bluetooth device. It will be low
when it si not connected to any device.
HC-05 Module can act like a Master as well as a slave. Use AT commands to put the
HC-05 module in the master mode.
The master mode helps you connect the HC-05 module with other Bluetooth slave
devices.
AT mode also allows you to change the name of the module (as it appears in the list
of Bluetooth devices).
There are several ways for wireless communication such as NRF, ZigBee, Wi-Fi, and
Bluetooth.
HC05 module has an internal 3.3v regulator and that is why you can connect it to 5v
voltage. But we strongly recommend 3.3V voltage, since the logic of HC05 serial
communication pins is 3.3V. Supplying 5V to the module can cause damage to the
module.
In order to prevent the module from damages and make it work properly, you should
use a resistance division circuit (5v to 3.3v ) between arduino TX pin and module RX
pin. When master and slave are connected, blue and red LEDs on the board blink
every 2seconds. If they aren’t connected, only blue one blinks every 2 seconds.
Step 3: Circuit
Fig. 3.6 Circuit
Step 4: Code
In order to communicate with HC05 using Bluetooth, you need a Bluetooth terminal
application on your phone. You can use this [Link] for start transferring data,
upload this code on your Arduino and connect HC05 using the app you have just
installed. Communication name is HC05, the password is 1234 or 0000 and the
transfer baud rate is 9600 by default.
Let’s take a deeper look at the code and see what each line means:
#include "SoftwareSerial.h"
library you need for software serial communication. You can download it here.
[Link](9600);
This is probably the simplest code to test all the device that support the serial port
communication. It simply connects the computer terminal and the HC-05 in a loop.
The codes sends the messages from the terminal to the Bluetooth Module and
messages from the Bluetooth module to the terminal.
#include <SoftwareSerial.h>
void setup()
[Link](9600);
[Link](9600); //Default Baud for comm, it may be different for your Module.
[Link]("The bluetooth gates are open.\n Connect to HC-05 from any other
bluetooth device with 1234 as pairing key!.");
void loop()
In smartphone settings, enable Bluetooth and scan for available Bluetooth devices.
The HC-05 device is visible in scanned list. The default name for this Bluetooth
device is “HC-05” and the default pin code is either “0000” or “1234”.
Once connected we can control the motors by pressing the characters as mentioned in
coding.
3.3.5 MOTOR DRIVE
To control DC motors in order to build own robot, which is where the L298N motor
driver comes in. It can control the speed and spinning direction of two DC motors.
Controlling a DC Motor
We can only have full control over a DC motor if we can control its speed and
spinning direction. This is possible by combining these two techniques.
The speed of a DC motor can be controlled by changing its input voltage. A widely
used technique to accomplish this is Pulse Width Modulation (PWM).
PWM is a technique in which the average value of the input voltage is adjusted by
sending a series of ON-OFF pulses. This average voltage is proportional to the width
of the pulses, which is referred to as the Duty Cycle.
The higher the duty cycle, the higher the average voltage applied to the DC motor,
resulting in an increase in motor speed. The shorter the duty cycle, the lower the
average voltage applied to the DC motor, resulting in a decrease in motor speed.
Closing two specific switches at the same time reverses the polarity of the voltage
applied to the motor. This causes a change in the spinning direction of the motor.
At the center of the module is a big, black chip with a chunky heat sink – the L298N.
The L298N chip contains two standard H-bridges capable of driving a pair of DC
motors, making it ideal for building a two-wheeled robotic platform.
The L298N motor driver has a supply range of 5V to 35V and is capable of 2A
continuous current per channel, so it works very well with most of our DC motors.
Technical Specifications:
The L298N module has 11 pins that allow it to communicate with the outside world.
The pinout is as follows:
Power Pins
The L298N motor driver module receives power from a 3-pin, 3.5mm-pitch screw
terminal.
The L298N motor driver has two input power pins: VS and VSS.
VS pin powers the IC’s internal H-Bridge, which drives the motors. This pin accepts
input voltages ranging from 5 to 12V.
VSS is used to power the logic circuitry within the L298N IC, and can range between
5V and 7V.
Output Pins
The output channels of the L298N motor driver, OUT1 and OUT2 for motor A
and OUT3 and OUT4 for motor B, are broken out to the edge of the module with two
3.5mm-pitch screw terminals. You can connect two 5-12V DC motors to these
terminals.
Each channel on the module can supply up to 2A to the DC motor. The amount of
current supplied to the motor, however, depends on the capacity of the motor power
supply.
The direction control pins allow you to control whether the motor rotates forward or
backward. These pins actually control the switches of the H-Bridge circuit within the
L298N chip.
The spinning direction of the motor can be controlled by applying logic HIGH (5V)
or logic LOW (Ground) to these inputs. The chart below shows various combinations
and their outcomes.
High(1
Low(0) Forward
)
High(1
High(1) Motor OFF
)
The speed control pins ENA and ENB are used to turn on/off the motors and control
their speed.
Pulling these pins HIGH will cause the motors to spin, while pulling them LOW will
stop them. However, with Pulse Width Modulation (PWM), the speed of the motors
can be controlled.
The module usually comes with a jumper on these pins. When this jumper is in place,
the motor spins at full speed. If you want to control the speed of the motors
programmatically, remove the jumpers and connect them to the Arduino’s PWM-
enabled pins.
The module includes a 78M05 5V regulator that can be enabled or disabled via a
jumper.
When this jumper is in place, the 5V regulator is enabled, and the logic power supply
(VSS) is derived from the motor power supply (VS). In this case, the 5V input
terminal acts as the output pin, delivering 5V 0.5A. You can use it to power an
Arduino or other circuitry that needs 5V power.
When the jumper is removed, the 5V regulator is disabled, and we have to supply 5V
separately through the VSS pin.
The L298N has a voltage drop of approximately 2V. This is due to the fact that
internal switching transistors have a voltage drop of approximately 1V when forward
biased, and because an H-Bridge requires the current to pass through two transistors,
the total voltage drop is 2V.
So, if you connect 12V to the motor power supply terminal, the motors will receive
approximately 10V. This means that a 12V DC motor will never spin at full speed.
Taking into account a voltage drop of 2V, if you are using 5V motors, you will need
to provide 7V at the motor power supply terminal. If you have 12V motors then your
motor supply voltage should be 14V.
This excess voltage drop results in significant power dissipation in the form of heat.
This is why the L298N based motor drivers require a big heatsink.
Now that we know everything about the module, we can start hooking it up to our
Arduino!
Let’s begin by connecting the motor power supply. In our experiment, we are using
DC gearbox motors, also called “TT” motors, which are often found in two-wheel-
drive robots. They are rated for 3 to 12V. We will therefore connect an external 12V
power source to the VS terminal. Because L298N has a voltage drop of about 2V, the
motors will receive 10V and spin at a slightly lower RPM. But that’s okay.
Next, we need to supply 5V to the logic circuitry of the L298N. We’ll use the on-
board 5V regulator to draw 5V from the motor power supply, so keep the 5V-EN
jumper in place.
Now connect the L298N module’s Input and Enable pins (ENA, IN1, IN2, IN3, IN4
and ENB) to the six Arduino digital output pins (9, 8, 7, 5, 4 and 3). Note that both
Arduino output pins 9 and 3 are PWM-enabled.
Finally, wire one motor to terminal A (OUT1 and OUT2) and the other to terminal B
(OUT3 and OUT4). You can swap out your motor’s connections. There is technically
no right or wrong way.
Before digging in to the basics of Embedded C Program, we will first take a look at
what an Embedded System is and the importance of Programming Language in
Embedded Systems.
An Embedded System can be best described as a system which has both the hardware
and software and is designed to do a specific task. A good example for an Embedded
System, which many households have, is a Washing Machine.
We use washing machines almost daily but wouldn’t get the idea that it is an
embedded system consisting of a Processor (and other hardware as well) and
software.
Embedded Systems can not only be stand-alone devices like Washing Machines but
also be a part of a much larger system. An example for this is a Car. A modern day
Car has several individual embedded systems that perform their specific tasks with
the aim of making a smooth and safe. Some of the embedded systems in a Car are
Anti-lock Braking System (ABS), Temperature Monitoring System, Automatic
Climate Control, Tyre Pressure Monitoring System, Engine Oil Level Monitor, etc.
All these devices have one thing in common: they are programmable i.e. we can
write a program (which is the software part of the Embedded System) to define how
the device actually works.
From the above statement, it is clear that the Software part of an Embedded System
is equally important to the Hardware part. There is no point in having advanced
Hardware Components with poorly written programs (Software).
There are many programming languages that are used for Embedded Systems like
Assembly (low-level Programming Language), C, C++, JAVA (high-level
programming languages), Visual Basic, JAVA Script (Application level
Programming Languages), etc.
In the process of making a better embedded system, the programming of the system
plays a vital role and hence, the selection of the Programming Language is very
important.
The C Programming Language, developed by Dennis Ritchie in the late 60’s and
early 70’s, is the most popular and widely used programming language. The C
Programming Language provided low level memory access using an uncomplicated
compiler (a software that converts programs to machine code) and achieved efficient
mapping to machine instructions.
There is actually not much difference between C and Embedded C apart from few
extensions and the operating environment. Both C and Embedded C are ISO
Standards that have almost same syntax, datatypes, functions, etc.
Starting from consumer electronics like Digital Cameras, DVD Players to high end
and advanced systems like Flight Controllers and Missile Guidance Systems,
embedded systems are omnipresent and became an important part of our life.
The way we live our life has been significantly improved with the utilization of
Embedded Systems and they will continue to be an integral part of our lives even
tomorrow.
Another important concept we are hearing these days is Real – Time Systems. In a
real time system, Real Time Computing takes place, where a computer (an
Embedded System) must generate response to events within certain time limits.
3.4.8 PROGRAMMING
The Arduino Uno can be programmed with the Arduino software (download). Select
"Arduino Uno from the Tools > Board menu (according to the microcontroller on
your board). For details, see the reference and tutorials.
The ATmega328 on the Arduino Uno comes preburned with a bootloader that
allows you to upload new code to it without the use of an external hardware
programmer. It communicates using the original STK500 protocol (reference, C
header files).
You can also bypass the bootloader and program the microcontroller through the
ICSP (In-Circuit Serial Programming) header; see these instructions for details.
The ATmega16U2 (or 8U2 in the rev1 and rev2 boards) firmware source code is
available . The ATmega16U2/8U2 is loaded with a DFU bootloader, which can be
activated by:
On Rev1 boards: connecting the solder jumper on the back of the board (near the
map of Italy) and then resetting the 8U2.
On Rev2 or later boards: there is a resistor that pulling the 8U2/16U2 HWB line to
ground, making it easier to put into DFU mode.
You can then use Atmel's FLIP software (Windows) or the DFU programmer (Mac
OS X and Linux) to load a new firmware. Or you can use the ISP header with an
external programmer (overwriting the DFU bootloader). See this user-contributed
tutorial for more information.
3.4.9 Automatic (Software) Reset
Rather than requiring a physical press of the reset button before an upload, the
Arduino Uno is designed in a way that allows it to be reset by software running on a
connected computer. One of the hardware flow control lines (DTR) of the
ATmega8U2/16U2 is connected to the reset line of the ATmega328 via a 100
nanofarad capacitor. When this line is asserted (taken low), the reset line drops long
enough to reset the chip. The Arduino software uses this capability to allow you to
upload code by simply pressing the upload button in the Arduino environment. This
means that the bootloader can have a shorter timeout, as the lowering of DTR can be
well-coordinated with the start of the upload.
This setup has other implications. When the Uno is connected to either a computer
running Mac OS X or Linux, it resets each time a connection is made to it from
software (via USB). For the following half-second or so, the bootloader is running on
the Uno. While it is programmed to ignore malformed data (i.e. anything besides an
upload of new code), it will intercept the first few bytes of data sent to the board after
a connection is opened. If a sketch running on the board receives one-time
configuration or other data when it first starts, make sure that the software with
which it communicates waits a second after opening the connection and before
sending this data.
The Uno contains a trace that can be cut to disable the auto-reset. The pads on either
side of the trace can be soldered together to re-enable it. It's labeled "RESET-EN".
You may also be able to disable the auto-reset by connecting a 110 ohm resistor from
5V to the reset line; see this forum thread for details.
Chapter 4
CONCLUSION
This study shows the role of reducing vehicle speed automatically and its
contributions to the safety of pedestrians and road users. It is found that the use of the
vehicle speed control system contributes a lot in minimizing the accident rate that
occurs due to the negligence of the driver to disobeying roadside signboards in
special zones. Though the VSC system in a vehicle is effective, they help much in
terms of improving safety, keeping both the passenger safety and the pedestrians on
the [Link] the automatic VSC system is incorporate in school zones
or hospital zones which allows the vehicle to act independently to slow down the
vehicle when the vehicle comes at a higher speed which minimizes the accidents
due to negligence of the driver actively and in a way more effectively. Hence it is
concluded from the above study that the uses of Automatic vehicle speed control
systems in restricted zones minimize unwanted accidents to a great extent compared
to normal behaviour.
REFERENCES
1. Lombardi, M.; Pascale, F.; Santaniello, D. Internet of Things: A General Overview
between Architectures, Protocols and Applications. Information 2021, 12, 87.
[Google Scholar] [CrossRef]
2. Jan, S.U.; Young, D.L.; Soo, K. A distributed sensor-fault detection and diagnosis
framework using machine learning. Inf. Sci. 2021, 547, 777–796. [Google Scholar]
[CrossRef]
3. World Health Organization. Global Status Report on Road Safety 2015; World
Health Organization: Geneva, Switzerland, 2015. [Google Scholar]
4. Abbass, A. Estimating vehicle speed using image processing. AL-Mansour
J. 2010, 14, 127–141. [Google Scholar]
5. Sina, I.; Ari Wibisono, A.; Nurhadiyatna, B.H.; Wisnu, J.; Petrus, M. Vehicle
counting and speed measurement using headlight detection. In Proceedings of the
2013 International Conference on Advanced Computer Science and Information
Systems (ICACSIS), Sanur Bali, Indonesia, 28–29 September 2013; pp. 149–154.
[Google Scholar]
6. Song, A.; Mengjie, Z. Genetic programming for detecting target motions. Connect.
Sci. 2012, 24, 117–141. [Google Scholar] [CrossRef]
7. Lin, H.-Y.; Li, K.-J.; Chang, C.-H. Vehicle speed detection from a single motion
blurred image. Image Vis. Comput. 2008, 26, 1327–1337. [Google Scholar]
[CrossRef]
8. Rad, A.G.; Abbas, D.; Mohamed, R.K. Vehicle speed detection in video image
sequences using CVS method. Int. J. Phys. Sci. 2010, 5, 2555–2563. [Google
Scholar]
9. Mirza, F.H.; Qudsia, H.; Nadia, J. An autopsy-based study of death due to road
traffic accidents in metropolis of Karachi. JPMA 2013, 63, 156–160. [Google
Scholar]
10. Khan, M.A.; Khan, S.F.; BaOmar, T.; Rahman Mohammed Aqeel Ba Omar, A.
Development & implementation of smart vehicle over speeding detector using
IoT. Adv. Sci. Technol. Eng. Syst. 2019, 4, 170–175. [Google Scholar]
11. Rudin-Brown, C.M. Intelligent’in-vehicle intelligent transport systems: Limiting
behavioural adaptation through adaptive design. IET Intell. Transp. Syst. 2010, 4,
252–261. [Google Scholar] [CrossRef]
12. Bassey, I.; Khutsoane, O.; Dladlu, N. Real-time Monitoring and Detection of Drink-
driving and Vehicle Over-speeding. Int. J. Image Graph. Signal Processing 2017, 9,
1. [Google Scholar]
13. Xu, S.; Guo, P.; Xu, B.; Zhou, H. QoS evaluation of VANET routing protocols. J.
Netw. 2013, 8, 132. [Google Scholar] [CrossRef]
14. Pascale, F.; Adinolfi, E.A.; Coppola, S.; Santonicola, E. Cybersecurity in
Automotive: An Intrusion Detection System in Connected
Vehicles. Electronics 2021, 10, 1765. [Google Scholar] [CrossRef]
15. Sergi, R.; Ganan, C.; Caubet, J.; Alins, J.; Mata, J.; Munoz, J.L. Analysis of video
streaming performance in vehicular networks. In Proceedings of the First
International Conference on Advanced Communications and Computation,
INFOCOMP, Barcelona Spain, 23–29 October 2011; Volume 10, p. 2011. [Google
Scholar]
16. Thakur, T.; Gogate, M. Traffic Controlling and Monitoring using Internet of
Things. Int. J. Latest Trends Eng. Technol. (IJLTET) 2015, 6, 012017. [Google
Scholar]
17. Perumalla, K.B.; Babu, M.S. An intelligent traffic and vehicle monitoring system
using internet of things architecture. Int. J. Sci. Res. 2016, 5, 853–856. [Google
Scholar]
18. Harshini Vijetha, H.; Dr Nataraj, K.R. IOT Based Intelligent Traffic Control
System. Int. J. Eng. Technol. Res. Manag. 2020, 4, 59–63. [Google Scholar]
19. Jain, M.; Praveen, K.; Priya, S.; Chhavi, N.A.; Ankita, S. Detection of over speeding
vehicles on highways. Int. J. Comput. Sci. Mob. Comput. 2015, 4, 613–619. [Google
Scholar]
20. Du, S.; Mahmoud, I.; Mohamed, S.; Wael, B. Automatic license plate recognition
(ALPR): A state-of-the-art review. IEEE Trans. Circuits Syst. Video
Technol. 2012, 23, 311–325. [Google Scholar] [CrossRef]