0% found this document useful (0 votes)
25 views74 pages

Batch15 1

Uploaded by

Bhavya Reddy A
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)
25 views74 pages

Batch15 1

Uploaded by

Bhavya Reddy A
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/ 74

A project report on

ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE


DIM AND BRIGHTNESS CONTROLLED
Submitted in partial fulfillment for the award of the degree of
BACHELOR OF TECHNOLOGY
IN
ELECTRONICS AND COMMUNICATION ENGINEERING
BY
V. RAVIKISHORE 209L1A04A8
M. SHALINI 209L1A0469
M. NARASIMHA 209L1A0468
N. HARSHITHA 209L1A0469
C. SAIBABA 219L5A0403

Under the esteemed guidance of

Mr. T.VENKATARAMANA, M. Tech, (Ph. D)


Assistant Professor Department of ECE

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING


SIDDARTHA EDUCATIONAL ACADEMY GROUP OF INSTITUTIONS
(Approved by AICTE, New Delhi& Affiliated to JNTUA, Ananthapuramu)

An ISO 9001:2015 & ISO 14001:2015 Certified Institution


Near C. Gollapalli, Tirupati-517505
MAY-2024
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING
SIDDARTHA EDUCATIONAL ACADEMY GROUP OF INSTITUTIONS
Near C. Gollapalli, Tirupati-517505

CERTIFICATE
This is to certify that the project report entitled “ADVANCED VEHICLE MONITORING
SYSTEM AND AUTOMATIC VEHICLE DIM AND BRIGHTNESS CONTROLLED” is a
bonafide work carried out by
V. RAVIKISHORE 209L1A04A8
M. SHALINI 209L1A0469
M. NARASIMHA 209L1A0468
N. HARSHITHA 209L1A0469
C. SAIBABA 219L5A0403
B. Tech students of Siddartha Educational Academy Group of Institutions, Affiliated to JNTUA,
Ananthapuramu in partial fulfillment of the requirements for the award of the degree of
BACHELOR OF TECHNOLOGY with the specialization in ELECTRONICS AND
COMMUNICATION ENGINEERING during the Academic year 2023-2024.

Project guide Head of the department


Mr. T. VENKATARAMANA, M. Tech. Mr P.SAI PRASAD M. Tech, (Ph.D)
Assistant Professor, Dept. of ECE, Professor, Dept. of ECE,
SEAGI, Tirupati – 517505. SEAGI, Tirupati – 517505.

Viva-voice conducted on

INTERNAL EXAMINER EXTERNALEXAMINER


SIDDARTHA EDUCATIONAL ACADEMY GROUP OF INSTITUTIONS
Near C. Gollapalli, Tirupati-517505

DECLARATION
We hereby declare that the project report work entitled “ADVANCED VEHICLE
MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND BRIGHTNESS
CONTROLLLED” is entirely our original work carried out under the guidance of Mr.
T.VENKATARAMANA, Assistant Professor Department of Electronics and Communication
Engineering, Siddartha Educational Academy Group Of Institutions, C. Gollapalli, Tirupati,
Affiliated to JNTUA, Anantapuramu, for the award of the Degree of BACHELOR OF
TECHNOLOGY with the specialization in ELECTRONICS AND COMMUNICATION
ENGINEERING. The project report has not been submitted in a part full for the award of any
degree of diploma of this or any other university or institutions.

V. RAVIKISHORE 209L1A04A8
M. SHALINI 209L1A0469
M. NARASIMHA 209L1A0468
N. HARSHITHA 209L1A0469
C. SAIBABA 219L5A0403
ACKNOWLEDGEMENT

All endeavours over a long period can be successful only with the advice and support of
many well-wishers. We take this opportunity to express our gratitude and appreciation to all of
them.
We wish to express deep sense of gratitude to our guide Mr T. VENKATARAMANA,
Assistant Professor Department of Electronics and Communication Engineering, Siddartha
Educational Academy Group of Institutions, Tirupati, for his valuable guidance, given to us for
the successful completion of work.
Our sincere thanks to MR P.SAI PRASAD , Head, Department of Electronics and
Communication Engineering, Siddartha Educational Academy Group of Institutions, Tirupati,
for his valuable advice, guidance and encouragement given to us for the successful completion of
work.
We extend sincere thanks to the Dr. K. RAJASEKHAR, Principal of Siddartha
Educational Academy Group of Institutions, Tirupati, for his kind co-operation in completing
and making the project a success.
We would like to thank the Management for their kind co-operation and for providing
infrastructure facilities.
We extend our thanks to all the Teaching staff and Non-Teaching staff of the Department
of Electronics and Communication Engineering for their support and encouragement during the
course of our project work.
We also thank our parents for being helpful in many ways in successful completion of
our work, Finally, we thank all these who helped us directly or indirectly in successful
completion of this project work.

V. RAVIKISHORE 209L1A04A8
M. SHALINI 209L1A0469
M. NARASIMHA 209L1A0468
N. HARSHITHA 209L1A0469
C.SAIBABA 219L5AO403
ABSTRACT

Nowadays people are driving very fast, accidents are occurring frequently, we lost our
valuable life by making small mistake while driving (school zone, hills area, and highways). So
in order to avoid such kind of accidents and to alert the drivers and to control the ultrasonic
vehicle speed in such kind of places the highway department have placed the signboards. But
sometimes it may not be possible to view that kind of signboards and there is a chance for
accident or driver don’t slow the speed of the ultrasonic vehicles even after seeing the sign
boards.

Accidents are occurring frequently in highly traffic areas. Drivers drive vigorously without
caring the traffic. Intimation of driver about speed and accident prone zone is necessary. It can
be done by using automatic technology with the help of embedded system and sensors. This
project is focused on “automatic speed control of vehicles” by detecting the accident- prone
zone. The main objective is to design a Smart Display controller meant for Vehicle’s speed
control and monitors the zones, which can run on an embedded system.

V
TABLE OF CONTENTS

CHAPTERS NAME PAGE NO

Title Page I
Certification II
Declaration III
Acknowledgement IV
Abstract V
Table of Contents VI
List of Figures IX
List of Acronyms XI

CHAPTER 1 INTRODUCTION 01-11

1.1 Introduction to microcontroller 03

1.2 Embedded design life cycle 06

1.3 Proposed system 09

1.4 Existing work 10

1.5 Aim of the project 10

1.6 Problem statement 10

1.7 Organisation of project 11

CHAPTER 2 LITERATURE SURVEY 12-14

CHAPTER 3 HARDWARE 15-20

3.1 Ultrasonic sensor 16

3.2 Actuators 17

3.3 Arduino UNO 18

vi
3.4 Power supply 19

CHAPTER 4 SOFTWARE IMPLEMENTATIONS 21-26

4.1 Arduino IDE 22

4.2 Arduino libraries 23

4.3 Motor control code 23

4.4 Speed control algorithm 24

4.5 Ultrasonic sensor code 25

4.6 Speed control 26

CHAPTER 5 METHODOLOGY 27-47

5.1 Schematic diagram 29

5.1.1 Ultrasonic sensor 30

5.1.2 Motor 1 30

5.1.3 Motor 2 30

5.1.4 Arduino UNO 30

5.2 Block diagram 31

5.2.1 Ultrasonic sensor 32

5.2.2 Motors 42

5.2.3 Arduino UNO 47

CHAPTER 6 RESULTS 48-53

6.1 Advantages 51

CHAPTER 7 CONCLUSION & FUTURE SCOPE 54-57

7.1 Conclusion 55

vii
7.2 Future scope 56

CHAPTER 8 REFERENCE 58

APPENDIX PROJECT CODE 60

viii
LIST OF FIGURES

S. NO NAME PAGE NO

1.1 Microcontroller 3

1.2 Types of microcontroller 5

1.3 Product life cycle 8

1.4 Transmitter Module 9

3.1 Ultrasonic sensor 17

3.2 Actuators 17

3.3 Arduino UNO 18

3.4 Power supply 19

4.1 Arduino IDE 22

4.2 Arduino libraries 23

4.3 Arduino motor control 24

4.4 Speed control of dc motor 25

4.5 Ultrasonic distance sensor 26

5.1 Schematic diagram 29

5.2 Block diagram 31

5.3 Sensor 32

5.4 Working principle of sensor 35

ix
5.5 Various types of sensors 35

5.6 Ultrasonic transmitter 36

5.7 Ultrasonic receiver 36

5.8 Working model of vehicle 39

