0% found this document useful (0 votes)
7 views55 pages

Soil Paramets Measurements

The document presents a project on an automatic plant watering system that measures temperature, light intensity, and soil moisture using Arduino technology. It highlights the integration of computer programming and hardware to enhance agricultural practices, emphasizing the importance of monitoring environmental conditions for optimal crop yields. The project aims to provide real-time data through sensors and displays, facilitating improved farming techniques and the potential for fully automated systems.

Uploaded by

M Salman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views55 pages

Soil Paramets Measurements

The document presents a project on an automatic plant watering system that measures temperature, light intensity, and soil moisture using Arduino technology. It highlights the integration of computer programming and hardware to enhance agricultural practices, emphasizing the importance of monitoring environmental conditions for optimal crop yields. The project aims to provide real-time data through sensors and displays, facilitating improved farming techniques and the potential for fully automated systems.

Uploaded by

M Salman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

Automatic Plant Watering, Measurement Temperature, Light

Intensity And Soil Moisture Level Using Arduino

Submitted in partial fulfillment of the requirements for the award of Bachelor of Physics,
Department of Physics, Emerson University, Multan
By

Muhammad Kamil Khan (MCEP-20-26)


Muhammad Naveed (MCEP-20-03)
Shahzad Hassan (MCEP-20-47)
Shabnam Zahra (MCEP-20-03)
Sawera Siddique (MCEP-20-40)

DEPARTMENT OF PHYSICS,

EMERSON UNIVERSITY MULTAN

2020-2024

I
DEPARTMENT OF PHYSICS,

EMERSON UNIVERISTY MULTAN

BONAFIDE CERTIFICATE

This is to certify that this Project Report is the Bonafide work of


Muhammad Kamil Khan (MCEP-20-26)
Muhammad Naveed (MCEP-20-03)
Shahzad Hassan (MCEP-20-47)
Shabnam Zahra (MCEP-20-03)
Sawera Siddique (MCEP-20-40)

who have done the Project work as a team and carried out the project entitled
“Automatic Plant Watering, Measurement Temperature, Light Intensity And Soil
Moisture Level Using Arduino ” under my supervision.

Dr. Faisal
Assistant Professor
Department of Physics,
Emerson University Multan

II
ACKNOWLEDGEMENT

We are pleased to acknowledge my sincere thanks to our supervisor Dr. Faisal for their
kind encouragement in doing this project and for completing it successfully. I am grateful
to them. We convey my thanks to H e ad of Department of Physics.
We are pleased to Department of Physics, to facilitate us for the completion of our project.

III
ABSTRACT

This project is an effective tool for farmers. It is a wholesome involvement of computer


programming and hardware interaction. It shows how computer programming is expanding in
other domains like agriculture, farming etc. How readymade boards facilitate various
components like various sensors and modules. Arduino projects are like Lego blocks.
Creativity and necessity can find unlimited possibilities in the field of Arduino projects.
Internet of things is on the way of taking over the world. Arduino coding is based on the C++
programming language. The inheritance property of the language plays an important role in
Arduino programming. Gives another reason to learn programming languages. This project
can be expanded even further to involve sprinklers and air conditioners to improve
environment quality. Fully automated farming systems can be developed keeping Arduino as
a base.
The project is designed to measure the light intensity, soil moisture and temperature of the soil.
The parameters are measured and displayed using HC-05 to serial monitor Bluetooth terminal
android mobile app.
Soil and light are very influential factors in farming activities, so you must pay close attention
to getting the desired crop yields. However, many still have not produced maximum plants
because many people still use manual technology in farming. One way to take advantage of
technology is to monitor soil moisture and the lighting received by plants. Therefore, the
purpose of establishing a decorative plant monitoring system is to determine the best condition
of the plants by displaying the value of soil moisture and lighting received by plants in real-
time using a soil moisture sensor and a photoresistor sensor. The results of this study indicate
that the plant is in good condition if it displays the soil moisture value in the range of 50-70%,
and the limit of the lighting value is 50%. Conversely, if the system shows a soil moisture
value of less than 50% and a lighting value of less than 50%, it indicates that it is not in good
condition. This research can also show information on the value of soil moisture and plant
lighting obtained through the LCD Oled Display Module, and the results of this study are also
able to assist in farming activities indoors or outdoors.

IV
Contents

1. Chapter INTRODUCTION ................................................................................................... 8


1.1. INTRODUCTION........................................................................................................ 8
1.2. ENABLING TECHNOLOGIES .................................................................................... 8
2. Chapter LITERATURE SURVEY ....................................................................................... 11
2.1. Overview .................................................................................................................. 11
2.2. SURVEY OF PREVIOUS WORKS ........................................................................... 11
3. Chapter ............................................................................................................................ 15
Hardware Components .......................................................................................................... 15
3.1. List of Components .................................................................................................. 15
• Stepdown Transformer 12V ............................................................................................ 15
• Diode In4007 ................................................................................................................ 15
• Capacitor 1000µF, 50V .................................................................................................. 15
• Resistor 1000Ω .............................................................................................................. 15
• Veroboard ..................................................................................................................... 15
• Soil Moisture Sensor ...................................................................................................... 15
• Temperature Sensor ....................................................................................................... 15
• LDR ............................................................................................................................. 15
• HC-05 Bluetooth Module. ............................................................................................... 15
3.2. Power Supply ........................................................................................................... 15
3.2.1. What is a Bridge Rectifier? ................................................................................ 16
........................................................................................................................................... 16
3.2.2. Construction ...................................................................................................... 16
3.2.3. Bridge Rectifier Circuit Diagram ......................................................................... 17
........................................................................................................................................... 17
3.2.4. Bridge Rectifier Circuit Diagram ......................................................................... 17
3.2.5. Bridge Rectifier Operation.................................................................................. 18
........................................................................................................................................... 18
3.2.6. Circuit Operation................................................................................................ 18
3.2.7. Types of Bridge Rectifiers .................................................................................. 19
3.2.8. Single Phase and Three Phase Rectifiers .......................................................... 19
........................................................................................................................................... 20
3.2.9. Uncontrolled Bridge Rectifiers ........................................................................... 20
........................................................................................................................................... 20
3.2.10. Controlled Bridge Rectifier ............................................................................... 20
........................................................................................................................................... 21
v
3.2.11. Specifications .................................................................................................. 21
3.2.12. Bridge Rectifier Characteristics ........................................................................ 22
3.2.13. Ripple Factor ................................................................................................... 22
3.2.14. Efficiency ......................................................................................................... 23
3.2.15. The advantages of bridge rectifier include the following. .................................. 23
3.2.16. Disadvantages ................................................................................................. 24
3.3. ARDUINO UNO:- ...................................................................................................... 24
3.3.1. ARDUINO .......................................................................................................... 25
3.3.2. OVERVIEW:- ..................................................................................................... 26
3.3.3. BASIC ARDUINO CODE DEFINITIONS: ............................................................ 27
BASIC ARDUINO PIN REFERENCE SHEET......................................................................... 29
3.4. SOIL MOISTURE SENSOR...................................................................................... 30
3.4.1. AGRICULTURE ................................................................................................. 31
3.4.2. RESEARCH....................................................................................................... 31
3.4.3. TECHNOLOGIES .............................................................................................. 32
3.4.4. Soil moisture sensor work:- ............................................................................... 32
3.4.5. Used in soil moisture:- ........................................................................................ 32
3.4.6. Testing soil for moisture:- .................................................................................. 33
3.5. HC-05 ...................................................................................................................... 33
3.5.1. HC-05 Hardware Overview ................................................................................ 33
3.5.2. Modes of Operation ........................................................................................... 34
3.5.3. Connection Roles .............................................................................................. 34
3.5.4. Power ................................................................................................................ 35
3.6. Light Dependent Resistor ......................................................................................... 39
3.6.1. What is LDR or Photoresistor?........................................................................... 39
3.7. Temperature Sensor ................................................................................................ 42
........................................................................................................................................... 42
........................................................................................................................................... 43
The following table shows how you should wire the DS18B20 sensor to your Arduino board: ....... 43
4.2 DS18B20 ................................................................................................................. 43
4.3 Arduino.................................................................................................................... 43
4.4 GND ........................................................................................................................ 43
4.5 GND ........................................................................................................................ 43
4.6 DQ .......................................................................................................................... 43
4.7 Any digital pin (with 4.7k Ohm pull-up resistor) ........................................................... 43
4.8 VDD ........................................................................................................................ 43
4.9 5V (normal mode) or GND (parasite mode) .................................................................. 43
4. Chapter Working of Project ................................................................................................ 46
4.1. Working of Project .................................................................................................... 46
vi
Code .................................................................................................................................. 46

