Merged Merged

Download as pdf or txt
Download as pdf or txt
You are on page 1of 93

A Project Report on

AN AUTOMATIC DRIVER DROWSINESS ALERT SYSTEM BY USING GSM


Submitted in partial fulfilment of the requirements for the award of the degree of

BACHELOR OF TECHNOLOGY

IN

ELECTRONICS AND COMMUNICATION ENGINEERING


By

P. NAVYA SRI 19A31B0419


A. HARSHITHA 19A31B0403
N. PRASANNA KUMAR 19A31B0453
T.SAI TRINADH 19A31B0463
K. TRINADH KUMAR 19A31B0446

Under the esteemed guidance of

Dr. D. NATARAJ, MTech., Ph.D.

Professor
DEPARTMENT OF
ECE

DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING

PRAGATI ENGINEERING COLLEGE


(Approved by AICTE, Permanently Affiliated to JNTUK, KAKINADA & Accredited by NAAC with ‘A’ Grade)

1-378, A.D.B. Road, Surampalem, Near Peddapuram-533437


2019-2023
PRAGATI ENGINEERING COLLEGE
(Approved by AICTE, Permanently Affiliated to JNTUK, KAKINADA & Accredited by NAAC with an ‘A’ Grade)

1-378, A.D.B. Road, Surampalem, Near Peddapuram – 533437

CERTIFICATE

DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING

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.

Head of the Department: Project Guide:


Dr. S. KOTESWARI Dr. D. NATARAJ
MTech, Ph.D. MTech, Ph.D.
Professor Professor
Department of ECE Department of ECE
ACKNOWLEDGEMENT

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.

P.NAVYA SRI 19A31B0419


A.HARSHITHA 19A31B0403
N.PRASANNA KUMAR 19A31B0453
T.SAI TRINADH 19A31B0463
K.TRINADH KUMAR 19A31B0446
TABLE OF CONTENTS

LIST OF TABLES 4

LIST OF FIGURES 26

ABSTRACT

1. EMBEDDED SYSTEMS 1-4


1.1 Introduction of Embedded Systems 1-2
1.2 Characteristics of Embedded Systems 2
1.3 Applications of Embedded Systems 2
1.4 Micro Controllers vs Micro Processors 3
1.5 Micro Controllers for Embedded Systems 3-4
2. INTRODUCTION TO PROJECT 5-6
2.1 Introduction 5
2.2 Block Diagram 6
3. ARDUINO UNO 7 - 14
3.1 Micro Controller 7 - 14
3.1.1 Introduction 7
3.1.2 ARDUINO UNO Controller 7-9
3.1.3 ARDUINO UNO Board 9 - 14
3.1.3.1 Technical Specifications 10 -12
3.1.3.2 Pin Description 12 -14
4. HARDWARE COMPONENTS 15 - 62
4.1 Power Supply Units 15 - 33
4.1.1 Transformer 15 – 16
4.1.2 Diodes 16
4.1.3 Rectifier 17 - 18
4.1.4 Capacitor Filter 19
4.1.5 Voltage Regulator 20
4.1.6 ULN 2003 22-25

4.1.7 IR SENSOR 25-34


4.1.8 Buzzer 35-36
4.2 DC Motor 37-39
4.3 Images for visual representation 39-41
4.4 GSM 42
4.4.1 Definition of GSM 42 - 56
5. SOFTWARES AND CODING 57 - 70
5.1 Introduction to ARDUINO IDE 57 - 70
5.1.1 ARDUINO Data Types 57 – 72
5.1.2 Source Code 69-70
6. RESULT 71
7. SCHEMATIC DIAGRAM 72
8. FLOWCHART 73
9. WORKING 74
10. ADVANTAGES, DISADVANTAGES AND APPLICATIONS 75
11. CONCLUSION AND FUTURE SCOPE 76
11.1 Conclusion 76
11.2 Future scope 76
References 77
PAPER PUBLICATION CERTIFICATE 79-83
CERTIFICATE
LIST OF FIGURES

Figure No. Description Page No.

2.2 Block Diagram 6

3.1 Arduino UNO Board 10

3.2 Pin Diagram of Arduino UNO 12

4.1 Power Supply 15

4.2 Transformer 16

4.3 Diode 16

4.4 Half Wave Rectifier 17

4.5 Half Wave Rectification 18

4.6 Full Wave Rectifier 19

4.7 Full Wave Rectification 19

4.8 Center Tapped Full Wave Rectifier with 20


Capacitor Filter
4.9 Regulator 21

4.10 Logic Diagram Of ULN 2003 22

4.11 Eye Blink Sensor 26

4.12 Infrared Sensor Circuit Diagram 28

4.13 Infrared Circuit diagram using Transistors 30

4.15 Burglar Alarm Circuit Using IR Sensor 31

4.7.0 Pin Diagram for DC Motor 39


4.7.1 Block Diagram Dc Motor 41

4.22 Time division Multiple Access 47

4.23 Cells 48

4.24 Modem 50

5.1 USB cable 60

6.1 Photo Copy Of Project 71


