You are on page 1of 64

Solar Powered Smart E-Vehicles with Road Safety Using

Eyeblink And Over IOT

INDEX

CONTENTS PAGE NO

ABSTRACT 01

CHAPTER-1 02-03

INTRODUCTION 02

1.1 OBJECTIVES OF PROJECT 02

CHAPTER-2 04-06

LITERATURE SERVEY 04

2.1 EXISTING SYSTEM 05


2.2 PROPOSED SYSTEM 05
2.3 EXTENSION 05
2.4 ADVANTAGES 06
2.5 DISADVANTAGES 06

CHAPTER-3 07-34

BLOCK DIAGRAM AND HARDWARE COMPONENTS 07

3.1 BLOCK DIAGRAM OVERVIEW 07


3.2 POWER SUPPLY 07
3.3 IC 7805 14

3.4 ALCOHOL SENSON 15


3.5 IR SENSON 18

EEE Dept Page 1


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

3.6 PHOTO DIODES 21


3.7 ESP8266 24

3.8 ARDUINO CONTROLLER 27


3.9 HISTORY 28
3.10 OPERATION WITH PINS 29

CHAPTER-4 35-48

4.1 EMBEDDED SYSTEMS 35


4.1.1 HISTORY 37
4.1.2 TOOLS 37
4.1.3 RESOURCES 38
4.1.4 REAL TIME ISSUES 38
4.2 NEED FOR EMBEDDED SYSTEMS 39
4.2.1 DEBUGGING 39
4.2.2 RELIABILITY 40
4.3 EXPLAINATION OF EMBEDDED SYSTEMS 42
4.3.1 SOFTWARE ARCHITECTURE 42
4.3.2 STAND ALONE EMBEDDED SYSTEM 44
4.3.3 REAL-TIME EMBEDDED SYSTEMS 44
4.3.4 NETWORK COMMUNICATION SYSTEMS 45
4.3.5 DIFFERENT TYPES OF PROCESSING UNITS 46
4.4 APPLICATIONS OF EMBEDDED SYSTEMS 46
4.4.1 CONSUMER APPLICATIONS 46
4.4.2 OFFICE AUTOMATION 47
4.4.3 INDUSTRIAL AUTOMATION 47
4.4.4 COMPUTER NETWORKING 48
4.4.5 TELE COMMUNICATIONS 48

CHAPTER-5 49-51

SOFTWARE EXPLANATION 49

INTRODUCTION
5.1 THE INTERFACE 49

EEE Dept Page 2


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

5.2 DESIGN CONSIDERATIONS 50


5.3 AURDINO COMPILING 51

CHAPTER-6 55

EXPLANATION OF RESULT AND ANALYSIS 55

CHAPTER-7 57-58

CONCULUSION AND FUTURE SCOPE 57

REFERENCES 58

EEE Dept Page 3


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

LIST OF FIGURES

S.NO NAME PAGE


NO

3.1 BLOCK DIAGRAM 07


3.2 BLOCK DIAGRAM OF FIXED
REGULATED POWER SUPPLY 07
3.3 TRANSFORMERS 08

3.3 CIRCUIT DIAGRAM OF POWER SUPPLY 14


3.4 DIAGRAM OF ALCOHOL SUPPLY 16
3.5 PHOTODIODE SCHEMATIC SYMBOL 21
3.6 HARDWARE IMAGE 28

3.7 BACKSIDE OF MODULE 30


3.8 ARDINO BOARD 31
3.9 PIN EXPLAINATION 34
4.1 A MODERN EXAMPLE OF EMBEDDED 36
SYSTEM
4.2 NETWORK COMMUNICATION EMBEDDED 45
SYSTEMS
4.3 AUTOMATIC COFFEE MAKES EQUIPMENT 46
4.4 FAX MACHINE 47
4.5 PRINTING MACHINE 47
4.6 ROBOT 47

4.7 COMPUTER NETWORKING 48

4.8 CELL PHONE 48


4.9 WEB CAMERA 48
5.1 TOOL BAR NECESSARY FOR THE INTERFACE 49
EEE Dept Page 4
Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

SOLAR POWERED SMART E VEHICLES WITH ROAD


SAFETY USING EYEBLINK AND ALCOHOL OVER IOT

ABSTRACT

All over the world, most of the road accidents are occurred by drunk and driving and rash
driving. The main concept of this paper is to prevent the road accident so to prevent the
road accident we are using alcohol detection sensor, eye blink sensor, over speed control
sensor. The alcohol sensors are used to detect the driver is drunk or not. The eye blink
sensors are used to check the driver is sleepy or not with the help of the eyeball
movement of the driver, if the driver is sleepy means it will trigger the alarm to conscious
the driver. The ultrasonic sensor is used to detect the objects and control the motors by
sending the information. In this process, the message or SMS will send to the relative of
the driver if the driver is consuming alcohol & driving and the message will also send to
the local police to prevent the accident.
The major cause of road accidents is happening due to the drunken driver & rash driving.
To overcome these problems we go for efficient method in this process, we are using
different modules based on IOT sensors. We are also using eye blink sensors, alcohol
detection sensors and ultrasonic sensor, all these sensors are connected with the mobile
app to send the SMS or message to driver relative and the local police using IOT.

EEE Dept Page 5


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

CHAPTER-1

INTRODUCTION

The purpose of this project is to develop vehicle accident prevention by method of


alcohol detector in an attempt to scale back traffic accident cases supported driving under
the influence alcohol. The major cause of road accidents is happening due to the drunken
driver. To overcome these problems we go for efficient method in this process, we are
using different modules based on IOT sensors. We are also using alcohol detection
sensors and ultrasonic sensor, all these sensors are connected with the mobile app to
send the SMS or message to driver relative and also to nearest hospital, fire station and
police station. This project is expanded by combining the alcohol sensor with the
microcontroller. The alcohol sensor utilized in this project is MQ-3 which to detect the
alcohol content in human breath. An ignition which can produce spark plugs is build up
as a prototype to act just like the ignition starter over the vehicle’s engine. The ignition
will operate supported the extent of blood alcohol content (BAC) from human breaths
detected by alcohol sensor. Now a days, many accidents are happening due to the alcohol
consumption of the driving force or the one that is driving the vehicle. Thus drunken
driving may be a major reason of accidents in most countries everywhere the planet .
Alcohol Detector in Car project is meant for the security of the people seating inside the
car.

1.1 Objective of the Project:

All over the world, most of the road accidents are occurred by drunk and driving and rash
driving. The main concept of this paper is to prevent the road accident so to prevent the
road accident we are using alcohol detection sensor, eye blink sensor, over speed control
sensor. The alcohol sensors are used to detect the driver is drunk or not. The eye blink
sensors are used to check the driver is sleepy or not with the help of the eyeball

EEE Dept Page 6


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

movement of the driver, if the driver is sleepy means, it will trigger the alarm to
conscious the driver. The ultrasonic sensor is used to detect the objects and control the
motors by sending the information. In this process, the message or SMS will send to the
relative of the driver if the driver is consuming alcohol & driving and the message will
also send to the local police to prevent the accident. The major cause of road accidents is
happening due to the drunken driver & rash driving. To overcome these problems, we go
for efficient method in this process, we are using different modules based on IOT sensors.
We are also using eye blink sensors, alcohol detection sensors and ultrasonic sensor, all
these sensors are connected with the mobile app to send the SMS or message to driver
relative and the local police using IOT

1.2 System Components:

 Controller(Arduino)
 Ultrasonic Sensor
 Alcohol Sensor(MQ3)
 16 x 2 LCD Display
 DC Motor
 Buzzer
 Solar panel(12V ,3W)
 GPS
 Wi – Fi
 Battery(12V)
 Connecting wires
 Power card
 RPS Modules
 A/D Converter
 12V Transformer
 ESP8266 PCB

EEE Dept Page 7


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

 IR Sensor
 12V Relay

CHAPTER-2

LITERATURE SURVEY

Das et al proposed a vehicle accident and location monitoring system. This