5.9 Working of vehicle 40


5.10 Working principle of ultrasonic 41

5.11 Actuator 42

5.12 Motor 43

5.13 DC motor 44

5.14 Brush less DC motor 46

5.15 Arduino UNO 47

6.1 Developed hardware kit 49

6.2 Car without immunity 51

x
LIST OF ACRONYMS
Symbol Name
ACC Accumulator

B B register

PSW Program status word

SP Stack pointer

DPTR Data pointer 2 bytes

DPL Low byte

DPH High byte

P0 Port 0

P1 Port 1

P2 Port 2

P3 Port 3

IP Interrupt priority control

IE Interrupt enable control

TMOD Timer/counter mode


control

TCON Timer/counter control

T2CON Timer/counter 2 control

T2MOD Timer counter mode 2


control

TH0 Timer/control 0 high byte

TL0 Timer/control 0 low byte

TH1 Timer/control 1 high byte

TL1 Timer/control 1 low byte

TH2 Timer/control 2 high byte

TL2 Timer/control 2 low byte

xi
SCON Serial control

SBUF Serial data buffer

PC Personal computer
RPS Regulated power supply
RMS Root mean square
EEPROM Electrically erasable programmable ROM
ROM Read only memory
RAM Random access memory
BIOS Basic input output system
SRAM Static RAM
EPROM Erasable programmable ROM
DRAM Dynamic RAM
ISR Interrupt service routine
I2C Inter integrated chip

xii
ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

CHAPTER 1
INTRODUCTION

Dept of ECE, SEAGI, Tirupati Page 1


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

Road accidents have been on the rise in the past few years. More than one-third of the accidents
are caused due to over speeding or sudden obstacles and turns. Such huge loss of life due to
human errors is a big concern to traffic authorities, automobile industries and traffic safety
research groups. One way in which this can be done is by using Advanced Driver Assistance
Systems in which the vehicle communicates to the driver in the event of a possibility of a
collision. Some of them are Cruise Control (CC) which maintains a steady preset speed and
Advanced Cruise Control (ACC) which maintains a safe distance from the vehicle in front of it
in addition to maintaining a constant speed. The disadvantage of the above two systems, where
curved parts of the road cannot be identified is met by the Curve Warning System (CWS)
developed using GPS and digital maps taken from GIS (Geographical Information System) to
warn the driver if curves in the road are approached too fast. Similarly, Intelligence Speed
Assistance (ISA)
Systems warn the driver when the driver’s speed does not conform with the landscape. The
abovementioned systems fail to work when unexpected road obstacles like roadwork, road
diversions and any kind of accidents are chanced with. These require dynamically generated
digital maps. This system is proposed to maintain speed control in specific critical zones like
schools, hospitals, colleges etc. using GPS and wireless technology in embedded systems.

Safety is a necessary part of man’s life. Due to the accident cases reported daily on the major
roads in all parts of the developed and developing countries, more attention is needed for
research in the designing an efficient car driving aiding system. It is expected that if such a
device is designed and incorporated into our cars as a road safety device, it will reduce the
incidence of accidents on our roads and various premises, with subsequent reduction in loss of
life and property. However, a major area of concern of an engineer should be safety, as it
concerns the use of his/her inventions and the accompanying dangers due to human limitations.
When it comes to the use of a motor vehicle, accidents that have occurred over the years tell us
that something needs to be done about them from an engineering point of view.According to the
2007 edition of the Small-M report on the road accident statistic in Malaysia, a total of 6,035
people were killed in 2000 and the fatality spring up to 6,287 in 2006 from accident cases
reported in 250,429 and 341,252 cases of accident for 2000 and 2006 respectively. The obtained
results show that, high rate of accident is reported each year. Now it is sufficed to say that the
implementation of certain highway safety means such as speed restrictions, among others, has
done a lot in reducing the rates of these accidents. The issue here is that policies of safe driving

Dept of ECE, SEAGI, Tirupati Page 2


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

alone would not eradicate this, the engineer has a role to play, after all the main issue is an
engineering product (the motor vehicle). Many motorists have had 2 to travel through areas with
little light under much fatigue, yet compelled to undertake the journey out of necessity. It is not
always ultrasonic responsible to do this. A lot of cases reported is as a result of drivers sleeping
off while driving, and when he/she eventually woke up, a head-on collision might have taken
place. Not many have had the fortune to quickly avert this. It is therefore imperative to consider
the advantages of an early warning system where the driver is alerted of a possible collision with
some considerable amount of time before it occurs.

1.1 INTRODUCTION TO MICROCONTROLLER

Fig 1.1 Microcontroller.

A micro controller [1] (sometimes abbreviated µC or MCU) is a self-contained system


with peripherals, memory and a processor that can be used as an embedded system. Most
programmable micro controllers that are used today are embedded in other consumer products or
machinery including phones, peripherals, automobiles and household appliances for computer
systems. Due to that, another name for a micro controller is "embedded controller.
"Some embedded systems are more sophisticated, while others have minimal ultrasonic elements
for memory and programming length and a low software complexity. Input and output devices
include solenoids, LCD displays, relays, switches and sensors for data like humidity, temperature
or light level, amongst others.

It is a decision-making device used widely in embedded systems and all intelligent devices.
Microcontrollers are hidden inside a surprising number of products these days. If your
microwave oven has an LED or LCD screen and a keypad, it contains a microcontroller. All
modern automobiles contain at least one micro controller, and can have as many as six or seven:
The engine is controlled by a microcontroller, as are the anti-lock brakes, the cruise control and

Dept of ECE, SEAGI, Tirupati Page 3


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

so on. Any device that has a remote control almost certainly contains a micro controller: TVs,
VCRs and high-end stereo systems all fall into this category. Nice SLR and digital cameras, cell
phones, camcorders, answering machines, laser printers, telephones (the ones with caller ID, 20-
number memory, etc.), pagers, and feature-laden refrigerators, dishwashers, washers and dryers
(the ones with displays and keypads)... You get the idea. Basically, any product or device that
interacts with its user has a micro controller buried inside.

HOW MICROCONTROLLER WORKS:

Microcontroller is used to control the operation of various machines and devices according to the
program or given instructions in the memory or ROM of the Microcontroller [5]. The program
that is needed for proper working of Microcontroller is called Fultrasonicmware and is written in
ROM (Read Only Memory). ROM is a non-volatile memory that is its contents are permanent.
Some latest ROMs can be ReProgrammed, but mostly it doesn't requultrasonices.

Types of Microcontrollers
There are several different kinds of programmable microcontrollers. We stock many of the most
common types categorized by several parameters including Bits, Flash size, RAM size, number
of input/output lines, packaging type, supply voltage and speed. Our parametric filters will allow
you to refine your search results according to the requultrasoniced specifications.
Programmable microcontrollers contain general purpose input/output pins. The number of these
pins varies depending on the microcontroller. They can be configured to an input or an output
state by software. When configured to an input state, these pins can be used to read external
signals or sensors. When they are configured to the output state, they can drive external devices
like LED displays and motors.

Applications for Micro controllers:

Programmable micro controllers are designed to be used for embedded applications, unlike
microprocessors that can be found in PCs. Micro controllers are used in automatically controlled
devices including power tools, toys, implantable medical devices, office machines, engine
control systems, appliances, remote controls and other types of embedded systems.

Dept of ECE, SEAGI, Tirupati Page 4


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

Choosing the Right Microcontroller:

With the Future-electronics.com parametric search, when looking for the right micro controllers,

you can filter the results by the number of Bits ultrasonically. We carry the following size micro
controllers:
Various types of controllers:

8051

PIC

Atmega 8/16/32 AVR ARM etc.

Fig 1.2: Types of micro controllers

Difference between Microprocessor and Microcontroller:

The term microprocessor and microcontroller has always been confused with each other. Both
have been designed for real time application. They share many common features and at the same

Dept of ECE, SEAGI, Tirupati Page 5


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

time they have significant differences. Both the IC’s i.e., the microprocessor and microcontroller
cannot be distinguished by looking at them. They are available in different version starting from
6 pin to as high as 80 to 100 pins or even higher depending on the features.

Difference between microprocessor and microcontroller:

Microprocessor is an IC which has only the CPU inside them i.e. only the processing powers
such as Intel’s Pentium 1,2,3,4, core 2 duo, i3, i5 etc. These microprocessors don’t have RAM,
ROM, and other peripheral on the chip. A system designer has to add them externally to make
them functional. Application of microprocessor includes Desktop PC’s, Laptops, notepads etc.
But this is not the case with Microcontrollers. Microcontroller has a CPU, in addition with a
fixed amount of RAM, ROM and other peripherals all embedded on a single chip. At times it is
also termed as a mini computer or a computer on a single chip. Today different manufacturers
produce microcontrollers with a wide range of features available in different versions. Some
manufacturers are ATMEL, Microchip, TI, Freescale, Philips, Motorola etc.

Microcontrollers are designed to perform specific tasks. Specific means applications where the
relationship of input and output is defined. Depending on the input, some processing needs to be
done and output is delivered. For example, keyboards, mouse, washing machine, digicam,
pendrive, remote, microwave, cars, bikes, telephone, mobiles, watches, etc. Since the
applications are very specific, they need small resources like RAM, ROM, I/O ports etc and
hence can be embedded on a single chip. This in turn reduces the size and the cost.

Microprocessor find applications where tasks are unspecific like developing software, games,
websites, photo editing, creating documents etc. In such cases the relationship between input and
output is not defined. They need high amount of resources like RAM, ROM, I/O ports etc.

1.2 The Embedded Design Life Cycle

Developing software and hardware for microcontroller based systems involves the use of a range
of tools that can include editors, assemblers, compilers, debuggers, simulators, emulators and
Flash/OTP programmers. To the newcomer to microcontroller development it is often not clear
how all of these different components play together in the development cycle and what
differences there are for example between starter kits, emulators and simulators.

Dept of ECE, SEAGI, Tirupati Page 6


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

To complicate matters more, there are quite a number of different approaches and technologies
for emulation available that make it difficult for even seasoned embedded engineers to pick the
right tools.

With this article, I'll try to give a short explanation of the different tools involved in the
microcontroller development cycle, with a particular focus on the different emulator types and
the ultrasonic advantages.
The embedded design [2] process is not as simple as Figure depicts. A considerable amount of
iteration and optimization occurs within phases and between phases. Defects found in later
stages often cause you to go back to square 1. For example, when product testing reveals
performance deficiencies that render the design noncompetitive, you might have to rewrite
algorithms, redesign custom hardware such as Application Specific Integrated Ultrasonicates
(ASICs) for better performance speed up the processor, choose a new processor, and so on.

PRODUCT LIFE CYCLE

In this section, we will introduce the product development process in general. The basic
approach is introduced here, and the details of these concepts will be presented throughout the
remaining chapters of the book. As we learn software/hardware development tools and
techniques, we can place them into the framework presented in this section. As illustrated in
Figure the development of a product follows an analysis design implementation testing
deployment cycle.

For complex systems with long lifespans, we transverse multiple times around the life cycle. For
simple systems, a onetime pass may suffice. During the analysis phase, we discover the
requultrasonicements and constraints for our proposed system. We can hultrasonice consultants
and interview potential customers in order to gather this critical information.

A requultrasonicement is a specific parameter that the system must satisfy. We begin by


rewriting the system requultrasonicements, which are usually written in general form, into a list
of detailed specifications. In general, specifications are detailed parameters describing how the
system should work.
For example, a requultrasonicement may state that the system should fit into a pocket, whereas a
specification would give the exact size and weight of the device. For example, suppose we wish

Dept of ECE, SEAGI, Tirupati Page 7


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

to build a motor controller. During the analysis phase, we would determine obvious
specifications such as range, stability, accuracy, and response time. There may be less obvious
requultrasonicements to satisfy, such as weight, size, battery life, product life, ease of operation,
display readability, and reliability.

Often, improving the performance on one parameter can be achieved only by decreasing the
performance of another. This art of compromise defines the trade offs an engineer must make
when designing a product. A constraint is a limitation, within which the system must operate.
The system may be constrained to such factors as cost, safety, compatibility with other products,
use of specific electronic and mechanical parts as other devices, interfaces with other instruments
and test equipment, and development schedule. The following measures are often considered
during the analysis phase of a project:

Fig 1.3: Product life cycle

 Safety: The risk to humans or the environmentalist.


 Accuracy: The difference between the expected truth and the actual parameter.
 Precision: The number of distinguishable measurements.
 Resolution: The smallest change that can be reliably detected.
 Response time: The time between a triggering event and the resulting action.

Dept of ECE, SEAGI, Tirupati Page 8


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

 Bandwidth: The amount of information processed per time.


 Maintainability: The flexibility with which the device can be modified.
 Testability: The ease with which proper operation of the device can be verified.
 Compatibility: The conformance of the device to existing standards.

 Mean time between failure: The reliability of the device, the life of a product.
 Size and weight: The physical space requultrasoniced by the system.
 Power: The amount of energy it takes to operate the system.
 Nonrecurring engineering cost (NRE cost): The one-time cost to design and test.
 Unit cost: The cost requultrasoniced to manufacture one additional product.
 Time-to-prototype: The time requultrasoniced to design, build, and test.
 Time-to-market: The time requultrasoniced to deliver the product to the customer.
 Human factors: The degree to which our customers like/appreciate the product.

1.3 PROPOSED WORK


A system that detects the particular zone and according the action are being carried out.

The project proposed here consists of a set of units are Transmitter Unit, receiver Unit. The
transmitter transmits the signal according to the restricted area speed and receiver unit receives
the signal sent by the transmitter according to that the motor adapt vehicle speed automatically.

The transmitter module consists of RF transmitter, Arduino micro controller and power supply.
Transmitter which is placed in the restricted areas. This unit simply contains the information of
how much the vehicle speed in that region it can run. The Arduino micro controller is used to
transmit the information through RF transmitter to an multiple RF receiver.

Fig 1.4: Transmitter module block diagram

Dept of ECE, SEAGI, Tirupati Page 9


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

The receiver module block diagram is show below,the receiver is used to acquire an information
from the transmitter based on the information it received, arduino uno controls the speed of the
vehicle. The receiver modules consists of RF receiver, lcd display , dc motor. Lcd is used to
display the information about limited speed in that zone to the driver who drives the vehicle. If
the driver does not reduce the speed manually it wait for few seconds after that the control goes
Automatically.
1.4 EXISTING WORK
In this paper we propose automatic vehicle speed control system using embedded system.In this
system we use IR transmitter unit and IR receiver the IR receiver module is been implemented
inside the car mechanism. A system that detects the particular zone and according the action are
being carried out.The project proposed here consists of a set of units are Transmitter Unit
,receiver unit. The transmitter transmits the signal according to the restricted area speed and
receiver unit Receives the signal sent by the transmitter according to that the motor adapt vehicle
speed automatically.
1.5 AIM OF THE PROJECT
The aim of the project "Vehicle Speed Controlling System using Embedded" is to develop a
system that can monitor and control the speed of a vehicle using embedded technology. The
system is designed to enhance road safety by preventing vehicles from exceeding the predefined
speed limits. The system should be able to continuously monitor the speed of the vehicle in real-
time using various sensors or data inputs such as wheel speed sensors.

1.6 PROBLEM STATEMENT


A vehicle speed control system is a system that is designed to control the speed of a vehicle The
system can be implemented using various methods, such as electronic speed governors, cruise
control, or automatic speed control.
The main concern of the modern automotive industry is passenger safety and accidents due to
drivers' negligence are one of the problems for the roadside people. This problem is being partly
solved with the use of this vehicle speed control system.
Hence a system that does ensure safety is in huge demand. Such a system is called automatic
vehicle speed control system

Dept of ECE, SEAGI, Tirupati Page 10


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

1.7 ORGANIZATION OF THE PROJECT


Chapter 2 describes about the literature survey, the survey based on the research of the people.
Chapter 3 describes about the hardware implementation of the project.
Chapter 4 describes about software implementation of the project.
Chapter 5 describes about the methodology about the proposed model
Chapter 6 describes about the result.
Chapter 7 describes about the conclusion and future scope.
Chapter 8 describes about the reference taken from the different authors.

Dept of ECE, SEAGI, Tirupati Page 11


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

CHAPTER 2

LITERATURE SURVEY

Dept of ECE, SEAGI, Tirupati Page 12


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

Amulya A M, et.al., Intelligent vehicle speed controller:

In this paper, they concentrated to avoid the collision of the vehicle due to its over speed in the
speed restricted zones by automatically. This can be done through the embedded systems and
the RF transmitter and receiver modules. When the vehicle enters the speed, the restricted area
driver has to reduce the speed of the vehicle manually. If the driver did not slow down the
vehicle, the electronic controller would take the lead to control and reduce the speed of the
vehicle by receiving the signal from the transmitter in that zone. By that received signal, the
Arduino microcontroller would process to give a signal to the motor to control the speed. Here
mainly they use the RF transmitter and receiver to identify the restricted zone.