LIST OF TABLES

Table No. Description Page No.

3.1 Arduino UNO Specifications 10

4.4 Mobile Telephony Standards 43


ABSTRACT

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

symptoms in drivers and control the speed of vehicles to avoid accidents.

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

1.1.INTRODUCTION TO EMBEDDED SYSTEMS


An embedded system is a special-purpose computer system designed to perform one or a few
dedicated functions, sometimes with real-time computing constraints. It is usually embedded
as part of a complete device including hardware and mechanical parts. In contrast, a general-
purpose computer, such as a personal computer, can do many different tasks depending on
programming. Embedded systems have become very important today as they control many of
the common devices we use. Since the embedded system is dedicated to specific tasks, design
engineers can optimize it, reducing the size and cost of the product, or increasing its 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 an exactly defined term, as many systems have some
element of programmability. For example, Handheld computers share some elements with
embedded systems — such as the operating systems and microprocessors which power them
but are not truly embedded systems, because they allow different applications to be loaded and
peripherals to be connected.
An embedded system is a combination of computer hardware and software, either fixed in
capability or programmable, that is specifically designed for a particular kind of application
device. Industrial machines, automobiles, medical equipment, cameras, household appliances,
airplanes, vending machines, and toys (as well as the more obvious cellular phone and PDA)
are among the myriad possible hosts of an embedded system. Embedded systems that are
programmable are provided with a programming interface, and embedded systems
programming is a specialized occupation. Certain operating systems or language platforms are
tailored for the embedded market, such as Embedded Java and Windows XP Embedded.

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 1


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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

1.3. APPLICATIONS OF EMBEDDED SYSTEMS


We are living in the Embedded World. You are surrounded by many embedded products and
your daily life largely depends on the proper functioning of these gadgets. Television, Radio,
CD player in your living room, Washing Machine or Microwave Oven in your kitchen, Card
readers, Access Controllers, and Palm devices in your workspace enable you to do many of
your tasks very effectively. Apart from all these, many controllers embedded in your car take
care of car operations between the bumpers, and most of the time you tend to ignore all these
controllers.

• Robotics: industrial robots, machine tools, Robocop soccer robots


• Automotive: cars, trucks, trains
• Aviation: airplanes, helicopters
• Home and Building Automation
• Aerospace: rockets, satellites
• Energy systems: windmills, nuclear plants
• Medical systems: prostheses, revalidation machine.

1.4.MICROCONTROLLER VERSUS MICROPROCESSOR

What is the difference between a Microprocessor and Microcontroller? By microprocessor is


meant the general purposes Microprocessors such as Intel's X86 family (8086, 80286, 80386,
80486, and the Pentium) or Motorola's 680X0 family (68000, 68010, 68020, 68030, 68040,

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 2


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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.

A system designer using a general-purpose microprocessor such as the Pentium or the


68040 must add RAM, ROM, I/O ports, and timers externally to make them functional.
Although the addition of external RAM, ROM, and I/O ports makes these systems bulkier and
much more expensive, they have the advantage of versatility such that the designer can decide
on the amount of RAM, ROM, and I/O ports needed to fit the task at hand. This is not the case
with Microcontrollers.

A Microcontroller has a CPU (a microprocessor) in addition to a fixed amount of RAM,


ROM, I/O ports, and a timer all on a single chip. In other words, the processor, the RAM, ROM,
I/O ports and the timer are all embedded together on one chip; therefore, the designer cannot
add any external memory, I/O ports, or timer to it. The fixed amount of on chip ROM, RAM,
and number of I/O ports in Microcontrollers makes them ideal for many applications in which
cost and space are critical.

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

1.5.MICROCONTROLLERS FOR EMBEDDED SYSTEMS


In the Literature discussing microprocessors, we often see the term Embedded System.
Microprocessors and Microcontrollers are widely used in embedded system products. An
embedded system product uses a microprocessor (or Microcontroller) to do one task only. A
printer is an example of an embedded system since the processor inside it performs one task
only; namely getting the data and printing it. Contrast this with a Pentium-based PC. A PC can
be used for any number of applications such as a word processor, print server, bank teller
terminal, Video game, network server, or Internet terminal. Software for a variety of
applications can be loaded and run. Of course, the reason a pc can perform myriad tasks is that
it has RAM memory and an operating system that loads the application software into RAM
memory and lets the CPU run it.
In this robot, as the fire sensor senses the fire, it senses the signal to themicrocontroller.

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 3


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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.

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 4


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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

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

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

an emergency SMS will be sent to the appropriate person.

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 5


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

2.2. BLOCK DIAGRAM

Figure.2.1. Block Diagram

GSM

Eye Blink
Sensor ARDUINO
DC
UNO ULN 2003
MOTOR

BUZZER

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 6


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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:·

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 7


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

• 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.

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 8


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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.

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 9


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

Figure 3.1: Arduino uno board


The Uno differs from all preceding boards in that it does not use the FTDI USB-toserial
driver chip. Instead, it features the Atmega16U2 (Atmega8U2 up to version R2)
programmed as a USB-to-serial converters.
3.1.3.1 Technical Specifications:

Table 3.1: Arduino uno specifications


The Arduino Uno can be powered via the USB connection or with an external power supply.
The power source is selected automatically. External (non-USB) power can come either from
an AC-to-DC adapter (wall-wart) or battery. The adapter can be connected by plugging a
2.1mm center-positive plug into the board's power jack. Leads from a battery can be inserted

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 10


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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:

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 11


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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

Figure 3.2: Pin diagram


3.1.3.2 Pin Description:
VCC: Digital supply voltage.
GND:Ground.

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 12


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

Port B (PB[7:0]) XTAL1/XTAL2/TOSC1/TOSC2:


Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit).
The Port B output buffers have symmetrical drive characteristics with both high sink and
source capability. As inputs, Port B pins that are externally pulled low will source current if
the pull-up resistors are activated. The Port B pins are tri-stated when a reset condition
becomes active, even if the clock is not running.
Depending on the clock selection fuse settings, PB6 can be used as input to the inverting
Oscillator amplifier and input to the internal clock operating circuit.
Depending on the clock selection fuse settings, PB7 can be used as output from the inverting
Oscillator amplifier.
If the Internal Calibrated RC Oscillator is used as chip clock source, PB[7:6] is used as
TOSC[2:1] input for the Asynchronous Timer/Counter2 if the AS2 bit in ASSR is set.
Port C (PC[5:0]):
Port C is a 7-bit bi-directional I/O port with internal pull-up resistors (selected for each bit).
The PC[5:0] output buffers have symmetrical drive characteristics with both high sink and
source capability. As inputs,
Port C pins that are externally pulled low will source current if the pull-up resistors are
activated. The Port C pins are tri-stated when a reset condition becomes active, even if the
clock is not running.
PC6/RESET:
If the RSTDISBL Fuse is programmed, PC6 is used as an I/O pin. Note that the electrical
characteristics of PC6 differ from those of the other pins of Port C.
If the RSTDISBL Fuse is unprogrammed, PC6 is used as a Reset input. A low level on this
pin for longer than the minimum pulse length will generate a Reset, even if the clock is not
running. Shorter pulses are not guaranteed to generate a Reset.
Port D (PD[7:0]):
Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each
bit).The Port D output buffers have symmetrical drive characteristics with both high sink
and source capability. As inputs, Port D pins that are externally pulled low will source
current if the pull-up resistors are activated. The Port D pins are tri-stated when a reset
condition becomes active, even if the clock is not running.
AVCC: AVCC is the supply voltage pin for the A/D Converter, PC[3:0], and PE[3:2]. It
should be externally connected to VCC, even if the ADC is not used. If the ADC is used, it

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 13


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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.

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 14


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

CHAPTER 4

HARDWARE COMPONENTS

4.1. POWER SUPPLY UNIT


The power supply for this system is shown below.

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.

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 15


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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.

Figure.4.3. Diode Symbol


A diode is a device which only allows current to flow through it in one direction. In
this direction, the diode is said to be 'forward-biased' and the only effect on the signal

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 16


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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.4Half Wave Rectifier


Figure 2 shows the AC input waveform to this circuit and the resulting output. As
you can see, when the AC input is positive, the diode is forward-biased and lets the
current through. When the AC input is negative, the diode is reverse-biased and
the diode does not let any current through, meaning the output is 0V. Because there
is a 0.7V voltage loss across the diode, the peak output voltage will be 0.7V less
than Vs.

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 17


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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.

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 18


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

Figure.4.6. Full-Wave Rectifier

Figure.4.7. Full-Wave Rectification


When the AC input is positive, diodes A and B are forward-biased, while diodes C
and D are reverse biased. When the AC input is negative, the opposite is true -
diodes C and D are forward-biased, while diodes A and B are reverse-biased.
While the full-wave rectifier is an improvement on the half-wave rectifier, its output
still isn't suitable as a power supply for most circuits since the output voltage still
varies between 0V and Vs-1.4V. So, if you put 12V AC in, you will 10.6V DC out.

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.

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 19


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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.

Figure.4.8.Centered Tapped Full-Wave Rectifier with a Capacitor Filter

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.

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 20


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

These regulators consists the three pins there are


Pin1: It is used for input pin.
Pin2: This is ground pin for regulator
Pin3: It is used for output pin. Through this pin we get the output.

Figure.4.9.Regulator

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 21


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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.

The versions interface to all common logic families:


– ULN2001 (general purpose, DTL, TTL, PMOS, CMOS)
– ULN2002 (14-25V PMOS)
– ULN2003 (5V TTL, CMOS)
– ULN2004 (6-15V CMOS, PMOS)
Applications include relay drivers, hammer drivers, lamp drivers, display drivers (LED gas
discharge),line drivers, and logic buffers. The ULN2003 has a 2.7kW series base resistor for
each darlington pair for operation directly with TTL or 5V CMOS devices.

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 22


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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

SCHEMATIC DIAGRAM OF EACH DARLINGTON:

FIG-4.10 Schematic diagram of a darlington

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 23


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

LOGIC DIAGRAM:

FIG-4.11 Logic diagram of ULN2003


TYPICAL APPLICATION CIRCUITS:

FIG – 4.12a TTL to LOAD

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 24


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

FIG- 4.12b use of pull-up resistor to increase drive current

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

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 25


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

a passive IR sensor. Usually, in the infrared spectrum, all the objects radiate some form of
thermal radiation.

FIG- 4.13 Eye Blink Infrared Sensor


These types of radiations are invisible to our eyes, which can be detected by an infrared sensor.
The emitter is simply an IR LED (Light Emitting Diode) and the detector is simply an IR
photodiode that is sensitive to IR light of the same wavelength as that emitted by the IR LED.
When IR light falls on the photodiode, the resistances and the output voltages will change in
proportion to the magnitude of the IR light received.

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.

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 26


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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.

Types of Infrared Sensor

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

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 27


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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.

IR Sensor Circuit Diagram

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).

FIG-4.14 Infrared Sensor Circuit Diagram

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 28


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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.

IR Sensor Circuit using Transistor

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.

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 29


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

FIG-4.15 Infrared Sensor Circuit using Transistors

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.

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 30


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

Burglar Alarm Circuit using IR Sensor

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.

FIG-4.16 Burglar Alarm Circuit using IR Sensor


The required components of this circuit mainly includes NE555IC, resistors R1 & R2 = 10k
& 560, D1 (IR photodiode), D2 (IR LED), C1 Capacitor (100nF), S1 (push switch), B1
(Buzzer) & 6v DC Supply.

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.

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 31


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

Advantages

The advantages of IR sensor include the following


• It uses less power
• The detection of motion is possible in the presence or absence of light approximately with
equal reliability.
• They do not need contact with the object for detection
• There is no data leakage because of the ray direction
• These sensors are not affected by oxidation & corrosion
• Noise immunity is very strong
Disadvantages

The disadvantages of IR sensor include the following


• Line of sight is required
• Range is limited
• These can be affected by fog, rain, dust, etc
• Less data transmission rate
IR Sensor Applications

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

• Measurement without direct contact with the object


• Faster response
• Easy pattern measurements

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 32


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 33


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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.

An electronic detector is cooled to low temperatures using liquid helium or liquid


nitrogen. Then the Cooling the detectors ensure that the radiant energy (photons) recorded by
the detectors comes from the terrain and not from the ambient temperature of objects within
the scanner itself and IR imaging electronic devices.

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

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 34


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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 operation of this circuit is as follows:

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

transistor will be switched on and thus the buzzer will be ON.

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 35


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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.

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 36


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

4.3 DC MOTOR
Introduction:

A DC motor is designed to run on DC electric power. Two examples of pure DC designs


are Michael Faraday's homopolar motor (which is uncommon), and the ball bearin motor,
which is (so far) a novelty. By far the most common DC motor types are the brushed and
brushless types, which use internal and external commutation respectively to create an
oscillating AC current from the DC source -- so they are not purely DC machines in a strict
sense.

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.

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 37


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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.

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 38


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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.4 VISUAL REPRESENTATION

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 39


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 40


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 41


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

4.5 GSM

4.5.1 DEFINITION OF GSM


GSM (Global System for Mobile communications) is an open, digital cellular technology used
for transmitting mobile voice and data services.
GSM (Global System for Mobile communication) is a digital mobile telephone system that is
widely used in Europe and other parts of the world. GSM uses a variation of Time Division
Multiple Access (TDMA) and is the most widely used of the three digital wireless telephone
technologies (TDMA, GSM, and CDMA). GSM digitizes and compresses data, then sends it
down a channel with two other streams of user data, each in its own time slot. It operates at
either the 900 MHz or 1,800 MHz frequency band. It supports voice calls and data transfer
speeds of up to 9.6 kbit/s, together with the transmission of SMS (Short Message Service).
❖ HISTORY

In 1982, the European Conference of Postal and Telecommunications Administrations (CEPT)


created the Group Special Mobile (GSM) to develop a standard for a mobile telephone system
that could be used across Europe. In 1987, a memorandum of understanding was signed by 13
countries to develop a common cellular telephone system across Europe. Finally the system
created by SINTEF lead by TorleivMaseng was selected.
In 1989, GSM responsibility was transferred to the European Telecommunications Standards
Institute (ETSI) and phase I of the GSM specifications were published in 1990. The first GSM
network was launched in 1991 by Radiolinja in Finland with joint technical infrastructure
maintenance from Ericsson.
By the end of 1993, over a million subscribers were using GSM phone networks being operated
by 70 carriers across 48 countries. As of the end of 1997, GSM service was available in more
than 100 countries and has become the de facto standard in Europe and Asia.
❖ GSM FREQUENCIES

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

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 42


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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.

Table.4.4. Mobile Telephony Standards


1G
The first generation of mobile telephony (written 1G) operated using analogue communications
and portable devices that were relatively large. It used primarily the following standards:

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 43


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

