Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 145

TABLE OF CONTENTS

1. INTRODUCTION

2. LITERATURE SURVEY
2.1. EXISTING SYSTEM
2.2. PROPOSED SYSTEM

3. SYSTEM SPECIFICATION
3.1. HARDWARE REQUIREMENTS
3.2. SOFTWARE REQUIREMENTS
3.3. TECHNOLOGY USED
4. SYSTEM DESIGN ARCHITECTURE
4.1. CLASS DIAGRAM
4.2 USECASE DIAGRAM
4.3 SEQUENCE DIAGRAM
4.4 DATA FLOW DIAGRAM
4.5 DATABASE DEISGN (Screenshots)
5. IMPLEMENTATION
5.1. MODULES and MODULES DESCRIPTION

5.2. SCREENSHOTS

6. TESTING
7. CONCLUSION
8. FUTURE ENHANSMENTS
9. BIBLIOGRAPHY
ANDROID APPLICATION ON AGRICULTURE.
ABSTRACT

The main intention of this “ANDROID APPLICATION ON AGRICULTURE” is to help the


Farmer’s to order the Pesticide/Fertilizer/Seeds from their Android Smartphone’s. By using this
application, they can easily order their requirements by sending the image of the diseased plant
and we will provide the best suited Pesticide/Fertilizer to the farmer’s door step. So that there is
no hassle of searching for Pesticide/Fertilizer in shops.

Chapter-1

1.INTRODUCTION

The main intention of this “ANDROID APPLICATION ON AGRICULTURE” is to help the


Farmer’s to order the Pesticide/Fertilizer from their Smartphone’s. By using this application,
they can easily order their requirements by sending the image of the diseased plant and we will
provide the best suited Pesticide/Fertilizer to the farmer’s door step. So that there is no hassle of
searching for Pesticide/Fertilizer shops

The developed application contains several modules as described below.

 Welcome Page which comes when opens the application.


 Registration or sign up for new customer.
 Login Page user has to log in for further process.
 Forgot Password page for the user who lost or forgot his login password.
 Home Page it is the Main page where user can select the required menu or options.
 Order Page user can order the required pesticides/fertilizer/seed
 Learn How to Grow Crops page user can get the required knowledge to grow the crops.
 Ask Questions in this page user who all are having doubts can be clarified by experts.

Chapter-2

2. LITERATURE SURVEY

A literature review is much more than a list of separate reviews of articles and books.
They are common and very important in the sciences. A literature review is a critical,
analytical summary and synthesis of the current knowledge of a topic. It should compare
and relate different theories, findings, and so on, rather than just summarize them
individually. It should also have a particular focus or theme to organize the review. It
does not have to be an exhaustive account of everything published on the topic. But it
should discuss all the more significant academic literature important for that focus

2.1 Existing System

The existing system uses all the manual work, where the farmers should go physically and
search for the Agro shop to order pesticides/fertilizers and seeds.

In Manual Work the customer will go to a shop and he will share the disease problems with the
shopper while explaining the problems he/she may not explain the exact problem so the shopper
will understand some other thing and he will provide some different pesticides which is not
suited for the diseased crop. So to solve this problem we came up with a solution that is android
application on agriculture.

2.2 PROPOSED SYSTEM


The application which we are proposing is much easier to understand by user who is familiar
with the use of mobile.

The options available for users is ordering of pesticides/fertilizers/seeds, user can learn how to
grow crops and user can get suggestion about their crop from experienced person.

The application is with very basic options available, but the application has lots of options that
can be enhanced in future.

Objectives:
They can easily Order the Pesticides/Fertilizer from their Smartphone’s.
They can get suggestions from the experts about their doubts.
They can learn how to grow crops.
They can Know the Today Market Vegetable Prices .

INTRODUCTION TO EMBEDDED SYSTEMS

Each day, our lives become more dependent on 'embedded systems', digital information
technology that is embedded in our environment. More than 98% of processors applied today are
in embedded systems, and are no longer visible to the customer as 'computers' in the ordinary
sense. An Embedded System is a special-purpose system in which the computer is completely
encapsulated by or dedicated to the device or system it controls. Unlike a general-purpose
computer, such as a personal computer, an embedded system performs one or a few pre-defined
tasks, usually with very specific requirements. Since the system is dedicated to specific tasks,
design engineers can optimize it, reducing the size and cost of the product. Embedded systems
are often mass-produced, benefiting from economies of scale. The increasing use of PC hardware
is one of the most important developments in high-end embedded systems in recent years.
Hardware costs of high-end systems have dropped dramatically as a result of this trend, making
feasible some projects which previously would not have been done because of the high cost of
non-PC-based embedded hardware. But software choices for the embedded PC platform are not
nearly as attractive as the hardware.

Typically, an embedded system is housed on a single microprocessor board with the


programs stored in ROM. Virtually all appliances that have a digital interface -- watches,
microwaves, VCRs, cars -- utilize embedded systems. Some embedded systems include an
operating system, but many are so specialized that the entire logic can be implemented as a
single program.

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.

In terms of complexity embedded systems can range from very simple with a single
microcontroller chip, to very complex with multiple units, peripherals and networks mounted
inside a large chassis or enclosure.

Definition of an Embedded System

Embedded system is defined as, For a particular/specific application implementing the


software code to interact directly with that particular hardware what we built. Software is used
for providing features and flexibility, Hardware = {Processors, ASICs, Memory,...} is used for
Performance (& sometimes security)

There are many definitions of embedded system but all of these can be combined into a
single concept. An embedded system is a special purpose computer system that is used for
particular task.
Features of Embedded Systems

The versatility of the embedded computer system lends itself to utility in all kinds of enterprises,
from the simplification of deliverable products to a reduction in costs in their development and
manufacture. Complex systems with rich functionality employ special operating systems that
take into account major characteristics of embedded systems. Embedded operating systems have
minimized footprint and may follow real-time operating system specifics.

The special computers system is usually less powerful than general-purpose systems, although
some expectations do exist where embedded systems are very powerful and complicated.
Usually a low power consumption CPU with a limited amount of memory is used in embedded
systems. Many embedded systems use very small operating systems; most of these provide very
limited operating system capabilities.

Since the embedded system is dedicated to specific tasks, design engineers can optimize it,
reducing the size and cost of the product, or increasing the reliability and performance. Some
embedded systems are mass-produced, benefiting from economies of scale.

Some embedded systems have to operate in extreme environment conditions such as very high
temperature & humidity.

For high volume systems such as portable music players or mobile phones, minimizing cost is
usually the primary design consideration. Engineers typically select hardware that is just “good
enough” to implement the necessary functions.

For low volume or prototype embedded systems, general purpose computers may be adapted by
limiting the programs or by replacing the operating system with a real-time operating system.

Characteristics of Embedded Systems


Embedded computing systems generally exhibit rich functionality—complex functionality is
usually the reason for introducing CPUs into the design. However, they also exhibit many non-
functional requirements that make the task especially challenging:

• Real-time deadlines that will cause system failure if not met;


• Multi-rate operation;

• In many cases, low power consumption;

• Low manufacturing cost, which often means limited code size.

Workstation programmers often concentrate on functionality. They may consider the


performance characteristics of a few computational kernels of their software, but rarely analyze
the total application. They almost never consider power consumption and manufacturing cost.
The need to juggle all these requirements makes embedded system programming very
challenging and is the reason why embedded system designers need to understand computer
architecture.

Overview of an Embedded System Architecture

Every Embedded system consists of a custom-built hardware built around a central processing
unit. This hardware also contains memory chips onto which the software is loaded.

Application Software

Operating
System
H/W
The operating system runs above the hardware and the application software runs above the
operating system. The same architecture is applicable to any computer including desktop
computer. However these are significant differences. It is not compulsory to have an operating
system in every embedded system. For small applications such as remote control units, air
conditioners, toys etc.

Applications of Embedded Systems

Some of the most common embedded systems used in everyday life are

Small embedded controllers: 8-bit CPUs dominate, simple or no operating system


(e.g., thermostats)

Control systems: Often use DSP chip for control computations


(e.g., automotive engine control)
Distributed embedded control: Mixture of large and small nodes on a real-time
Embedded networks
(e.g., cars, elevators, factory automation)
System on chip: ASIC design tailored to application area
(e.g., consumer electronics, set-top boxes)
Network equipment: Emphasis on data movement/packet flow
(e.g., network switches; telephone switches)
Critical systems: Safety and mission critical computing
(e.g., pacemakers, automatic trains)
Signal processing: Often use DSP chips for vision, audio, or other signal
Processing (e.g., face recognition)
Robotics: Uses various types of embedded computing (especially
Vision and control) (e.g., autonomous vehicles)
Computer peripherals: Disk drives, keyboards, laser printers, etc.
Wireless systems: Wireless network-connected “sensor networks” and
“Motes” to gather and report information
Embedded PCs: Palmtop and small form factor PCs embedded into
Equipment
Command and control: Often huge military systems and “systems of systems”
(e.g., a fleet of warships with interconnected
Computers)

Home Appliances, intercom, telephones, security systems, garage door openers, answering
machines, fax machines, home computers, TVs, cable TV tuner, VCR, camcorder, remote
controls, video games, cellular phones, musical instruments, sewing machines, lighting control,
paging, camera, pinball machines, toys, exercise equipment

Office Telephones, computers, security systems, fax machines, microwave, copier, laser printer,
color printer, paging

Auto Trip computer, engine control, air bag, ABS, instrumentation, security system,
transmission control, entertainment, climate control, cellular phone, keyless entry

TYPES OF EMBEDDED SYSTEMS


Based on functionality and performance embedded systems categorized as 4 types
1. Stand alone embedded systems
2. Real time embedded systems
3. Networked information appliances
4. Mobile devices

1. Stand alone embedded systems:-


As the name implies, stand alone systems work in stand alone mode. They take i/p, process them
and produce the desire o/p. The i/p can be an electrical signal from transducer or temperature
signal or commands from human being. The o/p can be electrical signal to drive another system
an led or LCD display

ex digital camera, microwave oven, CD player, Air conditioner etc

2. Real time embedded systems:-

In this type of an embedded system a specific work has to be complete in a particular


period of time.
Hard Real time systems: - embedded real time used in missiles
Soft Real time systems: - DVD players

3. Networked information appliances:-


Embedded systems that are provided with n/w interfaces and accessed by n/w such as local area
n/w or internet are called Network Information Appliances

Ex A web camera is connected to the internet. Camera can send pictures in real time to any
computers connected to the internet

4. Mobile devices:-
Actually it is a combination of both VLSI and Embedded System

Mobile devices such as Mobile phone, Personal digital assistants, smart phones etc are special
category of embedded systems
MICROCONTROLLER VERSUS MICROPROCESSOR
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.

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.
CPU platform:

Embedded processors can be broken into two distinct categories: microprocessors (μP) and
microcontrollers (μC). Microcontrollers have built-in peripherals on the chip, reducing size of
the system.

There are many different CPU architectures used in embedded designs such as ARM, MIPS,
Coldfire/68k, PowerPC, x86, PIC, 8051, Atmel AVR, Renesas H8, SH, V850, FR-V, M32R,
Z80, Z8, etc. This in contrast to the desktop computer market, which is currently limited to just a
few competing architectures.

PC/104 and PC/104+ are a typical base for small, low-volume embedded and ruggedized system
design. These often use DOS, Linux, NetBSD, or an embedded real-time operating system such
as QNX or VxWorks.

A common configuration for very-high-volume embedded systems is the system on a chip (SoC),
an application-specific integrated circuit (ASIC), for which the CPU core was purchased and
added as part of the chip design. A related scheme is to use a field-programmable gate array
(FPGA), and program it with all the logic, including the CPU.

Embedded systems are based on the concept of the microcontroller, a single integrated circuit
that contains all the technology required to run an application. Microcontrollers make integrated
systems possible by combining several features together into what is effectively a complete
computer on a chip, including:
* Central Processing Unit
* Input/Output interfaces (such as serial ports)
* Peripherals (such as timers)
* ROM, EEPROM or Flash memory for program storage
* RAM for data storage
* Clock generator
By integrating all of these features into a single chip it is possible to greatly reduce the number of
chips and wiring necessary to control an electronic device, dramatically reducing its complexity,
size and cost.

* Size & Weight: Microcontrollers are designed to deliver maximum performance for minimum
size and weight. A centralized on-board computer system would greatly outweigh a collection of
microcontrollers.
* Efficiency: Microcontrollers are designed to perform repeated functions for long periods of
time without failing or requiring service.

Based on the Processor side Embedded Systems is mainly divided into 3 types
1. Micro Processor: - are for general purpose eg: our personal computer
2. Micro Controller: - are for specific applications, because of cheaper cost we will go for these
3. DSP (Digital Signal Processor):- are for high and sensitive application purpose

ARDUINO

Introduction to the Arduino Board


The Arduino is a family of microcontroller boards to simplify electronic design, prototyping and
experimenting for artists, hackers, hobbyists, but also many professionals. People use it as brains
for their robots, to build new digital music instruments, or to build a system that lets your house
plants tweet you when they’re dry. Arduinos (we use the standard Arduino Uno) are built around
an ATmega micro controller essentially a complete computer with CPU, RAM, Flash memory,
and input/output pins, all on a single chip. Unlike, say, a Raspberry Pi, it’s designed to attach all
kinds of sensors, LEDs, small motors and speakers, servos, etc. directly to these pins, which can
read in or output digital or analog voltages between 0 and 5volts. The Arduino connects to your
computer via USB, where you program it in a simple language (C/C++, similar to Java) from
inside the free Arduino IDE by uploading your compiled code to the board. Once programmed,
the Arduino can run with the USB link back to your computer, or stand-alone without it no
keyboard or screen needed, just power.
Figure Structure of Arduino Board

Figure: Arduino Board


Looking at the board from the top down, this is an outline of what you will see (parts of the
board you might interact with in the course of normal use are highlighted). Starting clockwise
from the top center:

➢ Analog Reference pin (orange)

➢ Digital Ground (light green)

➢ Digital Pins 2-13 (green)

➢ Digital Pins 0-1/Serial In/Out - TX/RX (dark green) - These pins cannot be used for digital i/o
(DigitalRead and DigitalWrite) if you are also using serial communication (e.g. Serial.begin).

➢ Reset Button - S1 (dark blue)

➢ In-circuit Serial Programmer (blue-green)

➢ Analog In Pins 0-5 (light blue)

➢ Power and Ground Pins (power: orange, grounds: light orange)

➢ External Power Supply In (9-12VDC) - X1 (pink)

➢ Toggles External Power and USB Power (place jumper on two pins closest to desired supply)
- SV1 (purple)

➢ USB (used for uploading sketches to the board and for serial communication between the
board and the computer; can be used to power the board) (yellow)
Digital Pins
In addition to the specific functions listed below, the digital pins on an Arduino board can be
used for general purpose input and output via the pin Mode(),Digital Read(),and Digital
Write()commands. Each pin has an internal pull-up resistor which can be turned on and off using
digital Write() (w/ a value of HIGH or LOW, respectively) when the pin is configured as an
input. The maximum current per pin is 40mA.

➢ Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data. On the
ArduinoDiecimila, these pins are connected to the corresponding pins of the FTDI USB-to-TTL
Serial chip. On the Arduino BT, they are connected to the corresponding pins of the
WT11Bluetooth module. On the Arduino Mini and LilyPad Arduino, they are intended for use
with an external TTL serial module (e.g. the Mini-USB Adapter).

➢ 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 attach Interrupt()function for details.

➢ PWM: 3, 5, 6, 9, 10, and 11 Provide 8-bit PWM output with theanalog Write()function.On
boardswith an ATmega8, PWM output is available only on pins 9, 10, and 11.
➢ BT Reset: 7.(Arduino BT-only) Connected to the reset line of the bluetooth module.

➢ 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. On the Diecimila and LilyPad, there is a built-in LED connected to digital pin 13.
Whenthe pin is HIGH value, the LED is on, when the pin is LOW, it's off.
Analog Pins
In addition to the specific functions listed below, the analog input pins support 10-bit analog-to-
digital conversion (ADC) using the analog Read()function. Most of the analog inputs can also be
used as digital pins: analog input 0 as digital pin 14 through analog input 5 as digital pin 19.
Analog inputs 6 and 7 (present on the Mini and BT) cannot be used as digital pins.

Power Pins:

➢ VIN (sometimes labeled "9V"): The input voltage to the Arduino board when
it's using an externalpowersource (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. Also note that the Lily Pad has no VIN pin and accepts
only a regulated input.5V: The regulated power supply used to power the microcontroller and
other components on theboard. This can come either from VIN via an on-board regulator, or be
supplied by USB or another regulated 5V supply.

➢ 3V3 (Diecimila-only) :A 3.3 volt supply generated by the on-board FTDI chip.

➢ GND:Ground pins. Other Pins

➢ AREF:Reference voltage for the analog inputs. Used with analog reference().

➢ Reset: (Diecimila-only) Bring this line LOW to reset the microcontroller. Typically used to
add areset button to shields which block the one on the board.
Atmega328 Pin diagram

Figure :2.4 Pin Configuration of Atmega328