Vaishali B. Niranjan, et.al., Automatic vehicle speed control system:

They explained the working of their system in three different zones where the speed wants to
reduce automatically by using Zigbee technology. They are Normal zone, silence zone, speed
limit zone. The speed is reduced by reversing the motor rotating direction through the
microcontroller 8051. The Zigbee transmitter is placed at that zone for example hospital while
the vehicle reached that area the signal is received by the Zigbee receiver in the vehicle. The
speed of the vehicle is compared with the determined speed in that area. If speed is higher for
that zone the microcontroller takes in action to reduce the speed of the vehicle and if it is
silence zone it disables to make a horn.

Amar Narayan, et.al., Automatic over speed controlling of vehicle:

The main aim of the authors to control the speed of the vehicle to avoid the accidents in the
hospital zone, curve roads and deep cuts due to over speed. This can be done with the ZigBee
technology with the arm-7 microcontroller. The prescribed speeds at that zone are incorporated
in the transmitter module and when the receiver in the vehicle senses the signal that arm-7
microcontroller would check whether the driver reducing the speed for a limited time.

Dept of ECE, SEAGI, Tirupati Page 13


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

Markkaa sattibabu, et.al., Automatic vehicle speed control with wireless in-vehicle road
sign delivery system using arm 7:

The objective is to design the electronic display controller for Vehicle Speed control and
monitor the zones with the help of the embedded systems and they designed to display the
information on the dashboard about the zone. To achieve this they use two units, which are
zone status transmitter unit and electronic display and control unit (Arm-7). Here if the sensible
zone is detected by the receiver in a vehicle the signal processes in the controller and warns the
driver by displaying it and gives a buzzer sound. There is a timer for driver action to decrease
speed if the time passes then the vehicle automatically sets to desired predefined speed.

Dept of ECE, SEAGI, Tirupati Page 14


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

CHAPTER 3
HARDWARE IMPLEMENTATION OF VECHILE
SPEED

Dept of ECE, SEAGI, Tirupati Page 15


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

CONTROLLING SYSTEM USING EMBEDDED

Hardware:

The hardware required for this system includes [6]:

• Ultra sonic Sensor

• Actuators

• Arduino UNO

• Power supply: 5V, Regulated power supply

3.1 Ultra Sonic sensor :

An ultrasonic sensor-based vehicle speed controlling system using embedded technology


can be designed to regulate the speed of vehicle based on the distance between the vehicle and
an obstacle in front of it. Ultrasonic sensors are mounted on the front of the vehicle, facing
forward. The embedded system receives the signal from the sensor and calculates the distance
between the vehicle and the obstacle.

The ultrasonic sensor is mounted on the vehicle, typically on the front bumper or grille. It
should be positioned in a way that it can detect objects or obstacles in front of the vehicle.

By continuously measuring the distance between the vehicle and the object in front of it, the
ultrasonic sensor can determine how close the vehicle is to the obstacle.

An embedded system, such as a micro controller or a dedicated electronic control unit (ECU),
processes the distance measurements from the ultrasonic sensor. It uses a speed control
algorithm to determine the appropriate action based on the detected distance. Depending on the
algorithm's logic, the embedded system can adjust.

Dept of ECE, SEAGI, Tirupati Page 16


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

Fig 3.1: Ultra sonic sensor

3.2 Actuators :

The actuator is a critical component of this system that plays a key role in controlling the
vehicle's speed. Actuators are used to control the speed of the vehicle. Common actuators used
in vehicle speed controlling systems include servo motors, DC motors, and stepper motors.

Fig 3.2: Actuators

Dept of ECE, SEAGI, Tirupati Page 17


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

3.3 Arduino UNO :

Arduino UNO can be used to create a vehicle speed control system. However, it is important to
note that any modifications made to a vehicle should be done with caution and in accordance
with local laws and regulations. Choose a suitable speed control mechanism: The speed control
mechanism could be a servo motor or a DC motor with a motor driver shield. Connect the
speed control mechanism to the Arduino UNO: The servo motor or DC motor should be
connected to the Arduino UNO through appropriate pins.

ARDUINO is an open-source electronics platform depended on light-to-use hardware and


software. Arduino UNO the scheme is depended on micro controller equipment. The board
provides a group of digital and analogue

Input/output pins which can interface to multiple expansion boards and other.

Fig 3.3:Arduino UNO

Dept of ECE, SEAGI, Tirupati Page 18


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

3.4 Power supply:

The embedded system requires a stable power supply to operate reliably. Depending on the
system's power requirements, a battery, a voltage regulator, or a power supply module may be
used.power supply is an electrical device that supplies electric power to an electrical load.The
main purpose of a power supply

Fig 3.4:power supply

The main objectives is to design a system which controls the speed of vehicles in Accident
prone areas.
The system will inform the driver about the exceeding speed of vehicle and control it
automatically if driver does not respond.
Objectives: Clearly define the objectives of the vehicle speed controlling system. Determine
what you aim to achieve with this system, such as improving safety, fuel efficiency, or
regulatory compliance.
Technical Requirements: Identify the technical requirements for the system. This may include
components like sensors, actuators, micro-controllers, and communication interfaces.

Determine if the necessary technology is available and if it can be integrated into the vehicle
effectively.
Dept of ECE, SEAGI, Tirupati Page 19
ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

Regulatory Compliance: Research the relevant regulations and legal requirements related to
vehicle speed control systems in your target market. Ensure that your proposed system adheres
to the applicable rules and standards.

Feasibility: Evaluate the technical feasibility of implementing the system. Consider factors
such as the availability of required components, integration challenges, software development
complexity, and potential risks or limitations.
Safety Considerations: Assess the safety implications of the proposed speed controlling
system. Evaluate the potential risks, reliability of the system, and the impact on vehicle
handling and driver/user experience. Ensure that the system does not compromise overall safety

Environmental Impact: Evaluate the environmental impact of the proposed system. Consider
factors such as energy consumption, emissions, and reliability of the system components.

Dept of ECE, SEAGI, Tirupati Page 20


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

CHAPTER 4

SOFTWARE IMPLEMENTATION

Dept of ECE, SEAGI, Tirupati Page 21


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

VECHILE SPEED CONTROLLING SYSTEM

Several programs have been used in this project to create a separate program that is used to
measure the speed of vehicles, to save the necessary information and to send

them to authorities . Operation principle of the proposed system. The main program of this
project is MATLAB which is a global and professional program and a global language with
very high features. Graphical user interfaces (GUI) provide control over points and control in
software uses, dropping the need to understand a language or writing commands for work .
MATLAB was used to execute this project. Through MATLAB GUI the internal code and the
special program consisting of the username and password to enter the program were formed.

To create a vehicle speed controlling system using the Arduino UNO, motors, and an ultrasonic
sensor, you will need to use certain software components. Here are some software elements
commonly used in such projects:

4.1 Arduino IDE:

The Arduino Integrated Development Environment (IDE) is the primary software tool for
programming Arduino boards. It provides a user-friendly interface for writing, compiling, and
uploading code to the Arduino .

fig 4.1:Arduino IDE

Dept of ECE, SEAGI, Tirupati Page 22


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

4.2 Arduino Libraries:

Libraries are pre-written code modules that provide additional functionality and simplify the
programming process. In your project, you might need libraries such as the Servo library (for
controlling motors) and the Ultrasonic library (for interacting with ultrasonic sensors.

Fig 4.2: fig showing installing of Arduino library.

4.3 Motor control code:

You will need to write code to control motors connected to the Arduino UNO. Depending on
the type of motors you are using (DC motors, stepper motors, etc.), you will need to implement
the appropriate control logic to adjust the speed and direction.

The Arduino DC motor will control the speed of the motor.to set the values of pins we have to
use the digital function.The DC motor is the most commonly used motor.DC motors normally
have just two leads, one positive and one negative.

Dept of ECE, SEAGI, Tirupati Page 23


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

if you connect this two motors directly to a battery it will rotate .If the switch leads,the motor
will rotate in opposite direction.

Fig 4.3 Arduino motor control

4.4 Speed Control algorithm:

To control the speed of the vehicle, you will need to implement a speed control algorithm.

Dept of ECE, SEAGI, Tirupati Page 24


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

This algorithm can be as simple as adjusting the motor's speed based on the distance readings
from the ultrasonic sensor or as complex as incorporating PID (Proportional-Integral-
Derivative) control for more precise speed regulation.
These software components will help you develop the necessary logic to control the vehicle's
speed based on the input from the ultrasonic sensor using the Arduino UNO and motors.

Fig 4.4: speed control of DC motor

4.5 Ultrasonic Sensor Code:


The ultrasonic sensor is used to measure the distance between the vehicle and any obstacles in
its path. You'll need to write code to read the sensor data, calculate the distance, and trigger the
appropriate actions based on the distance readings (e.g., slowing down or stopping the vehicle).

Dept of ECE, SEAGI, Tirupati Page 25


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

Fig 4.5 Ultrasonic distance sensor in Arduino

4.6 Speed Control:


To control the speed of the vehicle, you will need to implement a speed control algorithm. This
algorithm can be as simple as adjusting the motor's speed based on the distance readings from
the ultrasonic sensor or as complex as incorporating PID (Proportional-Integral-Derivative)
control for more precise speed regulation.
Automatic vehicle over speed controlling system. This is done by a throttle valve which has a
spring action it allows to decreases the flow and simultaneously the vehicle decreases its speed
as per the detection of the sensors. current control signal and provide a higher current signal.
This higher current signal is used to drive the Motors.

Dept of ECE, SEAGI, Tirupati Page 26


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

CHAPTER 5
METHODOLOGY

Dept of ECE, SEAGI, Tirupati Page 27


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

A vehicle speed control system is a system that is designed to control the speed of a
vehicle.The system can be implemented using various methods, such as electronic speed
governors, cruise control, or automatic speed control.The method used for speed control will
depend on the specific application and the type of vehicle. For example, in a commercial truck,
an electronic speed governor may be used to limit the maximum speed of the vehicle to comply
with federal regulations. On the other hand, in a passenger car, cruise control may be used to
maintain a constant speed on the highway.

The system typically consists of sensors to measure the vehicle's speed, a control unit to
process the sensor data and determine the appropriate speed, and actuators to control the
vehicle's power train (e.g. throttle, brakes) to achieve the desired speed.

In terms of methodology, the first step is to determine the requirements for the speed control
system, such as the desired speed range and the types of vehicles it will be used on. Next, the
system design is developed, including the selection of appropriate sensors, control algorithms,
and actuators. The system is then implemented and tested on a vehicle to ensure proper
operation.

Automatic speed control of vehicles in some restricted areas can be developed by using
wireless technologies. In this model we can restrict the speed of a vehicle. If a particular zone is
registered with a restricted speed it cannot exceed that speed. If the Particular speed is exceeded
by the driver then with the help of IR transmitter transmits the signals it will be received by the
IR receiver by giving a beep sound and the speed of the vehicle is automatically returned to the
particular zone limit speed. And we can able to receive a message to particular registered
number by module. It will control the speed of vehicle in limited zones it prevents accidents.

Dept of ECE, SEAGI, Tirupati Page 28


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

5.1 SCHEMATIC DIAGRAM:

Fig 5.1: figure showing schematic diagram.

The "Vehicle Speedometer" represents the existing speed measuring system in the vehicle. The
"Ultrasonic Sensor" is used to detect obstacles in front of the vehicle. It emits ultrasonic waves
and measures the time taken for the waves to bounce back after hitting an object. The "Arduino
UNO" acts as the control unit of the system. It receives distance measurements from the
ultrasonic sensor and controls the motors accordingly "Motor 1" and "Motor 2" represent the
motors used to control the vehicle's speed.

Dept of ECE, SEAGI, Tirupati Page 29


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

These motors can be connected to the wheels or other parts of the vehicle's Connections:

5.1.1 Ultrasonic Sensor:

VCC: Connect to 5V pin of Arduino UNO.

GND: Connect to GND pin of Arduino UNO.

Trigger: Connect to any digital pin (e.g., Pin 7) of Arduino UNO.

Echo: Connect to any digital pin (e.g., Pin 6) of Arduino UNO

5.1.2 Motor 1:

Connect to a motor driver module or H-bridge circuit for controlling the motor speed and
direction. The motor driver module should have connections for power supply, control signals,
and motor terminals.
5.1.3 Motor 2:

Connect to a motor driver module or H-bridge circuit for controlling the motor speed and
direction. The motor driver module should have connections for power supply, control signals,
and motor terminals.
5.1.4 Arduino UNO:

Connect Arduino UNO's 5V pin to the VCC of the ultrasonic sensor.

Connect Arduino UNO's GND pin to the GND of the ultrasonic sensor, motor driver module,
and the vehicle's electrical ground.
Connect Arduino UNO's digital pin (e.g., Pin 7) to the Trigger pin of the ultrasonic sensor.
Connect Arduino UNO's digital pin (e.g., Pin 6) to the Echo pin of the ultrasonic sensor.
Connect Arduino UNO's digital pins (e.g., Pin X and Pin Y) to the motor driver module for
controlling the motor speed and direction.
Please note that you may need additional components such as motor driver modules, power
supply, motor control circuitry, etc., depending on your specific setup and requirements. Also,
make sure to refer to the data sheets and documentation of the components you are using for
more detailed wiring instructions.

Dept of ECE, SEAGI, Tirupati Page 30


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

5.2 BLOCK DIAGRAM

Fig 5.2 Block Diagram of vehicle system.

This project consists of Arduino UNO and other different components.

1) Ultra sonic sensor.


2) Actuators/Motors.
3) Arduino UNO.

Dept of ECE, SEAGI, Tirupati Page 31


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

5.2.1 Ultra sonic Sensor:

Fig 5. 3 Ultrasonic sensor


An ultrasonic sensor-based vehicle speed controlling system using embedded technology can
be designed to regulate the speed of a vehicle based on the distance between the vehicle and an
obstacle in front of it. Ultrasonic sensors are mounted on the front of the vehicle, facing
forward. The embedded system receives the signal from the sensor and calculates the distance
between the vehicle and the obstacle.

Infrared technology addresses a wide variety of ultrasonicates applications.

The main areas are sensing and remote controls. In the electromagnetic spectrum, the infrared
portion is divided into three regions: near infrared region, mid infrared region, and far infrared
Dept of ECE, SEAGI, Tirupati Page 32
ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

region.

The wavelengths of these regions and the ultrasonic applications are shown below.

Near infrared region — 700 nm to 1400 nm — ULTRASONIC Sensor, fiber optic

Mid infrared region — 1400 nm to 3000 nm — Heat sensing


Far infrared region — 3000 nm to 1 mm — Thermal imaging

The frequency range of infrared is higher than microwave and lesser than visible light.

For optical sensing and optical communication, photo optics technologies are used in the near
infrared region as the light is less complex than RF when implemented as a source of signal.
Optical ultrasonicates communication is done with ULTRASONIC data transmission for short
range applications.

An infrared sensor emits and/or detects infrared radiation to sense its surroundings.

The working of any Infrared sensor is governed by three laws: Planck’s Radiation law, Stephen
– Boltzmann law and Wien’s Displacement law.

Planck’s law states that “every object emits radiation at a temperature not equal to 00K”.
Stephen – Boltzmann law states that “at all wavelengths, the total energy emitted by a black
body is proportional to the fourth power of the absolute temperature”. According to Wien’s
Displacement law, “the radiation curve of a black body for different temperatures will reach its
peak at a wavelength inversely proportional to the temperature”.

The basic concept of an Infrared Sensor which is used as Obstacle detector is to transmit an
infrared signal, this infrared signal bounces from the surface of an object and the signal is
received at the infrared receiver.

Dept of ECE, SEAGI, Tirupati Page 33


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

There are five basic elements used in a typical infrared detection system: an infrared source, a
transmission medium, optical component, infrared detectors or receivers and signal processing.
Infrared lasers and Infrared LED’s of specific wavelength can be used as infrared sources.
The three main types of media used for infrared transmission are vacuum, atmosphere and
optical fibers. Optical components are used to focus the infrared radiation or to limit the
spectral response. Optical lenses made of Quartz, Germanium and Silicon are used to focus the
infrared radiation. Infrared receivers can be photodiodes, phototransistors etc.
some important specifications of infrared receivers are photosensitivity, detectivity and noise
equivalent power. Signal processing is done by amplifiers as the output of infrared detector is
very small.

Types of ULTRASONIC Sensor


