Upload
hadan
View
214
Download
0
Embed Size (px)
Citation preview
ABSTRACT
The Agriculture is one of the most fundamental resource of food production and also
plays vital role in keeping the economy running of every nation by contributing to the gross
domestic product but there are several issues related to the traditional methods of agriculture.
The economy being highly based on agriculture demands innovative and reliable methods of
irrigation. The short comings of manual methods of irrigation can be rectified using automated
process. This paper presents the idea of automatic irrigation method and the following research
sustains this idea. The task of automatic irrigation is done through assistance of soil moisture
sensors. In the project, apart from soil moisture sensors.
The proposed design also has the feature of GSM which makes this system wireless. The
electricity required by components is provided through power supply due to load shedding. The
water content is constantly judged and whenever moisture level of soil gets low ,the system
sendes a signal to motors asking them to turn on. The motors automatically stop after soil
reaches its maximum upper threshold value which is decided by user. Every time the motor starts
or stops automatically, the user will get a SMS about the status of operation. The major
advantages of the project include avoidance from water wastage, growth of plants to their
maximum potential, less chances of error due to less labor and uninterrupted supply of water due
to solar energy.
1.0 INTRODUCTION: Income countries, agriculture is considered as one of the major source of economic
progress. The income of many countries depends directly on agricultural advancement.
Moreover, the continuous increase in the population of a country demands more innovations in
food production technology. The factors affecting agricultural progress must be studied
thoroughly to obtain maximum results.
The significant building block of agriculture is the irrigation system. In other words, the
efficiency of irrigation system may induce ample effects onagri culture. Irrigation process should
provide water to soil consistently when it is needed and stops water flow as well, when soil has
soaked enough water. The excess of water in the crops is of no good, not only water is wasted
but it also destroys crops. Considering Pakistan, whose economy is mainly based on agriculture
requires efficient and modern methods for water provision in the crops fields.
The failures caused through manual methods of irrigation has let us to think about some
advance method which can be relied upon. Anything which is cost effective, laborsaving and
energy saving is considered efficient. Hence in this proposed system, a method which uses very
less or no labor (runs on its own) has been recommended, saves electricity and is easy to use.
1.1 SYSTEM ARCHITECHTURE:
Arduino is the embedded control in this project which plays a vital role in our project, the
equipment which makes our project a fully automated system without a human intervention is
the GSM module and the relay driver circuit, which is used to control the motor.
This system also makes use of moisture sensor (FC-28), which senses the moisture level
and switches the pump motor when moisture is low and puts off the pump motor when moisture
is normal.
The GSM module is the one of the most important feature of our project which sends the
message alert weather the moisture is low or high.
2.0 BLOCK DIAGRAM:
Fig. 2.0: Block diagram of the automatic Irrigation system
2.1 Working Explanation:
Irrigation is defined as artificial application of water to land or soil. Irrigation process can
be used for the cultivation of agricultural crops during the span of inadequate rainfall and for
maintaining landscapes. An automatic irrigation system does the operation of a system without
requiring manual involvement of persons. Every irrigation system such as drip, sprinkler and
surface gets automated with the help of electronic appliances and detectors such as
computer, timers, sensors and other mechanical devices.
Working of this Automatic Irrigation System is quite simple. First of all, it is
a Completely Automated System and there is no need of manpower to control the system.
Arduino is used for controlling the whole process and GSM module is used for sending alert
messages to user on his Cellphone.
If moisture is present in soil then there is conduction between the two probes of Soil
Moisture sensor and due to this conduction, sensor output pin Do is in on state and Arduino
Pin A0 remains Low. When Arduino reads LOW signal at A0, then it sends SMS to user about
“Soil Moisture is Normal. Motor turned OFF” and water pump remains in off state.
Now if there is no Moisture in soil then sensor output pin D0 becomes high and Pin A0
of Arduino becomes high. Then Arduino reads the Pin A0 and turns On the water motor and
also sends message to user about “Low Soil Moisture detected. Motor turned ON”. Motor will
automatically turn off when there is sufficient moisture in the soil.
The circuit diagram of the automatic irrigation system is shown in Fig. 2.1. The circuit
comprises an Arduino UNO board, a soil moisture sensor, a servo motor, a 12V water pump and
an L293D (IC1) motor driver IC to run the water pump.
Fig. 2.1: Circuit diagram of the automatic plants watering system
The automatic irrigation system on sensing soil moisture project is intended for the
development of an irrigation system that switches submersible pumps on or off by using relays to
perform this action on sensing the moisture content of the soil. The main advantage of using this
irrigation system is to reduce human interference and ensure proper irrigation.
The Arduino acts as a major block of the entire project, and a power supply block is used
for supplying power of 5V to the whole circuit with the help of a transformer, a bridge rectifier
circuit and a voltage regulator. The ARDUINO is programmed in such a way that it receives the
input signal from the sensing material which consists of a comparator to know the varying
conditions of the moisture in the soil. The OP-AMP which is used as comparator acts as an
interface between the sensing material and the microcontroller for transferring the moisture
conditions of the soil, viz. wetness, dryness, etc.
Once the Arduino gets the data from the sensing material and it compares the data as
programmed in a way, which generates output signals and activates the relays for operating the
submersible pump. The sensing arrangement is done with the help of two stiff metallic rods that
are inserted into the agricultural field at some distance. The required connections from these
metallic rods are interfaced to the control unit for controlling the operations of the pump
according to the soil moisture content.
3.0 SYSTEM DESCRIPTION:
The components used to construct a Automatic irrigation system are shown bellow
1. Soil moisture sensor (FC-28)
2. Arduino Uno R3
3.GSM 900 Module
4. LCD Display 16×2
5. Transformer 12-0-12 1 Amp
6. Water pump
7. Relay (12V)
8. Resistors (1kΩ .10kΩ)
9. BC 547
10. POT
11. Diodes (IN 4007)
12. LED
13. Capacitor 250µ F
14. Connecting wires
3.1 SOIL MOISTURE SENSOR (FC-28):
The soil moisture sensor consists of two probes that are used to measure the volumetric
content of water. The two probes allow the current to pass through the soil, which gives the
resistance value to measure the moisture value. When there is water, the soil will conduct more
electricity, which means that there will be less resistance. Dry soil conducts electricity poorly, so
when there is less water, then the soil will conduct less electricity, which means that there will be
more resistance. This sensor can be connected in analog and digital modes. First, we will connect
it in analog mode, and then digital.
3.1.1 The specifications of the soil moisture sensor are as follows:
Input Voltage: 3.3–5V
Output Voltage: 0–4.2V
Input Current: 35mA
Output Signal: both analog and digital
3.1.2 Pin-Out:
The FC-28 soil moisture sensor has four pins:
VCC: Power
A0: Analog Output
D0: Digital Output
GND: Ground
The module also contains a potentiometer, which will set the threshold value. This
threshold value will be compared by the LM393 comparator. The output LED will light up and
down according to this threshold value
Fig-3.1: Soil Moisture Sensor
3.1.3 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.
Connect the FC-28 soil moisture sensor to the Arduino as follows:
VCC of the FC-28 to 5V of the Arduino
GND of the FC-28 to GND of the Arduino
A0 of the FC-28 to A0 of the Arduino
3.1.4 Digital Mode:
To connect the soil moisture sensor FC-28 in the digital mode, we will connect the
digital output of the sensor to the digital pin of the Arduino. The sensor module contains a
potentiometer, which is used to set the threshold value. The threshold value is then compared
with the sensor output value using the LM393 comparator, which is placed on the sensor
module. The LM393 comparator compares the sensor output value and the threshold value, and
then gives us the output through the digital pin. When the sensor value is greater than the
threshold value, the digital pin will give us 5V, and the LED on the sensor will light up. When
the sensor value will be less than this threshold value, the digital pin will give us 0V and the light
will go down.
The connections for the FC-28 soil moisture sensor and the Arduino in digital mode are as
follows:
VCC of FC-28 to 5V of Arduino
GND of FC-28 to GND of Arduino
D0 of FC-28 to pin 12 of Arduino
LED positive to pin 13 of Arduino
LED negative to GND of Arduino
3.2 GSM SIM 900 Module:
A GSM modem is a device which can be either a mobile phone or a modem device
which can be used to make a computer or any other processor communicate over a network. A
GSM modem requires a SIM card to be operated and operates over a network range subscribed
by the network operator. It can be connected to a computer through serial, USB or Bluetooth
connection. A GSM modem can also be a standard GSM mobile phone with the appropriate
cable and software driver to connect to a serial port or USB port on your computer. GSM modem
is usually preferable to a GSM mobile phone.
The GSM modem has wide range of applications in transaction terminals, supply chain
management, security applications, weather stations and GPRS mode remote data l This is a
GSM/GPRS-compatible Quad-band cell phone, which works on a frequency of
850/900/1800/1900MHz and which can be used not only to access the Internet, but also for oral
communication (provided that it is connected to a microphone and a small loud speaker) and for
SMSs. Externally, it looks like a big package (0.94 inches x 0.94 inches x 0.12 inches) with L-
shaped contacts on four sides so that they can be soldered both on the side and at the bottom.
Internally, the module is managed by an AMR926EJ-S processor, which controls phone
communication, data communication (through an integrated TCP/IP stack), and (through an
UART and a TTL serial interface) the communication with the circuit interfaced with the cell
phone itself .The processor is also in charge of a SIM card (3 or 1,8 V) which needs to be
attached to the outer wall of the module .In addition, the GSM900 device integrates an analog
interface, an A/D converter, an RTC, an SPI bus, an I²C, and a PWM module. The radio section
is GSM phase 2/2+ compatible and is either class 4 (2 W) at 850/ 900 MHz or class 1 (1 W) at
1800/1900 MHz .The TTL serial interface is in charge not only of communicating all the data
relative to the SMS already received and those that come in during TCP/IP sessions in GPRS
(the data-rate is determined by GPRS class 10: max. 85,6 kbps), but also of receiving the circuit
commands (in our case, coming from the PIC governing the remote control) that can be either
AT standard or AT-enhanced SIM Com type. The module is supplied with continuous energy
(between 3.4 and 4.5 V) and absorbs a maximum of 0.8 A during transmission.
Fig 3.2: GSM Modem
3.2.1 Features of GSM Module:
Improved spectrum efficiency International roaming Compatibility with integrated
services digital network (ISDN) Support for new services.
SIM phonebook management
Fixed dialing number (FDN)
Real time clock with alarm management
High-quality speech
Uses encryption to make phone calls more secure
Short message service (SMS)
3.3 ARDUINO UNO:
Arduino is a single-board microcontroller meant to make the application more
accessible which are interactive objects and its surroundings. The hardware features with an
open-source hardware board designed around an 8-bit Atmel AVR microcontroller or a 32-bit
Atmel ARM. Current models consists a USB interface, 6 analog input pins and 14 digital I/O
pins that allows the user to attach various extension boards.
Fig 3.3: ARDUINO UNO R3
The Arduino Uno board is a microcontroller based on the ATmega328. It has 14 digital
input/output pins in which 6 can be used as PWM outputs, a 16 MHz ceramic resonator, an ICSP
header, a USB connection, 6 analog inputs, a power jack and a reset button. This contains all the
required support needed for microcontroller. In order to get started, they are simply connected to
a computer with a USB cable or with a AC-to-DC adapter or battery. Arduino Uno Board varies
from all other boards and they will not use the FTDI USB-to-serial driver chip in them. It is
featured by the Atmega16U2 (Atmega8U2 up to version R2) programmed as a USB-to-serial
converter.
There are various types of Arduino boards in which many of them were third-party
compatible versions. The most official versions available are the Arduino Uno R3 and the
Arduino Nano V3. Both of these run a 16MHz Atmel ATmega328P 8-bit microcontroller with
32KB of flash RAM 14 digital I/O and six analog I/O and the 32KB will not sound like as if
running Windows. Arduino projects can be stand-alone or they can communicate with software
on running on a computer. For e.g. Flash, Processing, Max/ MSP). The board is clocked by a 16
MHz ceramic resonator and has a USB connection for power and communication. You can
easily add micro SD/SD card storage for bigger tasks.
Arduino was created in the year 2005 by two Italian engineers David Cuartielles and
Massimo Banzi with the goal of keeping in mind about students to make them learn how to
program the Arduino uno microcontroller and improve their skills about electronics and use it in
the real world.
Arduino uno microcontroller can sense the environment by receiving input from a variety
of sensors and can affect its surroundings by controlling lights, motors, and other actuators. The
microcontroller is programmed using the Arduino programming language (based on Wiring) and
the Arduino development environment.
3.3.1 PIN DIAGRAM:
Fig-3.3.1 Pin Diagram of Arduino
3.3.2 Power USB:Arduino board can be powered by using the USB cable from your computer. All you
need to do is connect the USB cable to the USB connection
3.3.3 Power (Barrel Jack):Arduino boards can be powered directly from the AC mains power supply by connecting
it to the Barrel Jack
3.3.4 Voltage Regulator:
The function of the voltage regulator is to control the voltage given to the Arduino board
and stabilize the DC voltages used by the processor and other elements.
3.3.5 Crystal Oscillator:The crystal oscillator helps Arduino in dealing with time issues. How does Arduino
calculate time? The answer is, by using the crystal oscillator. The number printed on top of the
Arduino crystal is 16.000H9H. It tells us that the frequency is 16,000,000 Hertz or 16 MHz.
3.3.6 Arduino Reset:
You can reset your Arduino board, i.e., start your program from the beginning. You can
reset the UNO board in two ways. First, by using the reset button (17) on the board. Second, you
can connect an external reset button to the Arduino pin labelled RESET
3.3.7 Pins: 3.3, 5, GND, Vin:
3.3V (Pin - 6) − Supply 3.3 output volt
5V (Pin - 7) − Supply 5 output volt
Most of the components used with Arduino board works fine with 3.3 volt and 5 volt.
GND (Pin - 8)(Ground) − There are several GND pins on the Arduino, any of which can
be used to ground your circuit.
Vin (Pin - 9) − This pin also can be used to power the Arduino board from an external
power source, like AC mains power supply.
3.3.8 ICSP Pins:
Mostly, ICSP (12) is an AVR, a tiny programming header for the Arduino consisting of
MOSI, MISO, SCK, RESET, VCC, and GND. It is often referred to as an SPI (Serial Peripheral
Interface), which could be considered as an "expansion" of the output. Actually, you are slaving
the output device to the master of the SPI bus.
3.3.9 TX and RX LEDs:
On your board, you will find two labels: TX (transmit) and RX (receive). They appear in
two places on the Arduino UNO board. First, at the digital pins 0 and 1, to indicate the pins
responsible for serial communication. Second, the TX and RX led (13). The TX led flashes with
different speed while sending the serial data. The speed of flashing depends on the baud rate
used by the board. RX flashes during the receiving process.
3.3.10 Digital I/O:
The Arduino UNO board has 14 digital I/O pins (15) (of which 6 provide PWM (Pulse
Width Modulation) output. These pins can be configured to work as input digital pins to read
logic values (0 or 1) or as digital output pins to drive different modules like LEDs, relays, etc.
The pins labeled “~” can be used to generate PWM.
3.3.11 AREF:
AREF stands for Analog Reference. It is sometimes, used to set an external reference
voltage (between 0 and 5 Volts) as the upper limit for the analog input pins.
3.3.12 Arduino Uno Starter Kit:
Sl.No Name Specification1. Microcontroller ATmega3282. Operating Voltage 5V3. Input Voltage 7-12V4. Digital I/O Pins 14 (of which 6 provide PWM output)
5. Analog Input Pins 66. DC Current per I/O Pin 40 ma7. DC Current for 3.3V Pin 50 ma8. Flash Memory 32 KB (ATmega328) of which 0.5 KB used
by boot loader9. SRAM 2 KB (ATmega328)10. EEPROM 1 KB (ATmega328)11. Clock Speed 16 MHz
Table -3.3.12: Arduino Uno Starter Kit
3.3.13 Programming:
The Arduino integrated development environment (IDE) is a cross-platform application
written in Java, and is derived from the IDE for the Processing programming language and the
Wiring projects .The Arduino Uno board can be programmed with the Arduino software Select
“Arduino Uno from the Tools > Board menu (according to the microcontroller on your
board).The ATmega328 on the Arduino Uno comes pre-burned with a boot loader that allows
you to upload new code to it without the use of an external hardware programmer.
It communicates using the original STK500 protocol\ .You can also bypass the boot
loader and program the microcontroller through the ICSP (In-Circuit Serial Programming)
header .The ATmega16U2 (or 8U2 in the rev1 and rev2 boards) firmware source code is
available .
The ATmega16U2/8U2 is loaded with a DFU boot loader, which can be activated by :On
Rev1 boards: connecting the solder jumper on the back of the board (near the map of Italy) and
then resetting the 8U2.On Rev2 or later boards: there is a resistor that pulling the 8U2/16U2
HWB line to ground, making it easier to put into DFU mode .You can then use Atmel’s FLIP
software (Windows) or the DFU programmer (Mac OS X and Linux) to load a new firmware. Or
you can use the ISP header with an external programmer (overwriting the DFU boot loader.
3.3.14 Features of the Arduino Uno Board:
It is an easy USB interface. This allows interface with USB as this is like a serial device.
The chip on the board plugs straight into your USB port and supports on your computer
as a virtual serial port. The benefit of this setup is that serial communication is an
extremely easy protocol which is time-tested and USB makes connection with modern
computers and makes it comfortable.
It is easy-to-find the microcontroller brain which is the ATmega328 chip. It has more
number of hardware features like timers, external and internal interrupts, PWM pins and
multiple sleep modes.
It is an open source design and there is an advantage of being open source is that it has a
large community of people using and troubleshooting it. This makes it easy to help in
debugging projects.
It is a 16 MHz clock which is fast enough for most applications and does not speeds up
the microcontroller.
It is very convenient to manage power inside it and it had a feature of built-in voltage
regulation. This can also be powered directly off a USB port without any external power.
You can connect an external power source of up to 12v and this regulates it to both 5v
and 3.3v.
13 digital pins and 6 analog pins. This sort of pins allows you to connect hardware to
your Arduino Uno board externally. These pins are used as a key for extending the
computing capability of the Arduino Uno into the real world. Simply plug your electronic
devices and sensors into the sockets that correspond to each of these pins and you are
good to go.
This has an ICSP connector for bypassing the USB port and interfacing the Arduino
directly as a serial device. This port is necessary to re-bootload your chip if it corrupts
and can no longer used to your computer.
It has a 32 KB of flash memory for storing your code.
An on-board LED is attached to digital pin 13 to make fast the debugging of code and to
make the debug process easy.
Finally, it has a button to reset the program on the chip.
3.3.15 Technical Specifications:
Microcontroller ATmega328
Operating Voltage 5V
Input Voltage (recommended) 7-12V
Input Voltage (limits) 6-20V
Digital I/O Pins 14 (of which 6 provide PWM output)
Analog Input Pins 6
DC Current per I/O Pin 40 mA
DC Current for 3.3V Pin 50 mA
Flash Memory 32 KB of which 0.5 KB used bootloader
SRAM 2 KB
EEPROM 1 KB
Clock Speed 16 MHz
3.4 LCD DISPLAY (16×2):
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 DIYs and circuits. The 16×2 translates o a
display 16 characters per line in 2 such lines. In this LCD each character is displayed in a 5×7
pixel matrix.
Fig-3.4 :16X2 LCD Pinout Diagram
3.4.1 LCD Pin Description:
Pin No Function Name1. Ground (0V) Ground2. Supply voltage; 5V (4.7V – 5.3V) Vcc3. Contrast adjustment; the best way is to use variable
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
Vo / VEE
4. Selects command register when low, and data register when high
RS (Register 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; 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.
Enable
7. DB08. DB19. DB210. DB311. 8-bit data pins DB412. DB513. DB614. DB715. Backlight VCC (5V) Led+16. Backlight Ground (0V) Led-
Table-3.4: Lcd Display (16×2)
3.4.2 Command Codes for LCD:
SL.no:
HEX Code Command to LCD instruction 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 Increment cursor (shift cursor to right)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 left
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
Table-3.4.1: Command Codes for LCD
3.4.3 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-RAM size is 64 byte providing the option of creating eight characters at a time. Each
character is eight byte in size.
3.5 TRANSFORMER:
In this project we used a 12-0-12V transformer for step downing the 230 volts supply to 12
v and this output is given to 78005 and 7808 regulator IC's . The transformer is as shown below
Fig-3.5:12-0-12 transformer
A center-tapped transformer also known as two phase three wire transformer is
normally used for rectifier circuits. When a digital project has to work with AC mains a
Transformer is used to step-down the voltage (in our case, to 24V or 12V) and then convert it to
DC by using a rectifier circuit. In a center-tapped transformer the peak inverse voltage is twice as
in bridge rectifier hence this transformer is commonly used in full wave rectifier circuits.
The operation and theory behind a Center tapped transformer is very similar to a normal
secondary transformer. A primary voltage will be induced in the primary coil (I1 and I3) and due
to magnetic induction the voltage will be transferred to the secondary coil. Here in the secondary
coil of a centre tapped transformer, there will be an additional wire (T2) which will be placed
exactly at the center of the secondary coil, hence the voltage here will always be zero.
If we combine this zero potential wire (T2) with either T1 or T2, we will get a voltage of
12V AC. If this wire is ignored and voltage across T1 and T2 is considered then we will get a
voltage of 24V AC. This feature is very useful for the function of a full wave rectifier. Let us
consider the voltage given by the first half of the secondary coil as Va and the voltage across the
second half of the secondary coil as Vb as shown in the diagram below
Fig-3.5.1 :12-0-12 transformer
3.5.1 Transformer Terminal Description:
No: Terminal Name Description
1. I1 and I2 These are the input wires for the transformer, it is connected to the phase and neutral of AC mains
2. T1 and T3 There are the output terminals of the Transformer, the voltage across it will be 24V AC
3.T2
This is the centre tapped wire of the transformer; this wire can be combined with either T1 or T3 to get 12V
AC across it. It’s very useful
Table-3.5: Transformer Terminal Description
3.5.2 Specifications of Centre Tapped Transformer (12-0-12):
Step-down Centre tapped Transformer
Input Voltage: 220V AC at 50Hz
Output Voltage: 24V, 12V or 0V
Output Current: 1A
Vertical mount type
Low cost and small package
3.6 WATER PUMP
This is a low cost, small size Submersible Pump Motor which can be operated from a
12V power supply. It can take up to 120 liters per hour with very low current consumption of
220mA. Just connect tube pipe to the motor outlet, submerge it in water and power it. Make sure
that the water level is always higher than the motor. Dry run may damage the motor due to
heating and it will also produce noise.
The pump used was constructed using a miniature dc motor powered by the output of the
power supply unit. The mechanical output point of the motor was loaded with miniature
bidirectional fan blades and secured firmly using glue. The pumping was achieved by placing the
fan blades in an enclosure made from two cylindrical plastic stoppers. The motor was also
inserted into a stopper to protect it from contact with water. The electrical connections to the
motor were passed through a tight hole in the side of the stopper. The stopper containing the
motor was then taped with a water-tight cellophane tape to the pumping enclosure to make the
pumping system one single unit. When placed in water (the pump has to be lying 6 Journal of
Electrical Engineering www.jee.ro horizontally) and connected to the power from the power
supply unit, water is taken through the hole at the top of the pump, the blades attached to the
rotor spin the water around in the pumping enclosure and the water exits through the pipe
attached to the hole at the side of the enclosure.
Fig -3.6: Water Pump
3.6.1 Specification:
Operating Current : 130 ~ 220Ma
Flow Rate : 80 ~ 120 L/H
Maximum Lift : 40 ~ 110 mm
Continuous Working Life : 500 hours
Driving Mode : DC, Magnetic Driving
Material : Engineering Plastic
Outlet Outside Diameter : 7.5 mm
Outlet Inside Diameter : 5 mm
3.7 RELAY:
A given current rating. A relays are switches that open and close circuits
electromechanically or electronically. Relays control one electrical circuit by opening and
closing contacts in another circuit. As relay diagrams show, when a relay contact is normally
open (NO), there is an open contact when the relay is not energized. When a relay contact is
Normally Closed (NC), there is a closed contact when the relay is not energized. In either case,
applying electrical current to the contact will change their state.
Relays are generally used to switch smaller currents in a control circuit and do not
usually control power consuming devices except for small motors and Solenoids that draw low
amps. Nonetheless, relays can "control" larger voltages and amperes by having an amplifying
effect because a small voltage applied to a relays coil can result in a large voltage being switched
by the contacts.
Protective relays can prevent equipment damage by detecting electrical abnormalities,
including overcurrent, undercurrent, overloads and reverse currents. In addition, relays are also
widely used to switch starting coils, heating elements, pilot lights and audible alarms.
Fig-3.7.1: Relay
1. Frame: Heavy-duty frame that contains and supports the parts of the relay.
2. Coil: Wire is wound around a metal core. The coil of wire causes an electromagnetic
field.
3. Armature: A relays moving part. The armature opens and closes the contacts. An
attached spring returns the armature to its original position.
4. Contacts: The conducting part of the switch that makes (closes) or breaks (opens) a
circuit.
A relays useful life depends upon its contacts. Once contacts burn out, the relays contacts
or the entire relay has to be replaced. Mechanical Life is the number of operations (openings and
closings) a contact can perform without electrical current. A relays mechanical life is relatively
long, offering up to 1,000,000 operations. A relays Electrical life is the number of operations
(openings and closings) the contacts can perform with electrical current at Contact electrical life
ratings range from 100,000 to 500,000cycles.
3.8 LED:
Light emitting diode is a two-lead semiconductor light source. In 1962, Nick
Holonyak has come up with an idea of light emitting diode, and he was working for the
general electric company. The LED is a special type of diode and they have similar electrical
characteristics of a PN junction diode. Hence the LED allows the flow of current in the
forward direction and blocks the current in the reverse direction. The LED occupies the small
area which is less than the 1 mm2. The applications of LEDs used to make various electrical
and electronic projects. In this article, we will discuss the working principle of the LED and
its applications.
The lighting emitting diode is a p-n junction diode. It is a specially doped diode and
made up of a special type of semiconductors. When the light emits in the forward biased,
then it is called as a light emitting diode.
Fig-3.8: Led
3.8.1 Working Principle of LED:
The working principle of the Light emitting diode is based on the quantum theory. The
quantum theory says that when the electron comes down from the higher energy level to the
lower energy level then, the energy emits from the photon. The photon energy is equal to the
energy gap between these two energy levels. If the PN-junction diode is in the forward biased,
then the current flows through the diode.
Fig-3.8.1: Working Principle of LED
The flow of current in the semiconductors is caused by the both flow of free electrons in
the opposite direction of current and flow of electrons in the direction of the current. Hence there
will be recombination due to the flow of these charge carriers.
The recombination indicates that the electrons in the conduction band jump down to the
valence band. When the electrons jump from one band to another band the electrons will emit the
electromagnetic energy in the form of photons and the photon energy is equal to the forbidden
energy gap.
For an example, let us consider the quantum theory, the energy of the photon is the
product of both Planck constant and frequency of electromagnetic radiation. The mathematical
equation is shown
For an example, let us consider the quantum theory, the energy of the photon is the
product of both Planck constant and frequency of electromagnetic radiation. The mathematical
equation is shown
Eq = hf
Where h is known as a Planck constant, and the velocity of electromagnetic radiation is
equal to the speed of light i.e c. The frequency radiation is related to the velocity of light as a f=
c / λ. λ is denoted as a wavelength of an electromagnetic radiation and the above equation will
become as a
Eq = he / λ
From the above equation, we can say that the wavelength of electromagnetic radiation is
inversely proportional to the forbidden gap. In general silicon, germanium semiconductors this
forbidden energy gap is between the condition and valence bands are such that the total radiation
of electromagnetic wave during recombination is in the form of the infrared radiation. We can’t
see the wavelength of infrared because they are out of our visible range. The infrared radiation is
said to be as a heat because the silicon and the germanium semiconductors are not direct gap
semiconductors rather these are indirect gap semiconductors. But in the direct gap
semiconductors, the maximum energy level of the valence band and minimum energy level of
conduction band does not occur at the same moment of electrons. Therefore, during the
recombination of electrons and holes are a migration of electrons from the conduction band to
valence band the momentum of electron band will be changed.
3.8.2 I-V Characteristics of LED:
There are different types of light emitting diodes are available in the market and there are
different LED characteristics which include the color light, or wavelength radiation, light
intensity. The important characteristic of the LED is color. In the starting use of LED, there is the
only red color. As the use of LED is increased with the help of the semiconductor process and
doing the research on the new metals for LED, the different colors were formed.
Fig-3.8.2: I-V Characteristics of LED
The following graph shows the approximate curves between the forward voltage and the
current. Each curve in the graph indicates the different color. The table shows the summary of
the LED characteristics.
3.8.3 Applications of Light Emitting Diodes:
LED is used as a bulb in the homes and industries
The light emitting diodes are used in the motorcycles and cars
These are used in the mobile phones to display the message
At the traffic light signals led’s are used
3.8.4 Advantages of LED’s:
The cost of LED’s is less and they are tiny.
By using the LED’s the electricity is controlled.
The intensity of the LED differs with the help of the microcontroller.
3.9 POWER SUPPLY CIRCUIT:A step-down transformer with turn’s ratio of 16:1 was selected to transform the 240V
mains supply voltage to 15V for the power supply. The 15 V ac was converted to dc voltage
using a full wave rectifier circuit. The circuit was designed as follows:
diode forward conduction voltage drop voltage drop across the diode bridge at any instant
transformer secondary voltage = peak value of transformer secondary voltage = peak output dc
voltage from the diode bridge= average value of the diode bridge output voltage = rms value of
output dc voltage of the diode bridge = ripple factor for a full wave rectification process using a
diode bridge = ripple voltage
3.10 Resistor:The principal job of a resistor within an electrical or electronic circuit is to “resist” (hence
the name Resistor), regulate or to set the flow of electrons (current) through them by using the
type of conductive material from which they are composed. Resistors can also be connected
together in various series and parallel combinations to form resistor networks which can act as
voltage droppers, voltage dividers or current limiters within a circuit.
Fig-3.10: Resistor
Resistors are what are called “Passive Devices”, that is they contain no source of power
or amplification but only attenuate or reduce the voltage or current signal passing through them.
This attenuation results in electrical energy being lost in the form of heat as the resistor resists
the flow of electrons through it.
Then a potential difference is required between the two terminals of a resistor for current
to flow. This potential difference balances out the energy lost. When used in DC circuits the
potential difference, also known as a resistors voltage drop, is measured across the terminals as
the circuit current flows through the resistor.
3.11 POTETIOMETER:
A potentiometer is a three-terminal resistor with a sliding or rotating contact that forms
an adjustable voltage divider. If only two terminals are used, one end and the wiper, it acts as
a variable resistor or rheostat.
The measuring instrument called a potentiometer is essentially a voltage divider used for
measuring electric potential (voltage) the component is an implementation of the same principle,
hence its name.
Potentiometers are commonly used to control electrical devices such as volume controls
on audio equipment. Potentiometers operated by a mechanism can be used as
position transducers, for example, in a joystick. Potentiometers are rarely used to directly control
significant power (more than a watt) , since the power dissipated in the potentiometer would be
comparable to the power in the controlled load. Potentiometers consist of a resistive element, a
sliding contact (wiper) that moves along the element, making good electrical contact with one
part of it, electrical terminals at each end of the element, a mechanism that moves the wiper from
one end to the other, and a housing containing the element and wiper.
Fig-3.11: Potentiometer
3.12 BJT BC547:
BC547 is a NPN transistor hence the collector and emitter will be left open (Reverse
biased) when the base pin is held at ground and will be closed (Forward biased) when a signal is
provided to base pin. BC547 has a gain value of 110 to 800 this value determines the
amplification capacity of the transistor. The maximum amount of current that could flow through
the Collector pin is 100mA, hence we cannot connect loads that consume more than 100mA
using this transistor. To bias a transistor we have to supply current to base pin, this current (IB)
should be limited to 5mA.
Fig-3.12: BC547
When this transistor is fully biased then it can allow a maximum of 100mA to flow across
the collector and emitter. This stage is called Saturation Region and the typical voltage allowed
across the Collector-Emitter (VCE) or Base-Emitter (VBE) could be 200 and 900 mV respectively.
When base current is removed the transistor becomes fully off, this stage is called as the Cut-off
Region and the Base Emitter voltage could be around 660 mV.
3.12.1 Pin Configuration:
SL.no Pin Name Description1. Collector Current flows in through collector2. Base Controls the biasing of transistor3. Emitter Current Drains out through emitter
Table-3.12.1: Pin Configuration
3.12.2 Features of Transistor BC547: Bi-Polar NPN Transistor
DC Current Gain (hFE) is 800 maximum
Continuous Collector current (IC) is 100mA
Emitter Base Voltage (VBE) is 6V
Base Current(IB) is 5mA maximum
3.12.3 Applications:
Driver Modules like Relay Driver, LED driver etc..
Amplifier modules like Audio amplifiers, signal Amplifier etc..
Darlington pair
3.13 Diode (IN4007):
A diode is a device which allows current flow through only one direction. That is the
current should always flow from the Anode to cathode. The cathode terminal can be identified by
using a grey bar as shown in the picture above.
For 1N4007 Diode, the maximum current carrying capacity is 1A it withstand peaks up
to 30A. Hence we can use this in circuits that are designed for less than 1A. The reverse current
is 5uA which is negligible. The power dissipation of this diode is 3W.
Fig-3.13: Diode (IN4007)
3.13.1 Pin Configuration:
SL.no Pin Name Description1. Anode Current always Enters through Anode2. Cathode Current always Exits through Cathode
Fig- 3.13.1: Diode Pin Configuration
3.13.2 Features:
Average forward current is 1A
Reverse current is 5uA.
Peak repetitive Reverse voltage is 1000V
Non-repetitive Peak current is 30A
Power dissipation 3W
Available in DO-41 Package
3.13.3Applications of Diode: Can be used to prevent reverse polarity problem
Half Wave and Full Wave rectifiers
Used as a protection device
Current flow regulators
3.14 Capacitor:
A capacitor is a passive two-terminal electrical component that stores potential energy in
an electric field. The effect of a capacitor is known as capacitance. While some capacitance
exists between any two electrical conductors in proximity in a circuit, a capacitor is a component
designed to add capacitance to a circuit. The capacitor was originally known as a condenser.
The physical form and construction of practical capacitors vary widely and
many capacitor types are in common use. Most capacitors contain at least two electrical
conductors often in the form of metallic plates or surfaces separated by a dielectric medium. A
conductor may be a foil, thin film, sintered bead of metal, or an electrolyte. The non-conducting
dielectric acts to increase the capacitor's charge capacity. Materials commonly used as dielectrics
include glass, ceramic, plastic film, paper, mica, and oxide layers. Capacitors are widely used as
parts of electrical circuits in many common electrical devices. Unlike a resistor, an ideal
capacitor does not dissipate energy.
Fig-3.14: Capacitor
When two conductors experience a potential difference, for example, when a capacitor is
attached across a battery, an electric field develops across the dielectric, causing a net
positive charge to collect on one plate and net negative charge to collect on the other plate. No
current actually flows through the dielectric, however, there is a flow of charge through the
source circuit. If the condition is maintained sufficiently long, the current through the source
circuit ceases. However, if a time-varying voltage is applied across the leads of the capacitor, the
source experiences an ongoing current due to the charging and discharging cycles of the
capacitor.
4.0 SOFTWARES REQUIRED:
The two major software’s required for this project are
ARDUINO IDE
4.1 GETTING STARTED WITH ARDUINO IDE:
The Arduino Integrated Development Environment, 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.
The major applications/options in Arduino IDE are as follows:
Writing Sketches
Uploading
Libraries
Third-Party Hardware
Language Support
Boards
4.1.1 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.
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, Help. The
menus are context sensitive, which means only those items relevant to the work currently being
carried out are available.
4.1.2 Uploading:
Before uploading your sketch, you need to select the correct items from the Tools >
Board and Tools > Port menus. The boards are described below. On the Mac, the serial port is
probably something like /dev/tty.usbmodem241 (for an Uno or Mega2560 or Leonardo)
or /dev/tty.usbserial-1B1 (for a Duemilanove or earlier USB board),
or /dev/tty.USA19QW1b1P1.1 (for a serial board connected with a Keyspan USB-to-Serial
adapter). On Windows, it's probably COM1 or COM2 (for a serial board)
or COM4, COM5, COM7, or higher (for a USB board) - to find out, you look for USB serial
device in the ports section of the Windows Device Manager. On Linux, it should
be /dev/ttyACMx , /dev/ttyUSBx or similar. Once you've selected the correct serial port and
board, press the upload button in the toolbar or select the Upload item from the Sketch menu.
Current Arduino boards will reset automatically and begin the upload. With older boards (pre-
Diecimila) that lack auto-reset, you'll need to press the reset button on the board just before
starting the upload. On most boards, you'll see the RX and TX LEDs blink as the sketch is
uploaded. The Arduino Software (IDE) will display a message when the upload is complete, or
show an error.
When you upload a sketch, you're using the Arduino bootloader, a small program that has been
loaded on to the microcontroller on your board. It allows you to upload code without using any
additional hardware. The bootloader is active for a few seconds when the board resets; then it
starts whichever sketch was most recently uploaded to the microcontroller. The bootloader will
blink the on-board (pin 13) LED when it starts (i.e. when the board resets).
4.1.3 Libraries:
Libraries provide extra functionality for use in sketches, e.g. working with hardware or
manipulating data. To use a library in a sketch, select it from the Sketch > Import Library menu.
This will insert one or more #include statements at the top of the sketch and compile the library
with your sketch. Because libraries are uploaded to the board with your sketch, they increase the
amount of space it takes up. If a sketch no longer needs a library, simply delete
its #includestatements from the top of your code.
There is a list of libraries in the reference. Some libraries are included with the Arduino
software. Others can be downloaded from a variety of sources or through the Library Manager.
Starting with version 1.0.5 of the IDE, you do can import a library from a zip file and use it in an
open sketch. See these instructions for installing a third-party library.
4.1.4 Third-Party Hardware:
Support for third-party hardware can be added to the hardware directory of your sketchbook
directory. Platforms installed there may include board definitions (which appear in the board
menu), core libraries, bootloaders, and programmer definitions. To install, create
the hardware directory, then unzip the third-party platform into its own sub-directory. (Don't use
"arduino" as the sub-directory name or you'll override the built-in Arduino platform.) To
uninstall, simply delete its directory.
For details on creating packages for third-party hardware, see the Arduino IDE 1.5 3rd party
Hardware specification.
4.1.5 Language Support:
Fig-4.1.5: Language Support
Since version 1.0.1, the Arduino Software (IDE) has been translated into 30+ different
languages. By default, the IDE loads in the language selected by your operating system. (Note:
on Windows and possibly Linux, this is determined by the locale setting which controls currency
and date formats, not by the language the operating system is displayed in.)
If you would like to change the language manually, start the Arduino Software (IDE) and
open the Preferences window. Next to the Editor Language there is a dropdown menu of
currently supported languages. Select your preferred language from the menu, and restart the
software to use the selected language. If your operating system language is not supported, the
Arduino Software (IDE) will default to English.
You can return the software to its default setting of selecting its language based on your
operating system by selecting System Default from the Editor Language drop-down. This setting
will take effect when you restart the Arduino Software (IDE). Similarly, after changing your
operating system's settings, you must restart the Arduino Software (IDE) to update it to the new
default language.
4.1.6 Boards:
The board selection has two effects: it sets the parameters (e.g. CPU speed and baud rate)
used when compiling and uploading sketches; and sets and the file and fuse settings used by the
burn bootloader command. Some of the board definitions differ only in the latter, so even if
you've been uploading successfully with a particular selection you'll want to check it before
burning the bootloader. You can find a comparison table between the various boards here.
Arduino Software (IDE) includes the built in support for the boards in the following list,
all based on the AVR Core. The Boards Manager included in the standard installation allows to
add support for the growing number of new boards based on different cores like Arduino Due,
Arduino Zero, Edison, Galileo and so on.
Arduino Yùn :
An ATmega32u4 running at 16 MHz with auto-reset, 12 Analog In, 20 Digital I/O and 7 PWM.
Arduino/Genuino Uno:
An ATmega328P running at 16 MHz with auto-reset, 6 Analog In, 14 Digital I/O and 6 PWM.
ArduinoDiecimila or Duemilanove w/ ATmega168:
An ATmega168 running at 16 MHz with auto-reset.
Arduino Nano w/ ATmega328P:
An ATmega328P running at 16 MHz with auto-reset. Has eight analog inputs.
Arduino/Genuino Mega 2560:
An ATmega2560 running at 16 MHz with auto-reset, 16 Analog In, 54 Digital I/O and 15 PWM.
Arduino Mega:
An ATmega1280 running at 16 MHz with auto-reset, 16 Analog In, 54 Digital I/O and 15 PWM.
ArduinoMega ADK:
An ATmega2560 running at 16 MHz with auto-reset, 16 Analog In, 54 Digital I/O and 15 PWM.
Arduino Leonardo:
An ATmega32u4 running at 16 MHz with auto-reset, 12 Analog In, 20 Digital I/O and 7 PWM.
Arduino/Genuino Micro:
An ATmega32u4 running at 16 MHz with auto-reset, 12 Analog In, 20 Digital I/O and 7 PWM.
Arduino Esplora:
An ATmega32u4 running at 16 MHz with auto-reset.
Arduino Mini w/ ATmega328P:
An ATmega328P running at 16 MHz with auto-reset, 8 Analog In, 14 Digital I/O and 6 PWM.
Arduino Ethernet:
Equivalent to Arduino UNO with an Ethernet shield: An ATmega328P running at 16 MHz with
auto-reset, 6 Analog In, 14 Digital I/O and 6 PWM.
Arduino Fio:
An ATmega328P running at 8 MHz with auto-reset. Equivalent to Arduino Pro or Pro Mini
(3.3V, 8 MHz) w/ ATmega328P, 6 Analog In, 14 Digital I/O and 6 PWM.
Arduino BT w/ ATmega328P:
ATmega328P running at 16 MHz. The bootloader burned (4 KB) includes codes to initialize the
on-board bluetooth module, 6 Analog In, 14 Digital I/O and 6 PWM..
LilyPad Arduino USB:
An ATmega32u4 running at 8 MHz with auto-reset, 4 Analog In, 9 Digital I/O and 4 PWM
5.0 RESULTS AND CONCLUSION :
An LCD is also used for displaying status and messages. Control pins of LCD, RS and EN are
connected to pin 4 and 5 of Arduino and data pins of LCD D4-D7 are directly connected at pin
6, 7, 8 and 9 of Arduino. LCD is used in 4-bit mode and driven by Arduino’s inbuilt LCD
library.
Below is the circuit diagram of this Irrigation System with Arduino and soil moisture
sensor:
If moisture is present in soil then there is conduction between the two
probes of Soil Moisture sensor and due to this conduction, sensor output pin Do
is in on state and Arduino Pin A0 remains Low. When Arduino reads LOW
signal at A0, then it sends SMS to user about “Soil Moisture is Normal. Motor
turned OFF” and water pump remains in off state.
Now if there is no Moisture in soil then sensor output pin D0 becomes high
and Pin A0 of Arduino becomes high. Then Arduino reads the Pin A0 and turns
On the water motor and also sends message to user about “Low Soil Moisture
detected. Motor turned ON”. Motor will automatically turn off when there is
sufficient moisture in the soil.
SOURCE CODE
Code for this program is easily understandable. First of all we have
included SoftwareSerial library to make pin 2 and 3 as Rx & Tx and also
included LiquidCrystal for LCD. Then we defined some variables for motor, soil moisture
sensor, LED etc.
Code:
#include<LiquidCrystal.h>
LiquidCrystal lcd (4,5,6,7,8,9);
#include<Software Serial .h>
Software Serial gsm (2,3); //TX,RX
#define led pin 11
#define motor pin 10
Int sensor pin = A0;
int sensor value;
void setup()
Lcd . begin(16,2);
gsm .begin(9600);
Serial .begin(9600);
Pin Mode (led pin, OUTPUT);
Pin Mode (motor pin, OUTPUT);
Pin Mode (sensor pin, INPUT);
lcd.print ("BAPATLA POLYTECHNIC");
Delay (5000);
lcd.set Cursor (0,0);
lcd. Println ("AUTOMATIC IRRIGATION SYSTEM");
delay (5000);
lcd .clear ();
lcd.println("SYSTEM READY");
delay(5000);
void loop()
Lcd .clear();
lcd.setCursor(0,0);
lcd.println("AUTOMATIC MODE");
delay(1000);
sensor_value = analogRead(sensor_pin);
sensor_value = map(sensor_value,550,0,0,100);
if(sensor_value < 10)
digitalWrite(led_pin, HIGH);
digitalWrite(motor_pin, HIGH);
lcd.clear();
lcd.setCursor(0,0);
lcd.println("Motor ON ");
delay(1000);
//lcd.print("Sending SMS");
gsm.println("AT+CMGF=1");
delay(1000);
gsm.println("AT+CMGS=\"+919121957508\"\r"); //replace x by your
number
delay(1000);
gsm.print("Low Soil Moisture detected. Motor turned ON");
delay(1000);
gsm.println((char)26);
delay(1000);
if(sensor_value > 10)
digitalWrite(led_pin, LOW);
digitalWrite(motor_pin, LOW);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Motor OFF");
delay(1000);
//lcd.print("Sending SMS");
gsm.println("AT+CMGF=1");
delay(1000);
gsm.println("AT+CMGS=\"+919121957508\"\r"); //replace x by your
number
delay(1000);
gsm.print("Soil Moisture normal. Motor turned OFF");
delay(1000);
gsm.println((char)26);
delay(1000);