system provides a mechanism to reduce disasters by monitoring eye blinking of the
driver, which indicates drowsiness, obstacles located in the road and the drunken state of
the driver. Accident and the location of the vehicle are detected. By this system primary
care is received as the accident information is available Anusha et al implemented a
system using LPC2148 and the system has features like storing in the database. The work
includes GPS, GSM modules. The framework also detects Alcohol consumption and
Engine Temperature, All the values can be seen on the Web page. so safety is provided to
the travelers in the vehicle. Imteaj et al developed an Android-based application that
detects an accidental situation and sends an alert message to the nearest police station and
medical care center. This application is organized with an external pressure sensor to
extract the outward force of the vehicle body. Hence, the application plays an important
role in Post-accident services and could lessen the effect due to an accident Mayuresh et
al described a system that uses an open source platform and intended to monitor and trace
the location of a vehicle, the framework also checks fuel consumption, engine
temperature and vehicle speed, GPS/GPRS/GSM modules are used for communication.
All the values are stored in the data base on the web server. Prasanth et al are designed
and implemented a model that is based on Raspberry Pi and a smartphone android
application. The system mainly comprises of three things GPS/GPRS/GSM SIM
900A.The entire setup is placed inside the vehicle. GPRS sends the information to the
server and GSM is used for sending the alert messages to the vehicle mobile owner.
Manali et al proposed a system that has an Android mobile assembled with GPS and
GSM modules along with a processor that is setup in the vehicle. During the movement

EEE Dept Page 8


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

of the vehicle, the location of the vehicle is continuously observed in the web server
using GPRS. Harum et al suggested a framework that is based on Raspberry pi that is
connected to 3G/4G dongle used as a Modem. The vehicle unit is attached to the vehicle,
the attached unit is configured to receive signals from a mobile tower and send it to web
server to represent the location on the map in the real time. Navod et al designed and
implemented vehicle tracking, vehicle monitoring, controlling and vehicle status. In this
system vehicle door, parking lights, side mirrors are monitored and controlled by a
mobilephone.

2.1 EXISTING SYSTEM:

In existing system we are using MQ3 sensor for detection of alcohol based engine
stopping system. But the major disadvantage is only detecting the alcohol only. There is
no controlling of speed of the vehicle. Due to accidents will be occurs with rash driving.
2.2 PROPOSED SYSTEM:

This project is developed by integrating the alcohol sensor with the microcontroller. The
alcohol sensor used in this project is MQ-2 which to detect the alcohol content in human
breath. An ignition system which will produce spark plugs is build up as a prototype to
act like the ignition starter over the vehicle’s engine. In Proposed system we are using
two different type of sensors detection of driver condition. One is alcohol sensor and
second one is IR sensor. Here we are measuring two parameters for detection of
drowsiness of the driver. At this two conditions we get buzzer indication and vehicle also
get switch off mode.

2.3 EXTENSION:

In our project extension is vehicle will be in stop condition in alcohol detection time to
avoid the accidents. IR sensor detected means driver is in sleep mode then here vehicle
automatically stop and alerting with buzzer sounds. Vibration also used in extension part
to detect the accidents.

EEE Dept Page 9


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

2.4 ADVANTAGES:

1. Accidents are avoided from drunk and drive and rash driving.

2. To easily detect the drowsiness of the driver with alerting system also.

3. Low cost

4. Less Complexity

5. Reliable

6. Easy to implement

2.5 DISADVANTAGES:

1. There is no controlling of speed of the vehicle.

2. Accidents will be occurs.

EEE Dept Page 10


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

CHAPTER-3

BLOCK DIAGRAM AND HARDWARE COMPONENTS

3.1 BLOCK DIAGRAM OVERVIEW:

Fig.3.1.block diagram

3.2 POWER SUPPLY:

All digital circuits require regulated power supply. In this article we are going to learn
how to get a regulated positive supply from the mains supply

EEE Dept Page 11


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

Fig:3.2 shows the basic block diagram of a fixed regulated power supply. Let us go
through each block.

  TRANSFORMER:

Fig 3.3 Transformers

A transformer consists of two coils also called as “WINDINGS” namely


PRIMARY & SECONDARY. They are linked together through inductively coupled
electrical conductors also called as CORE. A changing current in the primary causes a
change in the Magnetic Field in the core & this in turn induces an alternating voltage in
the secondary coil. If load is applied to the secondary then an alternating current will flow
through the load. If we consider an ideal condition then all the energy from the primary
circuit will be transferred to the secondary circuit through the magnetic field.

So

EEE Dept Page 12


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

 The secondary voltage of the transformer depends on the number of turns


in the Primary as well as in the secondary.

Rectifier
A rectifier is a device that converts an AC signal into DC signal. For rectification
purpose we use a diode, a diode is a device that allows current to pass only in one
direction i.e. when the anode of the diode is positive with respect to the cathode also
called as forward biased condition & blocks current in the reversed biased condition.
 Rectifier can be classified as follows:
1)      Half Wave rectifier.

This is the simplest type of rectifier as you can see in the diagram a half wave
rectifier consists of only one diode. When an AC signal is applied to it during the positive
half cycle the diode is forward biased & current flows through it. But during the negative
half cycle diode is reverse biased & no current flows through it. Since only one half of
the input reaches the output, it is very inefficient to be used in power supplies.
2)      Full wave rectifier.

EEE Dept Page 13


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

Half wave rectifier is quite simple but it is very inefficient, for greater efficiency
we would like to use both the half cycles of the AC signal. This can be achieved by using
a center tapped transformer i.e. we would have to double the size of secondary winding &
provide connection to the center. So during the positive half cycle diode D1 conducts &
D2 is in reverse biased condition. During the negative half cycle diode D2 conducts & D1
is reverse biased. Thus we get both the half cycles across the load.
One of the disadvantages of Full Wave Rectifier design is the necessity of using a
center tapped transformer, thus increasing the size & cost of the circuit. This can be
avoided by using the Full Wave Bridge Rectifier.

EEE Dept Page 14


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

  3) BridgeRectifier.

As the name suggests it converts the full wave i.e. both the positive & the
negative half cycle into DC thus it is much more efficient than Half Wave Rectifier &
that too without using a center tapped transformer thus much more cost effective than
Full Wave Rectifier.

Full Bridge Wave Rectifier consists of four diodes namely D1, D2, D3 and D4.
During the positive half cycle diodes D1 & D4 conduct whereas in the negative half cycle
diodes D2 & D3 conduct thus the diodes keep switching the transformer connections so
we get positive half cycles in the output.

EEE Dept Page 15


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

If we use a center tapped transformer for a bridge rectifier we can get both
positive & negative half cycles which can thus be used for generating fixed positive &
fixed negative voltages.

FILTER CAPACITOR

Even though half wave & full wave rectifier give DC output, none of them
provides a constant output voltage. For this we require to smoothen the waveform
received from the rectifier. This can be done by using a capacitor at the output of the
rectifier this capacitor is also called as “FILTER CAPACITOR” or “SMOOTHING
CAPACITOR” or “RESERVOIR CAPACITOR”. Even after using this capacitor a small
amount of ripple will remain.
We place the Filter Capacitor at the output of the rectifier the capacitor will
charge to the peak voltage during each half cycle then will discharge its stored energy
slowly through the load while the rectified voltage drops to zero, thus trying to keep the
voltage as constant as possible.

EEE Dept Page 16


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

If we go on increasing the value of the filter capacitor then the Ripple will decrease.
But then the costing will increase. The value of the Filter capacitor depends on the current
consumed by the circuit, the frequency of the waveform & the accepted ripple.

 Where,
Vr= accepted ripple voltage.( should not be more than 10% of  the voltage)
I= current consumed by the circuit in Amperes.
F= frequency of the waveform. A half wave rectifier has only one peak in one cycle so
F=25hz
Whereas a full wave rectifier has Two peaks in one cycle so F=100hz.

EEE Dept Page 17


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

VOLTAGE REGULATOR 

A Voltage regulator is a device which converts varying input voltage into a


constant regulated output voltage. Voltage regulator can be of two types
1)      Linear Voltage Regulator
      Also called as Resistive Voltage regulator because they dissipate the excessive
voltage resistively as heat.
2)      Switching Regulators.
They regulate the output voltage by switching the Current ON/OFF very rapidly.
Since their output is either ON or OFF it dissipates very low power thus achieving higher
efficiency as compared to linear voltage regulators. But they are more complex &
generate high noise due to their switching action. For low level of output power
switching regulators tend to be costly but for higher output wattage they are much
cheaper than linear regulators.
The most commonly available Linear Positive Voltage Regulators are the 78XX
series where the XX indicates the output voltage. And 79XX series is for Negative
Voltage Regulators.

After filtering the rectifier output the signal is given to a voltage regulator. The
maximum input voltage that can be applied at the input is 35V.Normally there is a 2-3
Volts drop across the regulator so the input voltage should be at least 2-3 Volts higher
than the output voltage. If the input voltage gets below the Vmin of the regulator due to
the ripple voltage or due to any other reason the voltage regulator will not be able to
produce the correct regulated voltage.

EEE Dept Page 18


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