2.4.2 Pin Description and Features
VCC:
Digital supply voltage.
GND:
Ground
Port A (PA7-PA0):
Port A serves as the analog inputs to the A/D Converter. Port A also serves as an 8-bit bi-
directional I/O port, if the A/D Converter is not used. Port pins can provide internal pull-up
resistors (selected for each bit). The Port A output buffers have symmetrical drive characteristics
with both high sink and source capability. When pins PA0 to PA7 are used as inputs and are
externally pulled low, they will source current if the internal pull-up resistors are activated. The
Port A pins are tri-stated when a reset condition becomes active, even if the clock is not running.
Port B (PB7-PB0):
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. Port B also serves the functions of various special features of the
ATmega32.
Port C (PC7-PC0):
Port C is an 8-bit bidirectional I/O port with internal pull-up resistors (selected for each bit). The
Port C 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. If the JTAGinterface is enabled, the pull-up resistors on pins
PC5(TDI), PC3(TMS) and PC2(TCK) will be activated even if a reset occurs. The TD0 pin is tri-
stated unless TAP states that shift out data are entered. Port C also serves the functions of the
JTAG interface.
Port D (PD7-PD0):
Port D is an 8-bit bidirectional 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. Port D also serves the functions of various special features of the
ATmega32.
Reset (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.
XTAL1:
Input to the inverting Oscillator amplifier and input to the internal clock operating circuit.
XTAL2:
Output from the inverting Oscillator amplifier.
AVCC:
AVCC is the supply voltage pin for Port A and the A/D Converter. It should be externally
connected to VCC, even if the ADC is not used. If the ADC is used, it should be onnected to
VCC through a low-pass filter.
2.5 Features

➢ 1.8-5.5V operating range

➢ Part: ATMEGA328P-AU

➢ 32kB Flash program memory

➢ 1kB EEPROM

➢ 2kB Internal SRAM

➢ 2 8-bit Timer/Counters

➢ 16-bit Timer/Counter

➢ RTC with separate oscillator

➢ 6 PWM Channels

➢ 8 Channel 10-bit ADC

➢ Serial USART

➢ Master/Slave SPI interface

➢ 2-wire (I2C) interface

➢ Watchdog timer

➢ Analog comparator

➢ 23 IO lines

➢ Data retention: 20 years at 85C/ 100 years at 25C

➢ Digital I/O Pins are 14 (out of which 6 provide PWM output)

➢ Analog Input Pins are 6.


➢ DC Current per I/O is 40 mA

➢ DC Current for 3.3V Pin is 50mA


AVR CPU Core
The AVR core combines a rich instruction set with 32 general purpose working registers. All the
32 registers are directly connected to the Arithmetic Logic Unit (ALU), allowing two
independent registers to be accessed in one single instruction executed in one clock cycle. The
resulting architecture is more code efficient while achieving throughputs up to ten times faster
than conventional CISC microcontrollers.
Figure : Block Diagram

Overview
This section discusses the AVR core architecture in general. The main function of the CPU core
is to ensure correct program execution. The CPU must therefore be able to access memories,
perform calculations, control peripherals, and handle interrupts.

Figure:AVR core architecture

In order to maximize performance and parallelism, the AVR uses a Harvard architecture with
separate memories and buses for program and data. Instructions in the program memory are
executed with a single level pipelining. While one instruction is being executed, the next
instruction is prefetched from the program This concept enables instructions to be executed in
every clock cycle. The program memory is In-System Reprogrammable Flash memory. The fast-
access Register File contains 32 x 8-bit general purpose working registers with a single clock
cycle access time. This allows single-cycle Arithmetic Logic Unit (ALU) operation. In a typical
ALU operation, two operands are output from the Register File, the operation is executed, and
the result is stored back in the Register File in one clock cycle. Six of the 32 registers can be
used as three 16-bit indirect address register pointers for Data Space addressing – enabling
efficient address calculations. One of these address pointers can also be used as an address
pointer for look up tables in Flash program memory. These added function registers are the 16-
bit X-, Y-, and Z-register, described later in this section. The ALU supports arithmetic and logic
operations between registers or between a constant and a register. Single register operations can
also be executed in the ALU. After an arithmetic operation, the Status Register is updated to
reflect information about the result of the operation. Program flow is provided by conditional and
unconditional jump and call instructions, able to directly address the whole address space. Most
AVR instructions have a single 16-bit word format. Every program memory address contains a
16- or 32-bit instruction. Program Flash memory space is divided in two sections, the Boot
Program section and the Application Program section. Both sections have dedicated Lock bits for
write and read/write protection. The SPM instruction that writes into the Application Flash
memory section must reside in the Boot Program section. During interrupts and subroutine calls,
the return address Program Counter (PC) is stored on the Stack. The Stack is effectively
allocated in the general data SRAM, and consequently the Stack size is only limited by the total
SRAM size and the usage of the SRAM. All user programs must initialize the SP in the Reset
routine (before subroutines or interrupts are executed). The Stack Pointer (SP) is read/write
accessible in the I/O space. The data SRAM can easily be accessed through the five different
addressing modes supported in the AVR architecture. The memory spaces in the AVR
architecture are all linear and regular memory maps. A flexible interrupt module has its control
registers in the I/O space with an additional Global Interrupt Enable bit in the Status Register.
All interrupts have a separate Interrupt Vector in the Interrupt Vector table. The interrupts have
priority in accordance with their Interrupt Vector position. The lower the Interrupt Vector
address, the higher the priority.

Arduino with ATmega328


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
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 a 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 Atmega16U2 (Atmega8U2 up to version R2) programmed as a
USB-to-serial converter.

➢ Pin out: Added SDA and SCL pins that are near to the AREF pin and two other new pins
placed near to the RESET pin, the IOREF that allow the shields to adapt to the voltage provided
from the board. In future, shields will be compatible with both the board that uses the AVR,
which operates with 5V and with the Arduino. Due that operates with 3.3V. The second one is a
not connected pin that is reserved for future purposes.

➢ Stronger RESET circuit


➢ Atmega 16U2 replace the 8U2. "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. Arduino Characteristics:
Power:
12V, the voltage regulator may overheat and damage the board. The recommended range is 7 to
12 volts. 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& #39;s power jack. Leads from a battery can be
inserted in the Gnd and Vin pin headers of the POWER connector. The board can operate on an
external supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply
less than five volts and the board may be unstable. If using more than. The power pins are as
follows:

➢ VIN: The input voltage to the Arduino board when it's using an external power source
(as opposed to5
volts from the USB connection or other regulated power source). You can supply voltage
through this pin, or, if supplying voltage via the power jack, access it through this pin.

➢ 5V: This pin outputs a regulated 5V from the regulator on the board. The board can be
supplied with power either from the DC power jack (7 - 12V), the USB connector (5V), or the
VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator,
and can damage your board. We don't advise it.

➢ 3V3.A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA.

➢ GND.Ground pins.

➢ IOREF. This pin on the Arduino board provides the voltage reference with which the
microcontroller operates. A properly configured shield can read the IOREF pin voltage and
select the appropriate power source or enable voltage translators on the outputs for working with
the 5V or 3.3V.
Memory:
The ATmega328 has 32 KB (with 0.5 KB used for the boot loader). It also has 2 KB of SRAM
and 1 KB of EEPROM (which can be read and written with the EEPROM library).
Serial 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 ondigital pins 0 (RX) and 1 (TX). An ATmega16U2 on the
board channels this serial communication over USB and appears as a virtual com port to
software on the computer. The '16U2 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 absent 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 Software Serial library allows for serial communication on any of the
Uno's digital pins. The ATmega328 also supports I2C (TWI) and SPI communication. The
Arduino software includes a Wire library to simplify use of the I2C bus. For SPI communication,
use the SPI library.

BASIC REQUIRMENT

The following are the basic five requirements of microcontroller

1. Power Supply

2. Crystal Oscillator

3. Reset

4. SIP Resistor

5. Resistor for EA Pin

1. Regulated Power Supply


In mains-supplied electronic systems the AC input voltage must be converted into a DC voltage
with the right value and degree of stabilization. The common DC voltages that are required to
power up the devices are generally in the range of 3 VDC to 30 VDC. Typically the fixed types
of DC voltages are 5V, 9V, 12V, 15V and 18V DC.

POWER SUPPLY MODULES:


 STEP DOWN TRANSFORMER
 BRIDGE RECTIFIER WITH FILTER

 VOLTAGE REGULATORS

Transformer

Transformers convert AC electricity from one voltage to another with little loss of power.
Transformers work only with AC and this is one of the reasons why mains electricity is AC.
Step-up transformers increase voltage, step-down transformers reduce voltage.

A step down power transformer is used to step down the AC voltage from the

of 110 VAC or 220 VAC i.e, it converts higher voltage at the input side to a lower voltage at the
output.

Rectifier
There are several ways of connecting diodes to make a rectifier to convert AC to DC. The
bridge rectifier is the most important and it produces full-wave varying DC

Bridge rectifier Output: full-wave varying DC


Alternate pairs of diodes conduct, changing over (using all the AC wave)
the connections so the alternating directions of
AC are converted to the one direction of DC.

Filter

Filtering is performed by a large value electrolytic capacitor connected across the DC supply to
act as a reservoir, supplying current to the output when the varying DC voltage from the rectifier
is falling. The diagram shows the unfiltered varying DC (dotted line) and the filtered DC (solid
line). The capacitor charges quickly near the peak of the varying DC, and then discharges as it
supplies current to the output.

Typically 1000 μf capacitor is used in microcontroller of 8051.


Regulator

This is a simple DC regulated supply project using 7805 voltage regulator to obtain a variable
DC voltage range from 5V to 15V

Pin out of the 7805 regulator IC.

1. Unregulated voltage in

2. Ground

3. Regulated voltage out

If you need other voltages than +5V, you can modify the circuit by replacing the 7805 chips with
another regulator with different output voltage from regulator 78xx chip family. The last
numbers in the the chip code tells the output voltage. Remember that the input voltage must be at
least 3V greater than regulator output voltage ot otherwise the regulator does not work well.

Crystal Oscillator

The 8051 uses the crystal for precisely that: to synchronize it’s operation. Effectively, the 8051
operates using what are called "machine cycles." A single machine cycle is the minimum amount
of time in which a single 8051 instruction can be executed. although many instructions take
multiple cycles.  8051 has an on-chip oscillator. It needs an external crystal that decides the
operating frequency of the 8051. The crystal is connected to pins 18 and 19 with stabilizing
capacitors. 12 MHz (11.059MHz) crystal is often used and the capacitance ranges from 20pF to
40pF.
A cycle is, in reality, 12 pulses of the crystal. That is to say, if an instruction takes one machine
cycle to execute, it will take 12 pulses of the crystal to execute. Since we know the we can
calculate how many instruction cycles the 8051 can execute per second:

11,059,000 / 12 = 921,583

11.0592 MHz crystals are often used because it can be divided to give you exact clock rates for
most of the common baud rates for the UART, especially for the higher speeds (9600, 19200).

Reset
RESET is an active High input  When RESET is set to High, 8051 goes back to the power on
state.The 8051 is reset by holding the RST high for at least two machine cycles and then
returning it low. Initially charging of capacitor makes RST High, When capacitor charges fully it
blocks DC.

SIP Resistor
Sip Resistor is a single in pack Resistor (i.e.,) 8 resistors connected in series. Basically SIP
resistor is a 9 pin connector first pin is for power supply to the entire 8 resistors in SIP.

Generally SIP Resistor is used to close the open drain connections of Port 0.

In System Programming (ISP):-

In-System Programming (ISP) is the ability of some programmable logic devices,


microcontrollers, and other programmable electronic chips to be programmed while installed in
a complete system, rather than requiring the chip to be programmed prior to installing it into the
system. (or) In-system programming is a valuable feature that allows system firmware to be
upgraded without disassembling the embedded system to physically replace memory. Most
Maxim 8051-based microcontrollers can be reprogrammed from a PC or laptop via an
inexpensive RS-232 serial interface and a few logic gates

The primary advantage of this feature is that it allows manufacturers of electronic devices to
integrate programming and testing into a single production phase, rather than requiring a separate
programming stage prior to assembling the system. This may allow manufacturers to program
the chips in their own system's production line instead of buying preprogrammed chips from a
manufacturer or distributor, making it feasible to apply code or design changes in the middle of a
production run.

HARD WARE REQURIMENT


LIQUID CRYSTAL DISPLAY

INTRODUCTION:

An LCD or a liquid crystal display consists of liquid crystals between electrodes. The
arrangement consists of polarization filters which are aligned perpendicular to each other. This
arrangement doesn’t allow any visible light if there was no liquid crystal between the filters. This
arrangement is aligned in between transparent conductors.

When sufficient voltage is applied to a certain pixel, the crystal at that pixel aligns such that no
light passes through it. Therefore that particular pixel appears dark. If such an electric field is applied
for a longer period, the alignment of the crystal change, and the quality of LCD degrades. In a bigger
LCD display, to provide voltage sources to each pixel, the rows and column lines are multiplexed.

PIN DESCRIPTION OF THE LCD:

TABLE: PIN DESCRIPTION OF LCD

LCD INTERFAC WITH MICROCONTROLLER


Microcontroller

P
O
R
T
P
I
N
S

INTERFACING LCD TO MICROCONTROLLER

The LCD is generally interfaced in 8-bit mode or 4-bit mode. in this project LCD is connected in 4-
bit mode the interface connections of LCD with microcontroller are as follows

RS of LCD is connected to p0.0 of microcontroller

EN of LCD is connected to p0.1 of microcontroller

D4 of LCD is connected to p0.4 of microcontroller

D5 of LCD is connected to p0.5 of microcontroller

D6 of LCD is connected to p0.6 of microcontroller


D7 of LCD is connected to p0.7 of microcontroller

In 8-bit mode, the complete ASCII code is sent at once along with the control signals. But in 4-bit
mode, the data is divided into two parts, i.e. MSB & LSB, and are called upper nibble & lower nibble.

The control signals are RS, R/W & E. RS is used to select the internal registers i.e. data register &
command register. R/W is used to set the mode of LCD to read mode or write mode. E is used as chip
select and is used to push the data internally to the corresponding registers.

To transfer the data/command in 8-bit mode, the data is written to the 8-bit data bus after selecting
the required register and setting the mode to write mode. The E signal pin is then given a high to low
signal to transfer the data.

To transfer the data/command in 4-bit mode, the higher nibble is first written to the MSB of the
data port and the E is given a high to low signal. After a little delay or when the LCD is not busy, the
lower nibble is transferred in the same procedure.

LCD COMMANDS
Color Sensor
The Color Sensor is a complete color detector. It consists of a TAOS TCS3200 RGB sensor chip
and 4 white LEDs. It can detect and measure a nearly limitless range of visible colors to a certain
degree.

Principle
The color of an object we can see in fact is the chromatic light the object reflects in the white
light (sunlight) after it absorbs the rest ones. The white color is a mixture of various visible
colors, which means it includes each colored light like red (R), yellow (Y), green (G), blue (B),
and purple (P). Based on the theory of three primary colors, any color is made by mixing the
three primary colors (red, green, and blue) in a certain proportion.
Thus, knowing the proportion you can get the color of the tested object. For TCS3200, when a
color filter is selected, it only allows a specific primary color to pass through and blocks the
other two colors. With the light intensity value of the three primary colors, by analysis we can
know the color of light reflected to TCS3200.
The TCS3200 sensor has 4 types of filter: red filter, green filter, blue filter, and clear with no
filter. The filter is selected based on the high/low of pin S2 and S3 on the module (see the table
below): 

The module contains a programmable converter which transforms colorlight to frequency. When
the part of RGB colors in the light reflected by the object passes through the filter selected to the
TAOS TCS3200 RGB chip, the built-in oscillator outputs square waves. The frequency of the
waves is directly proportional to the light intensity – the more intense the light is, the higher is
the frequency. Also, the frequency of the OUT pin on the sensor module is proportional to that of
the oscillator; the proportion depends on the high/low of pin S0 and S1, as shown in the table.  

The schematic diagram of the module:


Features
1) A complete color detector that consists of a TAOS TCS3200 RGB sensor chip and 4 white
LEDs. It can detect and measure a nearly limitless range of visible colors to a certain degree
2) TCS3200 uses a 8- pin SOIC surface mount package
3) Working voltage: 3-5V DC; PCB size: 2.4 x 2.8 cm
4) Place the color sensor on the surface of an object and the color value can be displayed in the
Serial Monitor. 
5) Strong anti-interference ability; the white LED can be controlled on/off.
6) Single-Supply Operation (2.7V to 5.5V)
7) High-Resolution Conversion of Light Intensity to Frequency
8) Programmable Color and Full-Scale Output Frequency
9) Power Down Feature
10) Communicates Directly to Microcontroller
11) Support LED lamp light supplement control

Application
1) Color detection solution
2) Color identification device

TCS3200 Pin Functions


Light Emitting Diodes

Light Emitting Diodes or LEDs, are among the most widely used of all the types of
diodes available. They are the most visible type of diode that emits a fairly narrow bandwidth of
either visible colored light, invisible infra-red or laser type light when a forward current is passed
through them. A "Light Emitting Diode" or LED as it is more commonly called, is basically just
a specialized type of PN-junction diode, made from a very thin layer of fairly heavily doped
semiconductor material. When the diode is Forward Biased, electrons from the semiconductors
conduction band combine with holes from the valence band, releasing sufficient energy to
produce photons of light. Because of this thin layer a reasonable number of these photons can
leave the junction and radiate away producing a coloured light output.

Unlike normal diodes which are made for detection or power rectification, and which are
generally made from either Germanium or Silicon semiconductor material, Light Emitting
Diodes are made from compound type semiconductor materials such as Gallium Arsenide
(GaAs), Gallium Phosphide (GaP), Gallium Arsenide Phosphide (GaAsP), Silicon Carbide (SiC)
or Gallium Indium Nitride (GaInN). The exact choice of the semiconductor material used will
determine the overall wavelength of the photon light emissions and therefore the resulting colour
of the light emitted, as in the case of the visible light coloured LEDs, (RED, AMBER, GREEN
etc).

Typical LED Characteristics


Semiconductor
Wavelength Colour VF @ 20mA
Material
++++GaAs 850-940nm Infra-Red 1.2v
GaAsP 630-660nm Red 1.8v
GaAsP 605-620nm Amber 2.0v
GaAsP:N 585-595nm Yellow 2.2v
GaP
550-570nm Green 3.5v

SiC 430-505nm Blue 3.6v


GaInN 450nm White 4.0v

From the table above we can see that the main P-type dopant used in the manufacture of
Light Emitting Diodes is Gallium (Ga, atomic number 31) and the main N-type dopant used is
Arsenic (As, atomic number 31) giving the resulting Gallium Arsenide (GaAs) crystal structure,
which has the characteristics of radiating significant amounts of infrared radiation from its
junction when a forward current is flowing through it. By also adding Phosphorus (P, atomic
number 15), as a third dopant the overall wavelength of the emitted radiation is reduced to give
visible red light to the human eye. Further refinements in the doping process of the PN-junction
have resulted in a range of colours available from red, orange and amber through to yellow, and
the recently developed blue LED which is achieved by injecting nitrogen atoms into the crystal
structure during the doping process.

Light Emitting Diodes I-V Characteristics:

Before a light emitting diode can "emit" any form of light it needs a current to flow
through it, as it is a current dependant device. As the LED is to be connected in a forward bias
condition across a power supply it should be Current Limited using a series resistor to protect it
from excessive current flow. From the table above we can see that each LED has its own forward
voltage drop across the PN-junction and this parameter which is determined by the
semiconductor material used is the forward voltage drop for a given amount of forward
conduction current, typically for a forward current of 20mA. In most cases LEDs are operated
from a low voltage DC supply, with a series resistor to limit the forward current to a suitable
value from say 5mA for a simple LED indicator to 30mA or more where a high brightness light
output is needed.

LED Series Resistance:


The series resistor value RS is calculated by simply using Ohm´s Law, knowing the
required forward current IF, the supply voltage VS and the expected forward voltage drop of the
LED, VF at this current level as shown below:

LED Typical Applications:The following figure shows how to interface the LED to
microcontroller. As you can see the Anode is connected through a resistor to Vcc and the
Cathode is connected to the Microcontroller pin. So when the Port Pin is HIGH the LED is OFF
and when the Port Pin is LOW the LED is turned ON.

