Jayasree Be

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

MAGNETIC INDUCTION BASED

COMMUNICATIONS ON THE AGRICULTURE


FIELD USING WIRELESS UNDERGROUND
SENSOR NETWORK(WUSN)

A PROJECT REPORT

Submitted by

S MEGHANA SRI LASYA - 111619106081


MUNGAMURU LOHITHA - 111619106088
RACHAPALYAM JAYASREE - 111619106108

in partial fulfillment for the award of the degree

of

BACHELOR OF ENGINEERING

IN

ELECTRONICS AND COMMUNICATION ENGINEERING

R.M.K COLLEGE OF ENGINEERING AND TECHNOLOGY


PUDUVOYAL
ANNA UNIVERSITY: CHENNAI 600 025

MARCH 2023

1
ANNA UNIVERSITY: CHENNAI 600 025

BONAFIDE CERTIFICATE

Certified that this project report “MAGNETIC INDUCTION


BASED COMMUNICATIONS ON THE AGRICULTURE
FIELD USING WIRELESS UNDERGROUND SENSOR
NETWORK(WUSN)” is the bonafide work of “S.MEGHANA SRI
LASYA (111619106081), MUNGAMURU LOHITHA(111619106088),
RACHAPALYAM JAYASREE(111619106108)” who carried out the
project work under my supervision

SIGNATURE SIGNATURE
Dr.N.GANGATHARAN Mr. P. SATHYA RAJ
HEAD OF THE DEPARTMENT ASSISTANT PROFESSOR
Department of Electronics and Department of Electronics and
Communication Engineering Communication Engineering
R.M.K College of Engineering R.M.K College of Engineering
and Technology,R.S.M Nagar, and Technology,R.S.M Nagar,
Puduvoyal, Puduvoyal,
Tiruvallur – 601206 Tiruvallur – 601206

Submitted for the Examination held on ___________

INTERNAL EXAMINER EXTERNAL


EXAMINER

2
ACKNOWLEDGEMENT

Support on-demand, encouragement at the needed moment and


guidance in the right direction are indispensable for the success of our
project. We have received these in excess from all corners from various
people, we are glad to submit our gratitude to them.

We thank Shri.R.S.Munirathinam, our beloved Chairman and


Shri.R.M.Kishore, our Vice Chairman for extending a generous hand in
providing the best resources to the college. Dr.K.Ramar, Principal and
Dr.K.Sivaram, Dean Research have been a source of motivation to all the
staff and students of our college. We are so thankful to them.

Our sincere thanks to Dr.N. Gangatharan, the Head of the


Department for his continuous support and motivation throughout our
project.

We extend our profound gratitude to Dr.T.M.Inbamalar, our


Project Coordinator Mr.P.Sathyaraj our Supervisor for his guidance, who
have indeed been open all the time to help us throughout the course of the
project. We thank them for giving us full support to complete this project
successfully.

Last, but not the least, we take this opportunity to thank all the staff
members of the Department of Electronics and Communication
Engineering. Regards to our family, classmates and friends who offered an
unflinching moral support for completion of this project.

3
ABSTRACT

Wireless Underground Sensor Networks (WUSNs) constitute one


of the promising application areas of the recently developed wireless
sensor networking techniques. WUSN is a specialized kind of WSN that
mainly focuses on the use of sensors at the subsurface region of the soil.
For a long time, this region has been used to bury sensors, usually
targeting irrigation and environment monitoring applications, although
without wireless communication capability. WUSNs promise to fill this
gap and to provide the infrastructure for novel applications. The
underground wireless channel was only available recently. Communication
through the underground medium has been a challenging research
area .The applications require the deployment of sensors below the ground
surface. Hence, the sensor become part of the sensed environment and
might deliver more precise sensing.WUSNs, which have components, i.e.
the sensors, that are buried underground and that communicate through
soil.

KEYWORDS: SOIL COMMUNICATION, WIRELESS MONITORING

4
TABLE OF CONTENTS

CHAPTER NO. TITLE PAGE


NO.

ABSTRACT iv
LIST OF FIGURES vii
LIST OF ABBREVIATIONS viii
LIST OF TABLES ix

1. INTRODUCTION la
1.1 INTRODUCTION 1
1.2 SCOPE OF THE PROJECT 1
1.3 EXISTING SYSTEM 2
1.3.1 Disadvantages 2
1.4 PROPOSED SYSTEM 2
1.4.1 Advantages 2

2. LITERATURE SURVEY 3

3. PROJECT DESCRIPTION 7
3.1 INTRODUCTION 7
3.2 BLOCK DIAGRAM 8
3.3 MODULES 9
3.4 MODULE DESCRIPTION 9
3.4.1 Field Monitoring
9
3.4.2 Transmitting Data 10
3.4.3 Monitoring On Control Room 11

5
3.5 BLOCK DIAGRAM DESCRIPTION 11

CHAPTER NO. TITLE PAGE NO.

4. HARDWARE AND SOFTWARE DESCRIPTION 12


4.1 HARDWARE DESCRIPTION 12
4.1.1 Arduino Uno 13
4.1.2 LCD 15
4.1.3 DHT 20
4.1.4 Soil Moisture Sensor 27
4.1.5 Water Level 32
4.1.6 IOT 38
4.1.7 ESP-12E based Node MCU 53
4.2 SOFTWARE DESCRIPTION 56
4.2.1 Embedded C 56
4.2.2 Arduino Software Ide 59

5. OUTPUT 71
5.1 OUTPUT 71

6. FUTURE ENHANCEMENT 72
6.1 APPLICATIONS 72
6.2 ADVANTAGES 72
6.3 CONCLUSION 72

REFERENCES 74

6
LIST OF TABLES

TABLE NO. TITLE PAGE NO

1. Technical Specifications 14
2. Functions of LCD 17
3. Command Codes of LCD 18
4. ESP-12E Pin description 21
5. Interfaces 55

7
LIST OF FIGURES

FIGURE NO TITLE PAGE NO.


1.1 Arduino uno 13
1.2 LCD 15
1.3 LCD pinout diagram 16
1.4 Temperature Sensor 20
1.5 Soil moisture sensor 27
1.6 Water sensor 33
1.7 Water sensor with/without arduino 36
1.8 ESP-12E based nodemcu 46
1.9 Node MCU configuration 47
2.1 MCU pin configuration 48
2.2 Schematic WIFI Module 52
2.3 Representation of Embedded System 56
3.3 Arduino Software IDE 57

8
LIST OF ABBREVATION

AG2UG Aboveground to Underground


AVR Automatic Voltage Regulators
FTDI Future Technology Devices International Lmtd
ICSP In-Circuit Serial Programming
OOK On-Off Keying
PCB Printed Circuit Board
QPSK Quadrature Phase Shift Keying
RSSI Received Signal Strength Indicator
TTL Transistor-Transistor Logic
UIM Underground Infrastructure Monitoring
UG2AG Underground to Aboveground
WUSN Wireless Underground Sesnor Network

9
CHAPTER 1

INTRODUCTION

1.1 GENERAL

Wireless underground sensor networks (WUSNs) have been


preliminarily applied in underground infrastructure monitoring (UIM) to
alert entities about any anomaly in a timely manner. Some key repeaters
are deployed along a typical borehole to ensure reliable connectivity with
the aboveground gateways. However, the link quality characteristics of the
bi-directional communications between the underground repeaters and
aboveground devices have not been experimentally analyzed for UIM-
WUSNs.

To this end, a semi-empirical evaluation of undergroundto-