Fig 3.3. Circuit Diagram of power supply

3.3 IC 7805:
7805 is an integrated three-terminal positive fixed linear voltage regulator. It
supports an input voltage of 10 volts to 35 volts and output voltage of 5 volts. It has a
current rating of 1 amp although lower current models are available. Its output voltage is
fixed at 5.0V. The 7805 also has a built-in current limiter as a safety feature. 7805 is
manufactured by many companies, including National Semiconductors and Fairchild
Semiconductors.

The 7805 will automatically reduce output current if it gets too hot.The last two
digits represent the voltage; for instance, the 7812 is a 12-volt regulator. The 78xx series
of regulators is designed to work in complement with the 79xx series of negative voltage
regulators in systems that provide both positive and negative regulated voltages, since the
78xx series can't regulate negative voltages in such a system.

The 7805 & 78 is one of the most common and well-known of the 78xx series
regulators, as it's small component count and medium-power regulated 5V make it useful
for powering TTL devices.

SPECIFICATIONS IC 7805

Vout 5V

Vein - Vout Difference 5V - 20V


EEE Dept Page 19
Operation Ambient Temp 0 - 125°C

Output Imax 1A
Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

Table: Specifications of IC7805

3.4 Alcohol SENSOR:

Alcohol sensors need to be calibrated and periodically checked to ensure sensor


accuracy and system integrity. It is important to install stationary sensors in locations
where the calibration can be performed easily. The intervals between calibrations can be
different from sensor to sensor. Generally, the manufacturer of the sensor will
recommend a time interval between calibrations. However, it is good general practice to
check the sensor more closely during the first 30 days after installation. During this
period, it is possible to observe how well the sensor is adapting to its new environment.
Also, factors that were not accounted for in the design of the system might surface and
can affect the sensor’s performance.

If the sensor functions properly for 30 continuous days, this provides a good
degree of confidence about the installation. Any possible problems can be identified and
corrected during this time. Experience indicates that a sensor surviving 30 days after the
initial installation will have a good chance of performing its function for the duration
expected. Most problems—such as an inappropriate sensor location, interference from
other Alcoholics, or the loss of sensitivity—will surface during this time.

EEE Dept Page 20


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

Fig.3.4: Diagram of Alcohol sensor

Working of Alcohol sensor:

During the first 30 days, the sensor should be checked weekly. Afterward, a
maintenance schedule, Hazardous Alcohol Monitors including calibration intervals,
should be established. Normally, a monthly calibration is adequate to ensure the
effectiveness and sensibility of each sensor; this monthly check will also afford you the
opportunity to maintain the system’s accuracy. The method and procedure for calibrating
the sensors should be established immediately. The calibration procedure should be
simple, straightforward, and easily executed by regular personnel. Calibration here is
simply a safety check, unlike laboratory analyzers that require a high degree of accuracy.
For area air quality and safety Alcohol monitors, the requirements need to be simple,
repeatable, and economical. The procedure should be consistent and traceable. The
calibration will be performed in the field where sensors are installed so it can occur in
any type environment. Calibration of the Alcohol sensor involves two steps. First the
“zero” must be set and then the “span” must be calibrated.

The sensing material in TGS Alcohol sensors is metal oxide, most typically SnO2. When
a metal oxide Crystal such as SnO2 is heated at a certain high temperature in air, oxygen

EEE Dept Page 21


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

is adsorbed on the crystal surface with a negative charge. Then donor electrons in the
crystal surface are transferred to the adsorbed oxygen, resulting in leaving positive
charges in a space charge layer. Thus, surface potential is formed to serve as a potential
barrier against electron flow.
Inside the sensor, electric current flows through the conjunction parts
(grain boundary) of SnO2 micro crystals. At grain boundaries, adsorbed oxygen forms a
potential barrier which prevents carriers from moving freely. The electrical resistance of
the sensor is attributed to this potential barrier. In the presence of a deoxidizing Alcohol,
the surface density of the negatively charged oxygen decreases, so the barrier height in
the grain boundary is reduced. The reduced barrier height decreases sensor resistance.
Sensor resistance will drop very quickly when exposed to Alcohol, and when removed
from Alcohol its resistance will recover to its original value after a short time. The speed
of response and reversibility will vary according to the model of sensor and the Alcohol
involved.
Features
- Power requirements: 5 VDC @ ~160mA

- Interface Type: Resistive

- Dimensions: 0.75" diameter x 0.65" tall excluding leads (19.1mm diameter x 16.55mm
tall excluding leads)

- Operating temp range: -4 to +122 °F (-20 to +50 °C)

Connections
connecting five volts across the heating (H) pins keeps the sensor hot enough to function
correctly. Connecting five volts at either the A or B pins causes the sensor to emit an
analog voltage on the other pins. A resistive load between the output pins and ground sets
the sensitivity of the detector. Please note that the picture in the datasheet for the top
configuration is wrong. Both configurations have the same pinout consistent with the
bottom configuration. The resistive load should be calibrated for your particular

EEE Dept Page 22


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

application using the equations in the datasheet, but a good starting value for the resistor
is 10 kΩ.

3.5 IR SENSOR:

IR transmitter and receiver

Basics of IR transmitter and receiver transmitter and receiver are commonly used in
engineering projects for remote control of objects. In particularly, in Robotic system uses
transmitter and receiver. Here i would like to describe the basics if IR transmitter and
receiver

Basics of IR transmitter:

An electroluminescent IR LED is a product which requires care in use. IR LED’s are


fabricated from narrow band hetero structures with energy gap from 0.25 to 0.4 eV. Infra
red transmitter emits IR rays in planar wave front manner. Even though infra red rays
spread in all directions, it propagates along straight line in forward direction. IR rays have
the characteristics of producing secondary wavelets when it collides with any obstacles in
its path. This property of IR is used here.

EEE Dept Page 23


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

When IR rays gets emitted from LED, it moves in the direction it is angled. When any
obstacle interferes in the path, the IR rays get cut and it produces secondary wavelets
which propagates mostly in return direction or in a direction opposite to that of the
primary waves, which produces the net result like reflection of IR rays.

Basics of IR receiver:

Infrared photo receiver is a two terminal PN junction device, which operates in a reverse
bias. It has a small transparent window, which allows light to strike the PN junction. A
photodiode is a type of photo detector capable of converting light into either current or
voltage, depending upon the mode of operation. Most photodiodes will look similar to a
light emitting diode. They will have two leads, or wires, coming from the bottom. The
shorter end of the two is the cathode, while the longer end is the anode.

A photodiode consists of PN junction or PIN structure. When a photon of sufficient


energy strikes the diode, it excites an electron thereby creating a mobile electron and a
positively charged electron hole. If the absorption occurs in the junction's depletion
region, or one diffusion length away from it, these carriers are swept from the junction by
the built-in field of the depletion region. Thus holes move toward the anode, and
electrons toward the cathode, and a photocurrent is produced.

EEE Dept Page 24


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

Working of infrared communication:

Various types of infrared based applications are available in the market. The
circuit for infrared based applications is designed along with the transmitter and receiver
sections i.e. we can’t use it for other application. But the infrared communication project
which we have done here can be used in any application just by replacing the application
at the place of infrared LED in the circuit diagram of infrared communication. By using
this project we can design infrared based applications easily. The entire circuit consists of
two sections named as

1. Transmitter section and


2. Receiver section

1. Transmitter section:

EEE Dept Page 25


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

The transmitter section consists of a 555 timer IC functioning in astable mode. It is


wired as shown in figure. The output from astable mode is fed to an IR LED via resistor
which limits its operating current. Infrared LED in the transmitter section emits IR
radiation which is focused by a plastic lens (optics) in to a narrow beam.

2. Receiver section:

The receiver section consists of a silicon phototransistor to convert the infrared


radiation to an electric current. It responds only to the rapidly pulsing signal created by
the transmitter, and filters out slowly changing infrared radiation from ambient light. The
receiver section comprises an infrared receiver module, and a led indicator. When the
signals are interrupted, the IR Led goes off after a few seconds depending upon the value
of RC combination.

We can increase the distance between the IR transmitter and receiver just by
placing the lens between them. After connecting the IR transmitter and receiver circuit,
we can get the output by applying 6V Power supply to the circuit. We can use this circuit
with any application very simply. For example a buzzer circuit is placed at the output of
IR circuit, when the signals are interrupted, the buzzer produces sound. Both the
transmitter and receiver parts can be mounted on a single bread board or PCB. The
infrared receiver must be placed behind the IR Led to avoid false indication due to
infrared leakage. An object moving nearby actually reflects the IR rays emitted by the IR
Led.