• 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

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 44


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 45


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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.

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 46


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

Figure.4.22. Time Division Multiple Access

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

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 47


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 48


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 49


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

Figure.4.24. Modem Modem


stands for modulator-demodulator.
A modem is a device or program that enables a computer to transmit data over telephone or
cable lines. Computer information is stored digitally, whereas information transmitted over
telephone lines is transmitted in the form of analog waves. A modem converts between these
two forms.
Fortunately, there is one standard interface for connecting external modems to computers called
RS-232. Consequently, any external modem can be attached to any computer that has an RS-
232 port, which almost all personal computers have. There are also modems that come as an
expansion board that can be inserted into a vacant expansion slot. These are sometimes called
onboard or internal modems.
While the modem interfaces are standardized, a number of different protocols for formatting
data to be transmitted over telephone lines exist. Some, like CCITT V.34 are official
standards, while others have been developed by private companies. Most modems have built-
in support for the more common protocols at slow data transmission speeds at least, most
modems can communicate with each other. At high transmission speeds, however, the
protocols are less standardized.
Apart from the transmission protocols that they support, the following characteristics
distinguish one modem from another:
• Bps: How fast the modem can transmit and receive data. At slow rates, modems
are measured in terms of baud rates. The slowest rate is 300 baud (about 25 cps).
At higher speeds, modems are measured in terms of bits per second (bps). The
fastest modems run at 57,600 bps, although they can achieve even higher data
transfer rates by compressing the data. Obviously, the faster the transmission

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 50


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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.

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 51


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

SIM 800 GSM Module


A SIM card contains the following information:
• Subscriber telephone number (MSISDN)
• International subscriber number (IMSI, International Mobile Subscriber Identity)
• State of the SIM card
• Service code (operator)
• Authentication key
• PIN (Personal Identification Code)
• PUK (Personal Unlock Code)
Computers use AT commands to control modems. Both GSM modems and dial-up modems
support a common set of standard AT commands. In addition to the standard AT commands,
GSM modems support an extended set of AT commands. These extended AT commands are
defined in the GSM standards. With the extended AT commands, the following operations can
be performed:
• Reading, writing and deleting SMS messages.
• Sending SMS messages.
• Monitoring the signal strength.
• Monitoring the charging status and charge level of the battery.
• Reading, writing and searching phone book entries.

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

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 52


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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).

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 53


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

(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.

❖ BASIC CONCEPTS OF SMS TECHNOLOGY

1. Validity Period of an SMS Message


An SMS message is stored temporarily in the SMS center if the recipient mobile phone
is offline. It is possible to specify the period after which the SMS message will be deleted from
the SMS center so that the SMS message will not be forwarded to the recipient mobile phone
when it becomes online. This period is called the validity period. A mobile phone should have
a menu option that can be used to set the validity period. After setting it, the mobile phone will
include the validity period in the outbound SMS messages automatically.
2. Message Status Reports

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 54


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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.

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 55


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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.

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 56


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

CHAPTER 5

SOFTWARES

5.1 Introduction to Arduino IDE


Arduino is a prototype platform (open-source) based on easy-to-use hardware and
software. It consists of a circuit board, which can be programmed (referred to as a
microcontroller) and a ready-made software called Arduino IDE (Integrated Development
Environment), which is used to write and upload the computer code to the physical board.
The key features are:
• by sending a set of instructions to the microcontroller on the board via Arduino IDE
(referred to as uploading software).
• Arduino boards are able to read analog or digital input signals from different sensors
and turn it into an output such as activating a motor, turning LED on/off, connect to
the cloud and many other actions.
• You can control your board functions
• Unlike most previous programmable circuit boards, Arduino does not need an extra
piece of hardware (called a programmer) in order to load a new code onto the board.
You can simply use a USB cable.
• Additionally, the Arduino IDE uses a simplified version of C++, making it easier to
learn to program.
• Finally, Arduino provides a standard form factor that breaks the functions of the micro-
controller into a more accessible package.
After learning about the main parts of the Arduino UNO board, we are ready to learn howto set
up the Arduino IDE. Once we learn this, we will be ready to upload our program onthe Arduino
board.
5.1.1 Arduino data types:
Data types in C refers to an extensive system used for declaring variables or functions
of different types. The type of a variable determines how much space it occupies in the storage
and how the bit pattern stored is interpreted.
The following table provides all the data types that you will use during Arduino
programming.
Void:
The void keyword is used only in function declarations. It indicates that the function is
expected to return no information to the function from which it was called.
Example:

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 57


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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).

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 58


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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).

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 59


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

Example: short val= 13 ;//declaration of variable with type short and