aboveground (UG2AG) and aboveground-to-underground (AG2UG)
communications are presented in non-backfilled scenarios. In this paper,
the effects of burial depth, internode distance, propagation direction, and
backfilled condition on link quality are quantitatively investigated by real-
life experiments. First, the non-backfilled UG2AG and AG2UG channel
model is proposed and verified by the measured data.

1.2 SCOPE OF THE PROJECT

The scope of the project is to monitor the agriculture field through


soil communication technology.

1
1.3 EXISTING SYSTEM

No soil communication technology exist before for transmitting


sensor datas, Full wired communication exists previously.

1.3.1 Existing System Disadvantages

The response of the sensor information is very slow and not easy
to monitor the agriculture field.

1.4 PROPOSED SYSTEM

 In proposed system we implement a soil communication for


transmitting data in underground sensor networking.

 In proposed system all the data’s passed through soil and get
transmitted through sensor networks and applied in
underground infrastructure based monitoring system.

 Even jammer presence will not distract the signal.

1.4.1 Proposed System Advantages

Fast response and Easy to monitor the soldier during battelfields


(or) defense communications.

2
CHAPTER 2

LITERATURE SURVEY

Zhiheng Zhou, Hongxi Yin*, Yanxin Yao (2019) has proposed


about Wireless Optical Communication Performance Simulation and Full-
duplex Communication Experimental System with Different Seawater
Environment.

In his work, the impacts of transmitter divergence angle, receiver


aperture and transmission distance on the performance of underwater
wireless optical communication system under different seawater quality
conditions are modeled and simulated. A new type of underwater wireless
optical communication transmitter module based on OSRAM laser diode is
designed and developed. An integrated underwater green optical
communication experimental system is built and its performance is tested.
A full-duplex Ethernet transmission system with extended distance is
established to realize highspeed transmission of real-time multi-service
over Ethernet.

T J V V Prasad Reddy, C Sandeep Kumar, K Suman, U Avinash ,


Harisudha Kuresan (2020) has proposed about Wireless Underground
Sensor Network Using Magnetic Induction

The electromagnetic (EM) waves are used for long distance


communication by using air as a medium but when EM waves are used for
communication through soil it cannot penetrate through soil due to various
compositions of soil like red, black cotton soil etc. When these waves are
used for data transmission in soil there will be loss in data because of high
3
diffraction. When there is increase in transmission distance there will be
high path loss and high attenuation because of interior distance. In this
present day to day communication underground communication system
needs to play a key role for the effective data transmission. To establish
this effective wireless connection wireless underground sensor networks
(WUSN) has been introduced. To overcome problems in the
electromagnetic waves, Magnetic induction (MI) has been proposed as it
consists of magnetic induction coils which are used as transceivers for the
effective data transmission

Sijung Yang, Omar Baltaji, Andrew C. Singer, and Youssef M. A.


Hashas Has proposed about Development of an Underground Through-
Soil Wireless Acoustic Communication System

The practical development of WUSN would benefit numerous


applications, including online infrastructure monitoring, earthquake
warning systems, and agricultural automation. However, state of-the-art
RF electromagnetic wireless systems are ineffective for communicating
through-soil, due to extreme signal path losses from absorption and
scattering in soil, even though the typical data requirements for such
applications are modest, ranging from tens to hundreds of bps. In contrast,
elephants, rodents and a wide variety of insects use acoustic waves for
communicating through-soil, suggesting the viability of soil as a
communication channel, and of acoustic waves as carriers. In this article,
we demonstrate how soil can be used as a communication medium for
wireless acoustic digital communication over distances up to 50 m at 20
bps data rates. By leveraging a physical model of the soil channel derived
from its identified characteristics, then employing QPSK and OOK
modulation and sparse decision feedback equalization schemes, and

4
exploiting well-coupled and matched acoustic sources, wireless digital
communication was successful in both laboratory and field experiments,
illustrating the viability of sending application-specific data, ranging from
binary sensor readings to low-resolution images

Abdul Salam, Mehmet C. Vuran, Suat Irma (2020) has proposed


about A Statistical Impulse Response Model Based on Empirical
Characterization of Wireless Underground Channel

Wireless underground sensor networks (WUSNs) are becoming


ubiquitous in many areas. The design of robust systems requires extensive
understanding of the underground (UG) channel characteristics. In this
paper, an UG channel impulse response is modeled and validated via
extensive experiments in indoor and field testbed settings. The three
distinct types of soils are selected with sand and clay contents ranging
from 13% to 86% and 3% to 32%, respectively. The impacts of changes in
soil texture and soil moisture are investigated with more than 1, 200
measurements in a novel UG testbed that allows flexibility in soil moisture
control. Moreover, the time-domain characteristics of the channel such as
the RMS delay spread, coherence bandwidth, and multipath power gain are
analyzed. The analysis of the power delay profile validates the three main
components of the UG channel: direct, reflected, and lateral waves.
Furthermore, it is shown that the RMS delay spread follows a log-normal
distribution.

Piyush Raut , P. H. Ghare h(2020) has proposed that of Analysis of


Wireless Channel Parameters for the Different Types of Soil in the
WUSNs

5
The potential application of wireless underground sensor networks
requires precision and accuracy in their network communication. Hence
analysis of wireless channel parameters is required for reliable
communication. The simulation of path loss parameter for different types
of soil with respect to the frequency of sensor nodes and distance between
sensor nodes has been analyzed. Furthermore, RSSI has been analyzed for
ZigBee S8 wireless sensor nodes for UG-AG and AG-UG communication
link. The packet error rate is zero for internode distance up to 165 cm for
underground communication. The results will be helpful to apply in real
time practical implementation of any wireless underground sensor
networks.

6
CHAPTER 3

PROJECT DESCRIPTION

3.1 INTRODUCTION

Underground sensor nodes are installed along the external surfaces


of pipelines, and sensor data are uploaded to aboveground base stations or
gateways via repeaters. Besides the scenarios for which the repeater is
directly buried in soil, the repeater can also be deployed at the bottom of
the borehole to avoid high attenuation in soil and to ensure reliable data
delivery between the underground node and the aboveground gateway.
This can be denoted as the non-backfilled scenario for the repeater. Two
essential communication channels exist between repeaters and gateways
responsible for uploading the sensor data and receiving control messages.
Consequently, the link performance characterization for the underground-
to-aboveground (UG2AG) and aboveground-to-underground (AG2AG)
channels is a fundamental building block for the communication protocol
for UIM-WUSNs. On the other hand, the communication between repeater
and underground nodes is primarily via the underground-to-underground
(UG2UG) channel, which has been widely studied.

7
3.2 BLOCK DIAGRAM

TRANSMITTER SECTION:

POWER
SUPPLY

WATER SOIL DATA TX


LEVEL

SOIL
MOISTURE
ARDUINO UNO LCD

DHT 11

RECEIVER SECTION:

POWER
SUPPLY

SOIL DATA
RX LCD

IOT ARDUINO UNO

8
3.3 MODULES

 FIELD MONITORING

 TRANSMITTING DATA

 MONITORING BY FARMER

3.4 MODULE DESCRIPTION

3.4.1 Field Monitoring

POWER SUPPLY

WATER
LEVEL

SOIL
SENSOR ARDUINO
UNO

DHT11

In this concept we are using Arduino uno micro controller it acts as


brain of our system, it will control all the slave components, we are using
DHT 11 temperature sensor it is used to detect the temperature and
humidity in agriculture field, soil moisture

9
3.4.2 Transmitting Data

POWER SUPPLY

ARDUINO Soil data TX