3.6 Photo Diodes:

A photodiode is a semiconductor diode that functions as a photo detector.


Photodiodes are packaged with either a window or optical fiber connection, to let in the
light to the sensitive part of the device. They may also be used without a window to
detect vacuum UV or X-rays.

EEE Dept Page 26


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

A phototransistor is in essence nothing more than a bipolar transistor that is


encased in a transparent case so that light can reach the base-collector junction. The
phototransistor works like a photodiode, but with a much higher responsivity for light,
because the electrons that are generated by photons in the base-collector junction are
injected into the base, and this current is then amplified by the transistor operation.

Fig (3.5) Photodiode schematic symbol

Principle of operation:

A photodiode is a p-n junction or p-i-n structure. When a photon of sufficient


energy strikes the diode, it excites an electron thereby creating a mobile electron and a
positively charged electron hole. If the absorption occurs in the junction's depletion
region, or one diffusion length away from it, these carriers are swept from the junction by
the built-in field of the depletion region, producing a photocurrent.

Photodiodes can be used under either zero bias (photovoltaic mode) or reverse bias
(photoconductive mode). In zero bias, light falling on the diode causes a current across
the device, leading to forward bias which in turn induces "dark current" in the opposite
direction to the photocurrent. This is called the photovoltaic effect, and is the basis for
solar cells in fact; a solar cell is just a large number of big photodiodes. Reverse bias
induces only little current (known as saturation or back current) along its direction.

But a more important effect of reverse bias is widening of the depletion


layer (therefore expanding the reaction volume) and strengthening the photocurrent.
Circuits based on this effect are more sensitive to light than ones based on the
photovoltaic effect and also tend to have lower capacitance, which improves the speed of
their time response. On the other hand, the photovoltaic mode tends to exhibit less

EEE Dept Page 27


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

electronic noise. Avalanche photodiodes have a similar structure, but they are operated
with much higher reverse bias. This allows each photo-generated carrier to be multiplied
by avalanche breakdown, resulting in internal gain within the photodiode, which
increases the effective responsivity of the device.

Features:

Critical performance parameters of a photodiode include:

1. Responsivity:

The responsivity may also be expressed as quantum efficiency, or the ratio of the
number of photo generated carriers to incident photons and thus a unit less quantity.

2. Dark current:

The dark current includes photocurrent generated by background radiation and the
saturation current of the semiconductor junction. Dark current must be accounted for by
calibration if a photodiode is used to make an accurate optical power measurement, and it
is also a source of noise when a photodiode is used in an optical communication system.

3. Noise-equivalent power:

(NEP) The minimum input optical power to generate photocurrent, equal to the
RMS noise current in a 1 hertz bandwidth. The related characteristic directivity (D) is the
inverse of NEP, 1/NEPThe NEP is roughly the minimum detectable input power of a
photodiode.

Applications:

EEE Dept Page 28


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

1. P-N photodiodes are used in similar applications to other photo detectors, such as
photoconductors, charge-coupled devices, and photomultiplier tubes.
2. Photodiodes are used in consumer electronics devices such as compact disc
players, smoke detectors, and the receivers for remote controls in VCRs and
televisions.
3. PIN diodes are much faster and more sensitive than ordinary p-n junction diodes,
and hence are often used for optical communications and in lighting regulation.

P-N vs. P-I-N Photodiodes:

1. Due to the intrinsic layer, a PIN photodiode must be reverse biased (Vr). The Vr
increases the depletion region allowing a larger volume for electron-hole pair
production, and reduces the capacitance thereby increasing the bandwidth.
2. The Vr also introduces noise current, which reduces the S/N ratio. Therefore, a
reverse bias is recommended for higher bandwidth applications and/or
applications where a wide dynamic range is required.
3. A PN photodiode is more suitable for lower light applications because it allows
for unbiased operation.
3.7 ESP8266

The ESP8266 is a low-cost Wi-Fi microchip, with a full TCP/IP stack and


microcontroller capability, produced by Espressif Systems in Shanghai, China.

The chip first came to the attention of Western makers in August 2014 with the ESP-
01 module, made by a third-party manufacturer Ai-Thinker. This small module allows
microcontrollers to connect to a Wi-Fi network and make simple TCP/IP connections
using Hayes-style commands. However, at first there was almost no English-language
documentation on the chip and the commands it accepted.[2] The very low price and the
fact that there were very few external components on the module, which suggested that it
could eventually be very inexpensive in volume, attracted many hackers to explore the

EEE Dept Page 29


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

module, the chip, and the software on it, as well as to translate the Chinese
documentation.

The ESP8285 is an ESP8266 with 1 MiB of built-in flash, allowing the building of


single-chip devices capable of connecting to Wi-Fi.

 Processor: L106 32-bit RISC microprocessor core based on the Tensilica Xtensa


Diamond Standard 106Micro running at 80 MHz[5]
 Memory:
o 32 KiB instruction RAM
o 32 KiB instruction cache RAM
o 80 KiB user-data RAM
o 16 KiB ETS system-data RAM

 External QSPI flash: up to 16 MiB is supported (512 KiB to 4 MiB typically


included)
 IEEE 802.11 b/g/n Wi-Fi
o Integrated TR switch, balun, LNA, power amplifier and matching network
o WEP or WPA/WPA2 authentication, or open networks

EEE Dept Page 30


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

 16 GPIO pins
 SPI
 I²C (software implementation)
 I²S interfaces with DMA (sharing pins with GPIO)
 UART on dedicated pins, plus a transmit-only UART can be enabled on GPIO2
 10-bit ADC (successive approximation ADC)
OPERATIONS:

In October 2014, Espressif Systems released a software development kit (SDK) for


programming the chip directly, which removed the need for a separate
microcontroller. Since then, there have been many official SDK releases from Espressif;
Espressif maintains two versions of the SDK — one that is based on FreeRTOS and the
other based on callbacks.

An alternative to Espressif's official SDK is the open-source ESP-Open-SDK that is


based on the GNU Compiler Collection (GCC) toolchain, maintained by Max
Filippov. Another alternative is the "Unofficial Development Kit" by Mikhail Grigorev.

Other SDKs, mostly open-source, include:

 Arduino — A C++-based firmware. With this core, the ESP8266 CPU and its Wi-
Fi components can be programmed like any other Arduino device. The ESP8266
Arduino Core is available through GitHub.
 ESP8266 BASIC — An open-source BASIC-like interpreter specifically tailored
for the Internet of Things (IoT). Self-hosting browser-based development
environment.
 ESP Easy — Developed by home automation enthusiasts.
 ESPHome — ESPHome is a system to control your ESP8266/ESP32 by simple
yet powerful configuration files and control them remotely through home automation
systems.

EEE Dept Page 31


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

 ESP-Open-RTOS — Open-source FreeRTOS-based ESP8266 software


framework.
 ESP-Open-SDK — Free and open (as much as possible) integrated SDK for
ESP8266/ESP8285 chips.
 Espruino — An actively maintained JavaScript SDK and firmware, closely
emulating Node.js. Supports a few MCUs, including the ESP8266.
 ESPurna — Open-source ESP8285/ESP8266 firmware.
 Forthright — Port of Jones Forth to the ESP8266 microcontroller.
 MicroPython — A port of MicroPython (an implementation of Python for
embedded devices) to the ESP8266 platform.
 Mongoose OS — An open-source operating system for connected products.
Supports ESP8266 and ESP32. Develop in C or JavaScript.[13]
 NodeMCU — A Lua-based firmware.
 PlatformIO — A cross-platform IDE and unified debugger, which sits on top of
Arduino code and libraries.
 Punyforth — Forth-inspired programming language for the ESP8266.
 Sming — An actively developed asynchronous C/C++ framework with superb
performance and multiple network features.
 uLisp — A version of the Lisp programming language specifically designed to
run on processors with a limited amount of RAM.
 ZBasic for ESP8266 — A subset of Microsoft's widely-used Visual Basic 6,
which has been adapted as a control language for the ZX microcontroller family and
the ESP8266.
 Zerynth — IoT framework for programming ESP8266  and other microcontrollers
in Python.
3.8 ARDUINO CONTROLLER

Arduino is an open-source hardware and software company, project and user community
that designs and manufactures single-board microcontrollers and microcontroller kits for
EEE Dept Page 32
Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

building digital devices and interactive objects that can sense and control both physically
and digitally. Its products are licensed under the GNU Lesser General Public License
(LGPL) or the GNU General Public License (GPL), permitting the manufacture of
Arduino boards and software distribution by anyone. Arduino boards are available
commercially in preassembled form or as do-it-yourself (DIY) kits.