........................................................................................................................................... 48
........................................................................................................................................... 49
5. Chapter SUMMARY AND CONCLUSION.......................................................................... 36
5.1. CONCLUSION ......................................................................................................... 36
6. Chapter REFERENCES...................................................................................................... 37

vii
1. Chapter INTRODUCTION

1.1. INTRODUCTION

To measure temperature, soil moisture, and light intensity using an Arduino, you would
typically use a dedicated sensor for each parameter: a temperature sensor like a DHT11 for
temperature, a soil moisture sensor for soil moisture content, and a light dependent resistor
(LDR) for light intensity; all connected to an Arduino board which then reads the analog values
from each sensor and translates them into meaningful data that can be displayed on a screen or
used to trigger actions based on the environmental conditions.

1.2. ENABLING TECHNOLOGIES

Soil is the layer of the earth's surface that functions as a place for plants and a source of water
for plants. The need for water in plants is very important to pay attention to because giving too
much water will result in soil surface density. Current technological developments, especially
in the automation of a system, are increasingly demanding and cannot be separated by the
community, especially in big cities in Indonesia. Indonesia is currently in the process of
becoming a digital-oriented society. The development of information and communication
technology has also been almost widely used in various fields, including agriculture [1]. Soil
is a significant factor in farming that must be considered. Light is also a factor in the growth
and development of a plant, and one must also consider the desired crop production. One way
to take advantage of technology is to use a system that monitors soil moisture and lighting.
The system can use the Arduino Nano as a primary controller. Arduino Nano is a
microcontroller board that uses Atmega328.
Arduino Nano has a 14 pin digital output configuration, some of which also function for PWM
(Pulse Width Modulator) for analog output, six pins as an analog input, one pin RX-TX, and
one pin AREF ( Analogue Reference) [2]. One of the advantages of Arduino is that it does not
need a chip programmer device because there is already a bootloader that will upload programs
from the computer [3]. Then, the results of soil moisture and lighting received by plants will
be displayed on the LCD Oled Display Module 128x64. LCD OLED Display is a display
output media on the Arduino module or other microcontroller [4]. There are several related
8
studies on this topic. Such as research conducted by Wahyudi et al. In this research, the design
of monitoring systems and humidity automation of web based hydroponic planting media has
been carried out. The system response test results show that at low setpoint values, the system
can provide a final humidity value that is close enough to the given setpoint value. The greater
the given setpoint value, the system will give a greater error value [5]. In the research
conducted by Pravin et al, the system will capture all the soil details and the temperature using
different sensors. The sensed information will be sent to the processor and depends upon the
outcome, the alert message will be passed, and the appropriate amount of water will be released
to the crop. And further information related to the fertilizer quantity and whether there is any
set of a severe attack on the crop will also be identified by the system [6]. The research
conducted by Rizky Fitria Haya et al uses a microcontroller Arduino Nano as the central
controller and is connected to other sensors such as the LDR sensor, soil moisture, and DHT11.
This study indicates that the decorative plant is in good condition if it displays a happy face.
That is when the lighting, soil moisture, and temperature results are obtained by the values set
in the program [7]. Another related topic is research conducted by Arif Supriyanto and
Fathurrahmani. Therefore, this study aims to create an intelligent greenhouse prototype for
hydroponic plants. The intelligent greenhouse hardware is built based on the Arduino
microcontroller, DHT11 sensor, pH sensor, TDS, DS18b20 temperature, ultrasonic, and
esp8266 Wi-Fi module [8]. Another related topic is research conducted by Lu Zhuo et al 2020.
In this study, there is a need to develop a systematic approach for soil moisture network design
so that with a minimal number of sensors, the catchment spatial soil moisture information could
be captured accurately. In this study, a simple and low-data requirement method is proposed.
It is based on principal component analysis (PCA) for the investigation of the network
redundancy degree and K- means cluster analysis (CA) and a selection of statistical criteria for
the determination of the optimal sensor number and placements [9]. Research conducted by
Abd. Hakim, the project offers a solution that integrates the Internet of Things (IoT) system
and an Android application to monitor plant growth with real-time monitoring data and provide
system control. IoT is a shared network of objects that interact with each other. In this project,
sensors are used to detect soil moisture, observe humidity and air temperature, determine the
light intensity and measure soil temperature [10]. Therefore, with the development of current
technology, a system is formed to monitor a plant's condition in real-time by displaying the
value of soil moisture and lighting received by plants in real-time using soil moisture sensors
9
and photoresistor sensors. The soil moisture sensor is a module for detecting soil moisture,
which can be accessed using a microcontroller such as Arduino, Node MCU ESP8266 [11].
And photoresistor sensor (LDR) is a sensor that reacts to the level of light [12]. LDR (Light
Dependent Resistor) is a resistor component whose resistance value varies according to light
intensity. LDR use for light sensors. The more light received, the lower the resistance value. If
less light is received (dark), the resistance value will be higher so that the electric current
flowing will hamper [13]. The LDR sensor has a resistance value of around 20 Ohm when in
dark conditions and will decrease to 500 Ohm when it receives much light. Therefore, this
light-sensitive electronic component widely uses as a sensor for streetlights, bedrooms, alarms,
and others [14]. This system's design uses the Arduino Nano as a primary controller in the
program to obtain soil moisture values in plants through the Soil Moisture Sensor, namely its
place in the soil and the light received by plants using a Photoresistor Sensor. Then, the results
of soil moisture and lighting received by plants will be displayed on the LCD Oled Display
Module 128x64.

10
2. Chapter LITERATURE SURVEY

2.1. Overview

Irrigation is most important for high yield of the farm. Today, by using WSN technology it is
possible to monitor and control the environmental conditions as soil moisture, temperature,
wind speed, wind pressure, salinity, turbidity, humidity etc for irrigation. Automated irrigation
performed by using solenoid valve and pump. Solenoid valve is an electromechanical valve
used with liquid controller to control an electronic current through solenoid which is a coil of
wire that uses to control the state of the valve according to need of irrigation.
2.2. SURVEY OF PREVIOUS WORKS

