Merged Merged
Merged Merged
Merged Merged
BACHELOR OF TECHNOLOGY
IN
Professor
DEPARTMENT OF
ECE
CERTIFICATE
This is to certify that the Project Report entitled “AN AUTOMATIC DRIVER
DROWSINESS ALERT SYSTEM BY USING GSM” is being submitted by P. NAVYA
SRI(19A31B0419), A.HARSHISAI(19A31B0403), N.PRASANNAKUMAR(19A31B0453),
T. SAITRINADH (19A31B0463), K. TRINADHKUMAR (19A31B0446) in partial fulfilment
for the award of the Degree of Bachelor of Technology in Electronics & Communication
Engineering of Pragati Engineering College, for the record of bonafide work carried out by
them.
We express our thanks to project guide Dr.D.NATARAJ, Professor of Electronics and Communication
Engineering, who deserves a special note of thanks and gratitude, for having extended their fullest co-
cooperation and guidance, without this, the project would never have materialized.
We express our deep sense of gratitude to Dr.S.KOTESWARI, Head of the Department of Electronics and
Communication Engineering, for having shown keen interest at every stage of the development of our
project work and for guiding us in every aspect.
We wish to express our special thanks to our beloved Dr.K.SATYANARAYANA, Principal for giving
guidelines and encouragement.
We wish to express our special thanks to our beloved Dr.S.SAMBHU PRASAD, Director-Academics for
giving guidelines and knowledge throughout the curriculum.
We wish to express sincere gratitude to our beloved and respected Dr. P.Krishna Rao, Chairman, and
Sri.M.V.Haranatha Babu, Director (Management), and Sri.M.Satish, Vice-President for their
encouragement and blessing.
We are thankful to all our faculty members of the department for their valuable suggestions. Our sincere
thanks are also extended to all the teaching and non-teaching staff of Pragati Engineering College.
LIST OF TABLES 4
LIST OF FIGURES 26
ABSTRACT
4.2 Transformer 16
4.3 Diode 16
4.23 Cells 48
4.24 Modem 50
Our project is about making cars more intelligent and interactive which may notify or resist users under
unacceptable conditions, they may provide critical information in real-time situations to rescue or police or the
owner himself. Driver fatigue resulting from sleep deprivation or sleep disorders is an important factor in the
increasing number of accidents on today's roads. In this project, we describe a real-time safety prototype that
controls vehicle speed under driver fatigue. The purpose of such a model is to advance a system to detect fatigue
Drowsy is the reason for m road accidents. Manually tracing the drowsiness of the driver is not an
easy task, orders every day thousands of vehicles are running on the roads. So we need a system that must come
with every car and if it detects the sleepy driver it must stop the vehicle immediately. In addition to this if the
driver is sleeping the vehicle will be stopped. In case of an emergency SMS will be sent to the appropriate
person.
\
MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO
CHAPTER 1
EMBEDDED SYSTEMS
However, some low-end consumer products use very inexpensive microprocessors and limited
storage, with the application and operating system both part of a single program. The program
is written permanently into the system's memory in this case, rather than being loaded into
RAM (random access memory), as programs on a personal computer are.
1.2. CHARACTERISTICS OF EMBEDDED SYSTEM
• Speed (bytes/sec): Should be high speed
• Power (watts): Low power dissipation
• Size and weight: As far as possible small in size and low weight
• Accuracy (%error): Must be very accurate
• Adaptability: High adaptability and accessibility
• Reliability: Must be reliable over a long period of time
etc). These microprocessors contain no RAM, no ROM, and no I/O ports on the chip itself. For
this reason, they are commonly referred to as general-purpose Microprocessors.
In many applications, for example, a TV remote control, there is no need for the
computing power of a 486 or even an 8086 microprocessor. These applications most often
require some I/O operations to read signals and turn on and off certain bits
In an Embedded system, there is only one application software that is typically burned into
ROM. An x86 PC contains or is connected to various embedded products such as a keyboard,
printer, modem, disk controller, sound card, CD-ROM drives, mouse, and so on. Each one of
these peripherals has a Microcontroller inside it that performs only one task.
CHAPTER 2
INTRODUCTION TO PROJECT
2.1.INTRODUCTION
This project is about making cars more intelligent and interactive which may notify or resist
users under unacceptable conditions, they may provide critical information about real-time
situations to rescue or police or the owner himself. Driver fatigue resulting from sleep
today's roads. In this project, we describe a real-time safety prototype that controls vehicle
speed under driver fatigue. The purpose of such a model is to advance a system to detect fatigue
symptoms in drivers and control the speed of the vehicles to avoid accidents.
Drowsy is the reason for most road accidents. Manually tracing the drowsiness of the driver is
not an easy task, because every day thousands of vehicles are running on the roads. So we need
a system that must come with every car and if it detects a sleepy driver it must stop the vehicle
immediately. In addition to this if the driver is sleeping the vehicle will be stopped. In case of
GSM
Eye Blink
Sensor ARDUINO
DC
UNO ULN 2003
MOTOR
BUZZER
CHAPTER 3
ARDUINO UNO
3.1 Microcontroller:
3.1.1 Introduction:
A microcontroller as the name suggests is a small controller. They are like single-chip
computers that are often embedded into other systems to function as processing/controlling
units. For example, the control you are using probably has microcontrollers inside that do
decoding and other controlling functions. They are also used in automobiles, washing
machines, microwaves ovens, toys….etc, where automation is needed.
3.1.2 Arduino Uno Microcontroller:
The Arduino Uno is a microcontroller board based on the ATmega328 (datasheet). It has 14
digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz
crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button. It
contains everything needed to support the microcontroller; simply connect it to a computer
with a USB cable or power it with an AC-to-DC adapter or battery to get started.
The Uno differs from all preceding boards in that it does not use the FTDI USB-to serial driver
chip. Instead, it features the Atmega8U2 programmed as a USB-to-serial converter. "Uno"
means "One" in Italian and is named to mark the upcoming release of Arduino 1.0. The Uno
and version 1.0 will be the reference versions of Arduino, moving forward. The Uno is the
latest in a series of USB Arduino boards, and the reference model for the Arduino platform; for
a comparison with previous versions, see the index of Arduino boards.
The Arduino Uno can be powered via a USB connection or with an external power supply. The
power source is selected automatically. External (non-USB) power can come either from an
AC-to-DC adapter (wall-wart) or a battery. The adapter can be connected by plugging a 2.1mm
center-positive plug into the board's power jack. Leads from the battery can be inserted in the
Gnd and Vin pin headers of the POWER connector. The board can operate on an external
supply of 6 to 20 volts. If supplied with less than 7V, however, the 5Vpin may supply less than
five volts and the board may be unstable. If using more than 12V, the voltage regulator may
overheat and damage the board. The recommended range is 7 to 12 volts The power pins are
as follows:·
• VIN. The input voltage to the Arduino board when it's using an external power source
(as opposed to 5 volts from the USB connection or other regulated power source). You
can supply voltage through this pin, or, if supplying voltage via the power jack, access
it through this pin.·
• 5V. The regulated power supply is used to power the microcontroller and other
components on the board. This can come either from VIN via an onboarded regulator,
or be supplied by USB or another regulated 5V supply.
• 3.3V.A 3.3-volt supply is generated by the onboard regulator. The maximum current
draw is 50 mA.
• GND. Ground pins.
Memory:
The Atmega328 has 32 KB of flash memory for storing code (of which 0,5 KB is used for the
bootloader); Ithas also 2 KB of SRAM and 1 KB of EEPROM (which can be read and written
with the EEPROM library).
Input and Output:
Each of the 14 digital pins on the Uno can be used as an input or output, using
pinMode(),digitalWrite(), and digitalRead() functions. They operate at 5 volts. Each pin can
provide or receive a maximum of 40 mA and has an internal pull-up resistor (disconnected by
default) of 20-50 kOhms. In addition, some pins have specialized functions:
• Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data.
These pins are connected to the corresponding pins of the ATmega8U2 USB-to-TTL
Serial chip.
• External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on
a low value, arising or falling edge, or a change in value. See the attached Interrupt()
function for details.
• PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite()
function.
• SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI
communication, which although provided by the underlying hardware, is not currently
included in the Arduino language.
• LED: 13. There is a built-in LED connected to digital pin 13. When the pin is HIGH
value, the LED is on, when the pin is LOW, it's off.
The Uno has 6 analog inputs, each of which provides 10 bits of resolution (i.e. 1024 different
values). By defaultault they measure from ground to 5 volts, though is it possible to change the
upper end of their range using the AREF pin and the analogReference() function? Additionally,
some pins have specialized functionality:
• I2C: 4 (SDA) and 5 (SCL). Support I2C (TWI) communication using the Wire library.
There are a couple of other pins on the board:
• AREF. Reference voltage for the analog inputs. Used with analogReference().
• Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset
button to shields that block the one on the board.
Communication:
The Arduino Uno has a number of facilities for communicating with a computer, another
Arduino, or other microcontrollers. The ATmega328 provides UART TTL (5V) serial
communication, which is available on digital pins 0 (RX) and 1 (TX). An ATmega8U2 on the
board channels this serial communication over USB and appears as a virtual com port to
software on the computer. The '8U2 firmware uses the standard USB COM drivers, and no
external driver is needed. However, on Windows, a *.inf file is required. The Arduino software
includes a serial monitor which allows simple textual data to be sent to and from the Arduino
board. The RX and TX LEDs on the board will flash when data is being transmitted via the
USB-to-serial chip and USB connection to the computer (but not for serial communication on
pins 0 and 1). A SoftwareSerial library allows for serial communication on any of Uno's digital
pins. The ATmega328 also supports I2C (TWI) and SPI communication. The Arduino software
includes a Wire library to simplify the use of the I2C bus
3.1.3 ARDUINO UNO BOARD:
The Arduino Uno is a microcontroller board based on the ATmega328. It has 14 digital
input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz ceramic
resonator, a USB connection, a power jack, an ICSP header, and a reset button. It contains
everything needed to support the microcontroller; simply connect it to a computer with a USB
cable or power it with an AC-to-DC adapter or battery to get started.
in the Gnd and Vin pin headers of the POWER connector. The board can operate on an
external supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may
supply less than five volts and the board may be unstable. If using more than 12V, the voltage
regulator may overheat and damage the board. The recommended range is 7 to 12 volts.
1.USB Interface:
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
2.External power supply:
Arduino boards can be powered directly from the AC mains power supply by connecting it
to the power supply (Barrel Jack)
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.17.Arduino Reset:
It can reset your Arduino board, i.e., start your program from the beginning. It 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).
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:
The Arduino UNO board has five 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 Ardsuino 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.
The Atmega8U2 programmed as a USB-to-serial converter. "Uno" means "One" in Italian
and is named to mark the upcoming release of Arduino 1.0. The Uno and version 1.0 will be
the reference versions of Arduino, moving forward. The Uno is the latest in a series of USB
Arduino boards, and the reference model for the Arduino platform; for a comparison with
previous versions, see the index of Arduino boards
should be connected to VCC through a low-pass filter. Note that PC[6:4] use digital supply
voltage, VCC.
AREF: AREF is the analog reference pin for the A/D Converter.
ADC [7:6] (TQFP and VFQFN Package Only): In the TQFP and VFQFN package,
ADC[7:6] serve as analog inputs to the A/D converter. These pins are powered from the
analog supply and serve as 10-bit ADC channels.
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: 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
pinsworking.
CHAPTER 4
HARDWARE COMPONENTS
Figure.4.1.power supply
4.1.1.Transformer:
Transformer is a static device used to convert the voltage from one level to another level
without change its frequency. There are two types of transformers
1. Step-up transformer
2. Step-down transformer
Step-up transformer converts low voltage level into high voltage level without change its
frequency.
Step-down transformer converts high voltage level into low voltage level without change its
frequency.
In this project we using step-down transformer which converts 230V AC to 12V AC [or]
230V AC to 5V as shown below.
Figure.4.2.Transformers
4.1.2.Diodes:
Diodes allow electricity to flow in only one direction. The arrow of the circuit symbol
shows the direction in which the current can flow. Diodes are the electrical version
of a valve and early diodes were actually called valves.
is that there will be a voltage loss of around 0.7V. In the opposite direction, the
diode is said to be 'reverse-biased' and no current will flow through it.
4.1.3.Rectifier
The purpose of a rectifier is to convert an AC waveform into a DC waveform (OR)
Rectifier converts AC current or voltages into DC current or voltage. There are two
different rectification circuits, known as 'half-wave' and 'full-wave' rectifiers. Both
use components called diodes to convert AC into DC.
The Half-wave Rectifier
The half-wave rectifier is the simplest type of rectifier since it only uses one diode,
as shown in figure.
Figure.4.5Half-Wave Rectification
While the output of the half-wave rectifier is DC (it is all positive), it would not be
suitable as a power supply for a circuit. Firstly, the output voltage continually varies
between 0V and Vs-0.7V, and secondly, for half the time there is no output at all.
The Full-wave Bridge Rectifier
The circuit in figure 3 addresses the second of these problems since at no time is
the output voltage 0V. This time four diodes are arranged so that both the positive
and negative parts of the AC waveform are converted to DC. The resulting
waveform is shown in figure 4.
4.1.4.Capacitor Filter
The capacitor-input filter, also called "Pi" filter due to its shape that looks like the Greek
letterpi, is a type of electronic filter. Filter circuits are used to remove unwanted or undesired
frequencies from a signal.
A typical capacitor input filter consists of a filter capacitor C1, connected across the rectifier
output. The capacitor C1 offers low reactance to the AC component of the rectifier output
while it offers infinite reactance to the DC component. As a result the AC components are
going to ground. At that time DC components are feed to Regulator.
4.1.5.Voltage Regulator:
A voltage regulator is an electrical regulator designed to automatically maintain a constant
voltage level. It may use an electromechanical mechanism, or passive or active electronic
components. Depending on the design, it may be used to regulate one or more AC or DC
voltages. There are two types of regulator are they.
• Positive Voltage Series (78xx) and
• Negative Voltage Series (79xx)
78xx:’78’ indicate the positive series and ‘xx’ indicates the voltage rating. Suppose 7805
produces the maximum 5V.’05’indicates the regulator output is 5V.
79xx:’78’ indicate the negative series and ‘xx’ indicates the voltage rating. Suppose 7905
produces the maximum -5V.’05’indicates the regulator output is -5V.
Figure.4.9.Regulator
ULN2003
The ULN2003 is a monolithic high voltage and high current Darlington transistor arrays. It
consists of seven NPN darlington pairs that features high-voltage outputs with common-
cathode clamp diode for switching inductive loads. The darlington pairs may be paralleled
for higher current capability. Each channel rated at 500mA and can withstand peak currents
of 600mA. Suppression diodes are included for inductive load driving and the inputs are
pinned opposite the outputs to simplify board layout.
FEATURES:
1. Seven Darlington’s per package
2. Output current 500mA per driver (600mApeak)
3. Output voltage 50 V
4. Integrated suppression diodes for inductive loads
5. Outputs can be paralleled for higher current
6. TTL/CMOS/PMOS/DTL Compatible inputs
7. Inputs pinned opposite outputs to simplify layout
8. Relay driver application
LOGIC DIAGRAM:
IR SENSOR
IR technology is used in daily life and also in industries for different purposes. For example,
TVs use an Isensor to understand the signals which are transmitted from a remote control. The
main benefits of IR sensors are low power usage, their simple design & their convenient
features. IR signals are not noticeable by the human eye. The IR radiation in
the electromagnetic spectrum can be found in the regions of the visible & microwave.
Usually, the wavelengths of these waves range from 0.7 µm 5 to 1000µm. The IR spectrum
can be divided into three regions like near-infrared, mid, and far-infrared. The near IR region’s
wavelength ranges from 0.75 – 3µm, the mid-infrared region’s wavelength ranges from 3 to
6µm & the far IR region’s infrared radiation’s wavelength is higher than 6µm.
What is an IR Sensor/Infrared Sensor?
An infrared sensor is an electronic device that emits in order to sense some aspects of the
surroundings. An IR sensor can measure the heat of an object as well as detects the motion.
These types of sensors measure only infrared radiation, rather than emitting it that is called
a passive IR sensor. Usually, in the infrared spectrum, all the objects radiate some form of
thermal radiation.
Working Principle
The working principle of an infrared sensor is similar to the object detection sensor. This
sensor includes an IR LED & an IR Photodiode, so by combining these two can be formed as
a photo-coupler otherwise optocoupler. The physics laws used in this sensor are planks
radiation, Stephan Boltzmann &weins displacement.
IR LED is one kind of transmitter that emits IR radiations. This LED looks similar to a
standard LED and the radiation which is generated by this is not visible to the human eye.
Infrared receivers mainly detect the radiation using an infrared transmitter. These infrared
receivers are available in photodiodes form. IR Photodiodes are dissimilar as compared with
usual photodiodes because they detect simply IR radiation. Different kinds of infrared
receivers mainly exist depending on the voltage, wavelength, package, etc.
Once it is used as the combination of an IR transmitter & receiver, then the receiver’s
wavelength must equal the transmitter. Here, the transmitter is IR LED whereas the receiver
is IR photodiode. The infrared photodiode is responsive to the infrared light that is generated
through an infrared LED. The resistance of photo-diode & the change in output voltage is in
proportion to the infrared light obtained. This is the IR sensor’s fundamental working
principle.
Once the infrared transmitter generates emission, then it arrives at the object & some of the
emission will reflect back toward the infrared receiver. The sensor output can be decided by
the IR receiver depending on the intensity of the response.
Infrared sensors are classified into two types like active IR sensor and passive IR sensor.
Active IR Sensor
This active infrared sensor includes both the transmitter as well as the receiver. In most of the
applications, the light-emitting diode is used as a source. LED is used as a non-imaging
infrared sensor whereas the laser diode is used as an imaging infrared sensor.
These sensors work through energy radiation, received & detected through radiation. Further,
it can be processed by using the signal processor to fetch the necessary information. The best
examples of this active infrared sensor are reflectance and break beam sensor.
Passive IR Sensor
The passive infrared sensor includes detectors only but they don’t include a transmitter. These
sensors use an object like a transmitter or IR source. This object emits energy and detects
through infrared receivers. After that, a signal processor is used to understand the signal to
obtain the required information.
The best examples of this sensor are pyro electric detector, bolometer, thermocouple-
thermopile, etc. These sensors are classified into two types like thermal IR sensor and
quantum IR sensor. The thermal IR sensor doesn’t depend on wavelength. The energy source
used by these sensors is heated. Thermal detectors are slow with their response and detection
time. The quantum IR sensor depends on the wavelength and these sensors include high
response and detection time. These sensors need regular cooling for specific measurements.
An infrared sensor circuit is one of the basic and popular sensor modules in an electronic
device. This sensor is analogous to human’s visionary senses, which can be used to detect
obstacles and it is one of the common applications in real-time. This circuit comprises the
following components
• LM358 IC 2 IR transmitter and receiver pair
• Resistors of the range of kilo-ohms.
• Variable resistors.
• LED (Light Emitting Diode).
In this project, the transmitter section includes an IR sensor, which transmits continuous IR
rays to be received by an IR receiver module. An IR output terminal of the receiver varies
depending upon its receiving of IR rays. Since this variation cannot be analyzed as such,
therefore this output can be fed to a comparator circuit. Here an operational amplifier (op-
amp) of LM 339 is used as a comparator circuit.
When the IR receiver does not receive a signal, the potential at the inverting input goes higher
than that non-inverting input of the comparator IC (LM339). Thus the output of the
comparator goes low, but the LED does not glow. When the IR receiver module receives a
signal to the potential at the inverting input goes low. Thus the output of the comparator (LM
339) goes high and the LED starts glowing.
Resistor R1 (100 ), R2 (10k ), and R3 (330) are used to ensure that a minimum of 10 mA
current passes through the IR LED Devices like Photodiode and normal LEDs respectively.
Resistor VR2 (preset=5k ) is used to adjust the output terminals. Resistor VR1 (preset=10k )
is used to set the sensitivity of the circuit Diagram. Read more about IR sensors.
The circuit diagram of the IR sensor using transistors namely obstacle detection using two
transistors is shown below. This circuit is mainly used for obstacle detection using an IR LED.
So, this circuit can be built with two transistors like NPN and PNP. For NPN, BC547 transistor
is used whereas, for PNP, BC557 transistor is used. The pin out of these transistors is the
same.
In the above circuit, one infrared LED is always switched on whereas the other infrared LED
is allied to the PNP transistor’s base terminal because this IR LED acts as the detector. The
required components of this IR sensor circuit include resistors 100 ohms & 200 ohms, BC547
& BC557 transistors, LED, IR LEDs-2. The step by step procedure of how to make the IR
sensor circuit includes the following steps.
• Connect the components as per the circuit diagram using required components
• Connect one infrared LED to the BC547 transistor’s base terminal
• Connect an infrared LED to the base terminal of the same transistor.
• Connect the 100Ω resistor toward the residual pins of the infrared LEDs.
• Connect the base terminal of the PNP transistor toward the collector terminal of the NPN
transistor.
• Connect the LED & 220Ω resistor as per the connection in the circuit diagram.
• Once the connection of the circuit is done then gives the power supply to the circuit for
testing.
Circuit Working
Once the infrared LED is detected, then the reflected light from the thing will activate a small
current that will supply throughout the IR LED detector. This will activate the NPN transistor
& the PNP; therefore the LED will switch ON. This circuit is applicable for making different
projects like automatic lamps to activate once a person approaches close to the light.
This IR burglar alarm circuit is used at entries, doors, etc. This circuit gives a buzzer sound to
alert the concerned person whenever someone crosses throughout the IR ray. When the IR
rays are not visible to humans, then this circuit works as a hidden safety device.
This circuit can be connected by arranging the infrared LED as well as the infrared sensors on
the door opposite to each other. So that IR ray can fall on the sensor properly. Under normal
conditions, the infrared ray drops always over the infrared diode & the output condition at
pin-3 will stay in the low condition.
This ray will be interrupted once a solid object crosses the ray. When the IR ray smashes, the
circuit will activate & the output turns to ON condition. The output condition remains till it
retunes by shutting the switch that means, when the interrupt of the ray is detached then an
alarm remains ON. To avoid others from deactivating the alarm, the circuit or reset switch
must be located distant or out of sight from the infrared sensor. In this circuit, a ‘B1’ buzzer
is connected to produce sound with an inbuilt sound and this inbuilt sound can be replaced
with an alternative bells otherwise loud siren based on the requirement.
Advantages
IR sensors are classified into different types depending on the applications. Some of the typical
applications of different types of sensors. The speed sensor is used for synchronizing the
speed of multiple motors. The temperature sensor is used for industrial temperature
control. PIR sensor is used for an automatic door opening system and the Ultrasonic sensor is
used for distance measurement.
IR sensors are used in various Sensor based projects and also in various electronic devices
which measures the temperature that is discussed below.
Radiation Thermometers
IR sensors are used in radiation thermometers to measure the temperature depend upon the
temperature and the material of the object and these thermometers have some of the following
features
Flame Monitors
These types of devices are used for detecting the light emitted from the flames and to monitor
how the flames are burning. The Light emitted from flames extend from UV to IR region
types. PBS, PbSe, Two-colour detector, pyro electric detector are some of the commonly
employed detectors used in flame monitors.
Moisture Analysers
Moisture analysers use wavelengths that are absorbed by the moisture in the IR region. Objects
are irradiated with light having these wave lengths(1.1 µm, 1.4 µm, 1.9 µm, and 2.7µm) and
also with reference wavelengths.
The Lights reflected from the objects depend upon the moisture content and are detected by
the analyzer to measure moisture (ratio of reflected light at these wavelengths to the reflected
light at reference wavelength). In GaAs PIN photodiodes, Pbs photoconductive detectors are
employed in moisture analyser circuits.
Gas Analyzers
IR sensors are used in gas analyzers that use the absorption characteristics of gases in the IR
region. Two types of methods are used to measure the density of gas such as dispersive and
nondispersive.
Dispersive: An Emitted light is spectro scopically divided and their absorption characteristics
are used to analyze the gas ingredients and the sample quantity.
Non dispersive: It is the most commonly used method and it uses absorption characteristics
without dividing the emitted light. Non dispersive types use discrete optical bandpass filters,
similar to sunglasses that are used for eye protection to filter out unwanted UV radiation.
This type of configuration is commonly referred to as non-dispersive infrared (NDIR)
technology. This type of analyzer is used for carbonated drinks, whereas a non-dispersive
analyzer is used in most of the commercial IR instruments, for automobile exhaust gas fuel
leakages.
IR Imaging Devices
IR image device is one of the major applications of IR waves, primarily by virtue of its
property that is not visible. It is used for thermal imagers, night vision devices, etc.
For example, Water, rocks, soil, vegetation, and atmosphere, and human tissue all feature emit
IR radiation. The Thermal infrared detectors measure these radiations in the IR range and map
the spatial temperature distributions of the object/area on an image. Thermal imagers usually
composed of an Sb (indium antimonite), Gd Hg (mercury-doped germanium), Hg Cd Te
(mercury-cadmium-telluride) sensors.
The key applications of the infrared sensors mainly include the following.
• Meteorology
• Climatology
• Photo-bio modulation
• Analysis of Water
• Gas detectors
• Testing of Anesthesiology
• Exploration of Petroleum
• Safety of Rail
Specifications:
Buzzer-Audio Indication
Digital systems and microcontroller pins lack sufficient current to drive the circuits like relays,
buzzer circuits etc. While these circuits require around 10milli amps to be operated, the
microcontroller’s pin can provide a maximum of 1-2milli amps current. For this reason, a driver
such as a power transistor is placed in between the microcontroller and the buzzer circuit.
Fig : Buzzer
The input to the base of the transistor is applied from the microcontroller pin. The transistor
will be switched on when the base to emitter voltage is greater than 0.7V (cut-in voltage). Thus
when the voltage applied to the microcontroller pin is high i.e., buzzer_pin =1 (>0.7V), the
When the voltage at the buzzer pin is low i.e., P1.0=0 (<0.7V) the transistor will be in off state
and the buzzer will be OFF. Thus the transistor acts like a current driver to operate the
buzzer_accordingly.
4.3 DC MOTOR
Introduction:
H-Bridge Theory:
An H-Bridge is an electronic circuit which enables a voltage to be applied across a load in either
direction. These circuits are often used in robotics and other applications to allow DC motors
to run forwards and backwards. Hbridges are available as integrated circuits, or can be built
from discrete components
Let's start with the name, H-bridge. Sometimes called a "full bridge" the Hbridge is so named
because it has four switching elements at the "corners" of the H and the motor forms the cross
bar. The basic bridge is shown in the figure to the right.
The key fact to note is that there are, in theory, four switching elements within the bridge. These
four elements are often called, high side left, high side right, low side right, and low side left
(when traversing in clockwise order).
The switches are turned on in pairs, either high left and lower right, or lower left and high right,
but never both switches on the same "side" of the bridge. If both switches on one side of a
bridge are turned on it creates a short circuit between the battery plus and battery minus
terminals. This phenomena is called shoot through in the Switch-Mode Power Supply (SMPS)
literature. If the bridge is sufficiently powerful it will absorb that load and your batteries will
simply drain quickly. Usually however the switches in question melt.
To power the motor, you turn on two switches that are diagonally opposed. In the picture to the
right, imagine that the high side left and low side right switches are turned on. The current flow
is shown in green.
The current flows and the motor begins to turn in a "positive" direction. What happens if you
turn on the high side right and low side left switches? You guessed it, current flows the other
direction through the motor and the motor turns in the opposite direction.
4.5 GSM
GSM networks operate in a number of different frequency ranges (separated into GSM
frequency ranges for 2G and UMTS frequency bands for 3G). Most 2G GSM networks operate
in the 900 MHz or 1800 MHz bands. Some countries in the Americas (including Canada and
the United States) use the 850 MHz and 1900 MHz bands because the 900 and 1800 MHz
frequency bands were already allocated. Most 3G GSM networks in Europe operate in the 2100
MHz frequency band. The rarer 400 and 450 MHz frequency bands are assigned in some
countries where these frequencies were previously used for first-generation systems. GSM-900
uses 890–915 MHz to send information from the mobile station to the base station (uplink) and
935–960 MHz for the other direction (downlink), providing 124 RF channels (channel numbers
1 to 124) spaced at 200 kHz. Duplex spacing of 45 MHz is used. In some countries the GSM-
900 band has been extended to cover a larger frequency range. This 'extended GSM', E-GSM,
uses 880–915 MHz (uplink) and 925–960 MHz (downlink), adding 50 channels (channel
numbers 975 to 1023 and 0) to the original GSM-900 band.
Time division multiplexing is used to allow eight full-rate or sixteen half-rate speech channels
per radio frequency channel. There are eight radio timeslots (giving eight burst periods)
grouped into what is called a TDMA frame. Half rate channels use alternate frames in the same
timeslot. The channel data rate for all 8 channels is 270.833 Kbit/s, and the frame duration is
4.615 ms.
The transmission power in the handset is limited to a maximum of 2 watts in GSM850/900 and
1 watt in GSM1800/1900. GSM operates in the 900MHz and 1.8GHz bands in Europe and the
1.9GHz and 850MHz bands in the US. The 850MHz band is also used for GSM and 3G in
Australia, Canada and many South American countries. By having harmonized spectrum across
most of the globe, GSM’s international roaming capability allows users to access the same
services when travelling abroad as at home. This gives consumers seamless and same number
connectivity in more than 218 countries.
Terrestrial GSM networks now cover more than 80% of the world’s population. GSM satellite
roaming has also extended service access to areas where terrestrial coverage is not available.
• AMPS (Advanced Mobile Phone System), which appeared in 1976 in the United States,
was the first cellular network standard. It was used primarily in the Americas, Russia
and Asia. This first-generation analog network had weak security mechanisms which
allowed hacking of telephones.
• TACS (Total Access Communication System) is the European version of the AMPS
model. Using the 900 MHz frequency band, this system was largely used in England
and then in Asia (Hong Kong and Japan).
• ETACS (Extended Total Access Communication System) is an improved version of
the TACS standard developed in the United Kingdom that uses a larger number of
communication channels.
The first-generation cellular networks were made obsolete by the appearance of an entirely digital
second generation.
2G
The second generation of mobile networks marked a break with the first generation of cellular
telephones by switching from analogue to digital. The main 2G mobile telephony standards are:
• GSM (Global System for Mobile Communications) is the most commonly used standard
in Europe at the end of the 20th century and was supported in the United States. This
standard uses the 900 MHz and 1800 MHz frequency bands in Europe. In the United
States, however, the frequency band used is the 1900 MHz band. Portable telephones
that are able to operate in Europe and the United States are therefore called tri-band.
• CDMA (Code Division Multiple Access) uses a spread spectrum technique that allows
a radio signal to be broadcast over a large frequency range.
• TDMA (Time Division Multiple Access) uses a technique of time division of
communication channels to increase the volume of data transmitted simultaneously.
TDMA technology is primarily used on the American continent, in New Zealand, and
in the Asia-Pacific region.
With the 2G networks, it is possible to transmit voice and low-volume digital data, for
example text messages (SMS, for Short Message Service) or multimedia messages (MMS,for
Multimedia Message Service). The GSM standard allows a maximum data rate of 9.6 kbps.
Extensions have been made to the GSM standard to improve throughput. One of these
is the GPRS (General Packet Radio System) service which allows theoretical data rates on the
order of 114 Kbit/s but with throughput closer to 40 Kbit/s in practice. As this technology does
not fit within the "3G" category, it is often referred to as 2.5G
The EDGE (Enhanced Data Rates for Global Evolution) standard, billed as 2.75G, quadruples
the throughput improvements of GPRS with its theoretical data rate of 384 Kbps, thereby
allowing the access for multimedia applications. In reality, the EDGE standard allows
maximum theoretical data rates of 473 Kbit/s, but it has been limited in order to comply with
the IMT-2000 (International Mobile Telecommunications-2000) specifications from the ITU
(International Telecommunications Union).
3G
The IMT-2000 (International Mobile Telecommunications for the year 2000) specifications
from the International Telecommunications Union (ITU) defined the characteristics of 3G
(third generation of mobile telephony). The most important of these characteristics are:
• High transmission data rate.
• 144 Kbps with total coverage for mobile use.
• 384 Kbps with medium coverage for pedestrian use.
• 2 Mbps with reduced coverage area for stationary use.
• World compatibility.
• Compatibility of 3rd generation mobile services with second generation networks.
3G offers data rates of more than 144 Kbit/s, thereby allowing the access to multimedia uses
such as video transmission, video-conferencing or high-speed internet access. 3G networks use
different frequency bands than the previous networks: 1885-2025 MHz and 2110-2200 MHz.
The main 3G standard used in Europe is called UMTS (Universal Mobile Telecommunications
System) and uses WCDMA (Wideband Code Division Multiple Access) encoding. UMTS
technology uses 5 MHz bands for transferring voice and data, with data rates that can range
from 384 Kbps to 2 Mbps. HSDPA (High Speed Downlink Packet Access) is a third generation
mobile telephony protocol, (considered as "3.5G"), which is able to reach data rates on the
order of 8 to 10 Mbps. HSDPA technology uses the 5 GHz frequency band and uses WCDMA
encoding.
❖ INTRODUCTION TO THE GSM STANDARD
The GSM (Global System for Mobile communications) network is at the start of the 21st
century, the most commonly used mobile telephony standard in Europe. It is called as Second
Generation (2G) standard because communications occur in an entirely digital mode, unlike
the first generation of portable telephones. When it was first standardized in 1982, it was called
as Group Special Mobile and later, it became an international standard called "Global System
for Mobile communications" in 1991.
In Europe, the GSM standard uses the 900 MHz and 1800 MHz frequency bands. In the United
States, however, the frequency band used is the 1900 MHz band. For this reason, portable
telephones that are able to operate in both Europe and the United States are called tri-band
while those that operate only in Europe are called bi-band.
The GSM standard allows a maximum throughput of 9.6 kbps which allows transmission of
voice and low-volume digital data like text messages (SMS, for Short Message Service) or
multimedia messages (MMS, for Multimedia Message Service).
GSM Standards
GSM uses narrowband TDMA, which allows eight simultaneous calls on the same radio
frequency. There are three basic principles in multiple access, FDMA (Frequency Division
Multiple Access), TDMA (Time Division Multiple Access), and CDMA (Code Division
Multiple Access). All three principles allow multiple users to share the same physical channel.
But the two competing technologies differ in the way user sharing the common resource.
TDMA allows the users to share the same frequency channel by dividing the signal into
different time slots. Each user takes turn in a round robin fashion for transmitting and receiving
over the channel. Here, users can only transmit in their respective time slot.
CDMA uses a spread spectrum technology that is it spreads the information contained in a
particular signal of interest over a much greater bandwidth than the original signal.
Unlike TDMA, in CDMA several users can transmit over the channel at the same time.
TDMA in brief:
In late1980’s, as a search to convert the existing analog network to digital as a means to improve
capacity, the cellular telecommunications industry association chose TDMA over FDMA. Time
Division Multiplex Access is a type of multiplexing where two or more channels of information
are transmitted over the same link by allocating a different time interval for the transmission of
each channel. The most complex implementation using
TDMA principle is of GSM’s (Global System for Mobile communication). To reduce the effect
of co-channel interference, fading and multipath, the GSM technology can use frequency
hopping, where a call jumps from one channel to another channel in a short interval.
TDMA systems still rely on switch to determine when to perform a handoff. Handoff occurs
when a call is switched from one cell site to another while travelling. The TDMA handset
constantly monitors the signals coming from other sites and reports it to the switch without
caller’s awareness. The switch then uses this information for making better choices for handoff
at appropriate times. TDMA handset performs hard handoff, i.e., whenever the user moves
from one site to another, it breaks the connection and then provides a new connection with the
new site.
Advantages of TDMA:
There are lots of advantages of TDMA in cellular technologies.
• It can easily adapt to transmission of data as well as voice communication.
• It has an ability to carry 64 kbps to 120 Mbps of data rates. This allows the operator to
do services like fax, voice band data and SMS as well as bandwidth intensive
application such as multimedia and video conferencing.
• Since TDMA technology separates users according to time, it ensures that there will
be no interference from simultaneous transmissions.
• It provides users with an extended battery life, since it transmits only portion of the
time during conversations. Since the cell size grows smaller, it proves to save base
station equipment, space and maintenance.
TDMA is the most cost effective technology to convert an analog system to digital.
Disadvantages of TDMA:
One major disadvantage using TDMA technology is that the users has a predefined time slot.
When moving from one cell site to other, if all the time slots in this cell are full the user might
be disconnected. Likewise, if all the time slots in the cell in which the user is currently in are
already occupied, the user will not receive a dial tone.
The second problem in TDMA is that it is subjected to multipath distortion. To overcome this
distortion, a time limit can be used on the system. Once the time limit is expired, the signal is
ignored.
❖ THE CONCEPT OF CELLULAR NETWORK
Mobile telephone networks are based on the concept of cells, circular zones that overlap to cover
a geographical area.
Figure.4.23. Cells
Cellular networks are based on the use of a central transmitter-receiver in each cell, called a
"base station" (or Base Transceiver Station, written BTS). The smaller the radius of a cell, the
higher is the available bandwidth. So, in highly populated urban areas, there are cells with a
radius of a few hundred meters, while huge cells of up to 30 kilometers provide coverage in
rural areas.
In a cellular network, each cell is surrounded by 6 neighboring cells (thus a cell is generally
drawn as a hexagon). To avoid interference, adjacent cells cannot use the same frequency. In
practice, two cells using the same frequency range must be separated by a distance of two to
three times the diameter of the cell.
❖ ARCHITECTURE OF THE GSM NETWORK
In a GSM network, the user terminal is called a mobile station. A mobile station is made up of
a SIM (Subscriber Identity Module) card allowing the user to be uniquely identified and a
mobile terminal. The terminals (devices) are identified by a unique 15-digit identification
number called IMEI (International Mobile Equipment Identity). Each SIM card also has a
unique (and secret) identification number called IMSI (International Mobile Subscriber
Identity). This code can be protected using a 4-digit key called a PIN code.
The SIM card therefore allows each user to be identified independently of the terminal used
during communication with a base station. Communications occur through a radio link (air
interface) between a mobile station and a base station.
All the base stations of a cellular network are connected to a base station controller (BSC)
which is responsible for managing the distribution of the resources. The system consisting of
the base station controller and its connected base stations is called the Base Station Subsystem
(BSS).
Finally, the base station controllers are themselves physically connected to the Mobile
Switching Centre (MSC), managed by the telephone network operator, which connects them to
the public telephone network and the Internet. The MSC belongs to a Network Station
Subsystem (NSS), which is responsible for managing user identities, their location and
establishment of communications with other subscribers. The MSC is generally connected to
databases that provide additional functions:
• The Home Location Register (HLR) is a database containing information
(geographic position, administrative information etc.) of the subscribers
registered in the area of the switch (MSC).
• The Visitor Location Register (VLR) is a database containing information of
users other than the local subscribers. The VLR retrieves the data of a new user
from the HLR of the user's subscriber zone. The data is maintained as long as
the user is in the zone and is deleted when the user leaves or after a long period
of inactivity (terminal off).
• The Equipment Identify Register (EIR) is a database listing the mobile
terminals.
• The Authentication Centre (AUC) is responsible for verifying user identities.
• The cellular network formed in this way is designed to support mobility via
management of handovers (movements from one cell to another).
Finally, GSM networks support the concept of roaming i.e., movement from one operator
network to another.
❖ INTRODUCTION TO MODEM
rate, the faster the data can be sent and received. It should be noted that the data
cannot be received at a faster rate than it is being sent.
• Voice/data: Many modems support a switch to change between voice and data
modes. In data mode, the modem acts like a regular modem. In voice mode, the
modem acts like a regular telephone. Modems that support a voice/data switch
have a built-in loudspeaker and microphone for voice communication.
• Auto-answer: An auto-answer modem enables the computer to receive calls in
the absence of the operator.
• Data compression: Some modems perform data compression, which enables
them to send data at faster rates. However, the modem at the receiving end must
be able to decompress the data using the same compression technique.
• Flash memory: Some modems come with flash memory rather than
conventional ROM which means that the communications protocols can be
easily updated if necessary.
• Fax capability: Most modern modems are fax modems, which mean that they
can send and receive faxes.
GSM Modem:
A GSM modem is a wireless modem that works with a GSM wireless network. A wireless
modem behaves like a dial-up modem. The main difference between them is that a dial-up
modem sends and receives data through a fixed telephone line while a wireless modem sends
and receives data through radio waves.
A GSM modem can be an external device or a PC Card / PCMCIA Card. Typically, an external
GSM modem is connected to a computer through a serial cable or a USB cable. A GSM modem
in the form of a PC Card / PCMCIA Card is designed for use with a laptop computer. It should
be inserted into one of the PC Card / PCMCIA Card slots of a laptop computer. Like a GSM
mobile phone, a GSM modem requires a SIM card from a wireless carrier in order to operate.
The number of SMS messages that can be processed by a GSM modem per minute is very low
i.e., about 6 to 10 SMS messages per minute.
Introduction to AT Commands
AT commands are instructions used to control a modem. AT is the abbreviation of ATtention.
Every command line starts with "AT" or "at". That's the reason, modem commands are called
AT commands. Many of the commands that are used to control wired dial-up modems, such as
ATD (Dial), ATA (Answer), ATH (Hook control) and ATO (Return to online data state) are
also supported by GSM modems and mobile phones.
Besides this common AT command set, GSM modems and mobile phones support an AT
command set that is specific to the GSM technology, which includes SMS-related commands
like AT+CMGS (Send SMS message), AT+CMSS (Send SMS message from storage),
AT+CMGL (List SMS messages) and AT+CMGR (Read SMS messages).
It should be noted that the starting "AT" is the prefix that informs the modem about the start of
a command line. It is not part of the AT command name. For example, D is the actual AT
command name in ATD and +CMGS is the actual AT command name in AT+CMGS.
Some of the tasks that can be done using AT commands with a GSM modem or mobile phone
are listed below:
• Get basic information about the mobile phone or GSM modem. For example, name of
manufacturer (AT+CGMI), model number (AT+CGMM), IMEI number (International
Mobile Equipment Identity) (AT+CGSN) and software version (AT+CGMR).
• Get basic information about the subscriber. For example, MSISDN (AT+CNUM) and
IMSI number (International Mobile Subscriber Identity) (AT+CIMI).
• Get the current status of the mobile phone or GSM/GPRS modem. For example, mobile
phone activity status (AT+CPAS), mobile network registration status (AT+CREG),
radio signal strength (AT+CSQ), battery charge level and battery charging status
(AT+CBC).
• Establish a data connection or voice connection to a remote modem (ATD, ATA, etc).
Send and receive fax (ATD, ATA, AT+F*).
• Send (AT+CMGS, AT+CMSS), read (AT+CMGR, AT+CMGL), write (AT+CMGW)
or delete (AT+CMGD) SMS messages and obtain notifications of newly received SMS
messages (AT+CNMI).
• Read (AT+CPBR), write (AT+CPBW) or search (AT+CPBF) phonebook entries.
• Perform security-related tasks, such as opening or closing facility locks (AT+CLCK),
checking whether a facility is locked (AT+CLCK) and changing
passwords(AT+CPWD).
(Facility lock examples: SIM lock [a password must be given to the SIM card every
time the mobile phone is switched on] and PH-SIM lock [a certain SIM card is
associated with the mobile phone. To use other SIM cards with the mobile phone, a
password must be entered.])
• Control the presentation of result codes / error messages of AT commands. For
example, the user can control whether to enable certain error messages (AT+CMEE)
and whether error messages should be displayed in numeric format or verbose format
(AT+CMEE=1 or AT+CMEE=2).
• Get or change the configurations of the mobile phone or GSM/GPRS modem. For
example, change the GSM network (AT+COPS), bearer service type (AT+CBST),
radio link protocol parameters (AT+CRLP), SMS center address (AT+CSCA) and
storage of SMS messages (AT+CPMS).
• Save and restore configurations of the mobile phone or GSM/GPRS modem. For
example, save (AT+CSAS) and restore (AT+CRES) settings related to SMS messaging
such as the SMS center address.
It should be noted that the mobile phone manufacturers usually do not implement all AT
commands, command parameters and parameter values in their mobile phones. Also, the
behavior of the implemented AT commands may be different from that defined in the standard.
In general, GSM modems, designed for wireless applications, have better support of AT
commands than ordinary mobile phones.
Sometimes the user may want to know whether an SMS message has reached the
recipient mobile phone successfully. To get this information, you need to set a flag in the SMS
message to notify the SMS center that a status report is required about the delivery of this SMS
message. The status report is sent to the user mobile in the form of an SMS message.
A mobile phone should have a menu option that can be used to set whether the status
report feature is on or off. After setting it, the mobile phone will set the corresponding flag in
the outbound SMS messages for you automatically. The status report feature is turned off by
default on most mobile phones and GSM modems.
3. Message Submission Reports
After leaving the mobile phone, an SMS message goes to the SMS center. When it
reaches the SMS center, the SMS center will send back a message submission report to the
mobile phone to inform whether there are any errors or failures (e.g. incorrect SMS message
format, busy SMS center, etc). If there is no error or failure, the SMS center sends back a
positive submission report to the mobile phone. Otherwise it sends back a negative submission
report to the mobile phone. The mobile phone may then notify the user that the message
submission was failed and what caused the failure.
If the mobile phone does not receive the message submission report after a period of
time, it concludes that the message submission report has been lost. The mobile phone may
then send the SMS message again to the SMS center. A flag will be set in the new SMS message
to inform the SMS center that this SMS message has been sent before. If the previous message
submission was successful, the SMS center will ignore the new SMS message but send back a
message submission report to the mobile phone. This mechanism prevents the sending of the
same SMS message to the recipient multiple times.
Sometimes the message submission report mechanism is not used and the
acknowledgement of message submission is done in a lower layer.
4. .Message Delivery Reports
After receiving an SMS message, the recipient mobile phone will send back a message
delivery report to the SMS center to inform whether there are any errors or failures (example
causes: unsupported SMS message format, not enough storage space, etc). This process is
transparent to the mobile user. If there is no error or failure, the recipient mobile phone sends
back a positive delivery report to the SMS center. Otherwise it sends back a negative delivery
report to the SMS center.
If the sender requested a status report earlier, the SMS center sends a status report to the
sender when it receives the message delivery report from the recipient.If the SMS center does
not receive the message delivery report after a period of time, it concludes that the message
delivery report has been lost. The SMS center then ends the SMS message to the recipient for
the second time.
Sometimes the message delivery report mechanism is not used and the
acknowledgement of message delivery is done in a lower layer.
CHAPTER 5
SOFTWARES
Void Loop ( )
{
// rest of the code
}
Boolean:
A Boolean holds one of two values, true or false. Each Boolean variable occupies one
byte of memory.
Example:
Boolean state= false ; // declaration of variable with type boolean and initialize it with false.
Boolean state = true ; // declaration of variable with type boolean and initialize it with false.
Char:A data type that takes up one byte of memory that stores a character value. Character
literals are written in single quotes like this: 'A' and for multiple characters, strings use double
quotes: "ABC".
However, characters are stored as numbers. You can see the specific encoding in the ASCII
chart. This means that it is possible to do arithmetic operations on characters, in whichthe
ASCII value of the character is used. For example, 'A' + 1 has the value 66, since theASCII
value of the capital letter A is 65.
Example:
Char chr_a = ‘a’ ;//declaration of variable with type char and initialize it with character a.
Char chr_c = 97 ;//declaration of variable with type char and initialize it with character 97
Unsigned char:
Unsigned char is an unsigned data type that occupies one byte of memory. The unsigned char
data type encodes numbers from 0 to 255.
Example:
Unsigned Char chr_y = 121 ; // declaration of variable with type Unsigned char and initialize
it with character y Byte:
A byte stores an 8-bit unsigned number, from 0 to 255.
Example:
byte m = 25 ;//declaration of variable with type byte and initialize it with 25 int:
Integers are the primary data-type for number storage. int stores a 16-bit (2-byte) value. This
yields a range of -32,768 to 32,767 (minimum value of -2^15 and a maximum value of (2^15)
- 1).
The int size varies from board to board. On the Arduino Due, for example, an int stores
a 32-bit (4-byte) value. This yields a range of -2,147,483,648 to 2,147,483,647 (minimum value
of -2^31 and a maximum value of (2^31) - 1).
Example:
int counter = 32 ;// declaration of variable with type int and initialize it with 32.
Unsigned int:
Unsigned ints (unsigned integers) are the same as int in the way that they store a 2 byte value.
Instead of storing negative numbers, however, they only store positive values, yielding a useful
range of 0 to 65,535 (2^16) - 1). The Due stores a 4 byte (32-bit) value, ranging from 0 to
4,294,967,295 (2^32 - 1).
Example:
Unsigned int counter= 60 ; // declaration of variable with type unsigned int and initialize it
with 60.
Word:
On the Uno and other ATMEGA based boards, a word stores a 16-bit unsigned number. On
the Due and Zero, it stores a 32-bit unsigned number. Example word w = 1000 ;//declaration
of variable with type word and initialize it with 1000.
Long:
Long variables are extended size variables for number storage, and store 32 bits (4 bytes), from
2,147,483,648 to 2,147,483,647.
Example:
Long velocity= 102346 ;//declaration of variable with type Long and initialize it with
102346
Unsigned long:Unsigned long variables are extended size variables for number storage and
store 32 bits (4 bytes). Unlike standard longs, unsigned longs will not store negative numbers,
making their range from 0 to 4,294,967,295 (2^32 - 1).
Example:
Unsigned Long velocity = 101006 ;// declaration of variable with type Unsigned Long and
initialize it with 101006.
Short:
A short is a 16-bit data-type. On all Arduinos (ATMega and ARM based), a short stores a 16-
bit (2-byte) value. This yields a range of -32,768 to 32,767 (minimum value of 2^15 and a
maximum value of (2^15) - 1).
You can get different versions of Arduino IDE from the Download page on the Arduino
Official website. You must select your software, which is compatible with your operating
system (Windows, IOS, or Linux). After your file download is complete, unzip the file.
To open an existing project example, select File -> Example -> Basics -> Blink.
PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 62
MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO
Here, we are selecting just one of the examples with the name Blink. It turns the LED
on and off with some time delay. You can select any other example from the list.
Step 6: Select your Arduino board.
To avoid any error while uploading your program to the board, you must select the correct Arduino
board name, which matches with the board connected to your computer. Go to Tools -> Board and
select your board
Here, we have selected Arduino Uno board according to our tutorial, but you must select
the name matching the board that you are using Step 7: Select your serial port.
Select the serial device of the Arduino board. Go to Tools ->Serial Port menu. This is
likely to be COM3 or higher (COM1 and COM2 are usually reserved for hardware serial ports).
To find out, you can disconnect your Arduino board and re-open the menu, the entry that
disappears should be of the Arduino board. Reconnect the board and select that serial port.
Step 8: Upload the program to your board.Before explaining how we can upload our
program to the board, we must demonstrate the function of each symbol appearing in the
Arduino IDE toolbar.
• Setup( ) function
• Loop( ) function
Void setup ( )
{
}
PURPOSE:
The setup() function is called when a sketch starts. Use it to initialize the variables, pin modes,
start using libraries, etc. The setup function will only run once, after each power up or reset of
the Arduino board.
INPUT
OUTPUT
RETURN
Void Loop ( )
{
PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 67
MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO
PURPOSE:
After creating a setup() function, which initializes and sets the initial values, the loop()
function does precisely what its name suggests, and loops secutively, allowing your program
to change and respond. Use it to activelycontrol the Arduino board.
INPUT
OUTPUT
RETURN
SOURCE CODE:
#include <SoftwareSerial.h>
SoftwareSerial gsm(9, 10);
void setup()
{
Serial.begin(9600);
gsm.begin(9600);
pinMode(EB, INPUT);
pinMode(motor, OUTPUT);
pinMode(buz, OUTPUT);
digitalWrite(motor, LOW);
digitalWrite(buz, LOW);
gsm.println("AT+CMGF=1");
delay(1000);
gsm.println("AT+CNMI=2,2,0,0,0"); //ECHO
delay(2000);
}
void loop()
{
int EB_val = digitalRead(EB);
delay(100);
if (EB_val == 0)
{
digitalWrite(motor, LOW);
digitalWrite(buz, HIGH);
delay(500);
digitalWrite(buz, LOW);
gsm.print("AT+CMGS=\"+919703042936\"\r");
delay(1000);
gsm.println("Driver getting Sleep..");
delay(100);
gsm.write(0x1A);
delay(1000);
}
else if (EB_val == 1)
{
digitalWrite(motor, HIGH);
digitalWrite(buz, LOW);
}
}
CHAPTER 6
RESULTS
6.1. RESULTS
Photocopy of project
7.SCHEMATIC DIAGRAM
8.FLOWCHART
START
INITIALIZE ALL
THE INPUT AND
OUTPUT DEVICES
YES
IF IR
VALUE IS
VALID
NO
DRIVER IS
NOT STEADY MOTOR
RUNS
TURN OFF THE
MOTOR
BUZER ON
END
9.WORKING
1) we connect all the components as per the block and circuit diagrams.
2)First, we switch on the power supply. Then 230 V of supply is given from the
transformer to the power supply board.
3)From the power supply board, power is transmitted to GSM and AURDINO
boards.
4)we see that the power indicators of the supply ,GSM and AURDINO boards are
ON, indicating that the supply is available.
5)Now,the driver has to wear the Eye blink sensor spectacles.
6)The IR sensor detects the movement of the eye lids.
7)We observe that, as long as the driver opens his eyes, the motor runs as usual.
8)If the driver closes his eye lid,
9)The sensor detects the movement and sends the signal to the ULN and GSM
10)Now, The ULN turns the motor OFF.
11)The GSM sends a warning message to the driver that the motor is off and
vehicle is stopped due to his drowsiness.
12)Again,when the driver is alert , the motor starts running.
13)In this way, our project,”AN AUTOMATIC DRIVER DROWSINESS
ALERTING SYSTEM BY USING GSM”,alerts the driver whenever he is drowsy.
CHAPTER 10
10.1ADVANTAGES:
• Security
• Record driving data
• Analyse the accident detail
• Send location of car and its maintenance to base station through GPS and
GSM technique
• Sense gas and fuel leakage
• Detect if drivers are drunk or not
• Detect if the driver is feeling sleepy
10.2 DISADVANTAGES:
10.3 APPLICATIONS:
CHAPTER 11
11.1. CONCLUSION
Thus the “Automatic Driver Alerting System by using GSM” has been designed and
tested successfully. It has been developed by integrated features of all the hardware components
used. Presence of every module has been reasoned out and placed carefully, thus contributing
to the best working of the unit. The system has been tested to function automatically. The IR
sensor detects the movement of the eye lids. If the eye lid is detected to be closed, the IR sensor
sends the signal to the microcontroller which triggers the DC motor to turn off . otherwise,the
motor runs successfully . Thus, the functionality of the entire system has been tested thoroughly
and it is said to function successfully.
11.2FUTURE SCOPE
REFERENCES
.
[I] Ralph Oyini M bouna, Seong G. Kong, "Visual Analysis of Eye State and Head Pose for Driver
Alertnes Monitoring" ,IEEE, pp.1462-1469, vo1.14, 2013, USA
[2] Arun Sahayadhas,KennethSundaraj, "Detecting Driver Drowsiness Based on Sensors A
Review",pp.16937- 16953, ISSN 1424-8220, Malaysia 2012
[3] Anirban dasgupta,anjith george,"A Vision Based System For Monitoring The Loss Of
Attention in Automotive Drivers",IEEE Transaction, voI.l4,no.4 2013.
[4] Boon-Giin Lee and Wan-Young Chung, "Driver Alertness Monitoring Using Fusion of Facial
Features and Bio-Signals", IEEE Sensors journal, vol. 12, no. 7,2012
[5] Raoul Lopes, D.J Sanghvi, Aditya Shah,"Drowsiness Detection based on Eye Movement,
Yawn Detection and Head Rotation", Vol. 2, No.6,2012
[6] Artem A. Lenskiy and Jong-Soo Lee, "Driver's Eye Blinking Detection Using Novel Color
and Texture Segmentation Algorithms", International Journal of Control, Automation, and
Systems,pp.3 I 7-327, 2012
[7] Parris, J., et.al, "Face and eye detection on hard datasets," Biometrics (IJCB), International
Joint Conference on , vol., no., pp.l , 1 0 , 11-13 Oct. 2011
[8] X. Xie, R. Sudhakar and H. Zhuang, -RealTime Eye Feature Tracking from a Video Image
Sequence Using Kalman Filter,IIIEEE Transactions on Systems, Man, and Cybernetics, Vol.
25,No.12, pp. 1568-1577, 1995.