Arduino board designs use a variety of microprocessors and controllers. The boards are
equipped with sets of digital and analog input/output (I/O) pins that may be interfaced to
various expansion boards or breadboards (shields) and other circuits. The boards feature
serial communications interfaces, including Universal Serial Bus (USB) on some models,
which are also used for loading programs from personal computers. The microcontrollers
are typically programmed using a dialect of features from the programming languages C
and C++. In addition to using traditional compiler toolchains, the Arduino project
provides an integrated development environment (IDE) based on the Processing language
project.

The Arduino project started in 2003 as a program for students at the Interaction Design
Institute Ivrea in Ivrea, Italy, aiming to provide a low-cost and easy way for novices and
professionals to create devices that interact with their environment using sensors and
actuators. Common examples of such devices intended for beginner hobbyists include
simple robots, thermostats and motion detectors.

The name Arduino comes from a bar in Ivrea, Italy, where some of the founders of the
project used to meet. The bar was named after Arduin of Ivrea, who was the margrave of
the March of Ivrea and King of Italy from 1002 to 1014.

EEE Dept Page 33


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

Fig.3.6. Hardware image.

3.9 History:

The Arduino project was started at the Interaction Design Institute Ivrea (IDII) in Ivrea,
Italy. At that time, the students used a BASIC Stamp microcontroller at a cost of $50, a
considerable expense for many students. In 2003 Hernando Barragán created the
development platform Wiring as a Master's thesis project at IDII, under the supervision of
Massimo Banzi and Casey Reas. Casey Reas is known for co-creating, with Ben Fry,
the Processing development platform. The project goal was to create simple, low cost
tools for creating digital projects by non-engineers. The Wiring platform consisted of
a printed circuit board (PCB) with an at mega168 microcontroller, an IDE based on
Processing and library functions to easily program the microcontroller. In 2003, Massimo
Banzi, with David Mellis, another IDII student, and David Cuartielles, added support for
the cheaper ATmega8 microcontroller to Wiring. But instead of continuing the work on
Wiring, they forked the project and renamed it Arduino.

The initial Arduino core team consisted of Massimo Banzi, David Cuartielles, Tom Igoe,
Gianluca Martino, and David Mellis, but Barragán was not invited to participate.

Following the completion of the Wiring platform, lighter and less expensive versions
were distributed in the open-source community.

It was estimated in mid-2011 that over 300,000 official Arduinos had been commercially
produced, and in 2013 that 700,000 official boards were in users' hands. In October 2016,

EEE Dept Page 34


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

Federico Musto, Arduino's former CEO, secured a 50% ownership of the company. In
April 2017, Wired reported that Musto had "fabricated his academic record.... On his
company's website, personal LinkedIn accounts, and even on Italian business documents,
Musto was until recently listed as holding a PhD from the Massachusetts Institute of
Technology. In some cases, his biography also claimed an MBA from New York
University." Wired reported that neither University had any record of Musto's attendance,
and Musto later admitted in an interview with Wired that he had never earned those
degrees. Around that same time, Massimo Banzi announced that the Arduino
Foundation would be "a new beginning for Arduino." But a year later, the Foundation
still hasn't been established, and the state of the project remains unclear. The controversy
surrounding Musto continued when, in July 2017, he reportedly pulled many Open
source licenses, schematics, and code from the Arduino website, prompting scrutiny and
outcry. In October 2017, Arduino announced its partnership with ARM Holdings (ARM).
The announcement said, in part, "ARM recognized independence as a core value of
Arduino ... without any lock-in with the ARM architecture.” Arduino intends to continue
to work with all technology vendors and architectures.

3.9 OPERATION WITH PINS:

Arduino is open-source hardware. The hardware reference designs are distributed under a
Creative Commons Attribution Share-Alike 2.5 license and are available on the Arduino
website. Layout and production files for some versions of the hardware are also available.

Although the hardware and software designs are freely available under copyleft licenses,
the developers have requested the name Arduino to be exclusive to the official product
and not be used for derived works without permission. The official policy document on
use of the Arduino name emphasizes that the project is open to incorporating work by
others into the official product. Several Arduino-compatible products commercially
released have avoided the project name by using various names ending in -duino.

EEE Dept Page 35


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

Fig3.7 Backside of module

Most Arduino boards consist of an Atmel 8-bit AVR microcontroller (ATmega8,[24]


ATmega168, ATmega328, ATmega1280, ATmega2560) with varying amounts of flash
memory, pins, and features. The 32-bit Arduino Due, based on the Atmel SAM3X8E was
introduced in 2012. The boards use single or double-row pins or female headers that
facilitate connections for programming and incorporation into other circuits.

These may connect with add-on modules termed shields. Multiple and possibly stacked
shields may be individually addressable via an I²C serial bus. Most boards include a 5 V
linear regulator and a 16 MHz crystal oscillator or ceramic resonator. Some designs, such
as the LilyPad, run at 8 MHz and dispense with the onboard voltage regulator due to
specific form-factor restrictions.

Arduino microcontrollers are pre-programmed with a boot loader that


simplifies uploading of programs to the on-chip flash memory. The default bootloader of
the Arduino UNO is the optiboot bootloader. Boards are loaded with program code via a
serial connection to another computer. Some serial Arduino boards contain a level shifter
circuit to convert between RS-232 logic levels and transistor–transistor logic (TTL) level
signals. Current Arduino boards are programmed via Universal Serial Bus (USB),
implemented using USB-to-serial adapter chips such as the FTDI FT232. Some boards,
such as later-model Uno boards, substitute the FTDI chip with a separate AVR chip
containing USB-to-serial firmware, which is reprogrammable via its own ICSP header.
Other variants, such as the Arduino Mini and the unofficial Boarduino, use a detachable
USB-to-serial adapter board or cable, Bluetooth or other methods. When used with

EEE Dept Page 36


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

traditional microcontroller tools, instead of the Arduino IDE, standard AVR in-system
programming (ISP) programming is used. The Arduino board exposes most of the
microcontroller's I/O pins for use by other circuits. The Diecimila,[a] Duemilanove,[b]
and current Uno[c] provide 14 digital I/O pins, six of which can produce pulse-width
modulated signals, and six analog inputs, which can also be used as six digital I/O pins.
These pins are on the top of the board, via female 0.1-inch (2.54 mm) headers. Several
plug-in application shields are also commercially available. The Arduino Nano, and
Arduino-compatible Bare Bones Board and Boarduino boards may provide male header
pins on the underside of the board that can plug into solderless breadboards.

Many Arduino-compatible and Arduino-derived boards exist. Some are


functionally equivalent to an Arduino and can be used interchangeably. Many enhance
the basic Arduino by adding output drivers, often for use in school-level education, to
simplify making buggies and small robots. Others are electrically equivalent but change
the form factor, sometimes retaining compatibility with shields, sometimes not. Some
variants use different processors, of varying compatibility.

Fig.3.8. Ardino
board.

1.Power USB

Arduino board can be powered by using the USB cable from your computer. All you
need to do is connect the USB cable to the USB connection (1).

2.Power (Barrel Jack)

EEE Dept Page 37


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

Arduino boards can be powered directly from the AC mains power supply by connecting
it to the Barrel Jack (2).

3.Voltage Regulator

The function of the voltage regulator is to control the voltage given to the Arduino board
and stabilize the DC voltages used by the processor and other elements.

4.Crystal Oscillator

The crystal oscillator helps Arduino in dealing with time issues. How does Arduino
calculate time? The answer is, by using the crystal oscillator. The number printed on top
of the Arduino crystal is 16.000H9H. It tells us that the frequency is 16,000,000 Hertz or
16 MHz.

5.Arduino Reset

You can reset your Arduino board, i.e., start your program from the beginning. You can
reset the UNO board in two ways. First, by using the reset button (17) on the board.
Second, you can connect an external reset button to the Arduino pin labelled RESET (5).

6,7,8,9.Pins (3.3, 5, GND, Vin)

 3.3V (6) − Supply 3.3 output volt

 5V (7) − Supply 5 output volt

 Most of the components used with Arduino board works fine with 3.3 volt and 5
volt.

 GND (8)(Ground) − There are several GND pins on the Arduino, any of which
can be used to ground your circuit.

Vin (9) − This pin also can be used to power the Arduino board from an external
power source, like AC mains power supply.

10.Analog pins

EEE Dept Page 38


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

The Arduino UNO board has six analog input pins A0 through A5. These pins can read
the signal from an analog sensor like the humidity sensor or temperature sensor and
convert it into a digital value that can be read by the microprocessor.