Infrared sensors can be passive or active. Passive infrared sensors are basically Infrared
detectors. Passive infrared sensors do not use any infrared source and detects energy emitted by
obstacles in the field of view. They are of two types: quantum and thermal. Thermal infrared
sensors use infrared energy as the source of heat and are independent of wavelength.
Thermocouples, pyroelectric detectors and bolometers are the common types of thermal
infrared detectors.

Quantum type infrared detectors offer higher detection performance and are faster than thermal
type infrared detectors. The photosensitivity of quantum type detectors is wavelength
dependent. Quantum type detectors are further classified into two types: intrinsic and extrinsic
types. Intrinsic type quantum detectors are photoconductive cells and photovoltaic cells.

Active infrared sensors consist of two elements: infrared source and infrared detector. Infrared
sources include an LED or infrared laser diode. Infrared detectors include photodiodes or
phototransistors. The energy emitted by the infrared source is reflected by an object and falls on
the infrared detector.

Dept of ECE, SEAGI, Tirupati Page 34


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

Fig 5.4: working principle of ultrasonic sensor.

Fig 5.5: figure showing various types of ultrasonic sensor

ULTRASONIC Transmitter

Infrared Transmitter is a light emitting diode (LED) which emits infrared radiations.

Hence, they are called ULTRASONIC LED’s. Even though an ULTRASONIC LED looks like
a normal LED, the radiation emitted by it is invisible to the human eye.

Dept of ECE, SEAGI, Tirupati Page 35


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

The picture of a typical Infrared LED is shown below.

Fig 5.6: ultrasonic transmitter

ULTRASONIC Receiver

Infrared receivers are also called as infrared sensors as they detect the radiation from an
ULTRASONIC transmitter. ULTRASONIC receivers come in the form of photodiodes and
phototransistors. Infrared Photodiodes are different from normal photo diodes as they detect
only infrared radiation. The picture of a typical ULTRASONIC receiver or a photo diode is
shown below.

Fig 5.7: Ultra sonic receiver.

Dept of ECE, SEAGI, Tirupati Page 36


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

When the vehicle is in the normal area it speed does not decrease and it goes normally no
action is performed.When the vehicle enters into the restricted areas (such as school/college,
hospital, hill station etc) that means it enters into the speed limiting area. Whenever it enters the
restricted areas RF transmitter sends RF signal that contains the information that in how much
speed a vehicle can go. Then that information is received by the RF receiver and the signal
acquired from the speed meter both are given to the Arduino controller. Pin number 6 of
Arduino board which gives PWM output, it is used to control the speed of motors. Basically
signals are analog in nature that will be converted into digital so only the micro controller able
to process the signal. The signal from the transmitter and the speed meter is compared by the
Arduino controller.

In this there are two case: first, the current speed of the vehicle is less than the transmitted
\speed, the vehicle goes normally no action is required. Second, the current speed is greater
than the transmitted speed by the transmitter module the controller sends signal to LCD display
it shows the information about limited speed in that zone to the driver who drives the vehicle
and controller waits for few seconds, whether the driver reduce the speed to the below value if
the driver does not reduce the speed ,it automatically takes the control and reduce the speed
according to it. After that at the end of the restricted area it stop. The control released by the
controller to driver.

WORKING:

A vehicle speed controlling system using embedded technology typically involves various
components and functionalities to regulate and maintain the speed of a vehicle.
Here's a general overview of how such a system may work:

Speed Sensors: The system utilizes sensors to measure the current speed of the vehicle. These
sensors could include wheel speed sensors, GPS receivers, or other types of sensors depending
on the application.

Dept of ECE, SEAGI, Tirupati Page 37


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

Micro controller Unit (MCU): An embedded micro controller unit acts as the brain of the
system. It receives speed data from the sensors and processes it to determine the current speed
of the vehicle.

Speed Set point: The system allows the driver to set a desired speed, known as the speed set
point. This can be achieved through various input methods, such as buttons or a control
interface.

Comparison and Control: The MCU continuously compares the current speed of the vehicle
with the speed set point. Based on this comparison, it decides whether to maintain the current
speed or adjust it.

Actuators: To control the vehicle speed, the system interacts with the vehicle's actuators. The
specific actuators involved may vary depending on the vehicle type and control mechanisms.
For example, in an electronic throttle control system, the MCU may communicate with the
throttle actuator to adjust the engine's power output and, consequently, the vehicle's speed.

Feedback Loop: The system continuously monitors the speed of the vehicle and adjusts the
control signals sent to the actuators accordingly.

This creates a feedback loop that maintains the desired speed by constantly comparing and
adjusting the control signals.

Safety Measures: Vehicle speed controlling systems often incorporate safety features. For
instance, they may include speed limiters that prevent the vehicle from exceeding a certain
maximum speed. Additionally, they can be designed to respond to emergency situations, such
as sudden braking or loss of control, by overriding the speed control system and activating
safety mechanisms like anti-lock braking systems (ABS) or stability control systems.

It's important to note that the specific implementation and features of a vehicle speed
controlling system can vary depending on the vehicle's make and model, as well as the intended
application.

Dept of ECE, SEAGI, Tirupati Page 38


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

The above description provides a general overview of the fundamental components and
functionalities commonly found in such systems.

A sheet is being placed on left side of road in traffic prone areas like schools, colonies,
hospitals, four ways etc. This is an ordinary sheet which is being made up of any material like
aluminum, plastic etc. beside being used in this project this sheet can be utilized for
commercial purposes as any brand can commercialize the ultrasonic product through
advertisement on it. The length of sheet is taken in such a way that the vehicle of any size is
able to cross it easily.

Fig 5.8: model of vehicle working

The vehicle has ULTRASONIC sensor and controller installed on it. The

ULTRASONIC sensor is installed on left side of the car. It sends Infrared signals which strikes
the sheet and gets reflected back to the LDR in ULTRASONIC sensor . now the resistor of
LDR increases and sends some values to micro controller. The micro controller automatically
converts these signals into Digital signals and if controller receives a signal of adequate
intensity only then it will start counting .

Dept of ECE, SEAGI, Tirupati Page 39


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

This process continues till the sensor on vehicle is in affinity of sheet. But as the vehicle
crosses the sheet the intensity of light on LDR increases hence resistance of LDR decreases
hence LDR will not be able to send signals of adequate strength to controller.

So the controller stops counting.

The micro-controller has a default value of count pre-define on it with the help programming.
Now as soon as micro-controller stops counting it start its another function i.e comparing the
practical count to default count.
When controller start comparing the practical count to default count, there exist two conditions:
In condition 1, since the speed of vehicle is more than anticipated, speed of vehicle need to be
lowered down. In order to control the speed of vehicle, the controller signify either by
continuous beep or any other mean to driver, if driver doesn’t respond then controller take over
the control from driver and it automatically neutralizes the speed of vehicle with the help of
PWM in atmega16 AVR controller. After some duration of time controller automatically resets.

Fig 5.9: working model of vehicle.

Dept of ECE, SEAGI, Tirupati Page 40


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

In condition 2, since the speed of vehicle is normal so there is no need to control the speed by
controller .We need to install two or more than two sheets if the accident prone area are in
quick succession in order to prevent the further loss by accidents.

In this model we can add Ultra sonic sensors in front of car in order to prevent collision of
vehicles and control its speed due to brakers or any other obstacles.

Principle of Working
The principle of an ULTRASONIC sensor working as an Object Detection Sensor can be
explained using the following figure. An ULTRASONIC sensor consists of an ULTRASONIC
LED and an ULTRASONIC Photodiode; together they are called as Photo – Coupler or opt –
Coupler.

Fig 5.10 figure representing principle of working of ultra sonic sensor

Dept of ECE, SEAGI, Tirupati Page 41


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

5.2.2 Actuators/Motors:

Fig 5.11 Actuator.

The actuator is a critical component of this system that plays a key role in controlling the
vehicle's speed. Actuators are used to control the speed of the vehicle. Common actuators used
in vehicle speed controlling systems include servo motors, DC motors, and stepper motors.

Almost every mechanical movement that we see today is accomplished by an electric motor.
An electric motor takes electrical energy and produces mechanical energy. Electric motors
come in various ratings and sizes. Some applications of large electric motors include elevators,
rolling mills and electric trains. Some applications of small electric motors are robots,
automobiles and power tools. Electric motors are categorized into two types: DC (Dutra
sonicate Current) motors and AC (Alternating Current) motors. The function of both AC and
DC motors is same i.e. to convert electrical energy to mechanical energy.