M.Nesa Sudha et al., 2011 proposed a TDMA based MAC protocol used for collect data such
as soil moisture and temperature for optimum irrigation to save energy. MAC protocol plays
an important role to reduce energy consumption. Two methods used for energy efficiency as
Direct Communication method and aggregation method. Direct Communication method
provides collision free transmission of data, because all the sensor nodes send data directly to
the base station without the need of header node. This method is better where the base station
is near but it is not optimum where the base station is far because sensor nodes consume more
energy during transmission of data and if there is much data to the sensor node, sensor nodes
quickly damaged. The data aggregation method is better to use rather than direct
communication method. The sensor node senses the data and send to the head node. The head
node collects data from the entire sensor node, performs aggregation using various aggregation
techniques, and then sends data to the base station. Thus by using aggregation method overall
energy consumption reduce of the network. The simulation result show that aggregation
method provide better performance rather than direct communication method. It provides 10%
increase in residual energy and 13% increase in throughput. Sensor nodes consume more
energy while transmitting data.

11
AnujNayak et al., 2014 describe that sensor nodes batteries are charged by using harnessing
wind energy. A routing algorithm named DEHAR is proposed to extend overall batteries
power. The proposed method is efficient where the amount of sensor nodes very low because
of latency experienced due to synchronous sleep scheduling. A small band belt used to harness
wind energy to sensor nodes. Wind belt is aero elastic flutter, which is capable for harnessing
wind energy. Harnessing wind energy is a renewable energy source. However, the main
problem using harnessing wind energy is the unreliability as the power of the wind is not
permanent.

Man Zhang et al., 2012 analysis the temporal and spatial variability of soil moisture for the
realization of variable irrigation and for improve yield in the farm. Temporal variability adopts
the changes of soil moisture at the place where the sensor nodes installed and analyze soil
moisture variation at different times according to season. Spatial variability analyses calculate
all parameter of soil moisture as average, maximum, minimum in whole area. The temporal
variability curve has drawn according to measure data. It showed that the corn was in severe
water stress state during the completely monitoring period.

Joaquin Gutierrez et al., 2013 proposed an irrigation system that uses photovoltaic solar panel
to power system because electric power supply would be expensive. For water saving purpose,
an algorithm developed with threshold value of temperature and soil moisture programmed
into a micro controller gateway. The system has a full duplex communication links based on
internet cellular interface using GPRS based on mobile data for graphically display and stored
in a database server.The automation irrigation system consists of two components were WSU
and WIU. Wireless Sensor Units (WSU) components were used for minimize power
consumption because microcontroller is well suited by its lower power current in sleep mode.
Wireless Information Unit (WIU) transmits soil moisture and temperature data to a web server
using GPRS module. The WIU identify recorded and analyzed received temperature and soil
moisture data collected by WSU. WIU functionality is bases on microcontroller that
programmed to perform different task as to download the date and time information from web
server and compare the temperature and soil moisture value with maximum soil moisture
and minimum temperature value so
that irrigated pumps activated.
SherineM.AbdEl-kader et al., 2013 proposed APTEEN (Periodic Threshold oldsensitive
12
Energy-Efficient sensor Network) protocol. APTEEN is a Hierarchical based routing protocol
in which nodes have grouped into clusters. Each cluster has a head node and head node is
responsible for broadcast data to the base station. APTEEN broadcast parameters attribute,
which is a set of physical parameters, in which the user is interested to obtain info, Thresholds
value as Hard Threshold and Soft Threshold, Schedule as TDMA schedule uses to assign slots
to save energy, which provide collision free transmission. It controls the energy consumption
by changing threshold values and count time. The performance of proposed protocol is better
than LEACH on average 79% and by LEACH-C on average 112%.

B. Balaji Bhan et al., 2014 proposed a system to develop WSN based soil moisture controllers
that determine the water requirement by comparing soil moisture with predefined threshold
value. An intelligent remote system consists of wireless sensor nodes and computer system in
which data is transmitted to a server system from where the data accessed by individuals for
decision making for automated control of irrigation for the yield productivity. Field validation
tests routinely performed on different soils to measure the soil moisture, water amount in soil
for efficient irrigation system. If the stored data does not match with the soilmeasured data, an
interrupt sent to the pressure unit and stop irrigation automatically.

SbrineKhriji et al., 2014 describe different type of sensor nodes for real monitoring and control
of irrigation system. Each node consists of B mote and actuator. TelosB mote is an ultralow
power wireless module for monitoring applications. Soil nodes used to measure the soil
moisture weather nodes used to measure environmental parameter and actuator used for
controlling the opening of valves for irrigation. The system has cost efficient and reduce the
power consumption The experimental result shows that the plants are well irrigate and if there
is any change in threshold value the system alert to farmer about the problem to take

13
the appropriate decision.

Yunseop Kim et al., 2008 represents real time monitoring and control of variable rate irrigation
controller. The sensor nodes measure environmental parameter and transmit data to base
station where base station process data through a user-friendly decision making program and
all data commands send to irrigation control station. The Irrigation control station sends
machine location using GPS to the base station, send control signal back to irrigation control

Fiona Regan et al., 2009develop heterogeneous real time water monitoring network system to
monitor water quality parameter such as pH, temperature, turbidity and conductivity. The
implementation of intelligent sensors incorporating TEDS (Transducer Electronic Data Sheet)
which is a machinereadable specification of the sensor characteristics, enable sensors to
interfaced with the system in a plug and play fashion. PSOC system used to create generic
sensor interface. The plug and play capabilities enabled by the developed WSN platform allow
for integration of any commercially available water quality sensors. PSOC plug and play
system capable of transmitted data to the sensor that processed data for transmission to the
web.

Joaquin Gutierrez et al., 2015 represents that the sensors use Smartphone to capture and
process images of soils. Images can be capture to estimate the water content of the soil. The
router node is used to forward collected values to the gateway that provide automatically pump
the water to the crop in a field. An Android app used for connectivity such as Wi-Fi. Android
app wakes up the Smartphone by using given parameters. In-built camera takes an RGB picture
of the soil through an anti-reflective glass window to take estimation of wet and dry area. The
mobile app enables the Wi-Fi connection of Smartphone to transmit the estimation value to
the gateway via a router node for control an irrigation water .

6
3. Chapter
Hardware Components
3.1. List of Components
• Stepdown Transformer 12V

• Diode In4007

• Capacitor 1000µF, 50V

• Resistor 1000Ω

• Veroboard

• Soil Moisture Sensor

• Temperature Sensor

• LDR

• HC-05 Bluetooth Module.

3.2. Power Supply


The rectifier circuit is used to convert the AC (Alternating Current) into DC (Direct Current).

Rectifiers are mainly classified into three types namely half-wave, full-wave, and bridge

rectifier. The main function of all these rectifiers is the same as the conversion of current but

they not efficiently convert the current from AC to DC. The center tapped full wave rectifier

as well as bridge rectifier converts efficiently. A bridge rectifier circuit is a common part of

the electronic power supplies. Many electronic circuits require a rectified DC power supply for

powering the various electronic basic components from available AC mains supply. We can

find this rectifier in a wide variety of electronic AC power devices like home appliances, motor

controllers, modulation process, welding applications, etc. This article discusses an overview

of a bridge rectifier and its working.

15
3.2.1. What is a Bridge Rectifier?
A Bridge rectifier is an Alternating Current (AC) to Direct Current (DC) converter that rectifies

mains AC input to DC output. Bridge Rectifiers are widely used in power supplies that provide

necessary DC voltage for the electronic components or devices. They can be constructed with

four or more diodes or any other controlled solid-state switches.

Bridge Rectifier

Depending on the load current requirements, a proper bridge rectifier is selected. Components’

ratings and specifications, breakdown voltage, temperature ranges, transient current rating,

forward current rating, mounting requirements, and other considerations are taken into account

while selecting a rectifier power supply for an appropriate electronic circuit’s application.

3.2.2. Construction
The bridge rectifier construction is shown below. This circuit can be designed with four diodes

namely D1, D2, D3 & D4 along with a load resistor (RL). The connection of these diodes can