11.Main microcontroller

Each Arduino board has its own microcontroller (11). You can assume it as the brain of
your board. The main IC (integrated circuit) on the Arduino is slightly different from
board to board. The microcontrollers are usually of the ATMEL Company. You must
know what IC your board has before loading up a new program from the Arduino IDE.
This information is available on the top of the IC. For more details about the IC
construction and functions, you can refer to the data sheet.

12.ICSP pin

Mostly, ICSP (12) is an AVR, a tiny programming header for the Arduino consisting of
MOSI, MISO, SCK, RESET, VCC, and GND. It is often referred to as an SPI (Serial
Peripheral Interface), which could be considered as an "expansion" of the output.
Actually, you are slaving the output device to the master of the SPI bus.

13.Power LED indicator

This LED should light up when you plug your Arduino into a power source to indicate
that your board is powered up correctly. If this light does not turn on, then there is
something wrong with the connection.

14.TX and RX LEDs

On your board, you will find two labels: TX (transmit) and RX (receive). They appear in
two places on the Arduino UNO board. First, at the digital pins 0 and 1, to indicate the
pins responsible for serial communication. Second, the TX and RX led (13). The TX led
flashes with different speed while sending the serial data. The speed of flashing depends
on the baud rate used by the board. RX flashes during the receiving process.

15.Digital I/O

EEE Dept Page 39


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