initialize it with 13 Float:
Data type for floating-point number is a number that has a decimal point. Floatingpoint
numbers are often used to approximate the analog and continuous values because they have
greater resolution than integers.
Floating-point numbers can be as large as 3.4028235E+38 and as low as
3.4028235E+38. They are stored as 32 bits (4 bytes) of information.
Example: float num = 1.352;//declaration of variable with type float and initialize it
with 1.352.
Double:
On the Uno and other ATMEGA based boards, Double precision floating-point number
occupies four bytes. That is, the double implementation is exactly the same as the float, with
no gain in precision. On the Arduino Due, doubles have 8-byte (64 bit) precision.
Example:
double num = 45.352 ;// declaration of variable with type double and initialize it with
45.352.
In this section, we will learn in easy steps, how to set up the Arduino IDE on our computerand
prepare the board to receive the program via USB cable.
Step 1: First you must have your Arduino board (you can choose your favorite board) anda
USB cable. In case you use Arduino UNO, Arduino Duemilanove, Nano, Arduino Mega2560,
or Diecimila, you will need a standard USB cable (A plug to B plug), the kind youwould
connect to a USB printer as shown in the following image.

Figure 5.1: USB Cable Step


2: Download Arduino IDE Software.

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 60


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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.

Step 3: Power up your board.


The Arduino Uno, Mega, Duemilanove and Arduino Nano automatically draw power from
either, the USB connection to the computer or an external power supply. If you are using an
Arduino Diecimila, you have to make sure that the board is configured to draw power from the
USB connection. The power source is selected with a jumper, a small piece of plastic that fits
onto two of the three pins between the USB and power jacks. Check that it is on the two pins
closest to the USB port. Connect the Arduino board to your computer using the USB cable.
The green power LED (labeled PWR) should glow.

Step 4: Launch Arduino IDE.


After your Arduino IDE software is downloaded, you need to unzip the folder. Inside the folder,
you can find the application icon with an infinity label (application.exe).
Doubleclick the icon to start the IDE.

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 61


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

Step 5: Open your first project.


Once the software starts, you have two options:
• Create a new project.
• Open an existing project example.

To create a new project, select File --> New.To open

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

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 63


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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.

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 64


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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.

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 65


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

A- Used to check if there is any compilation error.


B- Used to upload a program to the Arduino board.
C- Shortcut used to create a new sketch.
D- Used to directly open one of the example sketch.
E- Used to save your sketch.
F- Serial monitor used to receive serial data from the board and send the serial data to the
board.
Now, simply click the "Upload" button in the environment. Wait a few seconds; you will see
the RX and TX LEDs on the board, flashing. If the upload is successful, the message "Done
uploading" will appear in the status bar.
Note: If you have an Arduino Mini, NG, or other board, you need to press the reset button
physically on the board, immediately before clicking the upload button on the Arduino
Software.
Arduinoprogramming stracture
In this chapter, we will study in depth, the Arduino program structure and we will learn more
new terminologies used in the Arduino world. The Arduino software is opensource. The source
code for the Java environment is released under the GPL and the C/C++ microcontroller
libraries are under the LGPL.
Sketch: The first new terminology is the Arduino program called “sketch”.
Structure
Arduino programs can be divided in three main parts: Structure, Values (variables and
constants), and Functions. In this tutorial, we will learn about the Arduino software program,
step by step, and how we can write the program without any syntax or compilation error.
Let us start with the Structure. Software structure consist of two main functions:

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 66


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

• 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

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 68


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

SOURCE CODE:

#include <SoftwareSerial.h>
SoftwareSerial gsm(9, 10);

#define EB 2 // Eye Blink Sensor

int motor = 8; // vehicle motor


int buz = 13;

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)

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 69


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

{
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);
}
}

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 70


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

CHAPTER 6

RESULTS

6.1. RESULTS

Photocopy of project

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 71


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

7.SCHEMATIC DIAGRAM

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 72


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

8.FLOWCHART

START

INITIALIZE ALL
THE INPUT AND
OUTPUT DEVICES

WAIT FOR THE


INPUT SIGNAL

YES
IF IR
VALUE IS
VALID

NO
DRIVER IS
NOT STEADY MOTOR
RUNS
TURN OFF THE
MOTOR

BUZER ON

GSM SENDS THE


MESSAGE

END

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 73


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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.

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 74


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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:

• Damage of sensor cannot be detected


• Lag in initialization of the GPS module

10.3 APPLICATIONS:

 providing real-time drowsiness feedback to the driver,


 providing performance feedback to a fatigue management program, and/or
 providing regulatory compliance information to enforcement officials.

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 75


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

CHAPTER 11

CONCLUSION AND FUTURE SCOPE

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

• Capture individual drivers steering activity while drowsy


• Conduct additional simulator experiments to validate the algorithm, test
additional road
• Conditions, and test a more diversified group of drivers
• Test and refine the algorithm based on the road test data. And conduct
research on warning systems integrated with the detection system.

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 76


MODELING AND DESIGNING OF AUTOMATIC PLANT WATERING SYSTEM USING ARDUINO

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.

PRAGATI ENGINEERING COLLEGE (AUTONOMOUS) Page 77