The basic difference between these two is the power supply which is an AC source for AC
motors and a DC source like a battery for DC motors. Both AC and DC electric motors consist
of a stator which is a stationary part and a rotor which is a rotating part or armature of the
motor.

Dept of ECE, SEAGI, Tirupati Page 42


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

The principle of working of an electric motor is based on the interaction of magnetic field
produced by the stator and the electric current flowing in the rotor in order to produce rotational
speed and torque.

There are different kinds of DC motors and they all work on the same principle. A DC motor is
an electromechanical actuator used for producing continuous movement with controllable
speed of rotation. DC motors are ideal for use in applications where speed control and servo
type control or positioning is ultrasonic.

Fig 5.12: Motor

Mentioned earlier, any motor consists of two parts viz. stator and rotor. Based on the
configuration and construction, there are three types of DC motors: brushed motor, brushless
motor and servo motor.

Working Principle of DC Motor

An electro mechanical energy conversion device will take electrical energy at the input and
produces a mechanical energy at the output side. There are three electrical machines that are
extensively used for this task: a DC motor, an induction or asynchronous motor and a
synchronous motor. Induction motor and synchronous motors are AC motors. In all the motors,
the electrical energy is converted into mechanical when the magnetic flux linking a coil is
changed.

Dept of ECE, SEAGI, Tirupati Page 43


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

An electric motor takes electrical energy as input and converts into mechanical energy.

Fig 5.13: Working principle of DC motor

When the electrical energy is applied to a conductor which is placed perpendicular to the
ultrasonication of the magnetic field, the result of the interaction between the electric current
flowing through the conductor and the magnetic field is a force. This force pushes the
conductor in the ultrasonication perpendicular to both current and the magnetic field, hence, the
force is mechanical in nature.

The value of the force can be calculated if the density of the magnetic field B, length of the
conductor L and the current flowing in the conductor I are known.

The force exerted on the conductor is given by

F = B×I×L Newtons

The dultra sonicection of the motion of the conductor can be determined with the help of
Fleming’s Left Hand Rule.

Fleming’s Left Hand Rule is applicable to all electric motors.

Dept of ECE, SEAGI, Tirupati Page 44


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

Types of DC Motors
DC motors are mainly classified into two types in the way of rotor is powered. They are
Brushed DC motors and Brushless DC motors. As its name indicates, the brushes are present in
brushed DC motor to supply the current to the rotating armature via the commutator whereas in
a brushless DC motor no need of brushes as it uses a permanent magnet rotor.

Brushed DC Motor
In this type of motors, magnetic field is produced by passing current through a commutator and
brush which are inside the rotor. Hence, they are called Brushed Motors. The brushes are made
up of carbon. These can be separately excited or selfexcited motors.

This coil setup can be in series or in parallel to the rotor coil winding forming series wound DC
motors and shunt wound DC motors. The armature or the rotor part of the DC motor consists of
Commutator which essentially a current carrying conductor connected at one end to copper
segments which are electrically isolated. External power can be connected to commutator via
the brushes as the armature rotates.

Brushless DC Motor
Brushless DC motors typically consist of a permanent magnet rotor and a coil wound stator.
This design by using permanent magnets in rotor eliminates the need for brushes in the rotor
part. Hence, in contrast to brushed DC motors, these type do not contain any brushes and
therefore no wear and tear of brushes as little amount of heat is generated.

As there are no brushes in the motor, there should be some other means to detect the angular
position of the rotor. Hall Effect sensors are used to produce the feedback signals that are
requultrasoniced to control any semiconductor switching devices. Brushless DC motors are
more expensive than brushed DC motors and are more efficient than the ultrasonic brushed
cousins.

Dept of ECE, SEAGI, Tirupati Page 45


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

Fig 5.14: brush less DC motor.

Driving a DC Motor
A DC motor can be switched ON or OFF with the help of transistors, switches, or relays. The
simplest form of motor control is linear control which uses a bipolar junction transistor acting
as a switch. The purpose of drive ultrasonicates is to control the current in the windings. The
speed of the motor can be controlled by varying the amount of base current in the transistor. If
the transistor is in active state, then the motor rotates with half speed as only half of the supply
voltage goes to the motor. The motor rotates at its maximum speed when all of the supply
voltage goes to it. This happens when the transistor is in saturation

Dept of ECE, SEAGI, Tirupati Page 46


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

5.2.3 Arduino UNO:

Fig 5.15: Arduino UNO

• Arduino UNO can be used to create a vehicle speed control system. However, it is important
to note that any modifications made to a vehicle should be done with caution and in accordance
with local laws and regulations.

• Choose a suitable speed control mechanism: The speed control mechanism could be a servo
motor or a DC motor with a motor driver shield.

• Connect the speed control mechanism to the Arduino UNO: The servo motor or DC motor
should be connected to the Arduino UNO through appropriate pins.

Dept of ECE, SEAGI, Tirupati Page 47


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

CHAPTER 6

RESULTS

Dept of ECE, SEAGI, Tirupati Page 48


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

Fig 6.1 Developed hardware kit

An embedded system that uses ultrasonic sensors and motors for vehicle speed control can be
designed and implemented in various ways, depending on the specific requirements.

Ultrasonic sensors are mounted on the vehicle, facing forward, to measure the distance between
the vehicle and any obstacle in its path.

The sensor data is processed by a micro controller, which calculates the vehicle's speed based
on the change in distance over time.

Dept of ECE, SEAGI, Tirupati Page 49


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

The micro controller then sends a signal to a motor control circuit to adjust the speed of the
vehicle.
The motor control circuit adjusts the voltage or current supplied to the motor, which in turn
adjusts the vehicle's speed.

The whole system is being controlled by an Arduino UNO as a micro-controller. The main
reason for choosing this as a controller for their advantage of having higher processing speeds
and their ability to handle multiple inputs and outputs at the same time without compromising
the accuracy and precision of the outputs. This Arduino UNO which has enough capacity to
process the input from the receiver. The main purpose of the processor is to process the signal
from the transmitter which receives by the receiver. By using these input signals Arduino
UNO process these signal and actuate the respective relays and the processor accordingly
generates output signals. This specific board can also be connected to a computer for easy
implementation or modification of the code that basically is the brain for the processor to
control the activities. Also, the board’s ability to connect with the computer via dedicated
software can be used to view an analog or graphical representation of both inputs.

The proposed speed control system. We used a case to explain the work of the system. We
identified the location name where the speed limitation is applied as AAA, and the maximum
allowable speed as 8 cm/s. To determine the speed of the vehicles the length of the
measurement distance was chosen as 60 cm. A picture of the prototype speed control system is
given in Figure.
The directory for the stored pictures is AAA. We used two types of vehicles, one of which was
an ambulance and the other sports car.

When the ambulance exceeds the speed limit, the system takes a photo of the ambulance, and
compares them with the images in the database.
If the vehicle matches with the one in database, the message “A car with immunity” is seen on
the screen, and the photo is refused. If the vehicle is not a privileged vehicle.

Dept of ECE, SEAGI, Tirupati Page 50


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

fig 6.2.car without immunity.


The photo for the ambulance that exceeded the determined speed limit is shown in
Figure. It can be seen from the figure that even the speed of the ambulance is above the
determined limit, the system checked the photo, and wrote “A car with immunity”. Then the
photo of the privileged vehicle was not saved. In case of other vehicles that exceed the limits,
system took the photo, compared it with the ones in the database, and then saved the photo and
necessary information to specified location as shown in the figure.

6.1 ADVANTAGES

Vehicle speed controlling systems using embedded technology offer several advantages.

Improved safety: Embedded speed controlling systems can help enhance road safety by
preventing vehicles from exceeding speed limits. By setting a maximum speed, these systems
reduce the risk of accidents caused by excessive speed, thereby protecting both the driver and
other road users.

Enhanced fuel efficiency: Maintaining a consistent and optimal speed can significantly improve
fuel efficiency. Embedded speed control systems can regulate the vehicle's speed, preventing
rapid acceleration and unnecessary speed variations, which can result in fuel wastage. This
helps reduce fuel consumption and lowers operating costs.

Dept of ECE, SEAGI, Tirupati Page 51


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

Reduced emissions: Consistent speed control leads to a smoother driving experience,


optimizing the vehicle's engine performance and reducing emissions. By preventing rapid
accelerations and deceleration, these systems contribute to a more eco-friendly driving
behavior, resulting in lower carbon dioxide (CO2) emissions and a smaller environmental
footprint.