UNO

POWER SUPPLY

Soil data rx ARDUINO


UNO

In this system we are using Arduino uno micro controller it acts a


brain of our system, all the solider data transmit through soil data
transmitter to soil data receiver will transmit the data to control room.

10
3.4.3 Monitoring in Control Room

POWER SUPPLY

LCD
ARDUINO
UNO
IOT

In this system we are using Arduino micro controller, LCD is used


to display the current status, IOT is used to monitor the body health
through cloud.

3.5 BLOCK DIAGRAM DESCRIPTION

In this project we have ARDUINO UNO microcontroller which


acts as brain of our system. Hence entire system program is stored in it.
Here, we have two units 1. Transmitter unit, 2. Receiver unit. In
transmitting side we have a water level sensor for monitoring the water
level in agriculture field, temperature sensor is used to detect the field
temperature and humidity, soil moisture sensor is used to detect the soil
condition whether it is wet or dry, LCD is used to update the current sensor
values, all these data’s are passes through soil data tx and Receiving
section we have we have soil data rx through the rx we are receiving all the

11
sensor data’s form agriculture field, all the sensor data’s are updated in
cloud.

CHAPTER 4

HARDWARE AND SOFTWARE DESCRIPTION

4.1 HARDWARE DESCRIPTION

ARDUINO

Arduino is an open-source electronics platform based on easy-to-


use hardware and software. Arduino boards are able to read inputs - light
on a sensor, a finger on a button, or a Twitter message - and turn it into an
output - activating a motor, turning on an LED, publishing something
online. You can tell your board what to do by sending a set of instructions
to the microcontroller on the board.

Over the years Arduino has been the brain of thousands of


projects, from everyday objects to complex scientific instruments. A
worldwide community of makers - students, hobbyists, artists,
programmers, and professionals - has gathered around this open-source
platform, their contributions have added up to an incredible amount
of accessible knowledge that can be of great help to novices and experts
alike.

There are many other microcontrollers and microcontroller


platforms available for physical computing. Parallax Basic Stamp,
Netmedia's BX-24, Phidgets, MIT's Handyboard, and many others offer
similar functionality. All of these tools take the messy details of
microcontroller programming and wrap it up in an easy-to-use package.

12
Arduino also simplifies the process of working with microcontrollers, but
it offers some advantage for teachers, students, and interested amateurs
over other systems:

4.1.1 Arduino Uno

The UNO is the best board to get started with electronics and
coding. If this is your first experience tinkering with the platform, the
UNO is the most robust board you can start playing with. The UNO is the
most used and documented board of the whole Arduino family.

Fig no-1.1-Arduino Uno

Arduino Uno is a microcontroller board based on the


ATmega328P (datasheet). It has 14 digital input/output pins (of which 6
can be used as PWM outputs), 6 analog inputs, a 16 MHz quartz crystal, a
USB connection, a power jack, an ICSP header and a reset button. It
contains everything needed to support the microcontroller; simply connect
it to a computer with a USB cable or power it with an AC-to-DC adapter
or battery to get started. You can tinker with your UNO without worrying

13
too much about doing something wrong, worstcase scenario you can
replace the chip for a few dollars and start over again. "Uno" means one in
Italian and was chosen to mark the release of Arduino Software (IDE) 1.0.
The Uno board and version 1.0 of Arduino Software (IDE) were the
reference versions of Arduino, now evolved to newer releases. The Uno
board is the first in a series of USB Arduino boards, and the reference
model for the Arduino platform; for an extensive list of current, past or
outdated boards see the Arduino index of boards.

4.1.1a Technical Specifications

Microcontroller ATmega328P
Operating Voltage 5V
Input Voltage (recommended) 7-12V
Input Voltage (limit) 6-20V
Digital I/O Pins 14 (of which 6 provide PWM
output)
PWM Digital I/O Pins 6
Analog Input Pins 6
DC Current per I/O Pin 20 mA
DC Current for 3.3V Pin 50 mA
Flash Memory 32 KB (ATmega328P) of which
0.5 KB used by boot loader
SRAM 2 KB (ATmega328P)
EEPROM 1 KB (ATmega328P)
Clock Speed 16 MHz
LED_BUILTIN 13
Length 68.6 mm
Width 53.4 mm
Weight 25 g

14
4.1.2 Liquid Crystal Display

LCD screen is an electronic display module and find a wide range


of applications. A 16x2 LCD display is very basic module and is very
commonly used in various devices and circuits. These modules are
preferred over seven segments and other multi segment LEDs. The reasons
being: LCDs are economical; easily programmable; have no limitation of
displaying special & even custom characters (unlike in seven
segments), animations and so on.

A 16x2 LCD means it can display 16 characters per line and there
are 2 such lines. In this LCD each character is displayed in 5x7 pixel
matrix. This LCD has two registers, namely, Command and Data. The
command register stores the command instructions given to the LCD. A
command is an instruction given to LCD to do a predefined task like
initializing it, clearing its screen, setting the cursor position, controlling
display etc. The data register stores the data to be displayed on the LCD.
The data is the ASCII value of the character to be displayed on the LCD.
Click to learn more about internal structure of a LCD.

15
Fig no-1.5-LCD

We come across LCD displays everywhere around us. Computers,


calculators, television sets, mobile phones, digital watches use some kind
of display to display the time. An LCD is an electronic display module
which uses liquid crystal to produce a visible image. The 16×2 LCD
display is a very basic module commonly used in projects. The
16×2 translates to a display 16 characters per line in 2 such lines. In this
LCD each character is displayed in a 5×7 pixel matrix.

16X2 LCD PINOUT DIAGRAM:

Fig no-1.6-LCD pinout diagram

16
PIN
FUNCTION NAME
NO.
1 Ground (0V) Ground
2 Supply voltage; 5V (4.7V – 5.3V) VCC
3 Contrast adjustment; the best way is to use a variable Vo / VEE
resistor such as a potentiometer. The output of the
potentiometer is connected to this pin. Rotate the
potentiometer knob forward and backwards to adjust the
LCD contrast.
4 Selects command register when low, and data register RS (Register
when high Select )
5 Low to write to the register; High to read from the register Read/write
6 Sends data to data pins when a high to low pulse is given; Enable
Extra voltage push is required to execute the instruction
and EN(enable) signal is used for this purpose. Usually,
we make it en=0 and when we want to execute the
instruction we make it high en=1 for some milliseconds.
After this we again make it ground that is, en=0.
7 DB0
8 DB1
9 DB2
10 DB3
11 8-bit data pins DB4
12 DB5
13 DB6
14 DB7
15 Backlight VCC (5V) Led+
16 Backlight Ground (0V) Led-

IMPORTANT COMMAND CODES FOR LCD:


17
HEX COMMAND TO LCD INSTRUCTION
SR.NO.
CODE REGISTER
1 01 Clear display screen
2 02 Return home
3 04 Decrement cursor (shift cursor to left)
4 06 Increment cursor (shift cursor to right)
5 05 Shift display right
6 07 Shift display left
7 08 Display off, cursor off
8 0A Display off, cursor on
9 0C Display on, cursor off
10 0E Display on, cursor blinking
11 0F Display on, cursor blinking
12 10 Shift cursor position to left
13 14 Shift cursor position to right
14 18 Shift the entire display to the left
15 1C Shift the entire display to the right
16 80 Force cursor to beginning ( 1st line)
17 C0 Force cursor to beginning ( 2nd line)
18 38 2 lines and 5×7 matrix

DISPLAYING CUSTOM CHARACTERS ON 16X2 LCD:

Generating custom characters on LCD is not very hard. It requires


the knowledge about custom generated random access memory (CG-
RAM) of LCD and the LCD chip controller. Most LCDs contain Hitachi
HD4478 controller. CG-RAM is the main component in making custom
characters. It stores the custom characters once declared in the code. CG-

18
RAM size is 64 byte providing the option of creating eight characters at a
time. Each character is eight byte in size.

CG-RAM address starts from 0x40 (Hexadecimal) or 64 in


decimal. We can generate custom characters at these addresses. Once we
generate our characters at these addresses, now we can print them on the
LCD at any time by just sending simple commands to the LCD. Character
addresses and printing commands are below.

In the table above you can see starting addresses for each character
with their printing commands. The first character is generated at address
0x40 to 0x47 and is printed on LCD by just sending simple command 0 to
the LCD. The second character is generated at address 0x48 to 0x55 and is
printed by sending 1 to LCD.

Fig no-1.7 Characteristics of RAM

19
4.1.3 Temperature Sensor

Fig no-1.8 LM35

The LM35 series are precision integrated-circuit temperature


devices with an output voltage linearly proportional to the Centigrade
temperature. The LM35 device has an advantage over linear temperature
sensors calibrated in Kelvin, as the user is not required to subtract a large
constant voltage from the output to obtain convenient Centigrade scaling.
The LM35 device does not require any external calibration or trimming to
provide typical accuracies of ±¼°C at room temperature and ±¾°C over a
full −55°C to 150°C temperature range. Lower cost is assured by trimming
and calibration at the wafer level. The low-output impedance, linear
output, and precise inherent calibration of the LM35 device makes
interfacing to readout or control circuitry especially easy. The device is
used with single power supplies, or with plus and minus supplies. As the
LM35 device draws only 60 μA from the supply, it has very low self-
heating of less than 0.1°C in still air. The LM35 device is rated to operate
over a −55°C to 150°C temperature range, while the LM35C device is
rated for a −40°C to 110°C range (−10° with improved accuracy). The
LM35-series devices are available packaged in hermetic TO transistor
packages, while the LM35C, LM35CA, and LM35D devices are available
in the plastic TO-92 transistor package. The LM35D device is available in

20
an 8-lead surface-mount small-outline package and a plastic TO-220
package.

Formula to convert voltage to temperature


The formula to convert voltage to centigrade temperature for Lm35 is
Centigrade Temperature = Voltage Read by ADC / 10 mV (mills Volt)
I divided by 10 mV because Linear scale factor is for Lm35 is 10mV.

Following the above steps and tutorial you can easily interface
lm35 temperature sensor with any microcontroller that has a build in
analog to digital converter pins. Almost all the microcontroller today have
to built in ADC.

Pin Configuration:

Pin Number Pin Name Description


1 Vcc Input voltage is +5V for typical applications
2 Analog Out There will be increase in 10mV for raise of
every 1°C. Can range from -1V(-55°C) to
6V(150°C)
3 Ground Connected to ground of circuit

Features

 Calibrated Directly in Celsius (Centigrade)

 Linear + 10-mV/°C Scale Factor

 0.5°C Ensured Accuracy (at 25°C)

 Rated for Full −55°C to 150°C Range

21
 Suitable for Remote Applications

 Low-Cost Due to Wafer-Level Trimming

 Operates From 4 V to 30 V

 Less Than 60-μA Current Drain

 Low Self-Heating, 0.08°C in Still Air

 Non-Linearity Only ±¼°C Typical

 Low-Impedance Output, 0.1 Ω for 1-mA Load

 Small and hence suitable for remote applications

 Available in TO-92, TO-220, TO-CAN and SOIC package

 Output voltage is directly proportional (Linear) to temperature


(i.e.) there will be a rise of 10mV (0.01V) for every 1°C rise
in temperature.

Absolute Maximum Ratings

If Military/Aerospace specified devices are required, please


contact the National Semiconductor Sales Office/ Distributors for
availability and specifications.

Supply Voltage +35V to −0.2V

Output Voltage +6V to −1.0V

Output Current 10 mA

Storage Temp.;

TO-46 Package −60˚C to +180˚C

22
TO-92 Package −60˚C to +150˚C

SO-8 Package −65˚C to +150˚C

TO-220 Package −65˚C to +150˚C

Lead Temp.:

TO-46 Package,

(Soldering, 10 seconds) 300˚C

TO-92 and TO-220 Package,

(Soldering, 10 seconds) 260˚C

SO Package

Vapor Phase (60 seconds) 215˚C

Infrared (15 seconds) 220˚C

ESD Susceptibility 2500V

Specified Operating Temperature Range: TMIN to T MAX

LM35, LM35A −55˚C to +150˚C

LM35C, LM35CA −40˚C to +110˚C

LM35D 0˚C to +100˚C

23
Functional block diagram

Fig No-1.9 functional block diagram of DHT 11 sensor

The temperature-sensing element is then buffered by an amplifier


and provided to the VOUT pin. The amplifier has a simple class A output
stage with typical 0.5-Ω output impedance as shown in the Functional
Block Diagram. Therefore the LM35 can only source current and it's
sinking capability is limited to 1 μA.

Applications

The LM35 can be applied easily in the same way as other


integrated-circuit temperature sensors. It can be glued or cemented to a
surface and its temperature will be within about 0.01˚C of the surface
temperature. This presumes that the ambient air temperature is almost the
same as the surface temperature; if the air temperature were much higher

24
or lower than the surface temperature, the actual temperature of the LM35
die would be at an intermediate temperature between the surface
temperature and the air temperature. This is expecially true for the TO-92
plastic package, where the copper leads are the principal thermal path to
carry heat into the device, so its temperature might be closer to the air
temperature than to the surface temperature. To minimize this problem, be
sure that the wiring to the LM35, as it leaves the device, is held at the same
temperature as the surface of interest. The easiest way to do this is to cover
up these wires with a bead of epoxy which will insure that the leads and
wires are all at the same temperature as the surface, and that the LM35
die’s temperature will not be affected by the air temperature. The TO-46
metal package can also be soldered to a metal surface or pipe without
damage. Of course, in that case the V− terminal of the circuit will be
grounded to that metal. Alternatively, the LM35 can be mounted inside a
sealed-end metal tube, and can then be dipped into a bath or screwed into a
threaded hole in a tank. As with any IC, the LM35 and accompanying
wiring and circuits must be kept insulated and dry, to avoid leakage and
corrosion. This is especially true if the circuit may operate at cold
temperatures where condensation can occur. Printed-circuit coatings and
varnishes such as Humiseal and epoxy paints or dips are often used to
insure that moisture cannot corrode the LM35 or its connections. These
devices are sometimes soldered to a small light-weight heat fin, to decrease
the thermal time constant and speed up the response in slowly-moving air.
On the other hand, a small thermal mass may be added to the sensor, to
give the steadiest reading despite small deviations in the air temperature

25
Fig No-1.10-Temperature to Digital converter(Serial output)

Fig No-1.11-Temperature to digital converter(parallel TRI-state


outputs)

LM35 Temperature Sensor Applications:

 Measuring temperature of a particular environment

 Providing thermal shutdown for a circuit/component

 Monitoring Battery Temperature

 Measuring Temperatures for HVAC applications.

26
4.1.4 Soil Moisture Sensor

Fig no-1.12 Soil Moisture Sensor