AN AUTOMATIC DRIVER DROWSINESS ALERT SYSTEM BY USING GSM
Dr. D. NATARAJ1, P.NAVYA SRI2, A.HARSHITHA3, N.PRASANNA KUMAR4,
T.SAI TRINADH5, K.TRINADH KUMAR6
1
Professor, Dept. of ECE, PRAGATI ENGINEERING COLLEGE.
23456
UG Student, Dept. of ECE, PRAGATI ENGINEERING COLLEGE.
ABSTRACT
This project is about making cars more intelligent and interactive which may notify or resist user
under unacceptable conditions, they may provide critical information of real time situations to
rescue or police or 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 the 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 vehicle to avoid accidents. Drowsy is the reason for most of the
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 the sleepy driver it must stop the vehicle immediately. In addition to
this if the driver is slept the vehicle will be stopped. In case of emergency SMS will be sent to
appropriate person.

INTRODUCTION rate, heart-beat respiration rate and


Driver drowsiness detection is a car temperature of the driver .In this project we
safety technology which helps prevent use sensors to measure all these factors. The
accidents caused by the driver getting values measured will be sent to the
drowsy. Various studies have suggested that microcontroller where the measured values
around 20% of all road accidents are will be compared with the reference values.
fatigue-related, up to 50% on certain roads If the values measured do not match with the
.Some of the current systems learn driver reference values then the microcontroller
patterns and can detect when a driver is will send a warning signal in the LCD
becoming drowsy .The development of display thereby preventing accidents. This
technologies for detecting or preventing project is about making cars more intelligent
drowsiness at the wheel is a major challenge and interactive which may notify or resist
in the field of accident avoidance systems. user under unacceptable conditions, they
Because of the hazard that drowsiness may provide critical information of real time
presents on the road, methods need to be situations to rescue or police or owner
developed for counteracting its affects [4]. himself. Driver fatigue resulting from sleep
The aim of this project is to develop a deprivation or sleep disorders is an
prototype drowsiness detection system. The important factor in the increasing number of
focus will be placed on designing a system accidents on today's roads. In this project,
that will accurately monitor the eye blink we describe a real-time safety prototype that

Volume 13, Issue 04, Apr 2023 ISSN 2457-0362 Page 79


controls the vehicle speed under driver controllers, or the systems controlling
fatigue. The purpose of such a model is to nuclear power plants. Complexity varies
advance a system to detect fatigue from low, with a single microcontroller chip,
symptoms in drivers and control the speed to very high with multiple units, peripherals
of vehicle to avoid accidents. and networks mounted inside a large chassis
Drowsy is the reason for most of the or enclosure. In general, "embedded system"
road accidents. Manually tracing the is not an exactly defined term, as many
drowsiness of the driver is not an easy task, systems have some element of
because every day thousands of vehicles are programmability. For example, Handheld
running on the roads. So we need a system computers share some elements with
that must come with every car and if it embedded systems such as the operating
detects the sleepy driver it must stop the systems and microprocessors which power
vehicle immediately. In addition to this if them but are not truly embedded systems,
the driver is slept the vehicle will be because they allow different applications to
stopped. In case of emergency SMS will be be load and peripherals to be connected.
sent to appropriate person.An embedded An embedded system is some
system is a special-purpose computer system combination of computer hardware and
designed to perform one or a few dedicated software, either fixed in capability or
functions, sometimes with real-time programmable, that is specifically designed
computing constraints. It is usually for a particular kind of application device.
embedded as part of a complete device Industrial machines, automobiles, medical
including hardware and mechanical parts. In equipment, cameras, household appliances,
contrast, a general-purpose computer, such airplanes, vending machines, and toys (as
as a personal computer, can do many well as the more obvious cellular phone and
different tasks depending on programming. PDA) are among the myriad possible hosts
Embedded systems have become very of an embedded system. Embedded systems
important today as they control many of the that are programmable are provided with a
common devices we use. Since the programming interface, and embedded
embedded system is dedicated to specific systems programming is a specialized
tasks, design engineers can optimize it, occupation. Certain operating systems or
reducing the size and cost of the product, or language platforms are tailored for the
increasing the reliability and performance. embedded market, such as Embedded Java
Some embedded systems are mass- and Windows XP Embedded. However,
produced, benefiting from economies of some low-end consumer products use very
scale. Physically embedded systems range inexpensive microprocessors and limited
from portable devices such as digital storage, with the application and operating
watches and MP3 players, to large stationary system both part of a single program.
installations like traffic lights, factory

Volume 13, Issue 04, Apr 2023 ISSN 2457-0362 Page 80


WORKING
 We connect all the components as
per the block and circuit diagrams.
 First, we switch on the power supply.
Then 230 V of supply is given from
the transformer to the power supply
board.
 From the power supply board, power
is transmitted to GSM and
AURDINO boards.
 We see that the power indicators of
the supply, GSM and AURDINO Fig.1: Block Diagram
boards are ON, indicating that the The Arduino Uno is a microcontroller board
supply is available. based on the ATmega328. It has 14 digital
 Now, the driver has to wear the Eye input/output pins (of which 6 can be used as
blink sensor spectacles. PWM outputs), 6 analog inputs, a 16 MHz
ceramic resonator, a USB connection, a
 The IR sensor detects the movement