Preventive maintenance: Many embedded speed control systems come equipped with
diagnostic capabilities. These systems can monitor and analyze various vehicle parameters,
such as engine speed, temperature, and fuel consumption. By collecting and analyzing this data,
the system can identify potential issues or anomalies early on, allowing for proactive
maintenance and minimizing the risk of breakdowns or costly repairs.

Enhanced driver comfort: Embedded speed control systems can offer features that enhance
driver comfort and convenience. For example, adaptive cruise control systems can
automatically adjust the vehicle's speed to maintain a safe distance from the preceding vehicle,
relieving the driver from constantly modulating the throttle. This reduces driver fatigue and
improves overall driving experience.

Integration with other safety systems: Embedded speed control systems can be integrated with
other advanced driver assistance systems (ADAS), such as collision avoidance systems and
lane departure warning systems. This integration allows for a more comprehensive safety
approach, where the vehicle can adapt its speed and behavior based on real-time road and
traffic conditions, enhancing overall safety on the road.

Regulatory compliance: In many jurisdictions, there are legal requirements and speed limits
that drivers must adhere to. Embedded speed control systems can assist drivers in complying
with these regulations by actively preventing them from exceeding the prescribed speed limits.
This helps avoid fines, penalties, and potential legal issues.

Dept of ECE, SEAGI, Tirupati Page 52


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

Overall, vehicle speed controlling systems using embedded technology offer numerous
advantages, including improved safety, enhanced fuel efficiency, reduced emissions, preventive
maintenance, driver comfort, integration with other safety systems, and regulatory compliance.
These systems play a vital role in promoting responsible driving and creating a safer and more
efficient transportation environment.

Dept of ECE, SEAGI, Tirupati Page 53


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

CHAPTER 7

CONCLUSION AND FUTURE SCOPE

Dept of ECE, SEAGI, Tirupati Page 54


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

7.1 CONCLUSION
The Automatic Vehicle Speed Control System, coupled with automatic vehicle dim and
brightness control, represents a comprehensive solution to enhance driving safety and
efficiency. By integrating embedded technology, these systems not only monitor and regulate
vehicle speed but also adjust lighting conditions based on environmental factors. Through
sensors and microcontrollers, they detect and respond to changes in ambient light, ensuring
optimal visibility for drivers while minimizing glare for oncoming traffic. Utilizing Zigbee
wireless communication ensures reliable operation, particularly in high-traffic areas and
restricted zones, safe guarding pedestrians and minimizing accidents. Moreover, these systems
promote fuel efficiency by optimizing driving behavior and reducing emissions. With their data
analysis capabilities, continuous improvements in road safety and traffic management are
facilitated. In conclusion, the integration of automatic vehicle speed and lighting control
systems offers a holistic approach to enhance road safety and driving efficiency, contributing to
safer and more sustainable transportation overall.

Dept of ECE, SEAGI, Tirupati Page 55


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

7.2 FUTURE SCOPE


1. Advanced AI Integration : Incorporating artificial intelligence algorithms can enhance the
system's ability to predict and respond to potential hazards on the road, improving overall
safety.

2. Connected Vehicle Technology : Integration with vehicle-to-vehicle (V2V) and vehicle-to-


infrastructure (V2I) communication systems can enable cooperative control strategies, allowing
vehicles to interact with each other and with traffic infrastructure to optimize speed and safety.

3. Autonomous Driving : As autonomous driving technology advances, the automatic speed


control system can seamlessly integrate with self-driving vehicles, providing an additional layer
of safety and control.

4. Energy Efficiency Optimization : Further optimization of the system can focus on


maximizing energy efficiency by dynamically adjusting vehicle speed based on real-time traffic
conditions and road topography.

5. Enhanced Sensor Technologies : Continued advancements in sensor technologies, such as


LiDAR and radar, can improve the accuracy and reliability of speed detection and obstacle
avoidance, enhancing overall system performance.

6. Integration with Smart Cities : Collaboration with smart city initiatives can enable the
automatic speed control system to access real-time traffic data and infrastructure updates,
facilitating more efficient traffic flow and reducing congestion.

7. User Interface Enhancements : Improving the user interface and human-machine interaction
aspects of the system can enhance driver acceptance and trust in the technology, leading to
greater adoption and effectiveness.

Dept of ECE, SEAGI, Tirupati Page 56


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

8. Regulatory Support and Standardization : Establishment of regulatory frameworks and


industry standards for automatic speed control systems can promote interoperability and ensure
consistent performance across different vehicle models and manufacturers.

9. Data Analytics and Predictive Maintenance : Implementing data analytics techniques can
enable proactive maintenance and optimization of the system, reducing downtime and
improving reliability.

10. Integration with Electric Vehicles : Integration with electric vehicle (EV) technology can
focus on optimizing speed control to maximize battery life and range, further promoting the
adoption of sustainable transportation solutions.

Dept of ECE, SEAGI, Tirupati Page 57


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

CHAPTER 8
REFERENCES

Dept of ECE, SEAGI, Tirupati Page 58


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

REFERENCES

[1]"The 8051 Microcontroller Architecture, Programming & Applications “By Kenneth J


Ayala.

[2]"The 8051 Microcontroller & Embedded Systems" by Mohammed Ali Majidi and Janice
Gillis pie Majidi.

[3]International journal of scientific &engineering research, volume 4 oct 13

[4]ATMEL AVR studio & AT mega 16 data sheet.

[5]The 8051 micro controller Architecture, Programming & Applications by Ramesh Gaonkar.

[6]Electronic components by Deviprasad.

[7]Fundamentals of microprocessors and microcomputers by ram.

[8]International journal of engineering trends and technology, volume 3, 2012.

[9]Shamkhani K B, et.al., Vehicle Speed Control using RF Communication, Volume 13, Issue
1, May 2016, ISSN: 2349 – 9303.

[10] Deepa. Design of Vehicle Speed Control System Using Wireless Instrument

Cluster, Volume 4, Issue 1, January 2015

Dept of ECE, SEAGI, Tirupati Page 59


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

[11] Sunil R Kewate, et.al., Automatic speed control system by the color sensor for
automobiles – An innovative model based approach, ISSN 2250-3234, volume 4, number
(2014), pp. 223-230.

[12] Dr.K.S.Tamilselvan, et.al., Android Based Vehicle Speed Control System In Critical
Zone Using GPS Technology, volume 7, issue 6, June 2018, pp.639-644.

Dept of ECE, SEAGI, Tirupati Page 60


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

APPENDIX

Project code

// defines pins numbers


const int trigPin = 4; const int echoPin = 5;

#define pwm 7

#define pwm1 8

// defines variables long duration; int distance; void setup() { pinMode(trigPin, OUTPUT); //
Sets the trigPin as an Output pinMode(echoPin, INPUT); // Sets the echoPin as an Input
Serial.begin(9600); // Starts the serial communication pinMode(7,OUTPUT);
pinMode(8,OUTPUT); analogWrite(pwm, 255);

analogWrite(pwm1, 255);

} void loop() { digitalWrite(7,HIGH); digitalWrite(8,HIGH); analogWrite(pwm,255);


analog Write(pwm1,255);

// Clears the trigPin digitalWrite(trigPin, LOW); delayMicroseconds(2);


// Sets the trigPin on HIGH state for 10 micro seconds digitalWrite(trigPin, HIGH);
delayMicroseconds(10); digitalWrite(trigPin, LOW);
// Reads the echoPin, returns the sound wave travel time in microseconds duration =
pulseIn(echoPin, HIGH); // Calculating the distance distance = duration * 0.034 / 2;
// Prints the distance on the Serial Monitor

Dept of ECE, SEAGI, Tirupati Page 61


ADVANCED VEHICLE MONITORING SYSTEM AND AUTOMATIC VEHICLE DIM AND
BRIGHTNESS CONTROLLED

Serial.print("Distance: "); Serial.println(distance); if (distance<100)


{ analogWrite(pwm,255);

analogWrite(pwm1,255); delay(100);
}

if (distance<50)
{ analogWrite(pwm,150);

analogWrite(pwm1,150); delay(100); }

if (distance<10) { analogWrite(pwm,0);

analogWrite(pwm1,0); delay(100); } else { analogWrite(pwm,255);

analogWrite(pwm1,255);

Dept of ECE, SEAGI, Tirupati Page 62

You might also like