This sensor can be used to test the moisture of soil, when the soil is
having water shortage, the module output is at high level, and else the
output is at low level. By using this sensor one can automatically water the
flower plant, or any other plants requiring automatic watering technique.
Soil moisture sensors measure the volumetric water content in soil . Since
the direct gravimetric measurement of free soil moisture requires
removing, drying, and weighing 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. Module
triple output mode, digital output is simple, analog output more accurate,
serial output with exact reading

27
Description:

This sensor consists of two parts, the fork-shaped probe that has to
be nailed to the ground, and an electronic module that will be used to
connect the probe with Arduino. It operates with a 3.3V or 5V supply to be
administered by the VCC and GND pins. The red LED will light when we
are feeding. Has both digital and analog functionality, the pin AO will give
us an analog signal between the supply value to 0V (For
Arduino UNO 5v to 0V) to higher humidity value will be higher, this is
due to the operation of the probe because the higher the humidity is
greater conductivity of the soil and therefore increase the value that we
measure.

The DO pin will give us a digital signal is “1” when the humidity
value is lower than manually establish on the potentiometer and ‘0’ when it
is larger. The potentiometer is connected to a comparator LM393 as
the probe signal. To use it correctly we must calibrate with different soil
samples with different humidities. The green LED will help us in this
task because when we have a 1 in DO will turn on.

Weatherproofing

If you intend to use this sensor outdoors, we recommend adding a


little protection to the PCB to extend its lifespan. You could always use
good ol' fashioned hot glue. However, hot glue does not hold up well in the
sun and is only recommended for projects that will not be exposed to high
temperatures. For projects that need to be able to withstand all the

28
elements, you could use a conformal coating to cover the SMD parts on the
PCB as well as your solder connections.

Working principle:

This is an easy to use digital soil moisture sensor. Just insert the
sensor in the soil and it can measure moisture or water level content in it. It
gives a digital output of 5V when moisture level is high and 0V when the
moisture level is low in the soil.

The sensor includes a potentiometer to set the desired moisture


threshold. When the sensor measures more moisture than the set threshold,
the digital output goes high and an LED indicates the output. When the
moisture in the soil is less that the set threshold, the output remains low.
The digital output can be connected to a micro controller to sense the
moisture level. The sensor also outputs an analog output which can be
connected to the ADC of a micro controller to get the exact moisture level
in the solid. This sensor is great for making water gardening projects,
water sensing, etc.

Specifications:-

 Operating voltage: 3.3V~5V

 Dual output mode, analog output more accurate

 A fixed bolt hole for easy installation

 With power indicator (red) and digital switching output


indicator (green)

 Having LM393 comparator chip, stable

29
 Panel PCB Dimension: Approx.3cm x 1.5cm

 Soil Probe Dimension: Approx. 6cm x 3cm

 Cable Length: Approx.21cm

 VCC: 3.3V-5V

 GND: GND

 DO: digital output interface(0 and 1)

 AO: analog output interface

 Output Voltage: 0–4.2V

 Input Current: 35mA

 Output Signal: both analog and digital

Usage:-

 Soil moisture module is most sensitive to the ambient, generally


used to detect the moisture content of the soil.

 When the module cannot reach the threshold value, DO port


output high, when the soil humidity exceeds a set threshold
value, the module D0 output low;

 The small board digital output D0 can be connected directly to


the MCU, MCU to detect high and low, to detect soil moisture;

 Small board digital output DO can directly drive the buzzer


module or relay module in our store, which can form a soil
moisture alarm equipment;

30
 Small board analog output AO and AD module connected
through the AD converter, you can get more precise values of
soil moisture.

Specifications

The specifications of the FC-28 soil moisture sensor are as follows:

 Input Voltage: 3.3–5V

Analog Mode

To connect the sensor in the analog mode, we will need to use the
analog output of the sensor. When taking the analog output from the soil
moisture sensor FC-28, the sensor gives us a value from 0 to 1023. The
moisture is measured in percentages, so we will map these values from 0 to
100, and then show them on the serial monitor. You can set different
ranges of the moisture values and turn the water pump on or off according
to it.

APPLICATIONS:

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

31
2. 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.

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.

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

4. 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, wet or moist for plants

4.1.5 Water Level Sensor

Water level sensor is used to measure water level in water tank or


in any other equipment. In our daily life we need to detect the level of
water like in water tank at the top of roof which is not directly accessible

32
and in laboratories where specific level of any liquid is required to be
monitored. In such applications water level sensor is very useful. In
today’s tutorial we will see how to interface water level sensor with
Arduino and how to monitor specific water level using this assembly.
Water level sensor gives output in the form of voltage.

4.1.5 WATER LEVEL SENSOR

Fig no-2.1 Water Sensor

This circuit will be able to tell us roughly how much of the sensor
is covered by liquid.

Liquid level sensors are used for all types of applications. They are
extensively used within automobiles, which rely on a substantial amount of
different fluids in order to operate to check for how much gas in the car,
windshield washer fluid, oil levles. Basically, they are used whenever we
want to measure the level of any type of fluid of a system. Thus, they are

33
extremely valuable to be able to learn and manipulate and build circuits
with.

The liquid level sensor we will use is an analog sensor, meaning it


outputs an analog voltage in proportion to the amount of liquid the sensor
is exposed to. We just connect the analog pin, represented by an S, to an
analog pin on the arduino board to read the analog value.

As you can see from the above image, the sensor has a series of
parallel wires across the board. These wires are what sense the liquid level
that the board is exposed to.

If the board has water or another fluid covering all the wire, then it
will output a maximum analog value reading. Since analog values read by
an arduino range from 0 (lowest reading) to 1023 (highest reading), a
board completely submerged with a liquid will have a reading of 1023 by
an arduino. If the board is halfway covered, a reading of about 512 will be
read by the arduino. If the board is 1/4 covered by a liquid, then the
arduino will read about 256. And if no liquid is on it at all, then a near 0
reading should be obtained.

With our liquid level sensor and an arduino, there are a number of
options of what we can do. We can use the sensor, simply, to read and
output the analog value obtained. Or we can create a type of alarm
indicator status system. For example, we can have a green LED light up
when the sensor is completely full (submerged to the top with fluid),
indicating that it's full. We can have a red LED light up when the sensor's
liquid level falls below 1/4 level, like how car dashboard LED indicators
tell us when our gas tank goes below E (empty).

34
So with a microcontroller like the arduino, there are basically
limitless options of how we can incorporate the liquid level sensor.

In this circuit, we will build now, we will just do the most basic
circuit and simply read and output the analog value read by the arduino.

Specifications:
 Working Voltage: DC 3-5V

 Working Current: <20mA

 Interface: Analog

 Weight : 3g.

 Sensor Type: Simulation

 Detection Area: 40 mm x 16 mm

 Manufacturing Process: FR4 double spray tin

 Fixed Hole Size: 3.2 mm

 Humanized Design: Half moon sag nonskid treatment

 Working Temperature: 10 °C to 30 °C

 Work Humidity: 10% to 90% without condensation

 Size: 65 mm x 20 mm x 8 mm

 Low power consumption.

 High sensitivity.

 Output Voltage :0- 4.2 v.

 Optional Accessories: 3 pin sensor connecting


line,Arduino 328 controller,Sensor relay shield

35
Water level sensor connecting with arduino

Fig no-2.2 Water Sensor without Arduino,b)with Arduino

This circuit is as basic as it can get.

The liquid level sensor board needs about 5V of power.

36
The signal pin (S) gets connected to an analog pin on the arduino
board. Here we connect it to analog pin A0. This allows the arduino board
to be able to read the analog voltage value.

Applications:

 Rainfall detecting

 Tank overflow detector

 Water level detection for the pan of a water heater. It’s very
common for these heaters to leak when they get older. Placing
a sensor in the pan to detect the presence of water where there
should be none.

 Same goes for under sink links. Especially in homes that are
vacant for much of the year. Use an Ethernet Shield (or WiFi)
to add this leak detection device to the internet and have it
send an email if water is detected.

 Although not specifically designed for soil moisture readings,


it does work relatively well for that purpose. Again, you’ll
need to experiment with the numbers but this device could be
used to determine if plants need water and to initiate a
sprinkler to hydrate them.

37
3.1.6 Internet of Things

The internet of things (IoT) is the network of physical devices,


vehicles, buildings and other items embedded with electronics, software,
sensors, actuators, and network connectivity that enable these objects to
collect and exchange data. In 2013 the Global Standards Initiative on
Internet of Things (IoT-GSI) defined the IoT as "the infrastructure of the
information society. The IoT allows objects to be sensed and controlled
remotely across existing network infrastructure, creating opportunities for
more direct integration of the physical world into computer-based systems,
and resulting in improved efficiency, accuracy and economic benefit.
When IoT is augmented with sensors and actuators, the technology
becomes an instance of the more general class of cyber-physical systems,
which also encompasses technologies such as smart grids, smart
homes, intelligent transportation and smart cities. Each thing is uniquely
identifiable through its embedded computing system but is able to
interoperate within the existing Internet infrastructure. Experts estimate
that the IoT will consist of almost 50 billion objects by 2020.

INFRASTRUCTURE:

The Internet of Things will become part of the fabric of everyday


life. It will become part of our overall infrastructure just like water,
electricity, telephone, TV and most recently the Internet. Whereas the
current Internet typically connects full-scale computers, the Internet of
Things (as part of the Future Internet) will connect everyday objects with a
strong integration into the physical world.

38
1. Plug and Play Integration

If we look at IoT-related technology available today, there is a


huge heterogeneity. It is typically deployed for very specific purposes and
the configuration requires significant technical knowledge and may be
cumbersome. To achieve a true Internet of Things we need to move away
from such small-scale, vertical application silos, towards a horizontal
infrastructure on which a variety of applications can run simultaneously.

2. Infrastructure Functionality

The infrastructure needs to support applications in finding the


things required. An application may run anywhere, including on the things
themselves. Finding things is not limited to the start-up time of an
application. Automatic adaptation is needed whenever relevant new things
become available, things become unavailable or the status of things
changes. The infrastructure has to support the monitoring of such changes
and the adaptation that is required as a result of the changes.

3. Physical Location and Position

As the Internet of Things is strongly rooted in the physical world,


the notion of physical location and position are very important, especially
for finding things, but also for deriving knowledge. Therefore, the
infrastructure has to support finding things according to location (e.g. geo-
location based discovery). Taking mobility into account, localization
technologies will play an important role for the Internet of Things and may
become embedded into the infrastructure of the Internet of Things.

39
4. Security and Privacy

In addition, an infrastructure needs to provide support for security


and privacy functions including identification, confidentiality, integrity,
non-repudiation authentication and authorization. Here the heterogeneity
and the need for interoperability among different ICT systems deployed in
the infrastructure and the resource limitations of IoT devices (e.g., Nano
sensors) have to be taken into account.

APPLICATION AREAS:

In the last few years the evolution of markets and applications, and
therefore their economic potential and their impact in addressing societal
trends and challenges for the next decades has changed dramatically.
Societal trends are grouped as: health and wellness, transport and mobility,
security and safety, energy and environment, communication and e-
society, as presented in Figure 2.15. These trends create significant
opportunities in the markets of consumer electronics, automotive
electronics, medical applications, communication, etc. The applications in
these areas benefit directly by the More-Moore and More-than-Moore
semiconductor technologies, communications, networks, and software
developments.

a) Cities

Smart Parking: Monitoring of parking spaces availability in the city.

Structural health: Monitoring of vibrations and material conditions in


buildings, bridges and historical monuments.

40
Noise Urban Maps: Sound monitoring in bar areas and centric zones in
real time.

Traffic Congestion: Monitoring of vehicles and pedestrian levels to


optimize driving and walking routes.

Smart Lightning: Intelligent and weather adaptive lighting in street lights.

Waste Management: Detection of rubbish levels in containers to optimize


the trash collection routes.

Intelligent Transportation Systems: Smart Roads and Intelligent


Highways with warning messages and diversions according to climate
conditions and unexpected events like accidents or traffic jams.

b) Environment

Forest Fire Detection: Monitoring of combustion gases and preemptive


fire conditions to define alert zones.

Air Pollution: Control of CO2 emissions of factories, pollution emitted by


cars and toxic gases generated in farms.

Landslide and Avalanche Prevention: Monitoring of soil moisture,


vibrations and earth density to detect dangerous patterns in land
conditions.

Earthquake Early Detection: Distributed control in specific places of


tremors.

41
c) Water

Water Quality: Study of water suitability in rivers and the sea for fauna
and Eligibility for drinkable use.

Water Leakages: Detection of liquid presence outside tanks and pressure


variations along pipes.

River Floods: Monitoring of water level variations in rivers, dams and


reservoirs.

d) Energy Smart Grid, Smart Metering

Smart Grid: Energy consumption monitoring and management.

Tank level: Monitoring of water, oil and gas levels in storage tanks
andcisterns.

Photovoltaic Installations: Monitoring and optimization of performance


insolar energy plants.

Water Flow: Measurement of water pressure in water transportation


systems.

Silos Stock Calculation: Measurement of emptiness level and weight of


thegoods.

e) Security & Emergencies

Perimeter Access Control: Access control to restricted areas and


detection of people in non-authorized areas.

42
Liquid Presence: Liquid detection in data centres, warehouses and
sensitive building grounds to prevent break downs and corrosion.

Radiation Levels: Distributed measurement of radiation levels in nuclear


power stations surroundings to generate leakage alerts.

Explosive and Hazardous Gases: Detection of gas levels and leakages in


industrial environments, surroundings of chemical factories and inside
mines.

f) Industrial Control

M2M Applications: Machine auto-diagnosis and assets control.

Indoor Air Quality: Monitoring of toxic gas and oxygen levels inside
chemical plants to ensure workers and goods safety.

Temperature Monitoring: Control of temperature inside industrial and


medical fridges with sensitive merchandise.

Ozone Presence: Monitoring of ozone levels during the drying meat


process in food factories.

Indoor Location: Asset indoor location by using active (ZigBee, UWB)


and passive tags (RFID/NFC).

Vehicle Auto-diagnosis: Information collection from CAN Bus to send


real time alarms to emergencies or provide advice to drivers.

43
g) Agriculture

Wine Quality Enhancing: Monitoring soil moisture and trunk diameter in


vineyards to control the amount of sugar in grapes and grapevine health.

Green Houses: Control micro-climate conditions to maximize the


production of fruits and vegetables and its quality.

Golf Courses: Selective irrigation in dry zones to reduce the water


resources required in the green.

Meteorological Station Network: Study of weather conditions in fields to


forecast ice formation, rain, drought, snow or wind changes.

Compost: Control of humidity and temperature levels in alfalfa, hay,


straw, etc. to prevent fungus and other microbial contaminants.

h) Domestic & Home Automation

Energy and Water Use: Energy and water supply consumption


monitoring to obtain advice on how to save cost and resources.

Remote Control Appliances: Switching on and off remotely appliances to


avoid accidents and save energy.

Intrusion Detection Systems: Detection of window and door openings


and violations to prevent intruders.

Art and Goods Preservation: Monitoring of conditions inside museums


and art warehouses.

44
i) eHealth

Fall Detection: Assistance for elderly or disabled people living


independent.

Medical Fridges: Control of conditions inside freezers storing vaccines,


medicines and organic elements.

Sportsmen Care: Vital signs monitoring in high performance centres and


fields.

Patients Surveillance: Monitoring of conditions of patients inside


hospitals and in old people’s home.

Ultraviolet Radiation: Measurement of UV sun rays to warn people not


to be exposed in certain hours.

ESP-12E BASED NODEMCU:

The ESP8266 is the name of a micro controller designed by


Espressif Systems. The ESP8266 itself is a self-contained Wi-Fi
networking solution offering as a bridge from existing micro controller to
Wi-Fi and is also capable of running self-contained applications. This
module comes with a built in USB connector and a rich assortment of pin-
outs. With a micro USB cable, you can connect NodeMCU devkit to your
laptop and flash it without any trouble, just like Arduino. It is also
immediately breadboard friendly.

45
Fig no-2.3 ESP-12E BASED NODEMCU

ESP-12E Wi-Fi module is developed by Ai-thinker Team. core


processor ESP8266 in smaller sizes of the module encapsulates Tensilica
L106 integrates industry-leading ultra-low power 32-bit MCU micro, with
the 16-bit short mode, Clock speed support 80 MHz, 160 MHz, supports
the RTOS, integrated Wi-Fi MAC/BB/RF/PA/LNA, on-board antenna.
The module supports standard IEEE802.11 b/g/n agreement, complete
TCP/IP protocol stack. Users can use the add modules to an existing
device networking, or building a separate network controller. ESP8266 is
high integration wireless SOCs, designed for space and power constrained
mobile platform designers. It provides unsurpassed ability to embed Wi-Fi
capabilities within other systems, or to function as a standalone
application, with the lowest cost, and minimal space requirement.

46
Fig no-2.4 Nodemcu pin configuration

ESP8266EX offers a complete and self-contained Wi-Fi


networking solution; it can be used to host the application or to offload
Wi-Fi networking functions from another application processor. When
ESP8266EX hosts the application, it boots up directly from an external
flash. In has integrated cache to improve the performance of the system in
such applications. Alternately, serving as a Wi-Fi adapter, wireless internet
access can be added to any micro controller based design with simple
connectivity (SPI/SDIO or I2C/UART interface). ESP8266EX is among
the most integrated Wi-Fi chip in the industry; it integrates the antenna
switches, RF balun, power amplifier, low noise receive amplifier, filters,
power management modules, it requires minimal external circuitry, and the
entire solution, including front-end module, is designed to occupy minimal
PCB area.

47
ESP8266EX also integrates an enhanced version of Tensilica’s
L106 Diamond series 32-bit processor, with on-chip SRAM, besides the
Wi-Fi functionalities. ESP8266EX is often integrated with external sensors
and other application specific devices through its GPIOs; codes for such
applications are provided in examples in the SDK. Espressif Systems’
Smart Connectivity Platform (ESCP) demonstrates sophisticated system-
level features include fast sleep/wake context switching for energy-
efficient VoIP, adaptive radio biasing. For low-power operation, advance
signal processing, and spur cancellation and radio co-existence features for
common cellular, Bluetooth, DDR, LVDS, LCD interference mitigation.

Features:

 802.11 b/g/n

 Integrated low power 32-bit MCU

 Integrated 10-bit ADC

 Integrated TCP/IP protocol stack

 Integrated TR switch, balun, LNA, power amplifier and


matching network

 Integrated PLL, regulators, and power management units

 Supports antenna diversity

 Wi-Fi 2.4 GHz, support WPA/WPA2

 Support STA/AP/STA+AP operation modes

 Support Smart Link Function for both Android and iOS


devices
48
 Support Smart Link Function for both Android and iOS
devices

 SDIO 2.0, (H) SPI, UART, I2C, I2S, IRDA, PWM, GPIO

 STBC, 1x1 MIMO, 2x1 MIMO

 A-MPDU & A-MSDU aggregation and 0.4s guard interval

 Deep sleep power < 5uA

 Wake up and transmit packets in < 2ms

 Standby power consumption of < 1.0mW (DTIM3)

 +20dBm output power in 802.11b mode

 Operating temperature range -40C ~ 125

Fig no-2.5 ESP-12E pin configuration

49
PIN DESCRIPTION:

50
PIN MODE:

Receiver Sensitivity:

51
Schematic :

Fig no-2.6 Schematics of Esp-12E Wi-Fi Module

Functional Descriptions

MCU:

ESP8266EX is embedded with Tensilica L106 32-bit micro


controller (MCU), which features extra low power consumption and 16-bit
RSIC. The CPU clock speed is 80MHz. It can also reach a maximum value
of 160MHz. ESP8266EX is often integrated with external sensors and

52
other specific devices through its GPIOs; codes for such applications are
provided in examples in the SDK.

Memory Organization

Internal SRAM and ROM:

ESP8266EX Wi-Fi SoC is embedded with memory controller,


including SRAM and ROM. MCU can visit the memory units through
iBus, dBus, and AHB interfaces. All memory units can be visited upon
request, while a memory arbiter will decide the running sequence
according to the time when these requests are received by the processor.
According to our current version of SDK provided, SRAM space that is
available to users is assigned as below:

▪ RAM size < 36kB, that is to say, when ESP8266EX is working


under the station mode and is connected to the router,
programmable space accessible to user in heap and data section
is around 36kB.)

▪ There is no programmable ROM in the SoC, therefore, user


program must be stored in an external SPI flash.

External SPI Flash:

This module is mounted with an 4 MB external SPI flash to store


user programs. If larger definable storage space is required, a SPI flash
with larger memory size is preferred. Theoretically speaking, up to 16 MB
memory capacity can be supported. Suggested SPI Flash memory capacity:

53
▪ OTA is disabled: the minimum flash memory that can be
supported is 512 kB;

▪ OTA is enabled: the minimum flash memory that can be


supported is 1 MB. Several SPI modes can be supported,
including Standard SPI, Dual SPI, and Quad SPI.

Crystal:

Currently, the frequency of crystal oscillators supported includes


40MHz, 26MHz and 24MHz. The accuracy of crystal oscillators applied
should be ±10PPM, and the operating temperature range should be
between -20°C and 85°C. When using the downloading tools, please
remember to select the right crystal oscillator type. In circuit design,
capacitors C1 and C2, which are connected to the earth, are added to the
input and output terminals of the crystal oscillator respectively. The values
of the two capacitors can be flexible, ranging from 6pF to 22pF, however,
the specific capacitive values of C1 and C2 depend on further testing and
adjustment on the overall performance of the whole circuit. Normally, the
capacitive values of C1 and C2 are within 10pF if the crystal oscillator
frequency is 26MHz, while the values of C1 and C2 are 10pF

54
Interfaces

55
4.2 SOFTWARE DESCRIPTION

4.2.1 Embedded C

Embedded C is most popular programming language in software


field for developing electronic gadgets. Each processor used in electronic
system is associated with embedded software.

Embedded C programming plays a key role in performing specific


function by the processor. In day-to-day life we used many electronic
devices such as mobile phone, washing machine, digital camera, etc. These
all device working is based on microcontroller that are programmed by
embedded C.

Let's see the block diagram representation of embedded system


programming:

Fig no-3.1 Representation of embedded system programming

The Embedded C code written in above block diagram is used for