power jack, an ICSP header, and a reset
of the eye lids.
button. It contains everything needed to
 We observe that, as long as the
support the microcontroller; simply connect
driver opens his eyes, the motor runs
it to a computer with a USB cable or power
as usual.
it with a AC-to-DC adapter or battery to get
 If the driver closes his eye lid,
started.
 The sensor detects the movement
The Arduino Uno is a microcontroller board
and sends the signal to the ULN and
based on the ATmega328 (datasheet). It has
GSM
14 digitalinput/output pins (of which 6 can
 Now, The ULN turns the motor OFF. be used as PWM outputs), 6 analog inputs, a
 The GSM sends a warning message 16 MHz crystal oscillator, a USB
to the driver that the motor is off and connection, a power jack, an ICSP header,
vehicle is stopped due to his and a reset button. It contains everything
drowsiness. needed to support the microcontroller;
 Again, when the driver is alert, the simply connect it to a computer with a USB
motor starts running. cable or power it with a AC-to-DC adapter
 In this way, our project, “AN or battery to get started.
AUTOMATIC DRIVER
DROWSINESS ALERTING The Uno differs from all preceding boards in
SYSTEM BY USING GSM”,alerts that it does not use the FTDI USB-toserial
the driver whenever he is drowsy. driver chip. Instead, it features the

Volume 13, Issue 04, Apr 2023 ISSN 2457-0362 Page 81


Atmega8U2 programmed as a USB-to-serial
converter. "Uno" means "One" in Italian and ADVANTAGES
is named to mark the upcoming release of  Security
Arduino 1.0. The Uno and version 1.0 will  Record driving data
be the reference versions of Arduino,  Analyse the accident detail
moving forward. The Uno is the latest in a  Send location of car and its
series of USB Arduino boards, and the maintenance to base station through
reference model for the Arduino platform; GPS and GSM technique
for a comparison with previous versions, see  Sense gas and fuel leakage
the index of Arduino boards.  Detect if drivers are drunk or not
The Arduino Uno can be powered via the  Detect if the driver is feeling sleepy
USB connection or with an external power
DISADVANTAGES
supply. The powersource is selected
 Damage of sensor cannot be detected
automatically.External (non-USB) power
 Lag in initialization of the GPS
can come either from an AC-to-DC adapter
module
(wall-wart) or battery. The adaptercan be
APPLICATIONS
connected by plugging a 2.1mm center-
 providing real-time drowsiness
positive plug into the board's power jack.
feedback to the driver,
Leads from abattery can be inserted in the
 providing performance feedback to a
Gnd and Vin pin headers of the POWER
fatigue management program, and/or
connector.The board can operate on an
external supply of 6 to 20 volts. If supplied  Providing regulatory compliance
with less than 7V, however, the 5Vpin may information to enforcement officials.
supply less than five volts and the board
may be unstable.
SCHEMATIC DIAGRAM

Fig.2: Photocopy of project


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

Volume 13, Issue 04, Apr 2023 ISSN 2457-0362 Page 82


hardware components used. Presence of Monitoring The Loss Of Attention in
every module has been reasoned out and Automotive Drivers",IEEE
placed carefully, thus contributing to the Transaction, voI.l4,no.4 2013.
best working of the unit. The system has 4. Boon-Giin Lee and Wan-Young
been tested to function automatically. The Chung, "Driver Alertness
IR sensor detects the movement of the eye Monitoring Using Fusion of Facial
lids. If the eye lid is detected to be closed, Features and Bio-Signals", IEEE
the IR sensor sends the signal to the Sensors journal, vol. 12, no. 7,2012
microcontroller which triggers the DC motor 5. Raoul Lopes, D.J Sanghvi,
to turn off. Otherwise, the motor runs AdityaShah,"Drowsiness Detection
successfully . Thus, the functionality of the based on Eye Movement, Yawn
entire system has been tested thoroughly and Detection and Head Rotation", Vol.
it is said to function successfully. 2, No.6,2012.
FUTURE SCOPE 6. Artem A. Lenskiy and Jong-Soo Lee,
 Capture individual drivers steering "Driver's Eye Blinking Detection
activity while drowsy Using Novel Color and Texture
 Conduct additional simulator Segmentation Algorithms",
experiments to validate the International Journal of Control,
algorithm, test additional road Automation, and Systems,pp.3 I 7-
 Conditions, and test a more 327, 2012.
diversified group of drivers 7. Parris, J., et.al, "Face and eye
 Test and refine the algorithm based detection on hard datasets,"
on the road test data. And conduct Biometrics (IJCB), International
research on warning systems Joint Conference on , vol., no., pp.l ,
integrated with the detection system. 1 0 , 11-13 Oct. 2011
REFERENCES
1. 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. ArunSahayadhas,KennethSundaraj,
"Detecting Driver Drowsiness Based
on Sensors A Review",pp.16937-
16953, ISSN 1424-8220, Malaysia
2012
3. Anirbandasgupta,anjithgeorge,"A
Vision Based System For

Volume 13, Issue 04, Apr 2023 ISSN 2457-0362 Page 83

You might also like