- Open Access
- Total Downloads : 226
- Authors : Olbe Tesfaye Yacob, Prof. Jiang Dening, Tirunh Embiale Merkebu
- Paper ID : IJERTV2IS120600
- Volume & Issue : Volume 02, Issue 12 (December 2013)
- Published (First Online): 16-12-2013
- ISSN (Online) : 2278-0181
- Publisher Name : IJERT
- License: This work is licensed under a Creative Commons Attribution 4.0 International License
Integrated Plant watering system
Olbe Tesfaye Yacob
First author
Prof. Jiang Dening
Second author
Tirunh Embiale Merkebu
Third author
Tianjin University of Technology and Education (TUTE), School of Electronics Engineering
Abstract 1 Introduction
The aim of this research is to design and implement Integrated Plant Watering System (IPWS) using wireless sensor network, Global System for Mobile communication (GSM) and microcontroller based technology. This system uses to deliver a targeted amount of water directly to the plant automatically in such a way that plant is watered gently and evenly preventing too much precious water from unwanted wastage and fills water in to water reservoir when its level is lower than it is needed and to send message to the owner concerning the vital information about the system activities.
In this project, the designed system is made up of sensors, microprocessor, GSM modem and relays with control circuitry that integrate the system to have an intended application. A systematic working approach that included literature study together with varieties of phases such as design, experimental, development of prototype and testing are being illustrated in this report. This project will fulfill shortage of a cheap and portable yet module based IPWS to arouse the importance of plant to our future generation where alone conversation is not enough. Moreover, soil and plants are watered by automatic controlled system according to soil moisture content by adjusting circuits which are used depending on kinds of plants.
By knowing a decisive influence of plants for maintaining the big deal of these days climate change which is caused by declination of plants on the earth and to make our lives more convenient and easy by having the advantages of recent advances in flexible electronics I have decided to design reliable system which can be even efficiently used by people who are living in urban & rural area. The IPWS helps not only for watering plants which senses the soil moisture and switches water delivering valve but also senses water level in the water reservoir and switches water pump motor automatically when its level is lower than it is needed. Properly installed, maintain and managed system can be implemented in large fields like public gardens, lawns, golf fields etc.
Generally, this project provides exposure to the following technologies: (i) Microcontroller.
(ii) Embedded C programming for microcontroller & Microsoft visual basic for PC interface. (iii) GSM modem. (iv) Design of Printed Circuit Board (PCB).
-
Soil moisture sensor, water level sensor & temperature sensor. (6) Sensor fusion.
2 Objectives
There are some objectives need to be achieved in order to accomplish this project. These objectives will act as a guide and will restrict the system to be
implemented for certain situations:
-
To design & develop integrated plant watering system.
-
To use GSM as a medium to send the message to the owner.
-
To develop the system that work automatically. (iv)To use C language for developing program and system optimization.
Figure 1 Block diagram of the system
-
Research methods
Integrated Plant Watering System has the following main approaches. These are:
Sensors to sense and provide signals to the microprocessor.
Microprocessor to interface between inputs from sensors and outputs to relays which govern inlet valve to water plants & water pump motor to refill water reservoir, Buzzer to give alarm sound as it is programmed, GSM modem to use it as a medium to send the message to owner, LCD uses as common message display device to display ASCII character
& LED to indicate that the intended circuit is in norm condition or it is conducting.
Designing electronic circuit this approach helps to have hardware for the given system and exposes to use different circuit designer software.
Software developing this approach helps to program the system to have an intended real time application. The following block diagram shows the overall flow chart of the intended system.
Figure 2 Project approach flow
-
Embedded systems design
-
What is Embedded System?
This field of designing application specific computer systems is called embedded systems development. If the response of the computer system need to be real time and highly reliable then it's called Real Time Embedded System. To define in a sentence, Embedded Systems is a special purpose computer system/board, which encapsulates all the devices such as processor, memory, interface and control in single package or
board to perform only a specific application tasks.
4.1 Hardware system
Embedded systems for real-time applications are implemented as mixed software-hardware systems. Generally, software is used for features and flexibility, while hardware is used for performance.
The hardware design and its implementation for this system & its components will be discussed in the subsequent sections.
(i)Microcontroller PIC18F4520 (ii)TC35 GSM Modem (iii)Power Supply circuit
-
1602 LCD Display
-
Buzzer
-
Indicator LEDs (vii)Water Level Sensor (viii)Soil Moisture Sensor (ix)Temperature Sensor
-
Relays
-
ICD2 Connector Circuit
-
RS-232 Serial Communication Interface
-
Microcontroller Circuit (PIC18f4520)
Microchip PIC18F4520 microcontroller was chosen for this project due the high computation capabilities with relative low cost. This 40 pins 8- bits microcontroller comes with 5 PORTs and able to operate at the speed of up to 40MHz with high temperature endurances.
Figure 3 PIC18F4520 pins diagram
-
TC35 GSM Modem
GSM modem has a variety of value added services such as voice mail, call handling facilities, and SMS messages.
(i) Support 900/ 1800/ 1900 MHz GSM Tri band. (ii)Uses AT Command Set.
-
SIM card holder/socket ready.
-
Ready with SMA antenna for better signal reception and transmission
-
SMS (text) and voice communication is ready.
-
Single board solution.
-
Power with 7-15VDC.
-
Ready with UART (2.65V TTL) & RS232 (COM Port) serial interface.
-
Serial Interface, Baud rate: 9600bps, 8-1-N
-
5 LED act as indicator with different modes.
Figure 4 Siemens TC35 GSM modem
-
-
Power supply circuit
PIC18F4520 microcontroller operates from the voltage range of 2.0V to 5.5V. With the use of 9V DC battery, we require a 5V voltage regulator, LM7805. In order for the microcontroller to operate, the LM7805 step-down the voltage from 9V to 5V. LM7805 is capable of handling input voltage ranging from 5V to 18V and output voltage ranging from 4.8V to 5.2V.
A diode here is used to protect the power supply circuit if the battery or power source polarity is connected reversely. The diode does not allow current to flow as it only allows electric current to flow in one direction only and blocks the flow in the opposite direction.
Figure 5 power supply circuit diagram
-
1602 LCD Display
1602 LCD display is used to display the amount of temperature around the plant. To do so, one LM35 temperature sensors are used. The LCD is a 2 line 16 character displays so it will display the temperature of the srrounding on the upper line (line 1) and HELLO SIR, HIGH TEMP. IS REGISTERED
message on the lower line (line 2). Thus, the user can know the temperature of the surrounding the plant easily & take his own measure to overcome it.
R1 5.6k
HW
R4
1k
D1
C2
1µF
R6
VCC
12V
Key = Space Q1 R2
1N4004
1k Q4
R7
10k
LW
2N2222
R5 10k
Q3 10k
2N2222
2N2904
Key = Space
R3 10k
Q2
2N2222
R8 5.6k
R10
1k
D2 K1
1N4004
K
EMR161A08
Water Level Sensor
Figure 6 Schematic of 1602 LCD Display
-
LED and Buzzer with P18f4520
Two LEDs and a Buzzer are used as further indicating unit for the system. When water pump motor is running GREEN LED1 becomes ON and the buzzer beeps once. And when the water delivering vale is operating the GREEN LED2 becomes ON and the Buzzer beeps two times.
Figure 7 LED and Buzzer schematic
Figure 8 Schematic of Water Level Sensor
4.1.7 Soil Level Sensor
Here the principle of operation is somewhat similar with water level sensor does but it has different switching mechanism. When top soil & bottom soil are dry, the bases of Q1 & Q2 have no voltage, thus, collector of Q1 will have high voltage. This high voltage will transfer through D1 to base of Q3 and make Q3 and Q4 conduct current, GREEN LED2 becomes ON, relay works and water delivering valve is working. When watering plant starts from top soil, & it gets wet, thus, causes Q2 conduct current, shorts the collector of Q2 to ground while Q3 and Q4 still works and water delivering is working. Water pump is continuously working till water reaches bottom level, Q1 conduct current to short at the base of Q1 to ground thus, Q3 and Q4 will stop conducting current, GREEN LED2 becomes OFF and relay does not work and so water delivering is stop working too.
-
Water Level Sensor
R1 5.6k
TS
Key = Space
R4
1k
D1 1N4004
R5 10k
C2
1µF
R6
1k Q4
R7
VCC
12V
When water level is less than the low level of the tank, Q1 and Q2 will not work at the beginning stage
because the bases of Q1 and Q2 have no voltage,
BS
Key = Space
R2
10k
R3 10k
Q1
Q2
2N2222
Q3 10k
2N2222
R8 5.6k
2N2904
R10
1k
K2
D2
1N4004 K
2N2222
collector of Q1 will have high voltage. This high voltage will transfer through D1 to base of Q3 and make Q3 and Q4 conduct current, GREEN LED1 becomes ON, relay works and the pump is working. Water level will flow pass Low and causes Q1 conduct current, shorts the collector of Q1 to ground while Q3 and Q4 still works and water pump is working. Water pump is continuously working till
Soil Moisture Sensor
Figure 9 Soil Moisture Sensor
-
Relays
EMR161A08
water reaches H level, Q2 conduct current to short at the base of Q2 to ground thus, Q3 and Q4 will stop conducting current, GREEN LED1 becomes OFF and relay does not work and so water pump is stop working too.
A relay is a simple electromechanical switch made up of an electromagnet and a set of contacts.
Current flow through the coil of the relay creates a magnetic field which attracts a lever & changes the switch contacts. In this project relays use to
activate and deactivate depending on the states of water level sensor and soil moisture sensor.
Figure 10 Schematic of Relays1 & Relays2
-
Temperature Sensor
A temperature sensor is a device that collects data concerning the temperature from a source and converts it to a form that can be understood either by an observer or another device.
LM35 temperature sensor is an analogue sensor which generates an analogue signal that is directly proportional to temperature when temperature of the surrounding varies.
Figure 11 LM35 Temperature sensor circuit
-
RS232 Serial Communication Interface
A Max232 serial interface driver IC from Maxim is used to enable RS232 Serial Communication Interface between the microcontroller and the GSM modem. Through this serial communication interface, microcontroller is able to send a SMS (text) message to the owner.
Figure 12 Schematic of RS232
-
ICD2 Connector Circuit
The ICD connector is connected to the MPLAB ICD 2 debugger using RJ11 cable for communication between microcontroller and computer. A thing to take note before connecting the RJ11 jack connector on the board is that MPLAB ICD2 RJ11 Jack pin out and the modular connection pin are not in sequence.
Figure 13 RJ11 and ICD2 connection circuit
4.2 Software Development
The software programming for the PIC18F4520 microcontroller is C-program and will be compiled using C18 compiler of the MPLAB Integrated Development Environment. This software provides a single integrated environment to develop codes for embedded microcontrollers.
-
MPLAB Integrated Development Environment (IDE)
MPLAB Integrated Development Environment (IDE) is a free, integrated toolset for the development of embedded applications employing Microchip's PIC microcontrollers. It is easy to use and includes a host of free software components for fast application development and super-charged debugging. MPLAB support both Assembly Language and C programming languages, others language may be supported through the use of third party programs.
-
Process flow
The picture below shows the process flow diagram of the whole system.
Start
Initialization of microcontroller ports & LCD display
If Top & Bottom soils get wet
Motor & GSM testing
Motor & GSM testing
Check all sensors
Relays2 becomes OFF thus, delivering vale becomes OFF
If water gets below Low level of reservoir
If the temperature exceed threshold
Send SMS Sir, temperature is high
Send SMS Sir, temperature is high
Relay1 becomes ON thus, water pump motor also ON & send SMS to the owner water pump is working
If water gets above High level of reservoir
If the temperature below threshold
Send SMS Sir, temperature is low
Send SMS Sir, temperature is low
Relay1 becomes OFF thus, water pump motor also OFF
If Top & Bottom soils get dry
End
Relays2 becomes ON thus, delivering valve becomes ON & send SMS to the owner water delivering valve is working
Figure 14 Process flow of the program
-
Software Algorithm
#pragma config WDT=OFF, LVP=OFF, DEBUG=ON, MCLRE = OFF
#pragma config OSC=HS
#define _XTAL_FREQ 20000000
#include <p18F4520.h>
#include <delays.h>
#include <stdio.h>
#include <string.h>
#include <usart.h>
#include <stdlib.h>
//========define IO port=======
//========MAIN=============
void main(void)
{
ADCON1= 0b00111101; // Configure RA2 & RA5 as digital I/O
ADCON2= 0b10110100; // Set result right justified, manual acquisition time, Fosc/4 TRISA=0b11011011; // Configure PORTA I/O direction (RA2 & RA5 as digital input) TRISD=0b00000000; // Configure PORTD as output
TRISB= 0b01000000; // Configure PORTB I/O direction (RB6 as input) TRISE= 0b00000000; // Configure PORTE as output
// Configuration of Modem
TRISC= 0b10001111; // RC7 (Rx) as input, RC6 (Tx)-RC0 as output SPBRG=25; // baud rate of 9600
TXSTA= 0b00100100; // asynchronous mode , 8-bite data
// transmit enable, high baud rate select bit RCSTA=0b10010000; // Serial port enable, 8 bit data & Continuous reception POTA= 0; // initial value of PORTA is zero
PORTB= 0; // initial value of PORTB is zero PORTC= 0; // initial value of PORTC is zero PORTD= 0; // initial value of PORTD is zero
Figure15: Initialization of port and modem
-
Conclusion
The system provides with several benefits and can operate automatically. The system supplies water only when the moisture in the soil goes below the reference & refill the water reservoir when it gets less than its low level. The system runs smoothly by implementing C programming in the system. It will also trigger the GSM modem to send SMS message to the owner and it has the ability to display the temperature of the
-
References
-
Embedded Systems Architecture
A Comprehensive Guide for Engineers and Programmers ByTammy Noergaard Copyright © 2005, Elsevier Inc. All rights reserved.
- [2] The microcontroller idea book 1997 by Jan Axelson
-
Daniel K. Fisher and Hirut Kebede ,a low-cost microcontroller-based system to monitor crop temperature and water status, computers and electronics in agriculture, Elsevier B.V, 2010
-
Yan Xijun, Lu limei, Xu Lizhong, The Application of wireless sensor network in the Irrigation Area Automatic System, International Conference on Networks Security, Wireless Communications and Trusted Computing, 2009:34:21-24.
-
Wenbin Huang, Guanglong Wang, Jianglei Lu, Fengqi Gao, Jianhui Chen Research of wireless sensor networks for an intelligent measurement system based on ARM, International conference on Mechatronics and Automation, 2011:32: 1074 – 1079.
-
K.Balasubramanian, "Microprocessor based process control system", J. Instru. Soc. of India, Vol 17, No 2, 1987, pp I51
-
K.Balasubramanian and A.Cellatoglu, Analysis of Remote Control Techniques Employed in Home Automation and Security Systems, IEEE Trans. on Cons. Electronics, Vol 55 , No 3, Aug 2009, pp 1401
-
Dukes, Michael D.,Cardenas- Lailhacar, Bernardo,and Miller, Grady L.2005.Residential Irrigation Based on Soil Moisture. Resources, June/July 2005, 4-6.
-
Chen Peijiang, Jiang Xuehua, Design and Implementation of Remote Monitoring System Based on GSM, Pacific-Asia Workshop on Computational Intelligence and Industrial Application, 2008:26:678.
-
http://www.microchip.com/ [11]https://www.sparkfun.com [12]. tutorial.cytron.com [13]http://www.wisegeek.com/ [14]http://s.taobao.com/search
surrounding on the LCD. Besides these, it has helped me to improve my hardware design, software design, programming and planning skills.