be done in a closed-loop pattern to convert the AC (alternating current) to DC (Direct Current)

efficiently. The main benefit of this design is the lack of an exclusive center-tapped

transformer. So, the size, as well as cost, will be reduced.

Once the input signal is applied across the two terminals like A & B then the o/p DC signal

16
can be attained across the RL. Here load resistor is connected in between two terminals like C

& D. The arrangement of two diodes can be made in such a way that the electricity will be

conducted by two diodes throughout every half cycle. The pairs of diodes like D1& D3 will

conduct electric current throughout the positive half cycle. Similarly, D2 & D4 diodes will

conduct electric current throughout a negative half cycle.

3.2.3. Bridge Rectifier Circuit Diagram


The main advantage of the bridge rectifier is that it produces almost double the output voltage

as with the case of a full-wave rectifier using a center-tapped transformer. But this circuit

doesn’t need a center-tapped transformer so it resembles a low-cost rectifier.

The bridge rectifier circuit diagram consists of various stages of devices like a transformer,

Diode Bridge, filtering, and regulators. Generally, all these blocks combination is called

a regulated DC power supply that powers various electronic appliances.

The first stage of the circuit is a transformer which is a step-down type that changes the

amplitude of the input voltage. Most of the electronic projects use a 230/12V transformer to

step-down the AC mains 230V to 12V AC supply.

3.2.4. Bridge Rectifier Circuit Diagram


The next stage is a diode-bridge rectifier which uses four or more diodes depending on the type

of bridge rectifier. Choosing a particular diode or any other switching device for a

corresponding rectifier needs some considerations of the device like Peak Inverse Voltage

(PIV), forward current If, voltage ratings, etc. It is responsible for producing unidirectional or
17
DC current at the load by conducting a set of diodes for every half cycle of the input signal.

Since the output after the diode bridge rectifiers is of pulsating nature, and for producing it as

a pure DC, filtering is necessary. Filtering is normally performed with one or more capacitors

attached across the load, as you can observe in the below figure wherein smoothing of the wave

is performed. This capacitor rating also depends on the output voltage.

The last stage of this regulated DC supply is a voltage regulator that maintains the output

voltage to a constant level. Suppose the microcontroller works at 5V DC, but the output after

the bridge rectifier is around 16V, so to reduce this voltage, and to maintain a constant level –

no matter voltage changes in the input side – a voltage regulator is necessary.

3.2.5. Bridge Rectifier Operation


As we discussed above, a single-phase bridge rectifier consists of four diodes and this

configuration is connected across the load. For understanding the bridge rectifier’s working

principle, we have to consider the below circuit for demonstration purposes.

During the Positive half cycle of the input AC waveform diodes, D1 and D2 are forward biased

and D3 and D4 are reverse biased. When the voltage, more than the threshold level of the

diodes D1 and D2, starts conducting – the load current starts flowing through it, as shown in

the path of the red line in the diagram below.

3.2.6. Circuit Operation


During the negative half cycle of the input AC waveform, the diodes D3 and D4 are forward

biassed, and D1 and D2 are reverse biased. Load current starts flowing through the D3 and D4

diodes when these diodes start conducting as shown in the figure.


18
We can observe that in both cases, the load current direction is the same, i.e., up to down as

shown in the figure – so unidirectional, which means DC current. Thus, by the usage of a

bridge rectifier, the input AC current is converted into a DC current. The output at the load

with this bridge wave rectifier is pulsating in nature, but producing a pure DC requires an

additional filter like a capacitor. The same operation is applicable for different bridge rectifiers,

but in the case of controlled rectifiers thyristors triggering is necessary to drive the current to

load.

3.2.7. Types of Bridge Rectifiers


Bride rectifiers are classified into several types based on these factors: type of supply,

controlling capability, bride circuit configurations, etc. Bridge rectifiers are mainly classified

into single and three-phase rectifiers. Both these types are further classified into uncontrolled,

half controlled, and full controlled rectifiers. Some of these types of rectifiers are described

below.

3.2.8. Single Phase and Three Phase Rectifiers


The nature of supply, i.e., a single-phase or three-phase supply decides these rectifiers. The

Single phase bridge rectifier consists of four diodes for converting AC into DC, whereas

a three-phase rectifier uses six diodes, as shown in the figure. These can be again uncontrolled

or controlled rectifiers depending on the circuit components such as diodes, thyristors, and so

on.

19
3.2.9. Uncontrolled Bridge Rectifiers
This bridge rectifier uses diodes for rectifying the input as shown in the figure. Since the diode

is a unidirectional device that allows the current flow in one direction only. With this

configuration of diodes in the rectifier, it doesn’t allow the power to vary depending on the

load requirement. So this type of rectifier is used in constant or fixed power supplies.

3.2.10. Controlled Bridge Rectifier


In this type of rectifier, AC/DC converter or rectifier – instead of uncontrolled diodes,

controlled solid-state devices like SCR’s, MOSFET’s, IGBT’s, etc. are used to vary the output

power at different voltages. By triggering these devices at various instants, the output power

at the load is appropriately changed.

20
Controlled Bridge Rectifier

Bridge Rectifier IC

The bridge rectifier like RB-156 IC pin configuration is discussed below.

Pin-1 (Phase / Line): This is an AC input pin, where the connection of phase wire can be done

from the AC supply toward this phase pin.

Pin-2 (Neutral): This is the AC Input pin where the connection of the neutral wire can be done

from the AC supply to this neutral pin.

Pin-3 (Positive): This is the DC output pin where the positive DC voltage of the rectifier is

obtained from this positive pin

Pin-4 (Negative /Ground): This is the DC output pin where the ground voltage of the rectifier

is obtained from this negative pin

3.2.11. Specifications
The sub categories of this RB-15 Bridge rectifier range from RB15 to RB158. Out of these

rectifiers, the RB156 is the most frequently used one. The specifications of the RB-156 bridge

rectifier include the following.

• O/p DC current is 1.5A

• The maximum peak reverse voltage is 800V


21
• Output Voltage: (√2×VRMS) – 2 Volt

• The maximum input voltage is 560V

• Voltage drop for each bridge is 1V @ 1A

• The surge current is 50A

This RB-156 is most normally used compact, low cost and single phase bridge rectifier. This

IC has the highest i/p AC voltage like 560V therefore it can be used for 1- phase mains supply

in all countries. The highest DC current of this rectifier is 1.5A. This IC is the best choice in

the projects for converting AC-DC and provide up to 1.5A.

3.2.12. Bridge Rectifier Characteristics


The characteristics of bridge rectifier include the following

• Ripple Factor

• Peak Inverse Voltage (PIV)

• Efficiency

3.2.13. Ripple Factor


The measurement of the output DC signal’s smoothness using a factor is called the ripple

factor. Here, a smooth DC signal can be considered as the o/p DC signal including few ripples

whereas a high pulsating DC signal can be considered as the o/p including high ripples.

Mathematically, it can be defined as the fraction of ripple voltage and the pure DC voltage.

For a bridge rectifier, the ripple factor can be given as

Γ = √ (Vrms2/VDC)−1

The ripple factor value of the bridge rectifier is 0.48

PIV (Peak Inverse Voltage)

The peak inverse voltage or PIV can be defined as the highest voltage value that is coming

from the diode when it is connected in reverse bias condition throughout the negative half

cycle. The bridge circuit includes four diodes like D1, D2, D3 & D4.

In the positive half cycle, the two diodes like D1 & D3 are in the conducting position whereas
22
both the D2 & D4 diodes are in the non-conducting position. Likewise, in the negative half