The Arduino UNO board has 14 digital I/O pins (15) (of which 6 provide PWM (Pulse
Width Modulation) output. These pins can be configured to work as input digital pins to
read logic values (0 or 1) or as digital output pins to drive different modules like LEDs,
relays, etc. The pins labeled “~” can be used to generate PWM.

16.AREF

AREF stands for Analog Reference. It is sometimes, used to set an external reference
voltage (between 0 and 5 Volts) as the upper limit for the analog input pins.

Fig.3.9. Pin explanation.

CHAPTER-4
EMBEDDED SYSTEMS

EEE Dept Page 40


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

4.1 EMBEDDED SYSTEMS:

An embedded system is a computer system designed to perform one or a few


dedicated functions often with real-time computing constraints. It is embedded as part of
a complete device often including hardware and mechanical parts. By contrast, a general-
purpose computer, such as a personal computer (PC), is designed to be flexible and to
meet a wide range of end-user needs. Embedded systems control many devices in
common use today.

Embedded systems are controlled by one or more main processing cores that are
typically either microcontrollers or digital signal processors (DSP). The key
characteristic, however, is being dedicated to handle a particular task, which may require
very powerful processors. For example, air traffic control systems may usefully be
viewed as embedded, even though they involve mainframe computers and dedicated
regional and national networks between airports and radar sites. (Each radar probably
includes one or more embedded systems of its own).

Since the embedded system is dedicated to specific tasks, design engineers can
optimize it to reduce the size and cost of the product and increase the reliability and
performance. Some embedded systems are mass-produced, benefiting from economies of
scale.Physically embedded systems range from portable devices such as digital watches
and MP3 players, to large stationary installations like traffic lights, factory controllers, or
the systems controlling nuclear power plants. Complexity varies from low, with a single
microcontroller chip, to very high with multiple units, peripherals and networks mounted
inside a large chassis or enclosure.

In general, "embedded system" is not a strictly definable term, as most systems


have some element of extensibility or programmability. For example, handheld
computers share some elements with embedded systems such as the operating systems
and microprocessors which power them, but they allow different applications to be
loaded and peripherals to be connected. Moreover, even systems which don't expose
programmability as a primary feature generally need to support software updates. On a
EEE Dept Page 41
Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

continuum from "general purpose" to "embedded", large application systems will have
subcomponents at most points even if the system as a whole is "designed to perform one
or a few dedicated functions", and is thus appropriate to call "embedded". A modern
example of embedded system is shown in fig: 1.1.

Fig 4.1:A modern example of embedded system

Labeled parts include microprocessor (4), RAM (6), flash memory


(7).Embedded systems programming is not like normal PC programming. In many ways,
programming for an embedded system is like programming PC 15 years ago. The
hardware for the system is usually chosen to make the device as cheap as possible.
Spending an extra dollar a unit in order to make things easier to program can cost
millions. Hiring a programmer for an extra month is cheap in comparison. This means the
programmer must make do with slow processors and low memory, while at the same time
battling a need for efficiency not seen in most PC applications. Below is a list of issues
specific to the embedded field.

4.1.1 HISTORY:

EEE Dept Page 42


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

In the earliest years of computers in the 1930–40s, computers were sometimes


dedicated to a single task, but were far too large and expensive for most kinds of tasks
performed by embedded computers of today. Over time however, the concept of
programmable controllers evolved from traditional electromechanical sequencers, via
solid state devices, to the use of computer technology.

One of the first recognizably modern embedded systems was the Apollo Guidance
Computer, developed by Charles Stark Draper at the MIT Instrumentation Laboratory. At
the project's inception, the Apollo guidance computer was considered the riskiest item in
the Apollo project as it employed the then newly developed monolithic integrated circuits
to reduce the size and weight. An early mass-produced embedded system was the
Autonetics D-17 guidance computer for the Minuteman missile, released in 1961. It was
built from transistor logic and had a hard disk for main memory. When the Minuteman II
went into production in 1966, the D-17 was replaced with a new computer that was the
first high-volume use of integrated circuits.

4.1.2 TOOLS:

Embedded development makes up a small fraction of total programming. There's


also a large number of embedded architectures, unlike the PC world where 1 instruction
set rules, and the Unix world where there's only 3 or 4 major ones. This means that the
tools are more expensive. It also means that they're lower featured, and less developed.
On a major embedded project, at some point you will almost always find a compiler bug
of some sort.
Debugging tools are another issue. Since you can't always run general programs
on your embedded processor, you can't always run a debugger on it. This makes fixing
your program difficult. Special hardware such as JTAG ports can overcome this issue in
part. However, if you stop on a breakpoint when your system is controlling real world
hardware (such as a motor), permanent equipment damage can occur. As a result, people
doing embedded programming quickly become masters at using serial IO channels and
error message style debugging.

EEE Dept Page 43


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

4.1.3 RESOURCES:

To save costs, embedded systems frequently have the cheapest processors that can
do the job. This means your programs need to be written as efficiently as possible. When
dealing with large data sets, issues like memory cache misses that never matter in PC
programming can hurt you. Luckily, this won't happen too often- use reasonably efficient
algorithms to start, and optimize only when necessary. Of course, normal profilers won't
work well, due to the same reason debuggers don't work well.
Memory is also an issue. For the same cost savings reasons, embedded systems
usually have the least memory they can get away with. That means their algorithms must
be memory efficient (unlike in PC programs, you will frequently sacrifice processor time
for memory, rather than the reverse). It also means you can't afford to leak memory.
Embedded applications generally use deterministic memory techniques and avoid the
default "new" and "malloc" functions, so that leaks can be found and eliminated more
easily. Other resources programmers expect may not even exist. For example, most
embedded processors do not have hardware FPUs (Floating-Point Processing Unit).
These resources either need to be emulated in software, or avoided altogether.

4.1.4 REAL TIME ISSUES:

Embedded systems frequently control hardware, and must be able to respond to


them in real time. Failure to do so could cause inaccuracy in measurements, or even
damage hardware such as motors. This is made even more difficult by the lack of
resources available. Almost all embedded systems need to be able to prioritize some tasks
over others, and to be able to put off/skip low priority tasks such as UI in favor of high
priority tasks like hardware control.

4.2 NEED FOR EMBEDDED SYSTEMS:

The uses of embedded systems are virtually limitless, because every day new
products are introduced to the market that utilizes embedded computers in novel ways. In
recent years, hardware such as microprocessors, microcontrollers, and FPGA chips have
EEE Dept Page 44
Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

become much cheaper. So when implementing a new form of control, it's wiser to just
buy the generic chip and write your own custom software for it. Producing a custom-
made chip to handle a particular task or set of tasks costs far more time and money. Many
embedded computers even come with extensive libraries, so that "writing your own
software" becomes a very trivial task indeed. From an implementation viewpoint, there is
a major difference between a computer and an embedded system. Embedded systems are
often required to provide Real-Time response. The main elements that make embedded
systems unique are its reliability and ease in debugging.

4.2.1 DEBUGGING:

Embedded debugging may be performed at different levels, depending on the


facilities available. From simplest to most sophisticate they can be roughly grouped into
the following areas:

 Interactive resident debugging, using the simple shell provided by the embedded
operating system (e.g. Forth and Basic)
 External debugging using logging or serial port output to trace operation using
either a monitor in flash or using a debug server like the Remedy Debugger which
even works for heterogeneous multi core systems.
 An in-circuit debugger (ICD), a hardware device that connects to the
microprocessor via a JTAG or Nexus interface. This allows the operation of the
microprocessor to be controlled externally, but is typically restricted to specific
debugging capabilities in the processor.
 An in-circuit emulator replaces the microprocessor with a simulated equivalent,
providing full control over all aspects of the microprocessor.
 A complete emulator provides a simulation of all aspects of the hardware,
allowing all of it to be controlled and modified and allowing debugging on a
normal PC.

EEE Dept Page 45


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

 Unless restricted to external debugging, the programmer can typically load and
run software through the tools, view the code running in the processor, and start
or stop its operation. The view of the code may be as assembly code or source-
code.

Because an embedded system is often composed of a wide variety of elements,


the debugging strategy may vary. For instance, debugging a software(and
microprocessor) centric embedded system is different from debugging an embedded
system where most of the processing is performed by peripherals (DSP, FPGA, co-
processor). An increasing number of embedded systems today use more than one single
processor core. A common problem with multi-core development is the proper
synchronization of software execution. In such a case, the embedded system design may
wish to check the data traffic on the busses between the processor cores, which requires
very low-level debugging, at signal/bus level, with a logic analyzer, for instance.
4.2.2 RELIABILITY:

Embedded systems often reside in machines that are expected to run continuously
for years without errors and in some cases recover by themselves if an error occurs.
Therefore the software is usually developed and tested more carefully than that for
personal computers, and unreliable mechanical moving parts such as disk drives,
switches or buttons are avoided.
Specific reliability issues may include:

 The system cannot safely be shut down for repair, or it is too inaccessible to
repair. Examples include space systems, undersea cables, navigational beacons,
bore-hole systems, and automobiles.
 The system must be kept running for safety reasons. "Limp modes" are less
tolerable. Often backups are selected by an operator. Examples include aircraft
navigation, reactor control systems, safety-critical chemical factory controls, train
signals, engines on single-engine aircraft.

EEE Dept Page 46


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

 The system will lose large amounts of money when shut down: Telephone
switches, factory controls, bridge and elevator controls, funds transfer and market
making, automated sales and service.

A variety of techniques are used, sometimes in combination, to recover from errors—


both software bugs such as memory leaks, and also soft errors in the hardware:

 Watchdog timer that resets the computer unless the software periodically notifies
the watchdog

 Subsystems with redundant spares that can be switched over to


 software "limp modes" that provide partial function
 Designing with a Trusted Computing Base (TCB) architecture[6] ensures a highly
secure & reliable system environment
 An Embedded Hypervisor is able to provide secure encapsulation for any
subsystem component, so that a compromised software component cannot
interfere with other subsystems, or privileged-level system software. This
encapsulation keeps faults from propagating from one subsystem to another,
improving reliability. This may also allow a subsystem to be automatically shut
down and restarted on fault detection.
 Immunity Aware Programming

4.3 EXPLANATION OF EMBEDDED SYSTEMS

4.3.1 SOFTWARE ARCHITECTURE:

There are several different types of software architecture in common use.

EEE Dept Page 47


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

 Simple Control Loop:

In this design, the software simply has a loop. The loop calls subroutines, each of
which manages a part of the hardware or software.

 Interrupt Controlled System:

Some embedded systems are predominantly interrupting controlled. This means


that tasks performed by the system are triggered by different kinds of events. An interrupt
could be generated for example by a timer in a predefined frequency, or by a serial port
controller receiving a byte. These kinds of systems are used if event handlers need low
latency and the event handlers are short and simple.

Usually these kinds of systems run a simple task in a main loop also, but this task
is not very sensitive to unexpected delays. Sometimes the interrupt handler will add
longer tasks to a queue structure. Later, after the interrupt handler has finished, these
tasks are executed by the main loop. This method brings the system close to a
multitasking kernel with discrete processes.

 Cooperative Multitasking:

A non-preemptive multitasking system is very similar to the simple control loop


scheme, except that the loop is hidden in an API. The programmer defines a series of
tasks, and each task gets its own environment to “run” in. When a task is idle, it calls an
idle routine, usually called “pause”, “wait”, “yield”, “nop” (stands for no operation),
etc.The advantages and disadvantages are very similar to the control loop, except that
adding new software is easier, by simply writing a new task, or adding to the queue-
interpreter.

 Primitive Multitasking:

In this type of system, a low-level piece of code switches between tasks or threads
based on a timer (connected to an interrupt). This is the level at which the system is

EEE Dept Page 48


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

generally considered to have an "operating system" kernel. Depending on how much


functionality is required, it introduces more or less of the complexities of managing
multiple tasks running conceptually in parallel.

As any code can potentially damage the data of another task (except in larger
systems using an MMU) programs must be carefully designed and tested, and access to
shared data must be controlled by some synchronization strategy, such as message
queues, semaphores or a non-blocking synchronization scheme.

Because of these complexities, it is common for organizations to buy a real-time


operating system, allowing the application programmers to concentrate on device
functionality rather than operating system services, at least for large systems; smaller
systems often cannot afford the overhead associated with a generic real time system, due
to limitations regarding memory size, performance, and/or battery life.

 Microkernels And Exokernels:

A microkernel is a logical step up from a real-time OS. The usual arrangement is


that the operating system kernel allocates memory and switches the CPU to different
threads of execution. User mode processes implement major functions such as file
systems, network interfaces, etc.

In general, microkernels succeed when the task switching and intertask


communication is fast, and fail when they are slow. Exokernels communicate efficiently
by normal subroutine calls. The hardware and all the software in the system are available
to, and extensible by application programmers. Based on performance, functionality,
requirement the embedded systems are divided into three categories:

4.3.2 STAND ALONE EMBEDDED SYSTEM:

These systems takes the input in the form of electrical signals from transducers or
commands from human beings such as pressing of a button etc.., process them and
EEE Dept Page 49
Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

produces desired output. This entire process of taking input, processing it and giving
output is done in standalone mode. Such embedded systems comes under stand alone
embedded systems

Eg: microwave oven, air conditioner etc..

4.3.3 REAL-TIME EMBEDDED SYSTEMS:

Embedded systems which are used to perform a specific task or operation in a


specific time period those systems are called as real-time embedded systems. There are
two types of real-time embedded systems.

 Hard Real-time embedded systems:

These embedded systems follow an absolute dead line time period i.e.., if the
tasking is not done in a particular time period then there is a cause of damage to the entire
equipment.

Eg: consider a system in which we have to open a valve within 30 milliseconds. If


this valve is not opened in 30 ms this may cause damage to the entire equipment. So in
such cases we use embedded systems for doing automatic operations.

 Soft Real Time embedded systems:

These embedded systems follow a relative dead line time period i.e.., if the task is not
done in a particular time that will not cause damage to the equipment.

Eg: Consider a TV remote control system ,if the remote control takes a few milliseconds
delay it will not cause damage either to the TV or to the remote control. These systems which will
not cause damage when they are not operated at considerable time period those systems comes
under soft real-time embedded systems.

4.3.4 NETWORK COMMUNICATION EMBEDDED SYSTEMS:

EEE Dept Page 50


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

A wide range network interfacing communication is provided by using embedded


systems.

Eg:

 Consider a web camera that is connected to the computer with internet can be
used to spread communication like sending pictures, images, videos etc.., to
another computer with internet connection throughout anywhere in the world.

 Consider a web camera that is connected at the door lock.

Whenever a person comes near the door, it captures the image of a person and
sends to the desktop of your computer which is connected to internet. This gives an
alerting message with image on to the desktop of your computer, and then you can open
the door lock just by clicking the mouse.

Fig 4.2: Network communication embedded systems

4.3.5 DIFFERENT TYPES OF PROCESSING UNITS :

EEE Dept Page 51


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

The central processing unit (c.p.u) can be any one of the following microprocessor,
microcontroller, digital signal processing.

 Among these Microcontroller is of low cost processor and one of the main
advantage of microcontrollers is, the components such as memory, serial
communication interfaces, analog to digital converters etc.., all these are built on a
single chip. The numbers of external components that are connected to it are very
less according to the application.

 Microprocessors are more powerful than microcontrollers. They are used in major
applications with a number of tasking requirements. But the microprocessor
requires many external components like memory, serial communication, hard
disk, input output ports etc.., so the power consumption is also very high when
compared to microcontrollers.

 Digital signal processing is used mainly for the applications that particularly
involved with processing of signals

4.4 APPLICATIONS F EMBEDDED SYSTEMS

4.4.1 CONSUMER APPLICATIONS:

At home we use a number of embedded systems which include microwave oven,

Fig4.3: Automatic coffee makes equipment

EEE Dept Page 52


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

4.4.2 OFFICE AUTOMATION:

We use systems like fax machine, modem, printer etc…

Fig4.4Fax machine Fig4.5: Printing machine

4.4.3 INDUSTRIAL AUTOMATION:

Today a lot of industries are using embedded systems for process control. In
industries we design the embedded systems to perform a specific operation like
monitoring temperature, pressure, humidity ,voltage, current etc.., and basing on these
monitored levels we do control other devices, we can send information to a centralized
monitoring station.

Fig4.6: Robot

EEE Dept Page 53


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

In critical industries where human presence is avoided there we can use robots
which are programmed to do a specific operation.

4.4.4 COMPUTER NETWORKING:

Embedded systems are used as bridges routers etc..

Fig4.7: Computer networking

4.4.5 TELE COMMUNICATIONS:

Cell phones, web cameras etc.

Fig4.8: Cell Phone Fig4.9:Web camera

EEE Dept Page 54


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

CHAPTER-5

SOFTWARE EXPLANATION

Introduction

This project is implemented using following software’s:

 Express PCB – for designing circuit

 Arduino IDE compiler - for compilation part

 Proteus 7 (Embedded C) – for simulation part


5.1 The Interface
When a project is first started you will be greeted with a yellow outline. This yellow
outline is the dimension of the PCB. Typically after positioning of parts and traces,
move them to their final position and then crop the PCB to the correct size. However, in
designing a board with a certain size constraint, crop the PCB to the correct size before
starting.

Fig: 5.1 Tool bar necessary for the interface


The select tool: It is fairly obvious what this does. It allows you to move and manipulate
parts. When this tool is selected the top toolbar will show buttons to move traces to the
top / bottom copper layer, and rotate buttons.

The zoom to selection tool: does just that.

The place pad: button allows you to place small soldier pads which are useful for
board connections or if a part is not in the part library but the part dimensions are
available. When this tool is selected the top toolbar will give you a large selection of
round holes, square holes and surface mount pads

EEE Dept Page 55


Solar Powered Smart E-Vehicles with Road Safety Using Eyeblink And
Over IOT

The place component: tool allows you to select a component from the top toolbar and then by
clicking in the workspace places that component in the orientation chosen using the buttons next to
the component list. The components can always be rotated afterwards with the select tool if the
orientation is wrong.

The place trace: tool allows you to place a solid trace on the board of varying thicknesses. The
top toolbar allows you to select the top or bottom layer to place the trace on.

The Insert Corner in trace: button does exactly what it says. When this tool is selected, clicking
on a trace will insert a corner which can be moved to route around components and other traces.

The remove a trace button is not very important since the delete key will achieve the same result.

5.2 Design Considerations:


Before starting a project there are several ways to design a PCB and one must be chosen to suit the
project’s needs. Single sided, or double sided.When making a PCB you have the option of making
a single sided board, or a double sided board. Single sided boards are cheaper to produce and
easier to etch, but much harder to design for large projects. If a lot of parts are being used in a
small space it may be difficult to make a single sided board without jumpering over traces with a
cable. While there’s technically nothing wrong with this, it should be avoided if the signal
travelling over the traces is sensitive (e.g. audio signals).

A double sided board is more expensive to produce professionally, more difficult to etch on a DIY
board, but makes the layout of components a lot smaller and easier. It should be noted that if a
trace is running on the top layer, check with the components to make sure you can get to its pins
with a soldering iron. Large capacitors, relays, and similar parts which don’t have axial leads can
NOT have traces on top unless boards are plated professionally.

EEE Dept Page 56


Solar Powered Smart E-Vehicles with Road Safety Using Eyeblink And
Over IOT

5.3 AURDINO COMPILING

Step 1:Download Aurdino Software

Step 2:In next step download library

EEE Dept Page 57


Solar Powered Smart E-Vehicles with Road Safety Using Eyeblink And
Over IOT

Step 3:As Arduino doesn’t recognize the directory name, please rename it

Step 4: Launch Arduino by double click “Arduino” below

EEE Dept Page 58


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

One example:

Select the target board as “Arduino Uno”:

Click Sketch-> Verify/Compile:

EEE Dept Page 59


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

EEE Dept Page 60


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

CHAPTER-6

EXPLANATION OF RESULT AND ANALYSIS

Recently there has been an enormous increase in road accidents due to sleep
deprivation resulting to driver fatigue. The driver loses control of the vehicle when he
falls asleep which leads to loss of many lives. The driver is not able to control his vehicle
when he is asleep and by the time he realizes it, there is an accident. The vehicle is at a
very high speed on highways due to which handling is tough. The Purpose of such a
model is to advance a system to detect fatigue symptoms in drivers and control the speed
of vehicle to avoid accidents. The main components of the system consists of an eye
blink sensor for driver blink acquisition and an adaptive speed controller designed using
DC motor by providing pulse width modulation to control the speed of vehicle.

By using non-conventional solar source we are feeding battery and by using


alcohol detector we are detecting the alcohol consumption of the driver. If alcohol
detector senses the alcohol level, then the vehicle restricts to certain speed limit mode,
otherwise it operates in normal mode. Now by using the eye-blink sensor, we are
detecting the drowsiness of the driver by eye closures per minute and the obstacle sensor
detects the vehicles in the path of parking and the vehicle gets automatically parked,
when the driver was unable to control the vehicle by turning ON the LED lights.

EEE Dept Page 61


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

CASE STUDIES:

Without IOT

With alcohol sensor With eyeblink sensor Condition of motor in


electrical vehicle
Off Off Motor rotates

With IOT

With alcohol sensor With eyeblink sensor Condition of motor in


electrical vehicle
On On Motor does not rotates due
to fail in breaking system

With multiple IOT

With two alcohol sensors With two eyeblink sensors Condition of two motors in
electrical vehicle
On On Motors does not rotates due
to fail in breaking systems

CHAPTER-7

CONCLUSION AND FUTURE SCOPE


EEE Dept Page 62
Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

CONCLUSION:

This is because of the fact that the driver is not able to control his vehicle when he
is asleep and by the time he realizes it, there is an accident. The vehicle is at a very high
speed on highways due to which handling is tough and getting the vehicle to halt in such
a condition is difficult. Due to this many automobile companies are trying to research
onto how an accident which occurs due to driver fatigue can be prevented. In this project
we will generate a model which can prevent such an incident. The Purpose of such a
model is to advance a system to detect fatigue symptoms in drivers and control the speed
of vehicle to avoid accidents. The main components of the system consists of an eye
blink sensor for driver blink acquisition and an adaptive speed controller designed using
DC motor by providing pulse width modulation to control the speed of vehicle. Advanced
technology offers some hope to avoid these accidents up to some extent. So, we as an
engineer need to take some action against this and provide the desired solution. For the
safety of the human being some automation is made. In this paper by using some high
quality sensors, which helps in manipulating cause of accidents. This report consist of
different applications combined together to fulfill the safety precautions. We
experimented this application to provide the prevention of accident due to drowsiness of
the driver and disturbing intruders. We have made the vehicle and driver secure against
such severe problems.

FUTURE SCOPE:

In future mostly camera with used detection of drowsiness of the driver and inform to
authority peoples based on OPEN CV methodology. Usage of this method to all kinds of
road transportation

REFERENCES

EEE Dept Page 63


Solar Powered Smart E-Vehicles with Road Safety Using
Eyeblink And Over IOT

1) Y. Nishida, S. Murakami, H. Toshi, H. Mizoguchi “Minimally privacy-Violative


system for Locating Human by ultrasonic Radar Embedded on ceiling”, in
proceedings of 2004 IEEE International conference on systems, man and
cybernetics(SMC ’04), PP 1549-1554, October 2004.

2) T. Hori, Y. Nishida, S. Murakami, H. Aizawa, H. Mizoguchi “Distributed Sensor


Network for a Home for the Aged,” in Proceedings of 2004 IEEE International
Conference on System, Man Cybernetics (SMC ’04), pp.1577-1582, October
2004.

3) S. Murakami, Y. Nishida, T. Hori, H. Mizoguchi, Bg Detecting Human Head


Location Using a Simply Installed Ultrasonic Radar System, h in proceedings of
the 22nd Annual Conference of the Robotics Society of Japan, 1A23(1)-
(2),September 2004.

EEE Dept Page 64

You might also like