Soil moisture
Soil moisture sensors measure the volumetric water content in soil.[1] Since the direct gravimetric
measurement of free soil moisture requires removing, drying, and weighting of a sample, soil
moisture sensors measure the volumetric water content indirectly by using some other property
of the soil, such as electrical resistance, dielectric constant, or interaction with neutrons, as a
proxy for the moisture content.
The relation between the measured property and soil moisture must be calibrated and may vary
depending on environmental factors such as soil type, temperature, or electric conductivity.
Reflected microwave radiation is affected by the soil moisture and is used for remote
sensing in hydrology and agriculture. Portable probe instruments can be used by farmers or
gardeners.
Soil moisture sensors typically refer to sensors that estimate volumetric water content. Another
class of sensors measure another property of moisture in soils called water potential; these
sensors are usually referred to as soil water potential sensors and include tensiometers and
gypsum blocks.

Contents

 1Technology
 2Application
o 2.1Agriculture
o 2.2Landscape irrigation
o 2.3Research
o 2.4Simple sensors for gardeners
 3See also
 4References
 5External links

Technology
Technologies commonly used to indirectly measure volumetric water content (soil moisture)
include)

 Frequency Domain Reflectometry (FDR): The dielectric constant of a certain volume


element around the sensor is obtained by measuring the operating frequency of an oscillating
circuit.
 Time Domain Transmission (TDT) and Time Domain Reflectometry (TDR) : The dielectric
constant of a certain volume element around the sensor is obtained by measuring the speed
of propagation along a buried transmission line.[2]
 Neutron moisture gauges: The moderator properties of water for neutrons are utilized to
estimate soil moisture content between a source and detector probe.
 Soil resistivity: Measuring how strongly the soil resists the flow of electricity between two
electrodes can be used to determine the soil moisture content.
 Galvanic cell: The amount of water present can be determined based on the voltage the
soil produces because water acts as an electrolyte and produces electricity. The technology
behind this concept is the galvanic cell.[3]
Application
Agriculture
Measuring soil moisture is important for agricultural applications to help farmers manage
their irrigation systems more efficiently. Knowing the exact soil moisture conditions on their
fields, not only are farmers able to generally use less water to grow a crop, they are also able to
increase yields and the quality of the crop by improved management of soil moisture during
critical plant growth stages.[citation needed]
Landscape irrigation
In urban and suburban areas, landscapes and residential lawns are using soil moisture sensors to
interface with an irrigation controller. Connecting a soil moisture sensor to a simple irrigation
clock will convert it into a "smart" irrigation controller that prevents irrigation cycles when the
soil is already wet, e.g. following a recent rainfall event. [4]
Golf courses are using soil moisture sensors to increase the efficiency of their irrigation systems
to prevent over-watering and leaching of fertilizers and other chemicals into the ground. [citation
needed]

Research
Soil moisture sensors are used in numerous research applications, e.g. in agricultural
science and horticulture including irrigation planning, climate research, or environmental
science including solute transport studies and as auxiliary sensors for soil
respiration measurements.
Simple sensors for gardeners
Relatively cheap and simple devices that do not require a power source are available for
checking whether plants have sufficient moisture to thrive. After inserting a probe into the soil
for approximately 60 seconds, a meter indicates if the soil is too dry, moist or wet for plants.

Humidity

Humidity is the amount of water vapour present in air. Water vapour, the gaseous state of water,
is generally invisible to the human eye.[1] Humidity indicates the likelihood
for precipitation, dew, or fog to be present. The amount of water vapour needed to achieve
saturation increases as the temperature increases. As the temperature of a parcel of air decreases
it will eventually reach the saturation point without adding or losing water mass. The amount of
water vapour contained within a parcel of air can vary significantly. For example, a parcel of air
near saturation may contain 28 grams of water per cubic metre of air at 30 °C, but only 8 grams
of water per cubic metre of air at 8 °C.
Three primary measurements of humidity are widely employed: absolute, relative and
specific. Absolute humidity describes the water content of air and is expressed in either grams
per cubic metre[2] or grams per kilogram.[3] Relative humidity, expressed as a percentage,
indicates a present state of absolute humidity relative to a maximum humidity given the same
temperature. Specific humidity is the ratio of water vapor mass to total moist air parcel mass.
Humidity plays an important role for surface life. For animal life dependent
on perspiration (sweating) to regulate internal body temperature, high humidity impairs heat
exchange efficiency by reducing the rate of moisture evaporation from skin surfaces. This effect
can be calculated using a heat index table, also known as a humidex.
Absolute humidity[edit]
Absolute humidity is the total mass of water vapor present in a given volume or mass of air. It
does not take temperature into consideration. Absolute humidity in the atmosphere ranges from
near zero to roughly 30 grams per cubic metre when the air is saturated at 30 °C (86 °F).[5][6]
Absolute humidity is the mass of the water vapor , divided by the volume of the air and water
vapor mixture , which can be expressed as:
The absolute humidity changes as air temperature or pressure changes, if the volume is not fixed.
This makes it unsuitable for chemical engineering calculations, e.g. in drying, where temperature
can vary considerably. As a result, absolute humidity in chemical engineering may refer to mass
of water vapor per unit mass of dry air, also known as the humidity ratio or mass mixing
ratio (see "specific humidity" below), which is better suited for heat and mass balance
calculations. Mass of water per unit volume as in the equation above is also defined
as volumetric humidity. Because of the potential confusion, British Standard BS 1339 [7] suggests
avoiding the term"absolute humidity". Units should always be carefully checked. Many humidity
charts are given in g/kg or kg/kg, but any mass units may be used.
The field concerned with the study of physical and thermodynamic properties of gas–vapor
mixtures is named psychrometrics.
Relative humidity[edit]
Main article: Relative humidityThe relative humidity  or  of an air-water mixture is defined as the
ratio of the partial pressure of water vapor  in the mixture to the equilibrium vapor pressure of
water  over a flat surface of pure water[8] at a given temperature:
Relative humidity is normally expressed as a percentage; a higher percentage means that the air-
water mixture is more humid.
Relative humidity is an important metric used in weather forecasts and reports, as it is an
indicator of the likelihood of precipitation, dew, or fog. In hot summer weather, a rise in relative
humidity increases the apparent temperature to humans(and other animals) by hindering
the evaporation of perspiration from the skin. For example, according to the Heat Index, a
relative humidity of 75% at air temperature of 80.0 °F (26.7 °C) would feel like 83.6 °F ±1.3 °F
(28.7 °C ±0.7 °C).[11][12]
Specific humidity
Specific humidity (or moisture content) is the ratio of the mass of water vapor to the total mass
of the air parcel.[13] Specific humidity is approximately equal to the mixing ratio, which is
defined as the ratio of the mass of water vapor in an air parcel to the mass of dry air for the same
parcel. As temperature decreases, the amount of water vapor needed to reach saturation also
decreases. As the temperature of a parcel of air becomes lower it will eventually reach the point
of saturation without adding or losing water mass.
Measurement[edit]

A hygrometer
A device used to measure humidity is called a psychrometer or hygrometer. A humidistat is a
humidity-triggered switch, often used to control a dehumidifier.
]There are various devices used to measure and regulate humidity. Calibration standards for the
most accurate measurement include the gravimetric hygrometer, chilled mirror hygrometer,
and electrolytic hygrometer. The gravimetric method, while the most accurate, is very
cumbersome. For fast and very accurate measurement the chilled mirror method is effective.
[14]
 For process on-line measurements, the most commonly used sensors nowadays are based
on capacitance measurements to measure relative humidity[15], frequently with internal
conversions to display absolute humidity as well. These are cheap, simple, generally accurate
and relatively robust. All humidity sensors face problems in measuring dust-laden gas, such as
exhaust streams from dryers.
Humidity is also measured on a global scale using remotely placed satellites. These satellites are
able to detect the concentration of water in the troposphere at altitudes between 4 and 12
kilometres. Satellites that can measure water vapor have sensors that are sensitive to infrared
radiation. Water vapor specifically absorbs and re-radiates radiation in this spectral band.
Satellite water vapor imagery plays an important role in monitoring climate conditions (like the
formation of thunderstorms) and in the development of weather forecasts.

Climate
While humidity itself is a climate variable, it also overpowers other climate variables. The
humidity is affected by winds and by rainfall.
The most humid cities on earth are generally located closer to the equator, near coastal regions.
Cities in South and Southeast Asia are among the most humid. Kuala Lumpur, Manila, Jakarta,
and Singapore have very high humidity all year round because of their proximity to water bodies
and the equator and often overcast weather. Some places experience extreme humidity during
their rainy seasons combined with warmth giving the feel of a lukewarm sauna, such
as Kolkata, Chennai and Cochin in India, and Lahore in Pakistan. Sukkur city located on
the Indus River in Pakistan has some of the highest and most uncomfortable dew points in the
country, frequently exceeding 30 °C (86 °F) in the Monsoon season.[16] High temperatures
combine with the high dew point to create heat index in excess of 65 °C (149 °F). Darwin,
Australia experiences an extremely humid wet season from December to
April. Shanghai and Hong Kong also have an extreme humid period in their summer months.
During the South-west and North-east Monsoon seasons (respectively, late May to September
and November to March), expect heavy rains and a relatively high humidity post-rainfall.
Outside the monsoon seasons, humidity is high (in comparison to countries further from the
Equator), but completely sunny days abound. In cooler places such as Northern Tasmania,
Australia, high humidity is experienced all year due to the ocean between mainland Australia and
Tasmania. In the summer the hot dry air is absorbed by this ocean and the temperature rarely
climbs above 35 °C (95 °F).
Global climate
Humidity affects the energy budget and thereby influences temperatures in two major ways.
First, water vapor in the atmosphere contains "latent" energy. During transpiration or
evaporation, this latent heat is removed from surface liquid, cooling the earth's surface. This is
the biggest non-radiative cooling effect at the surface. It compensates for roughly 70% of the
average net radiative warming at the surface.
Second, water vapor is the most abundant of all greenhouse gases. Water vapor, like a green lens
that allows green light to pass through it but absorbs red light, is a "selective absorber". Along
with other greenhouse gases, water vapor is transparent to most solar energy, as one can literally
see. But it absorbs the infrared energy emitted (radiated) upward by the earth's surface, which is
the reason that humid areas experience very little nocturnal cooling but dry desert regions cool
considerably at night. This selective absorption causes the greenhouse effect. It raises the surface
temperature substantially above its theoretical radiative equilibrium temperature with the sun,
and water vapor is the cause of more of this warming than any other greenhouse gas.
Unlike most other greenhouse gases, however, water is not merely below its boiling point in all
regions of the Earth, but below its freezing point at many altitudes. As a condensable greenhouse
gas, it precipitates, with a much lower scale height and shorter atmospheric lifetime- weeks
instead of decades. Without other greenhouse gases, Earth's blackbody temperature, below the
freezing point of water, would cause water vapor to be removed from the atmosphere. Water
vapor is thus a "slave" to the non-condensable greenhouse gases.

Air density and volume


Humidity depends on water vaporization and condensation, which, in turn, mainly depends on
temperature. Therefore, when applying more pressure to a gas saturated with water, all
components will initially decrease in volume approximately according to the ideal gas law.
However, some of the water will condense until returning to almost the same humidity as before,
giving the resulting total volume deviating from what the ideal gas law predicted. Conversely,
decreasing temperature would also make some water condense, again making the final volume
deviate from predicted by the ideal gas law. Therefore, gas volume may alternatively be
expressed as the dry volume, excluding the humidity content. This fraction more accurately
follows the ideal gas law. On the contrary the saturated volume is the volume a gas mixture
would have if humidity was added to it until saturation (or 100% relative humidity).
Humid air is less dense than dry air because a molecule of water (M ≈ 18 u) is less massive than
either a molecule of nitrogen (M ≈ 28) or a molecule of oxygen (M ≈ 32). About 78% of the
molecules in dry air are nitrogen (N2). Another 21% of the molecules in dry air are oxygen (O2).
The final 1% of dry air is a mixture of other gases.
For any gas, at a given temperature and pressure, the number of molecules present in a particular
volume is constant – see ideal gas law. So when water molecules (vapor) are introduced into that
volume of dry air, the number of air molecules in the volume must decrease by the same number,
if the temperature and pressure remain constant. (The addition of water molecules, or any other
molecules, to a gas, without removal of an equal number of other molecules, will necessarily
require a change in temperature, pressure, or total volume; that is, a change in at least one of
these three parameters. If temperature and pressure remain constant, the volume increases, and
the dry air molecules that were displaced will initially move out into the additional volume, after
which the mixture will eventually become uniform through diffusion.) Hence the mass per unit
volume of the gas—its density—decreases. Isaac Newton discovered this phenomenon and wrote
about it in his book Opticks

Effects
Animal and plant life
Humidity is one of the fundamental abiotic factors that defines any habitat (the tundra, wetlands,
and the desert are a few examples), and is a determinant of which animals and plants can thrive
in a given environment.[24]
The human body dissipates heat through perspiration and its evaporation. Heat convection, to the
surrounding air, and thermal radiation are the primary modes of heat transport from the body.
Under conditions of high humidity, the rate of evaporation of sweat from the skin decreases.
Also, if the atmosphere is as warm as or warmer than the skin during times of high
humidity, blood brought to the body surface cannot dissipate heat by conduction to the air. With
so much blood going to the external surface of the body, less goes to the active muscles,
the brain, and other internal organs. Physical strength declines, and fatigue occurs sooner than it
would otherwise. Alertness and mental capacity also may be affected, resulting in heat
stroke or hyperthermia.
Human comfort
Humans are sensitive to humid air because the human body uses evaporative cooling as the
primary mechanism to regulate temperature. Under humid conditions, the rate at which
perspiration evaporates on the skin is lower than it would be under arid conditions. Because
humans perceive the rate of heat transfer from the body rather than temperature itself, we feel
warmer when the relative humidity is high than when it is low.
Some people experience difficulty breathing in humid environments. Some cases may possibly
be related to respiratory conditions such as asthma, while others may be the product of anxiety.
Sufferers will often hyperventilate in response, causing sensations of numbness, faintness, and
loss of concentration, among others.[25]
Air conditioning reduces discomfort by reducing not just temperature but humidity as well.
Heating cold outdoor air can decrease relative humidity levels indoors to below 30%, [26] leading
to ailments such as dry skin, cracked lips, dry eyes and excessive thirst.
Human health
Higher humidity reduces the infectivity of aerosolized influenza virus.
Electronics
Electronic devices are often rated to operate only under specific humidity conditions (e.g., 5% to
95%). At the top end of the range, moisture may increase the conductivity of
permeable insulators leading to malfunction. Too low humidity may make materials brittle. A
particular danger to electronic items, regardless of the stated operating humidity range,
is condensation. When an electronic item is moved from a cold place (e.g. garage, car, shed, an
air conditioned space in the tropics) to a warm humid place (house, outside tropics),
condensation may coat circuit boards and other insulators, leading to short circuit inside the
equipment. Such short circuits may cause substantial permanent damage if the equipment is
powered on before the condensation has evaporated. A similar condensation effect can often be
observed when a person wearing glasses comes in from the cold (i.e. the glasses become foggy).
[28]
 It is advisable to allow electronic equipment to acclimatize for several hours, after being
brought in from the cold, before powering on. Some electronic devices can detect such a change
and indicate, when plugged in and usually with a small droplet symbol, that they cannot be used
until the risk from condensation has passed. In situations where time is critical, increasing air
flow through the device's internals, such as removing the side panel from a PC case and directing
a fan to blow into the case, will reduce significantly the time needed to acclimatize to the new
environment.
In contrast, a very low humidity level favors the build-up of static electricity, which may result in
spontaneous shutdown of computers when discharges occur. Apart from spurious erratic
function, electrostatic discharges can cause dielectric breakdown in solid state devices, resulting
in irreversible damage. Data centers often monitor relative humidity levels for these reasons.
Building construction
Common construction methods often produce building enclosures with a poor thermal boundary,
requiring an insulation and air barrier system designed to retain indoor environmental conditions
while resisting external environmental conditions.[29] The energy-efficient, heavily sealed
architecture introduced in the 20th century also sealed off the movement of moisture, and this
has resulted in a secondary problem of condensation forming in and around walls, which
encourages the development of mold and mildew. Additionally, buildings with foundations not
properly sealed will allow water to flow through the walls due to capillary action of pores found
in masonry products. Solutions for energy-efficient buildings that avoid condensation are a
current topic of architecture.
Industry
High humidity can often have a negative effect on the capacity of chemical plants and refineries
that use furnaces as part of a certain processes (e.g., steam reforming, wet sulfuric acid
processes). For example, because humidity reduces ambient oxygen concentrations (dry air is
typically 20.9% oxygen, but at 100% relative humidity the air is 20.4% oxygen), flue gas fans
must intake air at a higher rate than would otherwise be required to maintain the same firing
rate .[30]
Baking
High humidity in the oven, represented by an elevated wet-bulb temperature, increases
the thermal conductivity of the air around the baked item, leading to a quicker baking process or
even burning. Conversely, low humidity slows the baking process down

RS232