cycle, the diodes like D2 & D4 are in the conducting position, whereas the diodes like D1 &

D3 are in the non-conducting position.

3.2.14. Efficiency
The efficiency of the rectifier mainly decides how capably the rectifier changes AC

(Alternating Current) into DC (Direct Current). The rectifier’s efficiency can be defined as; it

is the ratio of the DC o/p power and AC i/p power. The bridge rectifier’s maximum efficiency

is 81.2%.

η = DC o/p Power/AC i/p Power

3.2.15. The advantages of bridge rectifier include the following.


• The rectification efficiency of a full-wave rectifier is double that of a half-wave rectifier.

• The higher output voltage, higher output power, and higher Transformer Utilization Factor in

case of a full-wave rectifier.

• The ripple voltage is low and of higher frequency, in case of full-wave rectifier so simple

filtering circuit is required

• No center tap is required in the transformer secondary so in the case of a bridge rectifier, the

transformer required is simpler. If stepping up or stepping down of voltage is not required, the

transformer can be eliminated even.

• For a given power output, a power transformer of a smaller size can be used in the case of the

bridge rectifier because the current in both primary and secondary windings of the supply

transformer flows for the entire ac cycle.

• Rectification efficiency is double as compared with a half-wave rectifier

• It uses simple filter circuits for high frequency and low ripple voltage

• TUF is higher as compared with a center-tapped rectifier

• Center tap transformer is not necessary

23
3.2.16. Disadvantages
The disadvantages of the bridge rectifier include the following.

• It requires four diodes.

• The use of two extra diodes causes an additional voltage drop thereby reducing the output

voltage.

• This rectifier needs four diodes thus the rectifier’s cost will be high.

• The circuit is not appropriate once a small voltage is necessary to be rectified, because, the two

diodes connection can be done in series & provides a double voltage drop because of their

inner resistance.

• These circuits are very complex

• As compared with the center-tapped type rectifier, the bridge rectifier has more power loss.

3.3. ARDUINO UNO:-

Fig:4.1 :arduino uno

Arduino UNO is a microcontroller board 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 connec-tion, a
power jack, an ICSP header, and a reset button. It con-tains everything needed to support the
microcontroller; simp-ly connect it to a computer with a USB cable or power it with an AC-
to-DC adapter or battery to get started

24
3.3.1. ARDUINO

Arduino is a tool for making computers that can sense and control more of the physical world
than your desktop computer. It's an open-source physical computing platform based on a
simple microcontroller board, and a development environment for writing software for the
board.Arduino can be used to develop interactive objects, taking inputs from a variety of
switches or sensors, and controlling a variety of lights, motors, and other physical outputs.
Arduino projects can be stand-alone, or they can communicate with software running on
your computer (e.g. Flash, Processing, MaxMSP.) The boards can be assembled by hand or
purchased preassembled; the open-source IDE can be downloaded for free.

There are many other microcontrollers and microcontroller platforms available for physical
computing. Parallax Basic Stamp, Netmedia's BX-24, Phidgets, MIT's Handy board, 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. Arduino also simplifies the process of
working with microcontrollers, but it offers some advantage for teachers, students, and
interested amateurs over other systems:

• Inexpensive - Arduino boards are relatively inexpensive compared to other microcontroller


platforms. The least expensive version of the Arduino module can be assembled by hand, and
even the pre-assembled Arduino modules cost less than
$50
• Cross-platform - The Arduino software runs on Windows, Macintosh OSX, and Linux
operating systems. Most microcontroller systems are limited to Windows.
• Simple, clear programming environment - The Arduino programming environment is easy-
to-use for beginners, yet flexible enough for advanced users to take advantage of as well. For
teachers, it's conveniently based on the Processing programming environment, so students
learning to program in that environment will be familiar with the look and feel of Arduino
• Open source and extensible software- The Arduino software is published as open
source tools, available for extension by experienced programmers. The language can be
expanded through C++ libraries, and people wanting to understand the technical details can
make the leap from Arduino to the AVR C programming language on which it's based.
Similarly, you can add AVR-C code directly into your Arduino programs if you want to.
25
• Open source and extensible hardware - The Arduino is based on Atmel's ATMEGA8 and
ATMEGA168/ATMEGA2560 microcontrollers. The plans for the modules are published
under a Creative Commons license, so experienced circuit designers can make their own
version of the module, extending it and improving it.

Even relatively inexperienced users can build the breadboard version of the module in order
to understand how it works and save money
3.3.2. OVERVIEW:-

The Uno is a microcontroller board based on the ATmega328P. 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 a AC-to-DC adapter or battery to get started.. You can tinker with your UNO
without worrying too much about doing something wrong, worst case 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.
You can find here your board warranty informations. Getting Started
You can find in the Getting Started section all the information you need to configure your
board, use the Arduino Software (IDE), and start tinker with coding and electronics.
Need Help?

• On the Software on the Arduino Forum


• On Projects on the Arduino Forum
• On the Product itself through our Customer Support

Table no:4.1.2:ARDINO UNo

Microcontroller ATmega328P

Operating Voltage 5V
26
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

32 KB (ATmega328P)
Flash Memory
of which 0.5 KB used by bootloader

SRAM 2 KB (ATmega328P)

EEPROM 1 KB (ATmega328P)

Clock Speed 16 MHz

Length 68.6 mm

Width 53.4 mm

25 g
Weight

3.3.3. BASIC ARDUINO CODE DEFINITIONS:


setup( ): A function present in every Arduino sketch. Run once before the loop( ) function.
Often used to set pinmode to input or output. The setup( ) function looks like:
void setup( ){
//code goes here
}
loop( ): A function present in every single Arduino sketch. This code happens over and over
again. The loop( ) is where (almost) everything happens. The one exception to this is setup( )
and variable declaration. ModKit uses another type of loop called “forever( )” which executes
over Serial. The loop( ) function looks like:
void loop( ) {
//code goes here
}
27
input: A pin mode that intakes information.

output: A pin mode that sends information.

HIGH: Electrical signal present (5V for Uno). Also ON or True in boolean logic. LOW: No

electrical signal present (0V). Also OFF or False in boolean logic. digitalRead: Get a HIGH

or LOW reading from a pin already declared as an input. digitalWrite: Assign a HIGH or

LOW value to a pin already declared as an output.

analogRead: Get a value between or including 0 (LOW) and 1023 (HIGH). This allows you
to get readings from analog sensors or interfaces that have more than two states.

analogWrite: Assign a value between or including 0 (LOW) and 255 (HIGH). This
allows you to set output to a PWM value instead of just HIGH or LOW.

PWM: Stands for Pulse-Width Modulation, a method of emulating an analog signal


through a digital pin. A value between or including 0 and 255. Used with analogWrite.

ARDUINO UNO PIN TYPE DEFINITIONS: (TAKE A LOOK AT YOUR


28
ARDUINO BOARD)

Reset 3v3 5v Gnd Vin Analog In RX/TX Digital PWM(~) AREF

Resets 3.3 5 Ground Voltage in Analog Serial Input or Digital External


Arduino volts in volts for inputs, can comm. output, pins with reference
sketch on and out in and sources also be used Receive HIGH or output voltage
board out over 7V as Digital and LOW option of used for
(9V - Transmit PWM analog
12V)
Table no.-4.1.4 uno pin Type

BASIC ARDUINO PIN REFERENCE SHEET


These boards below use the same micro-controller, just in a different package. The Lilypad is
designed for use with conductive thread instead of wire and the Arduino Mini issimply a
smaller package without the USB, Barrel Jack and Power Outs. Other boards in the

Together a voltage divider:-


It's really pretty easy. Here is a schematic and explanation detailing how