blinking the LED connected with Port0 of microcontroller.
56
In embedded system programming C code is preferred over other
language. Due to the following reasons:

 Easy to understand

 High Reliability

 Portability

 Scalability

BASIC EMBEDDED C PROGRAMMING STEPS:

Let's see the block diagram representation of Embedded C


Programming Steps:

The microcontroller programming is different for each type of


operating system. Even though there are many operating system are exist
such as Windows, Linux, RTOS, etc but RTOS has several advantage for
embedded system development.

57
EMBEDDED SYSTEMS:

Embedded System is a system composed of hardware, application


software and real time operating system. It can be small independent
system or large combinational system.

Our Embedded System tutorial includes all topics of Embedded


System such as characteristics, designing, processors, microcontrollers,
tools, addressing modes, assembly language, interrupts, embedded c
programming, led blinking, serial communication, lcd programming,
keyboard programming, project implementation etc.

CHARACTERISTICS OF EMBEDDED SYSTEM:

 An embedded system is software embedded into computer


hardware that makes a system dedicated to be used for variety
of application.

 Embedded system generally used for do specific task that


provide real-time output on the basis of various characteristics
of an embedded system.

 Embedded system may contain a smaller part within a larger


device that used for serving the more specific application to
perform variety of task using hardware-software intermixing
configuration.

 It provides high reliability and real-time computation ability.

58
Advantages:

 Same hardware can be used in variety of application.

 Lesser power requirement

 Lower operational cost of system

 Provide high performance and efficiency

Disadvantages:

 Developing a system required more time. Due to functional


complexity.

 Skilled engineers required because one mistake may result in


destroying of complete project.

4.2.2 Arduino Software Ide

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.

59
Fig no-3.3-arduino software ide

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 right hand 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.

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

Additional commands are found within the five


menus: File, Edit, Sketch, Tools, and help. The menus are context
sensitive, which means only those items relevant to the work currently
being carried out are available.

FILE:

Fig No-3.4-Contents in File

 New
Creates a new instance of the editor, with the bare minimum
structure of a sketch already in place.

61
 Open
Allows loading a sketch file browsing through the computer drives
and folders.

 OpenRecent
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.

 Saveas...
Allows saving the current sketch with a different name.

 PageSetup
It shows the Page Setup window for printing.

62
 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:

Fig No-3.5-Contents in Edit

63
 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.

 CopyforForum
Copies the code of your sketch to the clipboard in a form suitable for
posting to the forum, complete with syntax coloring.

 CopyasHTML
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.

 SelectAll
Selects and highlights the whole content of the editor.

 Comment/Uncomment
Puts or removes the // comment marker at the beginning of each
selected line.

64
 Increase/DecreaseIndent
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.

 FindNext
Highlights the next occurrence - if any - of the string specified as the
search item in the Find window, relative to the cursor position.

 FindPrevious
Highlights the previous occurrence - if any - of the string specified
as the search item in the Find window relative to the cursor position.

65
SKETCH:

Fig no-3.6-Contents in 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 boot loader on the board; you will need to
use Tools > Burn Boot loader to restore it and be able to Upload to USB
serial port again. However, it allows you to use the full capacity of the
66
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 of 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.

67
 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.

68
Fig No-3.7 contents in tools

 Programmer
For selecting a hardware 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 boot loader to a new
microcontroller, you will use this.

 Burn Boot loader

The items in this menu allow you to burn a boot loader 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 comes without a boot
loader). Ensure that you've selected the correct board from
the Boards menu before burning the boot loader on the target board. This
command also set the right fuses.

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

 FindinReference
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.

70
CHAPTER 4

OUTPUT

1.1 OUTPUT:

Transmitter output Receiver output

Output in adafruit website:

71
CHAPTER 5

FUTURE ENHANCEMENT

5.1 APPLICATIONS

This system is used to monitoring the agriculture field through


soil communication.

FUTURE ENHANCEMENT:

In this study the agriculture field is monitored by using AI it will


automatically detect and inform to farmer.

5.2 ADVANTAGES

Fast response.

Easy to monitoring the field..

5.3 CONCLUSION

In this work, the link quality of the non-backfilled UG2AG and


AG2UG links is characterized for UIM-WUSNs. First, a non-backfilled
channel model is proposed and verified by the field data to provide an
accurate estimation of the link quality, which greatly improves the
deployment and energy efficiency of underground repeaters in non-
backfilled scenarios [17], [46]. Then, the effects of burial depth and
internode distance on the non-backfilled communication performance are
evaluated in the field. Link symmetry between the UG2AG and AG2UG

72
channels is exhibited, while the link quality degrades at greater burial
depths and larger internode distances due to the increases not only in
attenuation in air, but also in the loss caused by multiple refractions along
the borehole wall. Thanks to the LoRa wireless communication
technology, connectivity can be achieved at distances up to 42 m with high
link quality (PDR>90%) at a burial depth of 0.4 m. In addition, the
backfilled channel demonstrates more sensitivity to the soil properties at
different burial depths than the non-backfilled channel.

73
REFERENCES

[1] N. Bobylev, “Underground space as an urban indicator: Measuring


use of subsurface,” Tunnelling Underground Space Technol., vol.
55, pp. 40–51, May 2016.

[2] T. Hao et al., “Condition assessment of the buried utility service


infrastructure,” Tunnelling Underground Space Technol., vol. 28,
pp. 331–344, Mar. 2012.

[3] A. Cataldo, G. Cannazza, E. De Benedetto, and N. Giaquinto, “A


new method for detecting leaks in underground water pipelines,”
IEEE Sensors J., vol. 12, no. 6, pp. 1660–1667, Jun. 2012.

[4] C. Ebi, F. Schaltegger, A. Rüst, and F. Blumensaat, “Synchronous


LoRa mesh network to monitor processes in underground
infrastructure,” IEEE Access, vol. 7, pp. 57663–57677, 2019.

[5] A. M. Sadeghioon, N. Metje, D. Chapman, and C. Anthony, “Water


pipeline failure detection using distributed relative pressure and
temperature measurements and anomaly detection algorithms,”
Urban Water J., vol. 15, no. 4, pp. 287–295, Apr. 2018.

[6] B. Yuan, H. Chen, and X. Yao, “Optimal relay placement for


lifetime maximization in wireless underground sensor networks,”
Inf. Sci., vols. 418–419, pp. 463–479, Dec. 2017.

[7] S. Yang, O. Baltaji, A. C. Singer, and Y. M. A. Hashash,


“Development of an underground through-soil wireless acoustic
communication system,” IEEE Wireless Commun., vol. 27, no. 1,
pp. 154–161, Feb. 2020.
74
[8] A. R. Silva and M. C. Vuran, “Empirical evaluation of wireless
underground-to-underground communication in wireless
underground sensor networks,” in Proc. Int. Conf. Distrib. Comput.
Sens. Syst. Berlin, Germany: Springer, Jun. 2009, pp. 231–244.

[9] B. Silva, R. M. Fisher, A. Kumar, and G. P. Hancke, “Experimental


link quality characterization of wireless sensor networks for
underground monitoring,” IEEE Trans. Ind. Informat., vol. 11, no.
5, pp. 1099–1110, Oct. 2015.

[10] D. W. Sambo, A. Förster, B. O. Yenke, and I. Sarr, “A new


approach for path loss prediction in wireless underground sensor
networks,” in Proc. IEEE 44th LCN Symp. Emerg. Topics Netw.
(LCN Symp.), Oct. 2019, pp. 50–57.

75

You might also like