The most popular serial communication standard for asynchronous communications is RS-232
(Recommended Standard – 232. This specifies the rule of how different connected devices
communicate. The connected devices can either be terminals or communication equipments commonly
referred as DTE & DCE.

According to RS232 interface, it requires only 3 lines i.e. Rx, Tx & Ground when compared to
the bunch of connectors required for parallel communication. Even though parallel communication is
easier to establish, serial communication is preferred based on the costs for the communication lines.

  The EIA (Electronics Industry Association) RS232C Standard specifies & suggests a
maximum baud rate of 20,000bps, and RS232D is an advanced version of the same, which
allows 1.5 Mbps. The connectors specified are D-TYPE 25 pin connector and D-TYPE 9 pin
connector.
D-Type-25 pin no. Pin outs Function

3 2 RD Receive Data (Serial data input)

2 3 TD Transmit Data (Serial data output)

7 4 RTS Request to send (acknowledge to modem that UART is ready to


exchange data
8 5 CTS Clear to send (i.e.; modem is ready to exchange data)

6 6 DSR Data ready state (UART establishes a link)

5 7 SG Signal ground

1 8 DCD Data Carrier detect (This line is active when modem detects a
carrier
4 20 DTR Data Terminal Ready.

9 22 RI Ring Indicator (Becomes active when modem detects ringing


signal from PSTN
FIGURE DB-9 PIN CONNECTOR

According to RS232 specifications, the logic ‘1’ and logic ‘0’ are called as ‘mark & ‘space’. The
signal voltage levels are specified as ‘mark’ should be in the range of -3 to -15 volts and ‘space’ should
be in the range of 3 to 15 volts. The modern low power consuming CMOS devices use different logic
levels than the RS232 line specification. The logic levels of CMOS devices are in the range of 3.3v-5.5v
for ‘1’ and -0.3v to 0.8v for ‘0’. Therefore when communicating with such CMOS/TTL devices, the logic
levels need to be converted

RS232 INTERFACED TO MAX 232

J2
C1
U3 1uf
9 5
16

8 4 13 12 P 3 .0 R XD
7 3 T1O U T 8 R 1 IN R 1O U T 9
VCC

6 2 R 2 IN R 2O U T
1 10 14 T1O U T
T XD P 3 .1 11 T 2 IN T1O U T 7
C4 T 1 IN T2O U T
5V 1
3 C 1+
C0 . 51 u f 4 C 1-
5 C 2+
C6 C 2-
0 .1 u f 2
0 .1 u f 6 V+
GND

V-
C7
M A X3232
15

0 .1 u f
Fig RS232 INTERFACED TO MAX232

Rs232 is 9 pin db connector, only three pins of this are used ie 2, 3, 5 the transmit pin of rs232 is
connected to rx pin of microcontroller

MAX232 INTERFACED TO MICROCONTROLLER

MAX232 is connected to the microcontroller as shown in the figure above 17, 18 pins are connected to
the TX and RX pin i.e. transmit and receive pin of microcontroller

GAS (MQ2):
MQ-2 Semiconductor Sensor for Combustible Gas. MQ-2 gas sensor has high sensitivity to
LPG, Propane and Hydrogen, also could be used to Methane and other combustible steam, it is
with low cost and suitable for different application.

Features
Good sensitivity to Combustible gas in wide range
High sensitivity to LPG, Propane and Hydrogen
Long life and low cost
Simple drive circuit
Sensor Type - Semiconductor

MQ-2 Gas Sensor


 
It can detect: LPG, i-butane, propane, methane, alcohol, Hydrogen, smoke
Description : 

MQ-2  Semiconductor Sensor for Combustible Gas

Sensitive material of MQ-2 gas sensor is SnO2, which with lower conductivity in clean air.
When the target combustible gas exist, The sensors conductivity is more higher along with the
gas concentration rising. Please use simple electro circuit, Convert change of conductivity to
correspond output signal of gas concentration.

MQ-2 gas sensor has high sensitity to LPG, Propane and Hydrogen, also could be used to
Methane and other combustible steam, it is with low cost and suitable for different application.
 Character : 

1、High sensitivity to Combustible gas in wide range 

2、High sensitivity to LPG, Propane and Hydrogen

3、Fast response

4、Wide detection range

5、Stable performance long life low cost     

6、Simple drive circuit

Technical Data : 
Application :                       

1)  Domestic gas leakage detector

2)  Industrial Combustible gas detector

3)  Portable gas detector

4)  They are used in gas leakage detecting equipments in family and industry, are suitable for
detecting of LPG, i-butane, propane, methane ,alcohol, Hydrogen, smoke. 

FIRE SENSOR: DR 25
Features
• Low Leakage
• Low Forward Voltage Drop
• High Current Capability
• High Forward Surge Current Capability
Maximum Ratings
• Operating Temperature: -65℃ to +175℃
• Storage Temperature: -65℃ to +175℃
Applications

Specially formulated for optimum high temperature fluid resistance, and long term heat
resistance. Resistant to aviation and diesel fuels, hydraulic fluids and lubricating oils.
Particularly suitable as a jacketing material for military ground vehicle cables and harnesses. It
is also ideally suited for the demands of motorsport cable harnesses. When used in conjunction
with System 25 heat-shrinkable molded shapes and S1125 high performance adhesive, these
products provide a complete cable harness system.

SOFTWARE IMPLEMENTATION(Arduino)
The The Arduino Integrated Development Environment - or Arduino Software (IDE) - contains
a text editor for writing code, a message area, a text console, a toolbar with buttons for common
functions and a series of menus. It connects to the Arduino and Genuino hardware to upload
programs and communicate with them.

Writing Sketches
Programs written using Arduino Software (IDE) are called sketches. These sketches are written
in the text editor and are saved with the file extension .ino. The editor has features for
cutting/pasting and for searching/replacing text. The message area gives feedback while saving
and exporting and also displays errors. The console displays text output by the Arduino Software
(IDE), including complete error messages and other information. The bottom righthand corner of
the window displays the configured board and serial port. The toolbar buttons allow you to verify
and upload programs, create, open, and save sketches, and open the serial monitor.

NB: Versions of the Arduino Software (IDE) prior to 1.0 saved sketches with the extension .pde.
It is possible to open these files with version 1.0, you will be prompted to save the sketch with
the .ino extension on save.
Verify 
Checks your code for errors compiling it.

Upload 
Compiles your code and uploads it to the configured board. See uploading below for
details.

Note: If you are using an external programmer with your board, you can hold down the
"shift" key on your computer when using this icon. The text will change to "Upload
using Programmer"

New 
Creates a new sketch.

Open 
Presents a menu of all the sketches in your sketchbook. Clicking one will open it
within the current window overwriting its content.

Note: due to a bug in Java, this menu doesn't scroll; if you need to open a sketch late in
the list, use the File | Sketchbook menu instead.

Save 
Saves your sketch.

Serial Monitor 
Opens the serial monitor.
Additional commands are found within the five menus: File, Edit, Sketch, Tools, Help. The
menus are context sensitive, which means only those items relevant to the work currently being
carried out are available.

File
 New 
Creates a new instance of the editor, with the bare minimum structure of a sketch already in
place.
 Open 
Allows to load a sketch file browsing through the computer drives and folders.
 Open Recent 
Provides a short list of the most recent sketches, ready to be opened.
 Sketchbook 
Shows the current sketches within the sketchbook folder structure; clicking on any name opens
the corresponding sketch in a new editor instance.
 Examples 
Any example provided by the Arduino Software (IDE) or library shows up in this menu item. All
the examples are structured in a tree that allows easy access by topic or library.
 Close 
Closes the instance of the Arduino Software from which it is clicked.
 Save 
Saves the sketch with the current name. If the file hasn't been named before, a name will be
provided in a "Save as.." window.
 Save as... 
Allows to save the current sketch with a different name.
 Page Setup 
It shows the Page Setup window for printing.
 Print 
Sends the current sketch to the printer according to the settings defined in Page Setup.
 Preferences 
Opens the Preferences window where some settings of the IDE may be customized, as the
language of the IDE interface.
 Quit 
Closes all IDE windows. The same sketches open when Quit was chosen will be automatically
reopened the next time you start the IDE.
Edit

 Undo/Redo 
Goes back of one or more steps you did while editing; when you go back, you may go forward
with Redo.
 Cut 
Removes the selected text from the editor and places it into the clipboard.
 Copy 
Duplicates the selected text in the editor and places it into the clipboard.
 Copy for Forum 
Copies the code of your sketch to the clipboard in a form suitable for posting to the forum,
complete with syntax coloring.
 Copy as HTML 
Copies the code of your sketch to the clipboard as HTML, suitable for embedding in web pages.
 Paste 
Puts the contents of the clipboard at the cursor position, in the editor.
 Select All 
Selects and highlights the whole content of the editor.
 Comment/Uncomment 
Puts or removes the // comment marker at the beginning of each selected line.
 Increase/Decrease Indent 
Adds or subtracts a space at the beginning of each selected line, moving the text one space on the
right or eliminating a space at the beginning.
 Find 
Opens the Find and Replace window where you can specify text to search inside the current
sketch according to several options.
 Find Next 
Highlights the next occurrence - if any - of the string specified as the search item in the Find
window, relative to the cursor position.
 Find Previous 
Highlights the previous occurrence - if any - of the string specified as the search item in the Find
window relative to the cursor position.

Sketch

 Verify/Compile 
Checks your sketch for errors compiling it; it will report memory usage for code and variables in
the console area.
 Upload 
Compiles and loads the binary file onto the configured board through the configured Port.
 Upload Using Programmer 
This will overwrite the bootloader on the board; you will need to use Tools > Burn Bootloader to
restore it and be able to Upload to USB serial port again. However, it allows you to use the full
capacity of the Flash memory for your sketch. Please note that this command will NOT burn the
fuses. To do so a Tools -> Burn Bootloader command must be executed.
 Export Compiled Binary 
Saves a .hex file that may be kept as archive or sent to the board using other tools.
 Show Sketch Folder 
Opens the current sketch folder.
 Include Library 
Adds a library to your sketch by inserting #include statements at the start of your code. For more
details, see libraries below. Additionally, from this menu item you can access the Library
Manager and import new libraries from .zip files.
 Add File... 
Adds a source file to the sketch (it will be copied from its current location). The new file appears
in a new tab in the sketch window. Files can be removed from the sketch using the tab menu
accessible clicking on the small triangle icon below the serial monitor one on the right side o the
toolbar.

Tools
 Auto Format 
This formats your code nicely: i.e. indents it so that opening and closing curly braces line up, and
that the statements inside curly braces are indented more.
 Archive Sketch 
Archives a copy of the current sketch in .zip format. The archive is placed in the same directory
as the sketch.
 Fix Encoding & Reload 
Fixes possible discrepancies between the editor char map encoding and other operating systems
char maps.
 Serial Monitor 
Opens the serial monitor window and initiates the exchange of data with any connected board on
the currently selected Port. This usually resets the board, if the board supports Reset over serial
port opening.
 Board 
Select the board that you're using. See below for descriptions of the various boards.
 Port 
This menu contains all the serial devices (real or virtual) on your machine. It should
automatically refresh every time you open the top-level tools menu.
 Programmer 
For selecting a harware programmer when programming a board or chip and not using the
onboard USB-serial connection. Normally you won't need this, but if you're burning a
bootloader to a new microcontroller, you will use this.
 Burn Bootloader 
The items in this menu allow you to burn a bootloader onto the microcontroller on an Arduino
board. This is not required for normal use of an Arduino or Genuino board but is useful if you
purchase a new ATmega microcontroller (which normally come without a bootloader). Ensure
that you've selected the correct board from the Boards menu before burning the bootloader on the
target board. This command also set the right fuses.

Help
Here you find easy access to a number of documents that come with the Arduino Software
(IDE). You have access to Getting Started, Reference, this guide to the IDE and other documents
locally, without an internet connection. The documents are a local copy of the online ones and
may link back to our online website.

 Find in Reference 
This is the only interactive function of the Help menu: it directly selects the relevant page in the
local copy of the Reference for the function or command under the cursor.

Sketchbook
The Arduino Software (IDE) uses the concept of a sketchbook: a standard place to store your
programs (or sketches). The sketches in your sketchbook can be opened from the File >
Sketchbook menu or from the Open button on the toolbar. The first time you run the Arduino
software, it will automatically create a directory for your sketchbook. You can view or change
the location of the sketchbook location from with the Preferences dialog.

Beginning with version 1.0, files are saved with a .ino file extension. Previous versions use the
.pde extension. You may still open .pde named files in version 1.0 and later, the software will
automatically rename the extension to .ino.

Tabs, Multiple Files, and Compilation


Allows you to manage sketches with more than one file (each of which appears in its own tab).
These can be normal Arduino code files (no visible extension), C files (.c extension), C++ files
(.cpp), or header files (.h).

Uploading
Before uploading your sketch, you need to select the correct items from the Tools >
Board and Tools > Port menus. The boards are described below. On the Mac, the serial port is
probably something like /dev/tty.usbmodem241 (for an Uno or Mega2560 or Leonardo)
or/dev/tty.usbserial-1B1 (for a Duemilanove or earlier USB board),
or /dev/tty.USA19QW1b1P1.1 (for a serial board connected with a Keyspan USB-to-Serial
adapter). On Windows, it's probably COM1 or COM2 (for a serial board)
or COM4, COM5, COM7, or higher (for a USB board) - to find out, you look for USB serial
device in the ports section of the Windows Device Manager. On Linux, it should
be /dev/ttyACMx , /dev/ttyUSBx or similar. Once you've selected the correct serial port and
board, press the upload button in the toolbar or select the Upload item from the Sketch menu.
Current Arduino boards will reset automatically and begin the upload. With older boards (pre-
Diecimila) that lack auto-reset, you'll need to press the reset button on the board just before
starting the upload. On most boards, you'll see the RX and TX LEDs blink as the sketch is
uploaded. The Arduino Software (IDE) will display a message when the upload is complete, or
show an error.

When you upload a sketch, you're using the Arduino bootloader, a small program that has been
loaded on to the microcontroller on your board. It allows you to upload code without using any
additional hardware. The bootloader is active for a few seconds when the board resets; then it
starts whichever sketch was most recently uploaded to the microcontroller. The bootloader will
blink the on-board (pin 13) LED when it starts (i.e. when the board resets).

Libraries
Libraries provide extra functionality for use in sketches, e.g. working with hardware or
manipulating data. To use a library in a sketch, select it from the Sketch > Import Library menu.
This will insert one or more #include statements at the top of the sketch and compile the library
with your sketch. Because libraries are uploaded to the board with your sketch, they increase the
amount of space it takes up. If a sketch no longer needs a library, simply delete
its #include statements from the top of your code.
There is a list of libraries in the reference. Some libraries are included with the Arduino software.
Others can be downloaded from a variety of sources or through the Library Manager. Starting
with version 1.0.5 of the IDE, you do can import a library from a zip file and use it in an open
sketch. See these instructions for installing a third-party library.

To write your own library, see this tutorial.