29
3.4. SOIL MOISTURE SENSOR

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.
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.
A resistive soil moisture sensor works by using the relationship between electrical resistance
and water content to gauge the moisture levels of the soil. You'll observe these sensors to
possess two exposed probes that are inserted directly into the soil sample.
A soil moisture sensor is a device that measures current soil moisture. Sensors integrated

30
into the irrigation system aid in scheduling water supply and distribution much more
efficiently. Such gauges help to reduce or enhance irrigation for optimum plant growth.
Tensiometers are soil moisture sensors that measure this tension between soil particles and
water molecules. In order for plants to access this water they must overcome the tension to
draw water molecules away from the soil particles and into their roots.

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

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

31
3.4.3. TECHNOLOGIES

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; (see also: TDR moisture sensor)

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.4.4. Soil moisture sensor work:-

A small charge is placed on the electrodes and electrical resistance through the sensor is
measured. As water is used by plants or as the soil moisture decreases, water is drawn from
the sensor and resistance increases. Conversely, as soil moisture increases, resistance
decreases.
3.4.5. Used in soil moisture:-

meter soil moisture sensors use high-frequency capacitance technology to measure the
volumetric water content of the soil, meaning they measure the quantity of water on a volume
basis compared to the total volume of the soil.

32
3.4.6. Testing soil for moisture:-

Insert a trowel into the soil, then tilt the trowel to check the moisture of garden plants. You can
also insert a wooden dowel into the soil to determine the depth of soil moisture. If the dowel
comes out clean, the soil is dry. Damp soil will cling to the dowel.
3.5. HC-05
Interfacing HC05 Bluetooth Module with Arduino

Bluetooth is everywhere nowadays. It’s a word we hear all the time and is in millions of
products we use everyday, including headsets, cellphones, laptops, game controllers, activity
trackers, and so on.
In our world of embedded electronics, Bluetooth serves as an excellent way to transmit small
amounts of data wirelessly over short distances (less than 100 meters). It can be used for real-
time data logging, or controlling a project using a smartphone.
One of the most affordable and widely used Bluetooth modules is the HC-05. You can easily
find it for around $5 online, making it a budget-friendly option to add Bluetooth connectivity
to your project. No more tangled cables and messy wires!
In this tutorial, we’ll help you get started with the HC-05. But we don’t want to overwhelm
you with too much information at once, so we’ll split it into three easy-to-follow tutorials. This
first tutorial will show you how to send and receive data between the HC-05 and your
smartphone. In the next tutorial, we’ll teach you how to configure the HC-05 using AT
commands. And in the final tutorial, you’ll learn how to make two Arduino boards
communicate wirelessly using HC-05 Bluetooth modules.
By the end of these tutorials, you’ll have a good understanding of using the HC-05 Bluetooth
module in your projects. So, let’s get started!

3.5.1. HC-05 Hardware Overview


The HC-05 is a Bluetooth-to-Serial-Bridge module that allows wireless communications
between two microcontrollers or between a microcontroller and a smartphone, laptop, or
desktop PC with Bluetooth capability. It’s perfect for directly replacing a wired asynchronous
serial interface!

Each of these modules contains a Bluetooth transceiver, meaning they’re capable of both
21
sending and receiving data.

As a Class 2 Bluetooth device, the HC-05 has a nominal range of 10 m. Of course, that is out
in the open. Its range gets a little weaker inside the house, especially because of the walls.
To top it all off, these modules are very easy to use. There’s no need to mess with Bluetooth
protocols or the stack. Just send data over a serial interface, and it’s piped through to whatever
Bluetooth device it’s connected to.

3.5.2. Modes of Operation


Controlling the HC-05 module and sending data through it are two different operations, but
they are both accomplished through the serial interface. To distinguish between these two types
of data, the HC-05 employs two distinct communication modes: AT mode and Data mode.
In AT Mode, you can configure various settings of the HC-05 module, such as its name, baud
rate, PIN code, and data rate.
In Data Mode, the HC-05 module acts as a transparent data gateway. When the HC-05 receives
data, it removes the Bluetooth headers and trailers and sends it to the UART port. When data
is written to the UART port, the HC-05 constructs a Bluetooth packet and sends it over the
Bluetooth wireless connection.

3.5.3. Connection Roles


The HC-05 Bluetooth module can function in two main roles: Master and Slave.
21
In Slave Role, the HC-05 module waits for other devices to initiate a connection. This is the
module’s default role and is commonly used in projects where you want to control things using
a smartphone.
In Master Role, the HC-05 actively searches for other Bluetooth devices and tries to initiate a
connection. This mode is used in projects where two microcontrollers need to communicate
wirelessly.

To switch between roles, you need to configure the HC-05 module by putting it into AT mode
and sending AT commands over the UART port.
3.5.4. Power
The maximum operating voltage of the bare HC-05 chip is 3.3V. Therefore, the module
includes a linear 3.3V regulator, which allows a voltage from 3.6V to 6V to be used to supply
power to the module.

It is important to note that the HC-05 module has a 3.3V logic level, so we cannot connect the
HC-05 module’s Rx pin directly to a digital pin on a 5V microcontroller like an Arduino UNO.
In other words, the Rx pin on the HC-05 module is not 5V-tolerant. Therefore, before
connecting to the HC-05 module, the microcontroller’s Tx signal must be stepped down to
3.3V.

The current consumption of the HC-05 module depends on what state it is in. This table from
the datasheet provides some good estimates:
21
Mode Current Consumption

Connected with data transfer 45 mA

Connected Idle 8 mA

Status LED
Many HC-05 modules come with an onboard LED.

It blinks at various rates to indicate the status:


• When powered up, the module enters Bluetooth pairing mode, with the LED flashing rapidly
at about 2 Hz.
• When the module is paired with a device, the LED flash pattern changes to two quick flashes,
followed by a pause, and then repeats.
• When the module is put into AT mode, the LED blinks at a slow and steady rate.
AT Mode
AT Mode is the configuration mode where you can send Hayes AT-style commands to the HC-
05 module to change its settings like name, baud rate, password, etc.
Normally, the HC-05 module is in data mode. To put it into AT mode, you need to press-and-
hold the onboard button while powering up the module. The LED will then start blinking at a
slow and steady rate, indicating that the module is in AT mode.

21
Once in AT mode, you can send AT commands to the module over the UART port. The module
will respond to the commands, either by acknowledging the command, providing the requested
data, or signaling an error. The commands usually start with “AT+” followed by the specific
command, e.g., “AT+NAME?” queries the name of the module or “AT+NAME=MyHC05”
changes the name to “MyHC05”.

AT commands should be sent at the baud rate specified for the AT mode, which is often
different from the baud rate used for data transmission. The default baud rate for AT mode is
38400 bps, but it can be changed if necessary.
HC-05 Pinout
The HC-05 module breaks out six pins. Let’s look at the pinout.

STATE pin can be used to determine the current status of the HC-05 module. The State pin is
LOW when the module is not paired and HIGH when it is.

RXD pin receives serial data from the microcontroller. It should be connected to the TX of the
microcontroller. Please note that this pin is not 5V-tolerant. Therefore, before connecting the
module to a 5V microcontroller, the microcontroller’s Tx signal must be stepped down to 3.3V.
TXD pin sends serial data to the microcontroller. It should be connected to the RX of the
microcontroller.
GND is the ground pin, common to any other device connected to the module.
21
VCC is where you connect the positive supply voltage. This voltage supply signal is routed to
the HC-05 chip via a 3.3V regulator. It should range from 3.6V to 6V.
EN is connected to the on-board regulator enable pin and is pulled high by a 220k resistor.
Pulling this pin low disables the regulator, which consequently turns off the HC-05.
Controlling the HC-05 Module
A serial interface is all that is required to control the HC-05 Bluetooth module and send data
through it. It acts, essentially, like a data pipeline: serial data that goes into the module (from
the RXD pin), is passed out the Bluetooth connection. Data coming in from the Bluetooth side
is passed out the serial side (out the TXD pin).
To set up this data pipeline, we follow a two-step process:
1. Connect the HC-05 module to a device capable of sending and receiving serial data, like an
Arduino or any microcontroller with UART.
2. On the Bluetooth side, we establish a wireless connection between the HC-05 module and
another Bluetooth-enabled device, such as an Android phone. This connection involves a
pairing process similar to connecting any other Bluetooth devices together. You will also need
a terminal program installed on your phone that can communicate via Bluetooth. For this
purpose, we recommend using the “Serial Bluetooth Terminal,” which is available in the Play
Store. However, there are also many other free options that you can explore.

In summary, we just need to set up the serial interface between the HC-05 and our
microcontroller and then pair the HC-05 with the other Bluetooth device, and we’re good to
go!
Wiring a HC-05 Module to an Arduino
Connecting the HC-05 Module to an Arduino is as easy as applying power and wiring up the
serial RX and TX pins.
Instead of connecting the HC-05 Module to the Arduino’s hardware UART, we’ll use
SoftwareSerial and connect the HC-05’s RX and TX pins to any of the Arduino’s free digital
pins. This will help to avoid bus contention and ensure that the HC-05 doesn’t receive any
unintended data during a sketch upload.

Therefore, the TXD of the HC-05 module is connected to the Arduino’s D3, the RXD to D2,
GND to GND, and VCC to 5V. The TXD and RXD pins can actually be connected to any
21
digital pin (except 0 and 1). So, if pins 2 and 3 are needed for other purposes, feel free to switch
them.
However, if you remember, the Rx pin on the HC-05 module is not 5V-tolerant. Thus, you
can’t connect the HC-05’s Rx pin directly to the Arduino’s (5V MCU) digital pin. The Tx
signal from the Arduino must be stepped down to 3.3 V. There are numerous ways to
accomplish this, but the simplest is to use a resistor divider. A 1K resistor between HC-05’s
Rx and Arduino’s D2, and a 2K resistor between HC-05’s Rx and GND, will work just fine.
To summarize, the following are the connections we’ll make for the example code later in this
tutorial:

HC-05 Module Arduino Notes

VCC 5V –

GND GND –

TXD D3 –

Use level shifter if


RXD D2
using 5V MCU

The image below shows how to connect the HC-05 module to the Arduino Uno.
3.6. Light Dependent Resistor
Learn what is LDR, and how to interface it with evive. Understand analog and digital signals
and how to visualize the LDR values on evive’s screen. Write a script to change the backdrop
of PictoBlox’s Stage according to the amount of light incident on the LDR.
LDRs are tiny light-sensing devices also known as photoresistors. An LDR is a resistor whose
resistance changes as the amount of light falling on it changes. The resistance of the LDR
decreases with an increase in light intensity. This property allows us to use them for making
light sensing circuits. Learn what is LDR, how does it work, how to interface it with evive and
program it in PictoBlox – our Scratch blocks-based graphical programming platform with
advanced hardware interaction abilities, and finally what exciting DIY projects you can make
using the LDR available in the evive Starter Kit.
To work in PictoBlox, you’ll first need to download it from HERE.
3.6.1. What is LDR or Photoresistor?
Let’s begin by understanding what is LDR and how does LDR works.
21
LDR is an acronym for Light Dependent Resistor. LDRs are tiny light-sensing devices also
known as photoresistors. An LDR is a resistor whose resistance changes as the amount of light
falling on it changes. The resistance of the LDR decreases with an increase in light intensity,
and vice-versa. This property allows us to use them for making light sensing circuits.
For using an LDR, we always have to make a voltage divider circuit. When the value of
resistance of LDR increases in comparison to the fixed resistance, the voltage across it also
increases.

What are Signals?


But before we move ahead, let’s talk a little about signals.
A signal is anything that carries some sort of information. It can be an action, a sound, or a
type of movement.Any signal can be classified as:
1. Analog Signal
2. Digital Signal
Analog Signal
An analog signal is a signal that represents ALL of the possible values in a given range as it
varies with respect to time; it is analogous to the time-varying quantity it represents.

21
Digital Signal
On the contrary, a digital signal is a signal that represents a quantity as a series
of discontinuous values.
spribe aviator game!
The digital signal can represent only 2 values: ‘HIGH‘ and ‘LOW‘.

An LDR is an analogous device; its resistance changes gradually, and not in discontinuous
steps,
1. Connect the LDR and 4.7k ohm resistor in series.
2. Connect the 5V pin to the first leg of the LDR.
3. Connect the ground pin to the end of the resistor.
4. Connect the common leg of LDR and resistor to the A0 pin on evive.
5.

21
3.7. Temperature Sensor
Guide for DS18B20 Temperature Sensor with Arduino

This guide shows how to use the DS18B20 temperature sensor with the Arduino board. You’ll
learn how to wire the sensor, install the required libraries and get temperature from one or
multiple DS18B20 sensors.

28
The following table shows how you should wire the DS18B20 sensor to your Arduino
board:

4.2 DS18B20 4.3 Arduino

4.4 GND 4.5 GND

4.6 DQ 4.7 Any digital pin (with 4.7k Ohm pull-up resistor)

4.8 VDD 4.9 5V (normal mode) or GND (parasite mode)

28
Here’s a summary of the most relevant specs of the DS18B20 temperature sensor:

Communicates over one-wire bus communication

Power supply range: 3.0V to 5.5V

Operating temperature range: -55ºC to +125ºC

Accuracy +/-0.5 ºC (between the range -10ºC to 85ºC)

Parasite mode: You only need data and GND. The sensor derives its power from the data
line. In this case, here’s the schematic you need to follow:

28
You can read the temperature of more than one sensor at the same time using just one
Arduino digital pin. For that, you just need to wire together all the sensors data pins to an
Arduino digital pin.

28
4. Chapter Working of Project

4.1. Working of Project

.The soil moisture sensor is connected to Arduino pin A0, temperature sensor to pin A1, LDR
is connected to the pin A2, when the soil moisture sensor is dipped into the soil in measures
the soil resistance and sends signal to the Arduino, the Arduino processes the signal and send
it to the HC-05 , when sends the results to Bluetooth terminal app. Similarly the LDR and
temperature sensor also measures the value and sends to Arduino , the Arduino processes the
value and send it to the HC-05, HC-05 sends the signal to the Bluetooth terminal app which
displays the values in the human readable form.

Proposed Diagram
Code
/**
* DHT11 Sensor Reader
* This sketch reads temperature and humidity data from the DHT11 sensor and prints the
values to the serial port.
* It also handles potential error states that might occur during reading.
*
* Author: Dhruba Saha
* Version: 2.1.0
* License: MIT
*/

// Include the DHT11 library for interfacing with the sensor.


#include <DHT11.h>

// Create an instance of the DHT11 class.


// - For Arduino: Connect the sensor to Digital I/O Pin 2.
// - For ESP32: Connect the sensor to pin GPIO2 or P2.
28
// - For ESP8266: Connect the sensor to GPIO2 or D4.
DHT11 dht11(2);

void setup() {
// Initialize serial communication to allow debugging and data readout.
// Using a baud rate of 9600 bps.
Serial.begin(9600);

// Uncomment the line below to set a custom delay between sensor readings (in
milliseconds).
// dht11.setDelay(500); // Set this to the desired delay. Default is 500ms.
}