Third-Party Hardware
Support for third-party hardware can be added to the hardware directory of your sketchbook
directory. Platforms installed there may include board definitions (which appear in the board
menu), core libraries, bootloaders, and programmer definitions. To install, create
the hardware directory, then unzip the third-party platform into its own sub-directory. (Don't use
"arduino" as the sub-directory name or you'll override the built-in Arduino platform.) To
uninstall, simply delete its directory.

For details on creating packages for third-party hardware, see the Arduino IDE 1.5 3rd party
Hardware specification.

Serial Monitor
This displays serial sent from the Arduino or Genuino board over USB or serial connector. To
send data to the board, enter text and click on the "send" button or press enter. Choose the baud
rate from the drop-down menu that matches the rate passed to Serial.begin in your sketch. Note
that on Windows, Mac or Linux the board will reset (it will rerun your sketch) when you connect
with the serial monitor. Please note that the Serial Monitor does not process control characters; if
your sketch needs a complete management of the serial communication with control characters,
you can use an external terminal program and connect it to the COM port assigned to your
Arduino board.
You can also talk to the board from Processing, Flash, MaxMSP, etc (see the interfacing page for
details).

Preferences
Some preferences can be set in the preferences dialog (found under the Arduino menu on the
Mac, or File on Windows and Linux). The rest can be found in the preferences file, whose
location is shown in the preference dialog.

Language Support

 
Since version 1.0.1 , the Arduino Software (IDE) has been translated into 30+ different
languages. By default, the IDE loads in the language selected by your operating system. (Note:
on Windows and possibly Linux, this is determined by the locale setting which controls currency
and date formats, not by the language the operating system is displayed in.)

If you would like to change the language manually, start the Arduino Software (IDE) and open
the Preferences window. Next to the Editor Language there is a dropdown menu of currently
supported languages. Select your preferred language from the menu, and restart the software to
use the selected language. If your operating system language is not supported, the Arduino
Software (IDE) will default to English.

You can return the software to its default setting of selecting its language based on your
operating system by selecting System Defaultfrom the Editor Language drop-down. This setting
will take effect when you restart the Arduino Software (IDE). Similarly, after changing your
operating system's settings, you must restart the Arduino Software (IDE) to update it to the new
default language.

Boards
The board selection has two effects: it sets the parameters (e.g. CPU speed and baud rate) used
when compiling and uploading sketches; and sets and the file and fuse settings used by the burn
bootloader command. Some of the board definitions differ only in the latter, so even if you've
been uploading successfully with a particular selection you'll want to check it before burning the
bootloader. You can find a comparison table between the various boards here.

Arduino Software (IDE) includes the built in support for the boards in the following list, all
based on the AVR Core. The Boards Managerincluded in the standard installation allows to add
support for the growing number of new boards based on different cores like Arduino Due,
Arduino Zero, Edison, Galileo and so on.

 Arduino Yùn 
An ATmega32u4 running at 16 MHz with auto-reset, 12 Analog In, 20 Digital I/O and 7 PWM.
 Arduino/Genuino Uno 
An ATmega328P running at 16 MHz with auto-reset, 6 Analog In, 14 Digital I/O and 6 PWM.
 Arduino Diecimila or Duemilanove w/ ATmega168 
An ATmega168 running at 16 MHz with auto-reset.
 Arduino Nano w/ ATmega328P 
An ATmega328P running at 16 MHz with auto-reset. Has eight analog inputs.
 Arduino/Genuino Mega 2560 
An ATmega2560 running at 16 MHz with auto-reset, 16 Analog In, 54 Digital I/O and 15 PWM.
 Arduino Mega 
An ATmega1280 running at 16 MHz with auto-reset, 16 Analog In, 54 Digital I/O and 15 PWM.
 Arduino Mega ADK 
An ATmega2560 running at 16 MHz with auto-reset, 16 Analog In, 54 Digital I/O and 15 PWM.
 Arduino Leonardo 
An ATmega32u4 running at 16 MHz with auto-reset, 12 Analog In, 20 Digital I/O and 7 PWM.
 Arduino/Genuino Micro 
An ATmega32u4 running at 16 MHz with auto-reset, 12 Analog In, 20 Digital I/O and 7 PWM.
 Arduino Esplora 
An ATmega32u4 running at 16 MHz with auto-reset.
 Arduino Mini w/ ATmega328P
An ATmega328P running at 16 MHz with auto-reset, 8 Analog In, 14 Digital I/O and 6 PWM.
 Arduino Ethernet 
Equivalent to Arduino UNO with an Ethernet shield: An ATmega328P running at 16 MHz with
auto-reset, 6 Analog In, 14 Digital I/O and 6 PWM.
 Arduino Fio 
An ATmega328P running at 8 MHz with auto-reset. Equivalent to Arduino Pro or Pro Mini
(3.3V, 8 MHz) w/ ATmega328P, 6 Analog In, 14 Digital I/O and 6 PWM.
 Arduino BT w/ ATmega328P 
ATmega328P running at 16 MHz. The bootloader burned (4 KB) includes codes to initialize the
on-board bluetooth module, 6 Analog In, 14 Digital I/O and 6 PWM..
 LilyPad Arduino USB 
An ATmega32u4 running at 8 MHz with auto-reset, 4 Analog In, 9 Digital I/O and 4 PWM.
 LilyPad Arduino 
An ATmega168 or ATmega132 running at 8 MHz with auto-reset, 6 Analog In, 14 Digital I/O
and 6 PWM.
 Arduino Pro or Pro Mini (5V, 16 MHz) w/ ATmega328P 
An ATmega328P running at 16 MHz with auto-reset. Equivalent to Arduino Duemilanove or
Nano w/ ATmega328P; 6 Analog In, 14 Digital I/O and 6 PWM.
 Arduino NG or older w/ ATmega168 
An ATmega168 running at 16 MHz without auto-reset. Compilation and upload is equivalent to
Arduino Diecimila or Duemilanove w/ ATmega168, but the bootloader burned has a slower
timeout (and blinks the pin 13 LED three times on reset); 6 Analog In, 14 Digital I/O and 6
PWM.
 Arduino Robot Control 
An ATmega328P running at 16 MHz with auto-reset.
 Arduino Robot Motor 
An ATmega328P running at 16 MHz with auto-reset.
 Arduino Gemma 
An ATtiny85 running at 8 MHz with auto-reset, 1 Analog In, 3 Digital I/O and 2 PWM.

PROTEUS
Proteus is a simulation and design software tool developed by Labcenter
Electronics for Electrical
and Electronic circuit design. It also possess 2D CAD drawing feature. It deserves to bear the
tagline “From concept to completion”.

About Proteus

It is a software suite containing schematic, simulation as well as PCB designing.

 ISIS is the software used to draw schematics and simulate the circuits in real time.The
simulation allows human access during run time,thus providing real time simulation.
 ARES  is used for PCB designing.It has the feature of viewing output in 3D view of the
designed PCB along  with components.
 The designer can also develop 2D drawings for the product.

Features

ISIS has wide range of components in its library. It has sources, signal generators, measurement 
and analysis tools like oscilloscope, voltmeter, ammeter etc., probes for real time monitoring of
the parameters of the circuit, switches, displays, loads like motors and lamps, discrete
components like resistors, capacitors, inductors, transformers, digital and analog Integrated
circuits, semi-conductor switches, relays, microcontrollers, processors, sensors etc.

ARES offers PCB designing up to 14 inner layers, with surface mount and through hole
packages. It is embedded with the foot prints of different category of components like ICs,
transistors, headers, connectors and other discrete components. It offers Auto routing and manual
routing options to the PCB Designer. The schematic drawn in the ISIS can be directly transferred
ARES.

Starting New Design

Step 2: A dialogue box appears to save the current design. However, we are creating a new
design file so you can click Yes or No depending on the content of the present file. Then a Pop-
Up appears asking to select the template. It is similar to selecting the paper size while printing.
For now select default or according to the layout  size of the circuit.
Step 3: An untitled design sheet will be opened, save it according to your wish,it is better to
create a new folder for every layout as it generates other files supporting your design. However,it
is not mandatory.
Step 4:To Select components, Click on the component mode button.

Component Mode
Step 5: Click On Pick from Libraries. It shows the categories of components available and a
search option to enter the part name.

Steps:
1. Open Proteus ISIS Schematic Capture
2. Select the Component Mode from the left Toolbar
3. Click On P (Pick From Libraries)
4. Add all the required components
5. Place the components on the workspace
6. Wire up the circuit
7. Click on Play Button on the bottom left to start simulation.
Source code:

#define S0 4

#define S1 5

#define S2 6

#define S3 7

#define sensorOut 8

int frequency = 0;

int sensor1 = A0;

int sensor2 = A1;

int sensor3 = A2;

int R;

int G;

int B;

int sen1 = 0;

int sen2 = 0;

int sen3 = 0;

void setup() {

pinMode(S0, OUTPUT);
pinMode(S1, OUTPUT);

pinMode(S2, OUTPUT);

pinMode(S3, OUTPUT);

pinMode(sensorOut, INPUT);

pinMode(sensor1, INPUT);

pinMode(sensor2, INPUT);

pinMode(sensor3, INPUT);

// Setting frequency-scaling to 20%

digitalWrite(S0,HIGH);

digitalWrite(S1,LOW);

Serial.begin(9600);

void loop() {

sen1 = analogRead(A0);

sen2 = analogRead(A1);

sen3 = analogRead(A2);

Serial.print("nitrate = ");
Serial.print(sen1);

Serial.print("humidity = ");

Serial.print(sen2);

Serial.print("soilmoisture = ");

Serial.print(sen3);

// Setting red filtered photodiodes to be read

digitalWrite(S2,LOW);

digitalWrite(S3,LOW);

// Reading the output frequency

frequency = pulseIn(sensorOut, LOW);

// Printing the value on the serial monitor

Serial.print("R= ");//printing name

Serial.print(frequency);//printing RED color frequency

Serial.println(" ");

delay(100);

// Setting Green filtered photodiodes to be read

digitalWrite(S2,HIGH);

digitalWrite(S3,HIGH);

// Reading the output frequency


frequency = pulseIn(sensorOut, LOW);

// Printing the value on the serial monitor

Serial.print("G= ");//printing name

Serial.print(frequency);//printing RED color frequency

Serial.println(" ");

delay(100);

// Setting Blue filtered photodiodes to be read

digitalWrite(S2,LOW);

digitalWrite(S3,HIGH);

// Reading the output frequency

frequency = pulseIn(sensorOut, LOW);

// Printing the value on the serial monitor

Serial.print("B= ");//printing name

Serial.print(frequency);//printing RED color frequency

Serial.println(" ");

delay(2000);

if(R<100 )

{ ///This value should be change according to your reding please check serial monitor to know
your reading.
// color = 1; // Red

//Serial.println("Red ");

if(G<100){

//color = 2; // Green

//Serial.println("Green ");

if(B<100){

//color = 3;

//Serial.println("Blue ");

// color = 4; // Blue

Application:

kit images:

Results:
Conclusion:

References:

 "What is Water Vapor". Retrieved 2012-08-28.

Wyer, Samuel S. (1906). "Fundamental Physical Laws and Definitions". A Treatise on Producer-
Gas and Gas-Producers. McGraw-Hill Book Company. p. 23.

Perry, R.H. and Green, D.W, (2007) Perry's Chemical Engineers' Handbook(8th Edition), Section
12, Psychometry, Evaporative Cooling and Solids Drying McGraw-Hill, ISBN 978-0-07-151135-3

"Antarctic Air Visits Paranal". ESO Picture of the Week. Retrieved 4 February 2014.

"Climate - Humidity indexes". Encyclopedia Britannica. Retrieved 15 February 2018

https://www.arduino.cc/en/guide/environment

Arnold, James E. "Soil Moisture". NASA. Retrieved 15 June 2015. Soil moisture is difficult to


define it means different things in different disciplines. For example, a farmer's concept of soil
moisture is different from that of a water resource manager or a weather forecaster. Generally,
however, soil moisture is the water that is held in the spaces between soil particles. Surface soil
moisture is the water that is in the upper 10 cm of soil, whereas root zone soil moisture is the
water that is available to plants, which is generally considered to be in the upper 200 cm of soil.
[permanent dead link]

Blonquist, J. M. (April 2005). "A time domain transmission sensor with TDR performance
characteristics" (PDF). Journal of Hydrology. 314: 235–245. doi:10.1016/j.jhydrol.2005.04.005.
Retrieved 31 Jan 2016.

Gaikwad, Pramod. "Galvanic Cell Type Sensor for Soil Moisture Analysis". Analytical
Chemistry. 87: 7439–7445. doi:10.1021/acs.analchem.5b01653.

Kevin Handreck. Good Gardens with Less Water, Csiro Publishing,


2008 ISBN 0643094709 pages 79-81

Decagon Devices "List of peer-reviewed publications using Decagon soil moisture sensors".
Retrieved: 20 July 2015.
Chapter-4

Technologies Used:

XML
JAVA
PHP
MYSQL

3. SYSTEM SPECIFICATIONS

3.1. Hardware Specification:

Minimum Server requirements

 PROCESSOR: Intel core2Duo or Above Version.


 RAM : Minimum 2GB
 Hard-disk: 80 GB
 Server : Xampp-PhpmyAdmin , MySQL
 Operating System: Windows 7(32/64-bit) or above version.

Minimum Mobile requirements

 PROCESSOR: Minimum 512MHz.


 RAM : Minimum 512MB
 Internal Memory: 100 MB
 Operating System: Android version 2.2 or above version.

3 .2 Software Requirements for Demonstration and development purpose:


Android Studio 1.3
XAMPP (Apache server, MySql, PHP).

3.3. TECHNOLOGY USED:


XML (Extensible Markup Language):

Extensible Markup Language (XML) is a markup language that defines a set of rules for
encoding documents in a format which is both human-readable and machine-readable. It is
defined by the W3C's XML 1.0 Specification and by several other related specifications, all of
which are free open standards.

The design goals of XML emphasize simplicity, generality and usability across the Internet. It is
a textual data format with strong support via Unicode for different human languages. Although
the design of XML focuses on documents, it is widely used for the representation of arbitrary
data structures such as those used in web services.

JAVA

Java is a general-purpose computer programming language that is concurrent, class-based,


object-oriented, and specifically designed to have as few implementation dependencies as
possible. It is intended to let application developers "write once, run anywhere" (WORA)
meaning that compiled Java code can run on all platforms that support Java without the need for
recompilation. Java applications are typically compiled to byte code that can run on any Java
virtual machine (JVM) regardless of computer architecture. As of 2015, Java is one of the most
popular programming languages in use, particularly for client-server web applications, with a
reported 9 million developers. Java was originally developed by James Gosling at Sun
Microsystems (which has since been acquired by Oracle Corporation) and released in 1995 as a
core component of Sun Microsystems' Java platform. The language derives much of its syntax
from C and C++, but it has fewer low-level facilities than either of them.

Chapter-4

Android:

Android is a mobile operating system (OS) currently developed by Google, based on the
Linux kernel and designed primarily for touch screen mobile devices such as smart phones and
tablets. Android's user interface is based on direct manipulation, using touch gestures that loosely
correspond to real-world actions, such as swiping, tapping and pinching, to manipulate on-screen
objects, along with a virtual keyboard for text input. In addition to touch screen devices, Google
has further developed Android TV for televisions, Android Auto for cars, and Android Wear for
wrist watches, each with a specialized user interface. Variants of Android are also used on
notebooks, game consoles, digital cameras, and other electronics. As of 2015, Android has the
largest installed base of all operating systems.

Android OS versions:

My SQL (Data Base):


MySQL is the most popular Open Source Relational SQL database management system.
MySQL is one of the best RDBMS being used for developing web-based software applications.

What is Database?
A database is a separate application that stores a collection of data. Each database has one or
more distinct APIs for creating, accessing, managing, searching and replicating the data it holds.
Other kinds of data stores can be used, such as files on the file system or large hash tables in
memory but data fetching and writing would not be so fast and easy with those types of
systems.

So nowadays, we use relational database management systems (RDBMS) to store and manage
huge volume of data. This is called relational database because all the data is stored into
different tables and relations are established using primary keys or other keys known as foreign
keys.

A Relational Database Management System (RDBMS) is software that:

 Enables you to implement a database with tables, columns and indexes.


 Guarantees the Referential Integrity between rows of various tables.
 Updates the indexes automatically.
 Interprets an SQL query and combines information from various tables.

XAMPP:
XAMPP requires only one zip, tar, 7z, or exe file to be downloaded and run, and little or no
configuration of the various components that make up the web server is required. XAMPP is
regularly updated to incorporate the latest releases of Apache, MySQL, PHP and Perl. It also
comes with a number of other modules including OpenSSL and phpMyAdmin.

Self-contained, multiple instances of XAMPP can exist on a single computer, and any given
instance can be copied from one computer to another.

It is offered in both a full, standard version and a smaller version.

Officially, XAMPP's designers intended it for use only as a development tool, to allow website
designers and programmers to test their work on their own computers without any access to the
Internet. To make this as easy as possible, many important security features are disabled by
default. In practice, however, XAMPP is sometimes used to actually serve web pages on
the World Wide Web. A special tool is provided to password-protect the most important parts of
the package.

XAMPP also provides support for creating and manipulating databases


in MySQL and SQLite among others.
Chapter-5

IoT (Internet of things):

The Internet of things (IoT) is the extension of Internet connectivity into physical devices and


everyday objects. Embedded with electronics, Internet connectivity, and other forms of hardware
(such as sensors), these devices can communicate and interact with others over the Internet, and
they can be remotely monitored and controlled.

The definition of the Internet of things has evolved due to the convergence of multiple
technologies, real-time analytics, machine learning, commodity sensors, and embedded systems.
Traditional fields of embedded systems, wireless sensor networks, control
systems, automation (including home and building automation), and others all contribute to
enabling the Internet of things. In the consumer market, IoT technology is most synonymous
with products pertaining to the concept of the "smart home", covering devices and appliances
(such as lighting fixtures, thermostats, home security systems and cameras, and other home
appliances) that support one or more common ecosystems, and can be controlled via devices
associated with that ecosystem, such as smartphones and smart speakers.

The IoT concept has faced prominent criticism, especially in regards


to privacy and security concerns related to these devices and their intention of pervasive
presence.

History:

The concept of a network of smart devices was discussed as early as 1982, with a modified Coke
vending machine at Carnegie Mellon University becoming the first Internet-connected
appliance, able to report its inventory and whether newly loaded drinks were cold or not. Mark
Weiser's 1991 paper on ubiquitous computing, "The Computer of the 21st Century", as well as
academic venues such as UbiComp and PerCom produced the contemporary vision of the IoT. In
1994, Reza Raji described the concept in IEEE Spectrum as "[moving] small packets of data to a
large set of nodes, so as to integrate and automate everything from home appliances to entire
factories". Between 1993 and 1997, several companies proposed solutions like Microsoft's at
Work or Novell's NEST. The field gained momentum when Bill Joy envisioned device-to-
device communication as a part of his "Six Webs" framework, presented at the World Economic
Forum at Davos in 1999.

The term "Internet of things" was likely coined by Kevin Ashton of Procter & Gamble,
later MIT's Auto-ID Center, in 1999, though he prefers the phrase "Internet for things". At that
point, he viewed Radio-frequency identification (RFID) as essential to the Internet of
things, which would allow computers to manage all individual things.

A research article mentioning the Internet of Things was submitted to the conference for Nordic
Researchers in Norway, in June 2002, which was preceded by an article published in Finnish in
January 2002. The implementation described there was developed by Kary Främling and his
team at Helsinki University of Technology and more closely matches the modern one, i.e. an
information system infrastructure for implementing smart, connected objects.

Defining the Internet of things as "simply the point in time when more 'things or objects' were
connected to the Internet than people", Cisco Systems estimated that the IoT was "born" between
2008 and 2009, with the things/people ratio growing from 0.08 in 2003 to 1.84 in 2010.

Applications

A Nest learning thermostat reporting on energy usage and local weather.


A Ring doorbell connected to the Internet

An August Home smart lock connected to the Internet

The extensive set of applications for IoT devices is often divided into consumer, commercial,
industrial, and infrastructure spaces.

Consumer applications

A growing portion of IoT devices are created for consumer use, including connected
vehicles, home automation, wearable technology (as part of Internet of Wearable Things
(IoWT)), connected health, and appliances with remote monitoring capabilities.

Smart home

IoT devices are a part of the larger concept of home automation, which can include lighting,
heating and air conditioning, media and security systems. Long-term benefits could include
energy savings by automatically ensuring lights and electronics are turned off.

A smart home or automated home could be based on a platform or hubs that control smart
devices and appliances. For instance, using Apple's HomeKit, manufacturers can have their
home products and accessories controlled by an application in iOS devices such as
the iPhone and the Apple Watch. This could be a dedicated app or iOS native applications such
as Siri. This can be demonstrated in the case of Lenovo's Smart Home Essentials, which is a line
of smart home devices that are controlled through Apple's Home app or Siri without the need for
a Wi-Fi bridge. There are also dedicated smart home hubs that are offered as standalone
platforms to connect different smart home products and these include the Amazon Echo, Google
Home, Apple's HomePod, and Samsung's SmartThings Hub. In addition to the commercial
systems, there are many non-proprietary, open source ecosystems; including Home Assistant,
OpenHAB and Domoticz.

Elder care

One key application of a smart home is to provide assistance for those with disabilities and
elderly individuals. These home systems use assistive technology to accommodate an owner's
specific disabilities. Voice control can assist users with sight and mobility limitations while alert
systems can be connected directly to cochlear implants worn by hearing-impaired users. They
can also be equipped with additional safety features. These features can include sensors that
monitor for medical emergencies such as falls or seizures. Smart home technology applied in this
way can provide users with more freedom and a higher quality of life.

The term "Enterprise IoT" refers to devices used in business and corporate settings. By 2019, it is
estimated that the EIoT will account for 9.1 billion devices.

Commercial application

Medical and healthcare

The Internet of Medical Things (also called the internet of health things) is an application of


the IoT for medical and health related purposes, data collection and analysis for research, and
monitoring. This 'Smart Healthcare', as it is also called, led to the creation of a digitized
healthcare system, connecting available medical resources and healthcare services.

IoT devices can be used to enable remote health monitoring and emergency notification systems.


These health monitoring devices can range from blood pressure and heart rate monitors to
advanced devices capable of monitoring specialized implants, such as pacemakers, Fitbit
electronic wristbands, or advanced hearing aids. Some hospitals have begun implementing
"smart beds" that can detect when they are occupied and when a patient is attempting to get up. It
can also adjust itself to ensure appropriate pressure and support is applied to the patient without
the manual interaction of nurses. A 2015 Goldman Sachs report indicated that healthcare IoT
devices "can save the United States more than $300 billion in annual healthcare expenditures by
increasing revenue and decreasing cost." Moreover, the use of mobile devices to support medical
follow-up led to the creation of 'm-health', used "to analyze, capture, transmit and store health
statistics from multiple resources, including sensors and other biomedical acquisition systems".

Specialized sensors can also be equipped within living spaces to monitor the health and general
well-being of senior citizens, while also ensuring that proper treatment is being administered and
assisting people regain lost mobility via therapy as well. These sensors create a network of
intelligent sensors that are able to collect, process, transfer, and analyse valuable information in
different environments, such as connecting in-home monitoring devices to hospital-based
systems. Other consumer devices to encourage healthy living, such as connected scales
or wearable heart monitors, are also a possibility with the IoT. End-to-end health monitoring IoT
platforms are also available for antenatal and chronic patients, helping one manage health vitals
and recurring medication requirements.

Advances in plastic and fabric electronics fabrication methods have enabled ultra-low cost, use-
and-throw IoMT sensors. These sensors, along with the required RFID electronics, can be
fabricated on paper or e-textiles for wirelessly powered disposable sensing devices. Applications
have been established for point-of-care medical diagnostics, where portability and low system-
complexity is essential.

As of 2018 IoMT was not only being applied in the clinical laboratory industry, but also in the
healthcare and health insurance industries. IoMT in the healthcare industry is now permitting
doctors, patients, and others involved (i.e. guardians of patients, nurses, families, etc.) to be part
of a system, where patient records are saved in a database, allowing doctors and the rest of the
medical staff to have access to the patient's information. Moreover, IoT-based systems are
patient-centered, which involves being flexible to the patient's medical conditions. IoMT in the
insurance industry provides access to better and new types of dynamic information. This includes
sensor-based solutions such as biosensors, wearables, connected health devices, and mobile apps
to track customer behaviour. This can lead to more accurate underwriting and new pricing
models.

The application of the IOT in healthcare plays a fundamental role in managing chronic diseases
and in disease prevention and control. Remote monitoring is made possible through the
connection of powerful wireless solutions. The connectivity enables health practitioners to
capture patient's data and applying complex algorithms in health data analysis.

Transportation

Digital variable speed-limit sign.

The IoT can assist in the integration of communications, control, and information processing
across various transportation systems. Application of the IoT extends to all aspects of
transportation systems (i.e. the vehicle,[57] the infrastructure, and the driver or user). Dynamic
interaction between these components of a transport system enables inter- and intra-vehicular
communication, smart traffic control, smart parking, electronic toll collection systems, logistics
and fleet management, vehicle control, safety, and road assistance. In Logistics and Fleet
Management, for example, an IoT platform can continuously monitor the location and conditions
of cargo and assets via wireless sensors and send specific alerts when management exceptions
occur (delays, damages, thefts, etc.). This can only be possible with the IoT and its seamless
connectivity among devices. Sensors such as GPS, Humidity, and Temperature send data to the
IoT platform and then the data is analyzed and then sent to the users. This way, users can track
the real-time status of vehicles and can make appropriate decisions. If combined with Machine
Learning, then it also helps in reducing traffic accidents by introducing drowsiness alerts to
drivers and providing self-driven cars too.
V2X communications
Main article: V2X

In vehicular communication systems, vehicle-to-everything communication (V2X), consists of


three main components: vehicle to vehicle communication (V2V), vehicle to infrastructure
communication (V2I) and vehicle to pedestrian communications (V2P). V2X is the first step
to autonomous driving and connected road infrastructure.

Building and home automation

IoT devices can be used to monitor and control the mechanical, electrical and electronic systems
used in various types of buildings (e.g., public and private, industrial, institutions, or
residential) in home automation and building automation systems. In this context, three main
areas are being covered in literature:

 The integration of the Internet with building energy management systems in order to
create energy efficient and IOT-driven "smart buildings".
 The possible means of real-time monitoring for reducing energy consumption and
monitoring occupant behaviors.
 The integration of smart devices in the built environment and how they might to know
how to be used in future applications.

Industrial applications
Main article: Industrial Internet of Things

Manufacturing

The IoT can realize the seamless integration of various manufacturing devices equipped with
sensing, identification, processing, communication, actuation, and networking capabilities. Based
on such a highly integrated smart cyberphysical space, it opens the door to create whole new
business and market opportunities for manufacturing. Network control and management
of manufacturing equipment, assetand situation management, or manufacturing process
control bring the IoT within the realm of industrial applications and smart manufacturing as well.
The IoT intelligent systems enable rapid manufacturing of new products, dynamic response to
product demands, and real-time optimization of manufacturing production and supply chain
networks, by networking machinery, sensors and control systems together.
Digital control systems to automate process controls, operator tools and service information
systems to optimize plant safety and security are within the purview of the IoT. But it also
extends itself to asset management via predictive maintenance, statistical evaluation, and
measurements to maximize reliability. Industrial management systems can also be integrated
with smart grids, enabling real-time energy optimization. Measurements, automated controls,
plant optimization, health and safety management, and other functions are provided by a large
number of networked sensors.

Industrial IoT (IIoT) in manufacturing could generate so much business value that it will
eventually lead to the Fourth Industrial Revolution, also referred to as Industry 4.0. The potential
for growth from implementing IIoT may generate $12 trillion of global GDP by 2030.

Design architecture of cyber-physical systems-enabled manufacturing system

Industrial big dataanalytics will play a vital role in manufacturing asset predictive maintenance,
although that is not the only capability of industrial big data. Cyber-physical systems (CPS) is
the core technology of industrial big data and it will be an interface between human and the
cyber world. Cyber-physical systems can be designed by following the 5C (connection,
conversion, cyber, cognition, configuration) architecture, and it will transform the collected data
into actionable information, and eventually interfere with the physical assets to optimize
processes.

An IoT-enabled intelligent system of such cases was proposed in 2001 and later demonstrated in
2014 by the National Science Foundation Industry/University Collaborative Research Center
for Intelligent Maintenance Systems (IMS) at the University of Cincinnati on a bandsaw machine
in IMTS 2014 in Chicago. Bandsaw machines are not necessarily expensive, but the bandsaw
belt expenses are enormous since they degrade much faster. However, without sensing and
intelligent analytics, it can be only determined by experience when the band saw belt will
actually break. The developed prognosticssystem will be able to recognize and monitor the
degradation of band saw belts even if the condition is changing, advising users when is the best
time to replace the belt. This will significantly improve user experience and operator safety and
ultimately save on costs.

Agriculture

There are numerous IoT applications in farming such as collecting data on temperature, rainfall,
humidity, wind speed, pest infestation, and soil content. This data can be used to automate
farming techniques, take informed decisions to improve quality and quantity, minimize risk and
waste, and reduce effort required to manage crops. For example, farmers can now monitor soil
temperature and moisture from afar, and even apply IoT-acquired data to precision fertilization
programs.

In August 2018, Toyota Tsusho began a partnership with Microsoft to create fish farming tools


using the Microsoft Azure application suite for IoT technologies related to water management.
Developed in part by researchers from Kindai University, the water pump mechanisms
use artificial intelligence to count the number of fish on a conveyor belt, analyze the number of
fish, and deduce the effectiveness of water flow from the data the fish provide. The
specific computer programs used in the process fall under the Azure Machine Learning and the
Azure IoT Hub platforms.

Infrastructure applications

Monitoring and controlling operations of sustainable urban and rural infrastructures like bridges,
railway tracks and on- and offshore wind-farms is a key application of the IoT. The IoT
infrastructure can be used for monitoring any events or changes in structural conditions that can
compromise safety and increase risk. The IoT can benefit the construction industry by cost
saving, time reduction, better quality workday, paperless workflow and increase in productivity.
It can help in taking faster decisions and save money with Real-Time Data Analytics. It can also
be used for scheduling repair and maintenance activities in an efficient manner, by coordinating
tasks between different service providers and users of these facilities. IoT devices can also be
used to control critical infrastructure like bridges to provide access to ships. Usage of IoT
devices for monitoring and operating infrastructure is likely to improve incident management
and emergency response coordination, and quality of service, up-times and reduce costs of
operation in all infrastructure related areas. Even areas such as waste management can
benefit from automation and optimization that could be brought in by the IoT.

Metropolitan scale deployments

There are several planned or ongoing large-scale deployments of the IoT, to enable better
management of cities and systems. For example, Songdo, South Korea, the first of its kind fully
equipped and wired smart city, is gradually being built, with approximately 70 percent of the
business district completed as of June 2018. Much of the city is planned to be wired and
automated, with little or no human intervention.

Another application is a currently undergoing project in Santander, Spain. For this deployment,
two approaches have been adopted. This city of 180,000 inhabitants has already seen 18,000
downloads of its city smartphone app. The app is connected to 10,000 sensors that enable
services like parking search, environmental monitoring, digital city agenda, and more. City
context information is used in this deployment so as to benefit merchants through a spark deals
mechanism based on city behavior that aims at maximizing the impact of each notification.

Other examples of large-scale deployments underway include the Sino-Singapore Guangzhou


Knowledge City; work on improving air and water quality, reducing noise pollution, and
increasing transportation efficiency in San Jose, California; and smart traffic management in
western Singapore. Using its RPMA (Random Phase Multiple Access) technology, San Diego-
based Ingenuhas built a nationwide public network  for low-bandwidth data transmissions using
the same unlicensed 2.4 gigahertz spectrum as Wi-Fi. Ingenu's “Machine Network” covers more
than a third of the US population across 35 major cities including San Diego and Dallas. French
company, Sigfox, commenced building an Ultra Narrowband wireless data network in the San
Francisco Bay Area in 2014, the first business to achieve such a deployment in the U.S. It
subsequently announced it would set up a total of 4000 base stations to cover a total of 30 cities
in the U.S. by the end of 2016, making it the largest IoT network coverage provider in the
country thus far. Cisco also participates in smart cities projects. Cisco has started deploying
technologies for Smart Wi-Fi, Smart Safety & Security, Smart Lighting, Smart Parking, Smart
Transports, Smart Bus Stops, Smart Kiosks, Remote Expert for Government Services (REGS)
and Smart Education in the five km area in the city of Vijaywada.

Another example of a large deployment is the one completed by New York Waterways in New
York City to connect all the city's vessels and be able to monitor them live 24/7. The network
was designed and engineered by Fluidmesh Networks, a Chicago-based company developing
wireless networks for critical applications. The NYWW network is currently providing coverage
on the Hudson River, East River, and Upper New York Bay. With the wireless network in place,
NY Waterway is able to take control of its fleet and passengers in a way that was not previously
possible. New applications can include security, energy and fleet management, digital signage,
public Wi-Fi, paperless ticketing and others.

Energy management

Significant numbers of energy-consuming devices (e.g. switches, power outlets, bulbs,


televisions, etc.) already integrate Internet connectivity, which can allow them to communicate
with utilities to balance power generation and energy usage and optimize energy consumption as
a whole. These devices allow for remote control by users, or central management via a cloud-
based interface, and enable functions like scheduling (e.g., remotely powering on or off heating
systems, controlling ovens, changing lighting conditions etc.). The smart grid is a utility-side IoT
application; systems gather and act on energy and power-related information to improve the
efficiency of the production and distribution of electricity. Using advanced metering
infrastructure (AMI) Internet-connected devices, electric utilities not only collect data from end-
users, but also manage distribution automation devices like transformers.

Environmental monitoring

Environmental monitoring applications of the IoT typically use sensors to assist in environmental


protection by monitoring air or water quality, atmospheric or soil conditions, and can even
include areas like monitoring the movements of wildlife and their habitats. Development of
resource-constrained devices connected to the Internet also means that other applications
like earthquake or tsunami early-warning systems can also be used by emergency services to
provide more effective aid. IoT devices in this application typically span a large geographic area
and can also be mobile. It has been argued that the standardization IoT brings to wireless sensing
will revolutionize this area.

Living Lab

Another example of integrating the IoT is Living Lab which integrates and combines research
and innovation process, establishing within a public-private-people-partnership. There are
currently 320 Living Labs that use the IoT to collaborate and share knowledge between
stakeholders to co-create innovative and technological products. For companies to implement
and develop IoT services for smart cities, they need to have incentives. The governments play
key roles in smart cities projects as changes in policies will help cities to implement the IoT
which provides effectiveness, efficiency, and accuracy of the resources that are being used. For
instance, the government provides tax incentives and cheap rent, improves public transports, and
offers an environment where start-up companies, creative industries, and multinationals may co-
create, share common infrastructure and labor markets, and take advantages of locally embedded
technologies, production process, and transaction costs. The relationship between the technology
developers and governments who manage city's assets, is key to provide open access of resources
to users in an efficient way.

Trends and characteristics

Technology roadmap: Internet of things.


The IoT's major significant trend in recent years is the explosive growth of devices connected
and controlled by the Internet. The wide range of applications for IoT technology mean that the
specifics can be very different from one device to the next but there are basic characteristics
shared by most.

The IoT creates opportunities for more direct integration of the physical world into computer-
based systems, resulting in efficiency improvements, economic benefits, and reduced human
exertions.

The number of IoT devices increased 31% year-over-year to 8.4 billion in the year 2017 and it is
estimated that there will be 30 billion devices by 2020. The global market value of IoT is
projected to reach $7.1 trillion by 2020.

Intelligence

Ambient intelligence and autonomous control are not part of the original concept of the Internet
of things. Ambient intelligence and autonomous control do not necessarily require Internet
structures, either. However, there is a shift in research (by companies such as Intel) to integrate
the concepts of the IoT and autonomous control, with initial outcomes towards this direction
considering objects as the driving force for autonomous IoT. A promising approach in this
context is deep reinforcement learning where most of IoT systems provide a dynamic and
interactive environment. Training an agent (i.e., IoT device) to behave smartly in such an
environment cannot be addressed by conventional machine learning algorithms such
as supervised learning. By reinforcement learning approach, a learning agent can sense the
environment's state (e.g., sensing home temperature), perform actions (e.g., turn HVACon or off)
and learn through the maximizing accumulated rewards it receives in long term.

IoT intelligence can be offered at three levels: IoT devices, Edge/Fog nodes, and Cloud
computing. The need for intelligent control and decision at each level depends on the time
sensitiveness of the IoT application. For example, an autonomous vehicle's camera needs to
make real-time obstacle detection to avoid an accident. This fast decision making would not be
possible through transferring data from the vehicle to cloud instances and return the predictions
back to the vehicle. Instead, all the operation should be performed locally in the vehicle.
Integrating advanced machine learning algorithms including deep learning into IoT devices is an
active research area to make smart objects closer to reality. Moreover, it is possible to get the
most value out of IoT deployments through analyzing IoT data, extracting hidden information,
and predicting control decisions. A wide variety of machine learning techniques have been used
in IoT domain ranging from traditional methods such as regression, support vector machine,
and random forest to advanced ones such as convolutional neural networks, LSTM,
and variational autoencoder.

In the future, the Internet of Things may be a non-deterministic and open network in which auto-
organized or intelligent entities (web services, SOA components) and virtual objects (avatars)
will be interoperable and able to act independently (pursuing their own objectives or shared
ones) depending on the context, circumstances or environments. Autonomous behavior through
the collection and reasoning of context information as well as the object's ability to detect
changes in the environment (faults affecting sensors) and introduce suitable mitigation measures
constitutes a major research trend, clearly needed to provide credibility to the IoT technology.
Modern IoT products and solutions in the marketplace use a variety of different technologies to
support such context-aware automation, but more sophisticated forms of intelligence are
requested to permit sensor units and intelligent cyber-physical systems to be deployed in real
environments.

Architecture

IoT system architecture, in its simplistic view, consists of three tiers: Tier 1: Devices, Tier 2: the
Edge Gateway, and Tier 3: the Cloud. Devices include networked things, such as the sensors and
actuators found in IIoT equipment, particularly those that use protocols such as Modbus, Zigbee,
or proprietary protocols, to connect to an Edge Gateway. The Edge Gateway consists of sensor
data aggregation systems called Edge Gateways that provide functionality, such as pre-
processing of the data, securing connectivity to cloud, using systems such as WebSockets, the
event hub, and, even in some cases, edge analytics or fog computing. The final tier includes the
cloud application built for IIoT using the microservices architecture, which are usually polyglot
and inherently secure in nature using HTTPS/OAuth. It includes various database systems that
store sensor data, such as time series databases or asset stores using backend data storage
systems (e.g. Cassandra, Postgres). The cloud tier in most cloud-based IoT system features event
queuing and messaging system that handles communication that transpires in all tiers. Some
experts classified the three-tiers in the IIoT system as edge, platform, and enterprise and these
are connected by proximity network, access network, and service network, respectively.

Building on the Internet of things, the web of things is an architecture for the application layer of
the Internet of things looking at the convergence of data from IoT devices into Web applications
to create innovative use-cases. In order to program and control the flow of information in the
Internet of things, a predicted architectural direction is being called BPM Everywhere which is a
blending of traditional process management with process mining and special capabilities to
automate the control of large numbers of coordinated devices.

Network architecture

The Internet of things requires huge scalability in the network space to handle the surge of
devices. IETF 6LoWPAN would be used to connect devices to IP networks. With billions of
devices being added to the Internet space, IPv6 will play a major role in handling the network
layer scalability. IETF's Constrained Application Protocol, ZeroMQ, and MQTT would provide
lightweight data transport.

Fog computing is a viable alternative to prevent such large burst of data flow through
Internet. The edge devices' computation power to analyse and process data is extremely limited.
Limited processing power is a key attribute of IoT devices as their purpose is to supply data
about physical objects while remaining autonomous. Heavy processing requirements use more
battery power harming IoT's ability to operate. Scalability is easy because IoT devices simply
supply data through the internet to a server with sufficient processing power.

Complexity

In semi-open or closed loops (i.e. value chains, whenever a global finality can be settled) the IoT
will often be considered and studied as a complex system due to the huge number of different
links, interactions between autonomous actors, and its capacity to integrate new actors. At the
overall stage (full open loop) it will likely be seen as a chaotic environment
(since systems always have finality). As a practical approach, not all elements in the Internet of
things run in a global, public space. Subsystems are often implemented to mitigate the risks of
privacy, control and reliability. For example, domestic robotics (domotics) running inside a
smart home might only share data within and be available via a local network. Managing and
controlling a high dynamic ad hoc IoT things/devices network is a tough task with the traditional
networks architecture, Software Defined Networking (SDN) provides the agile dynamic solution
that can cope with the special requirements of the diversity of innovative IoT applications.

Size considerations

The Internet of things would encode 50 to 100 trillion objects, and be able to follow the
movement of those objects. Human beings in surveyed urban environments are each surrounded
by 1000 to 5000 trackable objects. In 2015 there were already 83 million smart devices in
people's homes. This number is expected to grow to 193 million devices by 2020.

The figure of online capable devices grew 31% from 2016 to 8.4 billion in 2017.

Space considerations

In the Internet of things, the precise geographic location of a thing—and also the precise
geographic dimensions of a thing—will be critical. Therefore, facts about a thing, such as its
location in time and space, have been less critical to track because the person processing the
information can decide whether or not that information was important to the action being taken,
and if so, add the missing information (or decide to not take the action). (Note that some things
in the Internet of things will be sensors, and sensor location is usually important.)
The GeoWeb and Digital Earth are promising applications that become possible when things can
become organized and connected by location. However, the challenges that remain include the
constraints of variable spatial scales, the need to handle massive amounts of data, and an
indexing for fast search and neighbor operations. In the Internet of things, if things are able to
take actions on their own initiative, this human-centric mediation role is eliminated. Thus, the
time-space context that we as humans take for granted must be given a central role in this
information ecosystem. Just as standards play a key role in the Internet and the Web, geospatial
standards will play a key role in the Internet of things.

A solution to "basket of remotes"

Many IoT devices have a potential to take a piece of this market. Jean-Louis Gassée (Apple
initial alumni team, and BeOS co-founder) has addressed this topic in an article on Monday
Note, where he predicts that the most likely problem will be what he calls the "basket of
remotes" problem, where we'll have hundreds of applications to interface with hundreds of
devices that don't share protocols for speaking with one another. For improved user interaction,
some technology leaders are joining forces to create standards for communication between
devices to solve this problem. Others are turning to the concept of predictive interaction of
devices, "where collected data is used to predict and trigger actions on the specific devices"
while making them work together.

Enabling technologies for IoT

There are many technologies that enable the IoT. Crucial to the field is the network used to
communicate between devices of an IoT installation, a role that several wireless or wired
technologies may fulfill:

Addressability

The original idea of the Auto-ID Center is based on RFID-tags and distinct identification through
the Electronic Product Code. This has evolved into objects having an IP address or URI. An
alternative view, from the world of the Semantic Web focuses instead on making all things (not
just those electronic, smart, or RFID-enabled) addressable by the existing naming protocols, such
as URI. The objects themselves do not converse, but they may now be referred to by other
agents, such as powerful centralized servers acting for their human owners. [134] Integration with
the Internet implies that devices will use an IP address as a distinct identifier. Due to the limited
address space of IPv4 (which allows for 4.3 billion different addresses), objects in the IoT will
have to use the next generation of the Internet protocol (IPv6) to scale to the extremely large
address space required. Internet-of-things devices additionally will benefit from the stateless
address auto-configuration present in IPv6, as it reduces the configuration overhead on the
hosts, and the IETF 6LoWPAN header compression. To a large extent, the future of the Internet
of things will not be possible without the support of IPv6; and consequently, the global adoption
of IPv6 in the coming years will be critical for the successful development of the IoT in the
future.

Short-range wireless

 Bluetooth mesh networking – Specification providing a mesh networking variant


to Bluetooth low energy (BLE) with increased number of nodes and standardized application
layer (Models).
 Light-Fidelity (Li-Fi) – Wireless communication technology similar to the Wi-Fi
standard, but using visible light communication for increased bandwidth.
 Near-field communication (NFC) – Communication protocols enabling two electronic
devices to communicate within a 4 cm range.
 Radio-frequency identification (RFID) – Technology using electromagnetic fields to read
data stored in tags embedded in other items.
 Wi-Fi – technology for local area networking based on the IEEE 802.11 standard, where
devices may communicate through a shared access point or directly between individual
devices.
 ZigBee – Communication protocols for personal area networking based on the IEEE
802.15.4 standard, providing low power consumption, low data rate, low cost, and high
throughput.
 Z-Wave – Wireless communications protocol used primarily for home automation and
security applications

Medium-range wireless

 LTE-Advanced – High-speed communication specification for mobile networks.


Provides enhancements to the LTE standard with extended coverage, higher throughput, and
lower latency.

Long-range wireless

 Low-power wide-area networking (LPWAN) – Wireless networks designed to allow


long-range communication at a low data rate, reducing power and cost for transmission.
Available LPWAN technologies and protocols: LoRaWan, Sigfox, NB-IoT, Weightless,
RPMA.
 Very small aperture terminal (VSAT) – Satellite communication technology using
small dish antennasfor narrowband and broadband data.

Wired[edit]

 Ethernet – General purpose networking standard using twisted pair and fiber optic links


in conjunction with hubs or switches.
 Power-line communication (PLC) – Communication technology using electrical wiring to
carry power and data. Specifications such as HomePlug or G.hn utilize PLC for networking
IoT devices.

Data storage

A challenge for producers of IoT applications is to clean, process and interpret the vast amount
of data which is gathered by the sensors. There is a solution proposed for the analytics of the
information referred to as Wireless Sensor Networks. These networks share data among sensor
nodes that are sent to a distributed system for the analytics of the sensory data.

Another challenge is the storage of this bulk data. Depending on the application, there could be
high data acquisition requirements, which in turn lead to high storage requirements. Currently
the Internet is already responsible for 5% of the total energy generated, and a "daunting
challenge to power" IoT devices to collect and even store data still remains.

Security

Concerns have been raised that the IoT is being developed rapidly without appropriate
consideration of the profound security challenges involved and the regulatory changes that might
be necessary. Most of the technical security concerns are similar to those of conventional servers,
workstations and smartphones, but security challenges unique to the IoT continue to develop,
including industrial security controls, hybrid systems, IoT-specific business processes, and end
nodes.

Security is the biggest concern in adopting Internet of things technology. In particular, as the
Internet of things spreads widely, cyber attacks are likely to become an increasingly physical
(rather than simply virtual) threat. The current IoT space comes with numerous security
vulnerabilities. These vulnerabilities include weak authentication (IoT devices are being used
with default credentials), unencrypted messages sent between devices, SQL injections and lack
of verification or encryption of software updates. This allows attackers to easily intercept data to
collect PII (Personally Identifiable Information), steal user credentials at login, or inject malware
into newly updated firmware.

In a January 2014 article in Forbes, cyber-security columnist Joseph Steinberg listed many
Internet-connected appliances that can already "spy on people in their own homes" including
televisions, kitchen appliances, cameras, and thermostats. Computer-controlled devices in
automobiles such as brakes, engine, locks, hood and trunk releases, horn, heat, and dashboard
have been shown to be vulnerable to attackers who have access to the on-board network. In some
cases, vehicle computer systems are Internet-connected, allowing them to be exploited
remotely. For example, a hacker can gain unauthorized access to IoT devices due to their set-up;
that is, because these devices are connected, Internet-enabled, and lack the necessary protective
measures. By 2008 security researchers had shown the ability to remotely control pacemakers
without authority. Later hackers demonstrated remote control of insulin pumps and implantable
cardioverter defibrillators. Many of these IoT devices have severe operational limitations on their
physical size and by extension the computational power available to them.  These constraints
often make them unable to directly use basic security measures such as implementing firewalls
or using strong cryptosystems to encrypt their communications with other devices.

The U.S. National Intelligence Council in an unclassified report maintains that it would be hard
to deny "access to networks of sensors and remotely-controlled objects by enemies of the United
States, criminals, and mischief makers... An open market for aggregated sensor data could serve
the interests of commerce and security no less than it helps criminals and spies identify
vulnerable targets. Thus, massively parallel sensor fusion may undermine social cohesion, if it
proves to be fundamentally incompatible with Fourth-Amendment guarantees against
unreasonable search." In general, the intelligence community views the Internet of things as a
rich source of data.

In 2016, a distributed denial of service attack powered by Internet of things devices running


the Miraimalware took down a DNS provider and major web sites. The Mirai Botnet had
infected roughly 65,000 IoT devices within the first 20 hours. Eventually the infections increased
to 200,000 to 300,000 infections. Brazil, Columbia and Vietnam made up of 41.5% of the
infections. The Mirai Botnet had singled out specific IoT devices that consisted of DVRs, IP
cameras, routers and printers. Top vendors that contained the most infected devices were
identified as Dahua, Huawei, ZTE, Cisco, ZyXEL and MikroTik. In May 2017, Junade Ali, a
Computer Scientist at Cloudflare noted that native DDoS vulnerabilities exist in IoT devices due
to a poor implementation of the Publish–subscribe pattern. These sorts of attacks have caused
security experts to view IoT as a real threat to Internet services.
On 31 January 2019, the Washington Post wrote an article regarding the security and ethical
challenges that can occur with IoT doorbells and cameras: "Last month, Ring got caught
allowing its team in Ukraine to view and annotate certain user videos; the company says it only
looks at publicly shared videos and those from Ring owners who provide consent. Just last week,
a California family’s Nest camera let a hacker take over and broadcast fake audio warnings about
a missile attack, not to mention peer in on them, when they used a weak password"

There have been a range of responses to concerns over security. The Internet of Things Security
Foundation (IoTSF) was launched on 23 September 2015 with a mission to secure the Internet of
things by promoting knowledge and best practice. Its founding board is made from technology
providers and telecommunications companies. In addition, large IT companies are continuously
developing innovative solutions to ensure the security for IoT devices. In 2017, Mozilla
launched Project Things, which allows to route IoT devices through a safe Web of Things
gateway. As per the estimates from KBV Research, the overall IoT security market would grow
at 27.9% rate during 2016–2022 as a result of growing infrastructural concerns and diversified
usage of Internet of things.

Governmental regulation is argued by some to be necessary to secure IoT devices and the wider
Internet – as market incentives to secure IoT devices is insufficient.

Safety

IoT systems are typically controlled by event-driven smart apps that take as input either sensed
data, user inputs, or other external triggers (from the Internet) and command one or more
actuators towards providing different forms of automation. Examples of sensors include smoke
detectors, motion sensors, and contact sensors. Examples of actuators include smart locks, smart
power outlets, and door controls. Popular control platforms on which third-party developers can
build smart apps that interact wirelessly with these sensors and actuators include Samsung's
SmartThings, Apple's HomeKit, and Amazon's Alexa, among others.

A problem specific to IoT systems is that buggy apps, unforeseen bad app interactions, or
device/communication failures, can cause unsafe and dangerous physical states, e.g., "unlock the
entrance door when no one is at home" or "turn off the heater when the temperature is below 0
degrees Celsius and people are sleeping at night".Detecting flaws that lead to such states,
requires a holistic view of installed apps, component devices, their configurations, and more
importantly, how they interact. Recently, researchers from the University of California Riverside
have proposed IotSan, a novel practical system that uses model checking as a building block to
reveal "interaction-level" flaws by identifying events that can lead the system to unsafe
states. They have evaluated IotSan on the Samsung SmartThings platform. From 76 manually
configured systems, IotSan detects 147 vulnerabilities (i.e., violations of safe physical
states/properties).

Chapter-6

PHP server:

PHP: Hypertext Preprocessor (or simply PHP) is a general-purpose programming


language originally designed for web development. It was originally created by Rasmus
Lerdorf in 1994; the PHP reference implementation is now produced by The PHP Group. PHP
originally stood for Personal Home Page, but it now stands for the recursive initialism PHP:
Hypertext Preprocessor.

PHP code may be executed with a command line interface(CLI), embedded into HTML code, or
used in combination with various web template systems, web content management systems,
and web frameworks. PHP code is usually processed by a PHP interpreter implemented as
a module in a web server or as a Common Gateway Interface (CGI) executable. The web server
outputs the results of the interpreted and executed PHP code, which may be any type of data,
such as generated HTML code or binary image data. PHP can be used for many programming
tasks outside of the web context, such as standalone graphical applications and
robotic dronecontrol.
The standard PHP interpreter, powered by the Zend Engine, is free software released under
the PHP License. PHP has been widely ported and can be deployed on most web servers on
almost every operating system and platform, free of charge.

The PHP language evolved without a written formal specification or standard until 2014, with
the original implementation acting as the de facto standard which other implementations aimed
to follow. Since 2014, work has gone on to create a formal PHP specification

During 2014 and 2015, a new major PHP version was developed, which was numbered PHP 7.
The numbering of this version involved some debate. While the PHP 6 Unicode experiment had
never been released, several articles and book titles referenced the PHP 6 name, which might
have caused confusion if a new release were to reuse the name. After a vote, the name PHP 7
was chosen.

The foundation of PHP 7 is a PHP branch that was originally dubbed PHP next


generation (phpng). It was authored by Dmitry Stogov, Xinchen Hui and Nikita Popov, and
aimed to optimize PHP performance by refactoring the Zend Engine while retaining near-
complete language compatibility. As of 14 July 2014, WordPress-based benchmarks, which
served as the main benchmark suite for the phpng project, showed an almost 100% increase in
performance. Changes from phpng are also expected to make it easier to improve performance in
the future, as more compact data structures and other changes are seen as better suited for a
successful migration to a just-in-time (JIT) compiler. Because of the significant changes, the
reworked Zend Engine is called Zend Engine 3, succeeding Zend Engine 2 used in PHP 5.

Because of major internal changes in phpng it must receive a new major version number of PHP,
rather than a minor PHP 5 release, according to PHP's release process. Major versions of PHP
are allowed to break backward-compatibility of code and therefore PHP 7 presented an
opportunity for other improvements beyond phpng that require backward-compatibility breaks.
In particular, it involved the following changes:

 Many fatal- or recoverable-level legacy PHP error mechanisms were replaced with
modern object-oriented exceptions
 The syntax for variable dereferencing was reworked to be internally more consistent and

complete, allowing the use of the operators  -> ,  [] ,  () , {} , and  :: , with arbitrary meaningful
left-side expressions
 Support for legacy PHP 4-style constructor methods was deprecated

 The behavior of the  foreach  statement was changed to be more predictable

 Constructors for the few classes built-in to PHP which returned null upon failure were
changed to throw an exception instead, for consistency
 Several unmaintained or deprecated server application programming interfaces (SAPIs)

and extensions were removed from the PHP core, most notably the legacy  mysql  extension

 The behavior of the  list()  operator was changed to remove support for strings

 Support was removed for legacy ASP-style delimiters  <%  and  %>  and  <script

language="php"> ... </script>

 An oversight allowing a switch statement to have multiple  default  clauses was fixed

 Support for hexadecimal number support in some implicit conversions from strings to
number types was remove
 The left-shift and right-shift operators were changed to behave more consistently across
platforms
 Conversions between integers and floating point numbers were tightened and
implemented more consistently across platforms

PHP 7 also included new language features. Most notably, it introduces return type declarations
for functions[64] which complement the existing parameter type declarations, and support for
the scalartypes (integer, float, string, and boolean) in parameter and return type declarations.

Syntax
Main article: PHP syntax and semantics

The following "Hello, World!" program is written in PHP code embedded in


an HTML document:
<!DOCTYPE html>
<title>PHP "Hello, World!" program</title>
<?php echo '<p>Hello World</p>'; ?>

However, as no requirement exists for PHP code to be embedded in HTML, the simplest version
of Hello, World! may be written like this, with the closing tag omitted as preferred in files
containing pure PHP code[122]

<?='Hello world';

As well, there is no requirement that a PHP file contain PHP code at all - the interpreter will
output data outside of PHP tags unchanged so a simple text file containing "Hello world" will
give the same output.

The PHP interpreter only executes PHP code within its delimiters. Anything outside its
delimiters is not processed by PHP, although non-PHP text is still subject to control

structures described in PHP code. The most common delimiters are  <?php  to open and  ?>  to

close PHP sections. The shortened form  <?  also exists. This short delimiter makes script files
less portable, since support for them can be disabled in the local PHP configuration and it is

therefore discouraged;[123][124] there is no recommendation against the echo short tag  <?= .


[125]
 Prior to PHP 5.4.0, this short syntax for  echo() only works with

the  short_open_tag  configuration setting enabled, while for PHP 5.4.0 and later it is always
available.[126][127][123] The purpose of all these delimiters is to separate PHP code from non-PHP
content, such as JavaScript code or HTML markup.[128]

The first form of delimiters,  <?php  and  ?> , in XHTML and other XML documents, creates
correctly formed XML processing instructions.[129] This means that the resulting mixture of PHP
code and other markup in the server-side file is itself well-formed XML.

Variables are prefixed with a dollar symbol, and a type does not need to be specified in advance.
PHP 5 introduced type hinting that allows functions to force their parameters to be objects of a
specific class, arrays, interfaces or callback functions. However, before PHP 7.0, type hints could
not be used with scalar types such as integer or string.[65]

Unlike function and class names, variable names are case sensitive. Both double-quoted ("")
and heredoc strings provide the ability to interpolate a variable's value into the string. [130] PHP
treats newlines as whitespace in the manner of a free-form language, and statements are

terminated by a semicolon.[131] PHP has three types of comment syntax:  /* */  marks block and

inline comments;  // or  #  are used for one-line comments.[132] The  echo  statement is one of
several facilities PHP provides to output text.

In terms of keywords and language syntax, PHP is similar to the C style

syntax.  if  conditions,  for and  while  loops, and function returns are similar in syntax to
languages such as C, C++, C#, Java and Perl.

XAMPP XAMPP (/ˈzæmp/ or /ˈɛks.æmp/[2]) is a free and open-source cross-platform web


serversolution stack package developed by Apache Friends,[2] consisting mainly of the Apache
HTTP Server, MariaDB database, and interpreters for scripts written in
the PHP and Perl programming languages.[3][4] Since most actual web server deployments use the
same components as XAMPP, it makes transitioning from a local test server to a live server
possible.

XAMPP's ease of deployment means a WAMP or LAMP stack can be installed quickly and


simply on an operating system by a developer. With the advantage a number of common add-in
applications such as WordPress and Joomla! can also be installed with similar ease
using Bitnami.

Etymology

The term XAMPP is an apparent acronym. However, there is no official acronym expansion


specified on the Apache Friends website. Their homepage header reads "XAMPP Apache +
MariaDB + PHP + Perl", indicating that this abbreviation is a recursive acronym.
MySQL was replaced with MariaDB on 2015-10-19 and beginning with XAMPP versions 5.5.30
and 5.6.14,[7] effectively altering the meaning of the acronym.

While both letters P are de facto interchangeable, convention used at the Apache Friends website
indicates that the first letter P is short for PHP and the latter letter P is short for Perl.

Prerequisites

XAMPP requires only one zip, tar, 7z, or exe file to be downloaded and run, and little or no
configuration of the various components that make up the web server is required. [8] The
Windows' version of XAMPP requires Microsoft Visual C++ 2017 Redistributable.

Features

XAMPP is regularly updated to the latest releases of Apache, MariaDB, PHP and Perl. It also


comes with a number of other modules
including OpenSSL, phpMyAdmin, MediaWiki, Joomla, WordPress and more.[9] Self-contained,
multiple instances of XAMPP can exist on a single computer, and any given instance can be
copied from one computer to another.[10] XAMPP is offered in both a full and a standard version
(Smaller version).[10]

Usage

The most obvious characteristic of XAMPP is the ease at which a WAMP webserver stack can
be deployed and instantiated.[11] Later some common packaged applications that could be easily
installed were provided by Bitnami.[12]

Officially, XAMPP's designers intended it for use only as a development tool, to allow website
designers and programmers to test their work on their own computers without any access to the
Internet. To make this as easy as possible, many important security features are disabled by
default.[13] XAMPP has the ability to serve web pages on the World Wide Web.[14] A special tool
is provided to password-protect the most important parts of the package.[15]

XAMPP also provides support for creating and manipulating databases


in MariaDB and SQLite among others.

Once XAMPP is installed, it is possible to treat a localhost like a remote host by connecting


using an FTPclient. Using a program like FileZilla has many advantages when installing
a content management system (CMS) like Joomla or WordPress[further explanation needed]
. It is also
possible to connect to localhost via FTP with an HTML editor.

Php based login using xampp server

Login profile

Title editing page


Setting the number of sensor to be connect

Chapter-7

Sensor
The sensors data updating to the server from the kit near field environment

MQ-2 Gas Sensor


 
It can detect: LPG, i-butane, propane, methane, alcohol, Hydrogen, smoke
Description : 

MQ-2  Semiconductor Sensor for Combustible Gas

Sensitive material of MQ-2 gas sensor is SnO2, which with lower conductivity in clean air.
When the target combustible gas exist, The sensors conductivity is more higher along with the
gas concentration rising. Please use simple electro circuit, Convert change of conductivity to
correspond output signal of gas concentration.

MQ-2 gas sensor has high sensitivity to LPG, Propane and Hydrogen, also could be used to
Methane and other combustible steam, it is with low cost and suitable for different application.
 Character : 

1、High sensitivity to Combustible gas in wide range 

2、High sensitivity to LPG, Propane and Hydrogen

3、Fast response

4、Wide detection range

5、Stable performance long life low cost     

6、Simple drive circuit

Technical Data : 
Application :                       

1)  Domestic gas leakage detector

2)  Industrial Combustible gas detector

3)  Portable gas detector

4)  They are used in gas leakage detecting equipments in family and industry, are suitable for
detecting of LPG, i-butane, propane, methane ,alcohol, Hydrogen, smoke. 

Alcohol Sensor:
Alcohol sensor is semiconductor sensor for alcohol detection. It has good sensitivity and
fast response to alcohol, suitable for portable alcohol detector. This alcohol sensor is suitable for
detecting alcohol concentration on your breath, just like your common breathalyzer. It has a high
sensitivity and fast response time. Sensor provides an analog resistive output based on alcohol
concentration. The drive circuit is very simple, all it needs is one resistor.

Features:

 5V DC or AC circuit
 Requires heater voltage
 Operation Temperature: -10 to 70 degrees C
 Heater consumption: less than 750mW
 High sensitivity to alcohol and small sensitivity to Benzine
 Fast response and High sensitivity
 Stable and long life
 Simple drive circuit

APPLICATIONS
They are suitable for alcohol checker, Breath analyzer.
 Alcohol level over-limit alarm
 Stand-alone/background sensing device
 Environmental monitoring equipment

LM35 TEMPERATURE SENSOR:


Description:

The LM35 series are precision integrated-circuit temperature sensors, whose output voltage is
linearly proportional to the Celsius (Centigrade) temperature. The LM35 thus has an advantage
over linear temperature sensors calibrated in ° Kelvin, as the user is not required to subtract a
large constant voltage from its output to obtain convenient Centigrade scaling. The LM35 does
not require any external calibration or trimming to provide typical accuracies of ±¼°C at room
temperature and ±¾°C over a full -55 to +150°C temperature range. Low cost is assured by
trimming and calibration at the wafer level. The LM35's low output impedance, linear output,
and precise inherent calibration make interfacing to readout or control circuitry especially easy.
It can be used with single power supplies, or with plus and minus supplies. As it draws only
60 µA from its supply, it has very low self-heating, less than 0.1°C in still air. The LM35 is rated
to operate over a -55° to +150°C temperature range, while the LM35C is rated for a -40° to
+110°C range (-10° with improved accuracy). The LM35 series is available packaged in
hermetic TO-46 transistor packages, while the LM35C, LM35CA, and LM35D are also available
in the plastic TO-92 transistor package. The LM35D is also available in an 8-lead surface mount
small outline package and a plastic TO-220 package

Features
 Calibrated directly in ° Celsius (Centigrade)
 Linear + 10.0 mV/°C scale factor
 0.5°C accuracy guarantee able (at +25°C)
 Rated for full -55° to +150°C range
 Suitable for remote applications
 Low cost due to wafer-level trimming
 Operates from 4 to 30 volts
 Less than 60 µA current drain
 Low self-heating, 0.08°C in still air
 Nonlinearity only ±¼°C typical
 Low impedance output, 0.1 Ohm for 1 mA load

FIRE SENSOR: DR 25
Features
• Low Leakage
• Low Forward Voltage Drop
• High Current Capability
• High Forward Surge Current Capability
Maximum Ratings
• Operating Temperature: -65℃ to +175℃
• Storage Temperature: -65℃ to +175℃
Applications

Specially formulated for optimum high temperature fluid resistance, and long term heat
resistance. Resistant to aviation and diesel fuels, hydraulic fluids and lubricating oils.
Particularly suitable as a jacketing material for military ground vehicle cables and harnesses. It
is also ideally suited for the demands of motorsport cable harnesses. When used in conjunction
with System 25 heat-shrinkable molded shapes and S1125 high performance adhesive, these
products provide a complete cable harness system.
CDS Photo Resistors - PGM series provides the mechanical data, electronic characteristics and test
conditions in terms of 5mm, 12mm, and 20mm. Token CdS resistors can be customed designs and
tighter tolerances available on request. Application of CdS resistors specific designs also available
including different photo resistance and response time specifications adjusted to resistance
requirements.
 Features
-Epoxy or hermetical package
-Reliable Performance
-Quick Response
-Good Characteristic of Spectrum
 Applications
-Auto Flash for Camera
-Industrial Control
-Photoelectric Control
-Photo switch; Electronic Toys

GSM commands

AT Checking communication between the module and computer.

ATA Answer command

ATD Dial command


ATH Hang up call

ATI Identification

ATZ Recall stored profile

AT&F Restore factory settings

AT&V View active configuration

AT&W Store parameters in given profile

AT+GMI Request manufacturer identification

AT+GMM Request model identification

AT+GMR Request revision identification

AT+GSN Request product serial number identification (IMEI)

AT+CPBF Find phone book entries

AT+CSQ Signal quality

AT+CEER Extended error report

AT+CMGL List messages

AT+CMGR Read message

AT+CMGS Send message

AT+CMSS Send message from storage

AT+CMGW Write message to memory

AT+CMGD Delete message

LDR
A photo resistor or light dependent resistor or cadmium sulfide (CdS) cell is a resistor whose
resistance decreases with increasing incident light intensity. It can also be referenced as a
photoconductor.

A photo resistor is made of a high resistance semiconductor. If light falling on the device is of
high enough frequency, photons absorbed by the semiconductor give bound electrons enough
energy to jump into the conduction band. The resulting free electron (and its hole partner)
conduct electricity, thereby lowering resistance.
A photoelectric device can be either intrinsic or extrinsic. An intrinsic semiconductor has its own
charge carriers and is not an efficient semiconductor, e.g. silicon. In intrinsic devices the only
available electrons are in the valence band, and hence the photon must have enough energy to
excite the electron across the entire band gap. Extrinsic devices have impurities, also called
dopants, added whose ground state energy is closer to the conduction band; since the electrons
do not have as far to jump, lower energy photons (i.e., longer wavelengths and lower
frequencies) are sufficient to trigger the device. If a sample of silicon has some of its atoms
replaced by phosphorus atoms (impurities), there will be extra electrons available for conduction.

This is an example of an extrinsic semiconductor.

COMPARTOR
LM324 Quad Op-Amp
The LM124 series consists of four independent, high gain, internally frequency compensated
operational amplifiers which were designed specifically to operate from a single power supply
over a wide range of voltages. Operation from split power supplies is also possible and the low
power supply current drain is independent of the magnitude of the power supply voltage.

The LM324 integrated circuit is a quad operational amplifier (Op-Amp). The device has four
individual Op-Amp circuits housed in a single package.
Pin Descriptions
V+ = Supply voltage.
GND = Gnd (0V) connection for supply voltage.
Input(s) = Input to Op-Amp.
Output = Output of Op-Amp.
The remaining 3 sections of the LM324 quad op-amp are used as voltage comparators and drive
3 indicator LED’s or incandescent.

Characteristics

 In the linear mode the input common-mode voltage range includes ground and the output
voltage can also swing to ground, even though operated from only a single power supply
voltage
 The unity gain cross frequency is temperature compensated
The input bias current is also temperature compensated
Advantages
 Eliminates need for dual supplies
 Four internally compensated op amps in a single package
 Allows directly sensing near GND and VOUT also goes to GND
 Compatible with all forms of logic
 Power drain suitable for battery operation

In order to design the interface between a sensor and the MCU, we need to specify the
performance of a linear amplifier which will translate the output of the sensor into a suitable
input for the MCU, which is in the right range for the amplifier to handle and allows a
convenient conversion factor to be used in the ADC

RELAY
A relay is an electrically operated switch. Many relays use an electromagnet to operate a
switching mechanism, but other operating principles are also used. Relays find applications
where it is necessary to control a circuit by a low-power signal, or where several circuits must be
controlled by one signal. The first relays were used in long distance telegraph circuits, repeating
the signal coming in from one circuit and re-transmitting it to another. Relays found extensive
use in telephone exchanges and early computers to perform logical operations. A type of relay
that can handle the high power required to directly drive an electric motor is called a contactor.
Solid-state relays control power circuits with no moving parts, instead using a semiconductor
device triggered by light to perform switching. Relays with calibrated operating characteristics
and sometimes multiple operating coils are used to protect electrical circuits from overload or
faults; in modern electric power systems these functions are performed by digital instruments
still called "protection relays".

SOLID-STATE RELAY

A solid state relay (SSR) is a solid state electronic component that provides a similar function to an
electromechanical relay but does not have any moving components, increasing long-term reliability.
With early SSR's, the tradeoff came from the fact that every transistor has a small voltage drop across it.
This voltage drop limited the amount of current a given SSR could handle. As transistors improved,
higher current SSR's, able to handle 100 to 1,200 Amperes, have become commercially available.
Compared to electromagnetic relays, they may be falsely triggered by transients.

RELAY INTERFACING WITH 8051

Relays are devices which allow low power circuits to switch a relatively high Current/Voltage
ON/OFF. For a relay to operate a suitable pull-in & holding current should be passed through its
coil. Generally relay coils are designed to operate from a particular voltage often its 5V or 12V.
The function of relay driver circuit is to provide the necessary current (typically 25 to 70ma) to
energize the relay coil.

Figure

Figure 1 shows the basic relay driver circuit. As you can see an NPN transistor BC547 is being
used to control the relay. The transistor is driven into saturation (turned ON)  when a LOGIC 1 is
written on the PORT PIN thus turning ON the relay. The relay is turned OFF by writing LOGIC
0 on the port pin.

A diode (1N4007/1N4148) is connected across the relay coil, this is done so as to protect the transistor
from damage due to the BACK EMF generated in the relay's inductive coil when the transistor is turned
OFF. When the transistor is switched OFF the energy stored in the inductor is dissipated through the
diode & the internal resistance of the relay coil. As you can see we have used a pull up resistor at the
base of the transistor. AT8951/52/55 has an internal pull up resistor of 10k so when the pin is pulled
high the current flows through this resistor so the maximum output current is 5v/10K = 0.5ma, the DC
current gain of BC547 is 100 so the maximum collector current we can get is 0.5ma x 100 = 50ma, but
most of the relays require more than 70ma-130ma current depending on the relay that we have
used, 0.5ma of base current is not suitable enough for turning ON the relay, so we have used an external
pull up resistor. When the controller pin is high current flows through the controller pin i.e.
5v/10k=0.5ma as well as through the pull up resistor. We have used 4.7k pull up resistor so
5v/4.7k=1.1ma so maximum base current can be 0.5ma + 1.1ma=1.6ma i.e. collector current =1.6ma x
100 = 160ma which is enough to turn ON most of the relays.

The right relay depends on what you want to switch and how fast. What voltage, current, etc...

You won't be able to drive it directly from the Arduino pin, as most general purpose relays
require at least 150mW to switch which is >30mA @ 5V. You will need to use something like
this:
The NPN can be just about any general purpose NPN (2N2222, BC337, etc) and the diode can be
most general purpose diodes (1N4001 or similar) VCC is your +5V.

If you go to somewhere like Farnell, and use the parametric search to narrow down you options,
you will get hundreds of choices, here is an example search with 5VDC general purpose relays
capable of >10A and >250VAC selected.

EDIT

It seems this is to turn an ATX supply on by pulling the PC_ON (usually green) connection to
ground. In this case the relay is a bit overkill, and a simple open collector NPN transistor circuit
can be used:
The dotted area is inside the PC, so all you need is the NPN transistor (almost any general purpose will
do) and the resistor (4.7kOhm is shown, but depending on the transistor gain, R1 can be between say,
50kOhm and 1kOhm - between 1kOhm and 10kOhm should work with just about anything though)
The R_pull up of 1kOhm is assuming about the worst case - it will probably be between 2kOhm and
10kOhm. The circuit as shown would work with a pull up down to around 100 ohms though if needed.

Chapter-8

4. SYSTEM DESIGN ARCHITECTURE

4.1. Class diagram


4.2. Use case diagram.

4.3 Sequence Diagram.


4.4 Data flow diagram.
4.5 Database Design:
Database (Screenshots)
5. IMPLEMENTATION
The implementation for the proposed system is defined according to the modules
available in that particular system.

5.1 MODULES and Modules Description

Welcome Page
Which comes when user opens the application. The user can move to the further pages
which all are described below.

Login Page

By giving the registered email id and password user can access this application. The user has to
give valid and registered data so that there is no hassle of exceptions, otherwise he has to go for
forgot password link.

Registration or sign up

User can register by giving name, email id, mobile number and required password and he can
sign up to the application.

Forgot Password page

In this form, if the user has been lost his password, by giving the registered email id and
mobile number, the password will be forwarded to registered email id.

Home Page

By completing all the above steps, user will move to the home page. This is the main (menu)
form, which consists of the following forms:

Order Pesticides / Fertilizers / Seeds


Pesticides

In this form user can order the pesticides by giving full details of the Crop so that, if the user
don’t know about the required pesticide to the Plant, then we will suggest what kind of pesticide
he has to apply to that diseased crops.

If the user is new to this field, then he has to give the following crop details to order the
Pesticides. Those are

Crop name, Crop days after Planting, Crop stage, Diseases,

Comments, Acres of Planting, Liters of Required Pesticides, Customer name, Mobile number,
Email Id, and finally Shipping address. By giving all these details in the application the user will
get the Ordered Pesticide to his door step through the registered shop. Once the order has been
placed by the user then, details of the order and quantity, shop address, shipping details all will
be send to the given email address, so that he can have the reference of his order.

Experienced Persons

If the user already know the Information about the required Pesticide, then he can directly
choose this option and he can order the required Pesticides, By filling the following fields. Those
are Pesticides List, Customer name, Mobile number, Email id and Shipping address, So that
Ordered Pesticide will be delivered to the Shipping address which has been given by the user and
it will be delivered by the registered shop to your door step. Once the order has been placed by
the user then, details of the order and quantity, shop address, shipping details all will be send to
the given email address, so that he can have the reference of his order.

Fertilizers

In this form user can order the Fertilizers by giving full details of the Crop so that, if the user
don’t know about the required Fertilizer to the Plant, then we will suggest what kind of Fertilizer
he has to apply to that diseased crops.

If the user is new to this field, then he has to give the following crop details to order the
Fertilizers. Those are
Crop name, Crop days after Planting, Crop stage, Comments, Acres of Planting, Kgs of Required
Fertilizers, Customer name, Mobile number, Email Id, and finally shipping address. By giving all
these details in the application the user will get the Ordered Fertilizer to his door step through the
registered shop. Once the order has been placed by the user then, details of the order and
quantity, shop address, shipping details all will be send to the given email address, so that he can
have the reference of his order.

Experienced Persons

If the user already knows the Information about the required Fertilizer, then he can directly
choose this option and he can order the required Fertilizer, by filling the following fields. Those
are Fertilizer List, Customer name, Mobile number, Email id and Shipping address, So that
Ordered Fertilizer will be delivered to the Shipping address which has been given by the user and
it will be delivered by the registered shop to your door step. Once the order has been placed by
the user then, details of the order and quantity, shop address, shipping details all will be send to
the given email address, so that he can have the reference of his order.

Seeds
In this form user can order the required seeds to their requirements by filling following details.

Crop name, Variety name, required Quantity, customer Name, Mobile number, email Id, Shipping
address.

Once he has given the above details the ordered quantity of seeds will be delivered to the given shipping
address by the registered shop. Once the order has been placed by the user then, details of the order
and quantity, shop address, shipping details all will be send to the given email address, so that he can
have the reference of his order.

Learn How to Grow


In this form the user can learn how to grow the crops. Consider the example of growing of carrot what
are the varieties of carrot, how the soil should be cultivated before planting, which is the best season to
plant, how much seeds required for an hectare, irrigation, fertilizers that are applied the crop, what are
the diseases will affect the particular crop.

Today Market Price


This form helps the user to know the current day’s vegetable price in the market. So that user can know
the price of the vegetables.

For any Query

If the user got any doubt about Pesticides or Fertilizers or other doubts, then he can post his doubt in
this form and he will get the suggestions from the experts and it will be sent to his registered Email
Address.

5.2 Design Screenshots:

Home Page: Welcome Page:


Login Page: Register page
Forgot Password page: Order Page:
Order Pesticides New page:
Order Pesticides Exp Page: Order Fertilizers new Page:
Order Fertilizers Exp Page: Order seeds page
While Receiving Order: On Order Successful:
About us: How to Grow:
Growing Carrot:
Ask Question: Shop List:
6.Testing
Software testing is a critical element of software quality assurance and represents the ultimate
review of specification, design and coding. Testing presents an interesting of a system using
various test data. Preparation of the test data plays a vital role in the system testing. After
preparation the test data, the system under study is tested those test data. Errors were found and
corrected by using the following testing steps and corrections are recorded for future references.
Thus, series of testing is performed on the system before it is already for implementation.

The development of software systems involves a series of production activities where


opportunities for injection of human errors are enormous. Errors may begin to occur at the very
inception of the process where the objectives may be erroneously or imperfectly specified as well
as in later design and development stages. Because of human in ability to perform and
communicate with perfection, software development is followed by assurance activities.

Unit testing

Unit testing focuses on verification effort on the smallest unit of software design module. Using
the unit test plans. Prepared in the design phase of the system as a guide, important control paths
are tested to uncover errors within the boundary of the modules. The interfaces of each of the
modules under consideration are also tested. Boundary conditions were checked. All independent
paths were exercised to ensure that all statements in the module are executed at least once and all
error-handling paths were tested. Each unit was thoroughly tested to check if it might fall in any
possible situation. This testing was carried out during the programming itself. At the end of this
testing phase, each unit was found to be working satisfactorily, as regarded to the expected out
from the module.

White Box Testing:

This is a unit testing method where a unit will be taken at a time and tested thoroughly at a
statement level to find the maximum possible errors. I tested step wise every piece of code,
taking care that every statement in the code is executed at least once. The white box testing is
also called Glass Box Testing. I have generated a list of test cases, sample data. This is used to
check all possible combinations of execution paths through the code at every module level.

Black Box Testing:

This testing method considers a module as a single unit and checks the unit at interface
and communication with other modules rather getting into details at statement level. Here the
module will be treated as a block box that will take some input and generate output. Output for a
given set of input combinations are forwarded to other modules.

TEST RESULT: UNIT TESTING

LOGIN FORM:

SL.No Test Case Excepted Result Test Result

1 Enter valid name and The application should Successful


password & click on login display Home Page.
button

2 Enter invalid Application will ask the successful


(Forgot password) user to enter Email Id
to forward their
Password.

ORDERING ITEMS :

1 By clicking the At first user have to fill all fields


Order Pesticides / with proper data , if any Error
like entering text data instead of
Fertilizers / Seeds.
number or entering number successful
instead of text..is found then it
gives proper message otherwise
Adds Record To the Database

CONCLUSION
The proposed application will make the Ordering of Fertilizers / Pesticides / Seeds. At any time
user can Order their Requirements using their Smartphone’s.
The user will get Confirmation message through Email and the Shop person will deliver the
orderings to their door step.
By uploading the image of the diseased crop the user/farmer will get the best suited
pesticides/fertilizers.
So that the system which is proposed will give the best which is basic, but very effective to do
such kind of activity.

FUTURE ENHANSMENTS

Project can be further developed with so many new modules. This is just like a beta version.

We are planning to implement this application in local languages so that every farmer can use
this application

We are planning to send sms to the customer mobile on the confirmation of the order.

Currently we are having only one shop , in future we will come up with so many shops in
different areas.
.Bibliography:

Books referred:
Professional android 4 application development – Reto Meier.
The Complete Reference J2ME - James Keogh.

Websites referred:

 www.google.co.in
 http://developer.android.com
 www.w3schools.com

You might also like