void loop() {
int temperature = 0;
int humidity = 0;

// Attempt to read the temperature and humidity values from the DHT11 sensor.
int result = dht11.readTemperatureHumidity(temperature, humidity);

// Check the results of the readings.


// If the reading is successful, print the temperature and humidity values.
// If there are errors, print the appropriate error messages.
if (result == 0) {
Serial.print("Temperature: ");
Serial.print(temperature);
Serial.print(" °C\tHumidity: ");
Serial.print(humidity);
Serial.println(" %");
} else {
// Print error message based on the error code.
Serial.println(DHT11::getErrorString(result));
}
}
In this part we will show you how we made a plant watering system using Arduino in an easy
that will help to keep your plants hydrated all the time.
One of the most common problems that every household faces if they keep the plant is
watering them on time, Even we used to keep some plants on my desk and backyard but
always fail to water them on time.
The result was dry plant and we know this is not the way! So thought to build something that
would keep my plant hydrated all the time, I checked online for various gadgets and they all
came with some price tag which we thought was not fair according to me!
So we built a watering system for my plant that used inexpensive electronics but it works
best and with this, you can leave your plants unmaintained for several months
So if you own a plant and are facing the issues like me then we would recommend building
this project and don't worry if you are a beginner we have given step by step instructions to
build this.
To make it easier and save time we have packed all the information on simple steps.
Supplies
28
28
Step 1: Circuit Diagram

28
We will divide the circuit into 3 components, relay module, moisture sensor and pump,
below is the connection for those components

Soil Moisture Sensor


• VCC of the soil moisture sensor connects to the 5V pin on the Arduino.
• GND of the soil moisture sensor connects to the GND pin on the Arduino.
• DO (Digital Output) of the soil moisture sensor connects to D6 on the Arduino.
Relay Module
• VCC of the relay module connects to the 5V pin on the Arduino.
• GND of the relay module connects to the GND pin on the Arduino.
• Signal Pin (S) of the relay module connects to D3 on the Arduino.
Submersible Pump
• Connect one terminal of the submersible pump to the normally open (NO) terminal of
the relay.
• Connect the other terminal of the submersible pump to the positive terminal of the
power supply for the pump.
• Connect the common (COM) terminal of the relay to the negative terminal of the
power supply.

Code
int water; //random variable
void setup() {
pinMode(3,OUTPUT); //output pin for relay board, this will sent signal to the relay
pinMode(6,INPUT); //input pin coming from soil sensor
}

void loop() {
water = digitalRead(6); // reading the coming signal from the soil sensor
if(water == HIGH) // if water level is full then cut the relay
28
{
digitalWrite(3,LOW); // low is to cut the relay
}
else
{
digital Write(3,HIGH); //high to continue proving signal and water supply
}
delay(400);
}

28
5. Chapter SUMMARY AND CONCLUSION

5.1. CONCLUSION

This system successfully detects plants by displaying the value of soil moisture and lighting
from a plant in real-time. The values are evaluated and the real time data is estimated to
predict further action for the monitoring of the plants.

36
6. Chapter REFERENCES

1. Akyildiz I. F, WeilianSu, SankarasubramaniamY. and Cayirci E, "A survey on sensor


networks," in IEEE Communications Magazine, vol. 40, no. 8, pp. 102-114.

2. Abu-El Magad M, KamelE "Economic assessment of an irrigation canal


automation and control project," Intelligent Control, 1997. Proceedings of the 1997 IEEE
International Symposium on, Istanbul, 1997, pp. 205-208.

3. Ahmed and Ladhake, "Design of Ultra Low Cost Cell Phone Based
Embedded System for Irrigation," Machine Vision and Human-Machine Interface (MVHI),
2010 International Conference on, Kaifeng, China, 2010, pp. 718-721.

4. Baviskar, Mulla, Baviskar, Dsouza and M. Khan, "Designing of mobile controlled automatic
Interactive Voice Response irrigation system," Recent Advances and Innovations in
Engineering (ICRAIE), 2014, Jaipur, 2014, pp. 1-6.

5. Doddapanen K, OmondiF. A., E. Ever, P. Shah, O. Gemikonakli and R. Gagliardi,


"Deployment Challenges and Developments in Wireless Sensor Networks Clustering,"
Advanced Information Networking and Applications Workshops (WAINA), 2014 28th
International Conference on, Victoria, BC, 2014, pp. 227-232.

6. Dong, Chang and Li, "The influence of groundwater quality on irrigation: A case study in
Dezhou, Shandong Province," Multimedia Technology (ICMT), 2011 International
Conference on, Hangzhou, 2011, pp. 1812-1815.

7. Dursunand Ozden, "A prototype of PC based remote control of irrigation," 2010 International
Conference on Environmental Engineering and Applications,

37
Singapore, 2010, pp. 255-258.

8. Gutiérrez, Villa-Medina, A. NietoGaribay andPorta-Gándara, "Automated


Irrigation System Using a Wireless Sensor Network and GPRS Module," in IEEE Transactions
on Instrumentation and Measurement, vol. 63, no. 1, pp. 166-176.

9. H. N. and Kant, "Local weather interpolation using remote AWS data with
error corrections using sparse WSN for automated irrigation for Indian farming,"
Contemporary Computing (IC3), 2014 Seventh International Conference on, Noida, 2014, pp.
478-483.

10. Haule and Michael, "Deployment of wireless sensor networks (WSN) in automated irrigation
management and scheduling systems: a review," Science, Computing and
Telecommunications (PACT), 2014 Pan African Conference on, Arusha, 2014, pp. 86-91.

11. Khriji, Houssaini, Jmal, C. Viehweger, M. Abid and O. Kanoun, "Precision irrigation based on
wireless sensor network," in IET Science, Measurement & Technology, vol. 8, no. 3, pp. 98-
106.

12. KodaliBoppana, "Irrigation with grid architecture sensor network," Advances in Computing,
Communications and Informatics (ICACCI, 2014 International Conference on, New Delhi,
2014, pp. 2110-2116.

13. Lenka and Mohapatra, "Gradient Descent with Momentum based Neural Network Pattern
Classification for the Prediction of Soil Moisture Content in Precision Agriculture," 2015 IEEE
International Symposium on Nanoelectronic and Information Systems, Indore, 2015, pp. 63-
66.

14. Nayak, Prakash and A. Rao, "Harnessing wind energy to power sensor networks for

38
agriculture," Advances in Energy Conversion Technologies
(ICAECT), 2014 International Conference on, Manipal,
2014, pp. 221-226.

15. Pham,. Saleem and N. Okello, "Real-time optimization of irrigation


scheduling in agriculture," 2013 25th Chinese Control and Decision Conference (CCDC),
Guiyang, 2013, pp. 4435-4439.

16. Singh A. K, J. Tiwari A. K, Yadav A and GuptaS , "Real Time Autonomous Irrigation Module
Design," Computational Intelligence and Communication Networks (CICN), 2014
International Conference on, Bhopal, 2014, pp. 1209-1213.

17. Vishwakarma and Choudhary, "Wireless solution for irrigation in


agriculture," Signal Processing, Communication, Computing and Networking Technologies
(ICSCCN), 2011 International Conference on, Thuckafay, 2011, pp. 61-63.

18. Wenz .M and Worn.H, "Event-based Production Rules for Data Aggregation in Wireless
Sensor Networks," 2006 IEEE International Conference on Multisensor Fusion and Integration
for Intelligent Systems, Heidelberg, 2006, pp. 59-64.doi:

39

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy