05524329

download 05524329

of 6

Transcript of 05524329

  • 8/4/2019 05524329

    1/6

    Automatic Irrigation System Based on Wireless Network

    Genghuang Yang, Yuliang Liu, Li Zhao, Shigang Cui, Qingguo Meng and Hongda Chen

    AbstractConsidering the characteristic of irrigation in the

    rural area of China, this paper brings forward new devices

    based on wireless network, that are GSM (Global System

    Mobile) network and radio communication. Three levels are

    included in the system: the PC control platform or common cell

    phone for surveillance, the controller and the action unit.

    Simple GSM modules are available in the PC control platform

    and the controller. Orders can be sent from the PC control

    platform or cell phone to the controller and the information

    such as temperature, soil moisture and air humidity sampled by

    the controller can also be sent to the PC platform or cell phone

    by GSM message. Emitter and receiver of short-wave radio are

    embedded in the controller and the action unit respectively.

    Radio communication works between the controller and theaction units. Database of spot information sampled can be

    analyzed and browsed by friendly interface in PC. The devices

    have been installed in some farms of Mentougou district in

    Beijing, capital of China, and Xinjiang, northwest of China.

    I. INTRODUCTIONITH the development of technology in water saving

    irrigation and automation, automatic irrigation is more

    popular in farms in China. Most of the technology and device

    comes from other countries such as Israel or America. They

    are too expensive to come into common farmers. Always it is

    difficult for the farmers to operate. The foreign technology

    and devices are only used in farms for experiment ordemonstration by fund of government. Less cost and simple

    operation are principles to develop new devices for common

    farmers in China.

    There are some characteristics in automatic irrigation.

    Firstly, the area to irrigate maybe covers several hundreds of

    hectares [1][2]. Secondly, the points to irrigate and sample by

    sensors spread around [3]. The parameters to sample include

    temperature, soil moisture and air humidity. Thirdly, farming

    keeps close to soil and wire is difficult to lay out [4]. Fourthly,

    the bad conditions such as high temperature by sunlight and

    high moisture by drench form the difficulties for devices to

    run for a long time. The last factor is that a majority of the

    farmers in China are illiterate and have only little ability for

    operation and maintenance.

    Manuscript received October 29, 2009. This work is supported by

    National High-tech R&D Program (863 Program), 2007AA04Z254,

    2006AA03Z0418, Tianjin Binhai New Areas Construction Science and

    Technology Action Planning Project Supported by Chinese Academy of

    Sciences, TJZX2-YW-06, the key project of Tianjin Science and Technology

    Planning, 08ZCKFSF03400 and China Postdoctoral Science Foundation,

    20090460501.

    Genghuang Yang is with the Tianjin Key Laboratory of InformationSensing & Intelligent Control in Tianjin University of Technology and

    Education, Tianjin, 300222 P.R.C (phone and fax: +862288181115; e-mail:

    [email protected]).

    Yuliang Liu is with Tianjin University of Technology and Education,

    Tianjin, 300222 P.R.C ([email protected])

    ,Li Zhao is with Tianjin University of Technology and Education, Tianjin,

    300222 P.R.C([email protected])

    Shigang Cui is with Tianjin University of Technology and Education,

    Tianjin, 300222 P.R.C([email protected])

    Qingguo Meng is with Tianjin University of Technology and Education,

    Tianjin, 300222 P.R.C([email protected])

    Hongda Chen is with the Semiconductor Institute of CAS, Beijing,

    100083, P.R.C([email protected])

    From above description, credible communication is the

    most important. Wireless communication avoids laying wires

    in the soil and is obviously the best way for data transmission.

    There are three levels in the devices: the PC controlplatform [5] or cell phone for surveillance, the controller and

    the action unit [6][7]. GSM network is the 2nd generation

    mobile communication platform. It is credible to transmit

    data by GSM network [8]. Once GSM module is embedded in

    device or connected to PC peripheral interface,

    communication between the PC control platform or cell

    phone and the controller can be easily achieved. Short-wave

    radio can reach 1-4 kilometers with low power supply. The

    controller with an emitter sends signal to the action units with

    receivers by radio.

    II.

    PROCEDURE FORPAPERSUBMISSIONAs the area to irrigate is different from each other, the

    devices should be extensible. Even part of the devices can also

    work. For a medium scale of several hundreds of hectares,

    three levels are included as figure 1 shows.

    PC contro l platform

    Controller Controller

    Action unit Action unit Action unit

    Cell phone

    Fig.1 Frame of devices in scheme

    The first level includes the PC control platform and cell

    phone. The controllers are in the second level. The

    microprocessor runs in the controller as a core [9]. The

    bottom level is made up of the action units. The controller

    W

    2010 8th IEEE International Conference on

    Control and Automation

    Xiamen, China, June 9-11, 2010

    FrD2.6

    978-1-4244-5196-8/10/$26.00 2010 IEEE 2120

  • 8/4/2019 05524329

    2/6

    decodes the orders from cell phone or the PC control platform

    by GSM message and encodes again to send to the action

    units by radio communication. One cell phone or PC can

    communicate with hundreds of controllers and one controller

    can control 1 to 255 action units.

    A. Orders for cell phone or PC control platformCell phone and the PC control platform are two ways to edit

    order before sending to the controllers. Cell phone is popular

    in China and almost everybody can edit and send GSM

    message. For PC, the order is stored as a database file. Some

    simple clicks of mouse can complete the operation.

    A fixed format is applied to make the controller decode the

    order easily.

    1 2 3 4 5 6 7 8 9 n-1 n

    Password Type of order Content of order End

    Fig.2 Format of order

    As fig.2 shows, checking password avoids disturb from cellphones without authorization. Type of order labels the order

    and content of order means the detail operation. At the end of

    every order, a symbol denotes the end of this order. Only

    Chinese characters, number and punctuations are used in the

    order.

    The orders can be divided into two types: one is preset

    irrigation plan and the other is instant order. The preset plan is

    stored in the controller. Once activated, the controller makes

    decision of when and where to irrigate by preset plan. For the

    different habits of farmers, there are two ways to denote time:

    date and weekday. The following shows the detail of the

    orders. Two preset plan include:

    Preset plan I: preset the interval days to irrigate,

    Preset plan II: preset the weekday to irrigate.

    The preset plan include:

    Valve ID: which valve to open,

    Time (hour : minute): when to open,

    Minutes: how long to keep valve open.

    The instant orders include:

    Halt preset plan: closes all the valves opened by preset plan

    and inactivates the plan,

    Activate preset order: activates or reactivates the preset

    plan and the controller runs by the plan,

    Run preset plan instantly: opens the valves involved in the

    preset plan instantly, always for testing,Delete preset order: closes all the valves involved in the

    preset plan, and then sets the plan as blank,

    Open valve: opens the valve set in the content of order,

    Close valve: closes the valve set in the content of order,

    Close all valves: closes all the valves,

    Set sensor: sets the thresholds of parameter such as soil

    moisture and valve IDs to open or close, so as to form the

    feedback to keep the parameter between the thresholds,

    Activate feedback: enables the controller to run in feedback,

    Inactivate feedback: disables the controller to run in

    feedback,

    Set prefix: sets the prefix of address, see latter chapter,

    Renew password: changes the password,

    Set time: sets time in the format of year, month, date,

    weekday, hour, minute and second,

    Check valve: when this order is received by the controller, thestatus of valves, open or close, will be transmitted to cell

    phone or PC,

    Check sensor: when this order is received by the controller,

    the values of parameters sampled by sensors will be

    transmitted to cell phone or PC.

    As the GSM message has length limit, 70 unicodes in China,

    one order always exceeds the length. One order is divided

    into several messages. It is necessary to add the current

    section of an order to the last section. An order to combine

    GSM messages is available.

    B.

    Information management on PC control platformAlthough cell phone can browse the data sampled by

    controllers, the information is rough and dispersed. If the area

    to irrigate is more than one hundred hectares, too much data

    results in difficulty to manage the information. Data

    processing by PC helps to resolve this problem.

    Information management is made up of classification of

    data and analysis of data. Data sampled by different sensors at

    different time and different points needs to be classified and

    stored as history data. Tab I describes the detail. Statistics is

    adopted to analyze the history data. When crop data are added

    together with sensor data, function between environmental

    parameters and crop, especially soil moisture and crop, will be

    gained. New layout of sensors and irrigation plan can also be

    redesigned. With simple and friendly interface, farmers can

    browse the information in CRT after data classification and

    analysis.

    TABLEI

    STATISTICS OF DATA SAMPLED BY CONTROLLER

    Point X

    Aug.1, 2005 Temperature Soil moisture Air humidity

    8:00 31 48 55

    10:00 33 49 50

    12:00 34 48 50

    FrD2.6

    2121

  • 8/4/2019 05524329

    3/6

    C. Controller and sensorsDS1302 GSM module

    MSP430F149

    Sensor interfaces

    24LC26

    Radio emitter

    module

    Fig.3 Structure of the controller

    Texas Instruments (TI) MSP430F149 is adopted to be the

    microprocessor [10]. The characteristic of this chip is listed as

    following: 3.3V power supply and 5 power saving modes,

    60Kbyte flash EEPROM, 2Kbyte SRAM, 8 channel 12 bits

    AD converters, 2 programmable USARTs and two 16-bit

    timers. The structure is as Fig.3 shows.

    DALLAS DS1302 [11] is the real-time clock. It

    communicates with MSP430F149 with a three-wire serial

    interface and supplied from board or by backup battery.

    Q24plus GSM module is used in this application which is

    produced by Wavecom Co. ltd.. MP-406 produced by

    ZhongTian sensor Co. ltd is adopted to be the soil moisture

    sensor. Temperature sensor and air humidity sensor are

    produced in China Agricultural University. GSM module is

    connected to MSP430F149 by RS-232 interface in TTL. The

    soil moisture sensors output signal is voltage between 0 to1.12V or current between 0 to 20mA. The temperature

    sensors output signal is voltage between 0 to 5V and the air

    humidity sensors output is voltage between 0 to 1V.

    Connected to the 8 channel 10 bits AD converters, 8 analog

    input modules with different scope for different signals are

    formed to be the interfaces for sensors. MICROCHIP 24LC64

    acts as the accessional EEPROM to store data. MSP430f149

    reads or writes 24LC64 by I2C interface. Radio emitter

    module is connected to MSP430F149 by only 2 I/O wires, one

    for chip selection and the other for pulse control. Solar battery

    supplies the power for the controller. When MSP430F149 is

    free, it will get into sleep mode to save power.

    As only the typical data is available in the converting data

    table for sensors. Tab II shows the typical data of mineral soil

    moisture sensor MP-406 in this application.

    TABLEII

    CONVERTING DATA TABLE FORMP-406

    VSW%Voltage

    (mV)

    Current

    (mA)VSW%

    Voltage

    (mV)

    Current

    (mA)

    -5.00 0.0 4.00 55.00 1015 18.50

    0.00 120 5.71 60.00 1025 18.64

    5.00 210 6.99 65.00 1035 14.785

    10.00 310 8.43 70.00 1045 18.93

    15.00 415 9.93 75.00 1055 19.07

    20.00 510 11.285 80.00 1065 19.21

    25.00 610 12.71 85.00 1070 19.28

    30.00 720 14.285 90.00 1080 19.43

    35.00 825 15.785 95.00 1095 19.64

    40.00 895 16.785 100.00 1120 20.00

    45.00 955 17.64 105.00 2090

    50.00 1005 18.35

    When the wire connected to sensor is longer than 50m,

    voltage to current converter should be added and current

    column is used to compute the VSW%, otherwise the

    converter is unnecessary and voltage column is used directly.

    The result of AD conversion can be computed to VSW%.

    As the types of soil are different from each other, adding of +2,

    -2, +3, -3 can amend the difference. The voltage or current are

    frequently not exactly the typical data, linear interpolation is

    used to compute the VSW%.

    Example: if the voltage measured is 782mV, then the

    VSW% is:

    30.00+(782-720)*(35.00-30.00)/(825-720)=32.95.

    The computing for temperature sensor, air humidity sensor

    is the same as the above.

    D. Action unit

    The action unit is used to open or close valve of nozzle and

    switch of pump. Corresponding to the radio emitter in the

    controller, radio receiver is embedded in the action unit to

    form the communication between the controller and the action

    unit.

    There are two kinds of action unit in use. One is without

    microprocessor and the other has a simple microprocessor. Fig.

    4 (a) shows the structure of the action unit without

    microprocessor. Fig. 4 (b) shows the structure of the action

    unit with microprocessor.

    FrD2.6

    2122

  • 8/4/2019 05524329

    4/6

    Power saving

    module

    Relay IRadio receiver

    module

    Solar battery

    Relay II

    Relay III

    Relay IV

    (a)

    MSP430F149

    Relay IRadio receiver

    module

    Solar battery

    Relay II

    Relay III

    Relay IV

    (b)

    Fig.4 Structure of the action unit

    As the action units are much more than the controllers, solar

    battery costs the most. Power saving by intermittent power

    supply can reduce the capability of battery so as to reduce the

    cost. When the pulse generated by 555 is low, the solar battery

    supplies power to radio receiver module, otherwise power

    supply interrupts. In one cycle, the time for low pulse is 1s and

    the time for high pulse is 5s.

    The improvement of the action unit includes the

    microprocessor. As fig. 4 (b) shows, another MSP430F149 is

    used to control the valves reliably. The microprocessor costs

    little power which has the same function as power saving

    module shown in fig. 4 (a).

    The above two kinds of action unit are both used in

    irrigation.

    III. COMMUNICATION MODULES AND OPERATIONA. GSM module

    Cell phone or the PC control platform communicates with

    the controllers by GSM network. Before the GSM module

    transmits a message, it encodes the Chinese characters,

    number and punctuations to unicodes. After the GSM module

    receives a message, it decodes the unicodes. As number and

    punctuation have two types of Unicode, Chinese and English,

    the design in software should include two types.

    Once the GSM module checks the change of voltage on the

    RS-232 interface, it will send a message to cell phone or

    another GSM module. When the GSM module receives a

    message, it will send the data stream to RS-232 interface and

    then desert the message. As the module doesnt have backup

    of the received message, the controller should receive data

    immediately by interrupt handling. The GSM module can

    remember the latest phone number of cell phone or module.

    In the next communication, the module will automatically

    send the message to the very cell phone or module.

    B. Radio communication and operation of action unitThe controller communicates with the action units by radio.

    A radio emitter is embedded in the controller and a receiver is

    embedded in the action unit. The radio emitter and receiver

    work at 433MHz. With the 6V power supply, the receivers at a

    distance of 2Km from the emitter can touch the radio without

    barrier between them. When the emitter works, the maximal

    peak value of current is 1A. The emitter can work 7 seconds

    continuously because of high-power and high-heat.

    Some device guards against theft also run by radio

    communication. Special coding prevents the action unit fromdisturb. Fig.5 describes the format of coding.

    128 pulses 20 bits 4 bits

    Synchronization Addressing Operation

    Fig.5 Format of coding in radio communication

    Each bit is made up of 16 pulses. 12 high pulses plus 4 low

    pulses denotes bit 1 and 4 high pulses plus 12 low pulses

    denotes bit 0 as Fig.6 shows.

    12 pulses 4 pulses Bit 1

    4 pulses 12 pulses Bit 0

    Fig.6 Denotation of bit

    The width of a pulse is 90us and a bit is 1.44ms. Coding of

    synchronization is made up of 128 pulses: 4 high pulses plus

    124 low pulses.

    Coding of address includes:

    Prefix of address: 12 bits, to avoid disturb,

    Address of the receiver: 8 bits, to denote the ID.

    The farmers can set the prefix of address by order, see

    former chapter. The address of the receiver has 8 bits with 256

    IDs. No. 1 to 200 is used to address valves of nozzle and No.

    201 to 255 is used to address switches of pump.

    The receiver has self-study ability. Push the button on thereceiver and it goes into the status of self-study for 30s. If the

    receiver gets pulse synchronization with the emitter in the 30s,

    it will store the address as the ID. When the self-study is

    completed, the LED on the receiver will flash. The receiver

    can store 20 addresses. Pushing the button for 10s, the

    addresses stored in the receiver will be erased.

    Coding of operation decides the status of relays and then

    controls the valves.

    FrD2.6

    2123

  • 8/4/2019 05524329

    5/6

    TABLEIII

    RELATION AMONG BITS,RELAYS AND VALVES

    1st

    bit

    2nd

    bit

    3rd

    bit

    4th

    bitRelay

    Status

    of

    relay

    Valve

    Status

    of

    valve

    I open1 0 x x

    II close1 on

    I close0 1 x x II open 1 off

    III openx x 1 0

    IV close2 on

    III closex x 0 1

    IV open2 off

    As Tab III shows, the 1st and the 2nd bit decide to open or

    close the relays. The status of the two relays decides to turn

    on or off the valve 1. The 3rd bit works in the same way as the

    4th bit. One action unit can only control two valves. The

    action unit can also be used to start up or shut the pump with

    only 1st and 2nd bit or 3rd bit and 4th bit.

    IV. SOFTWARE DESIGNThere are two parts in software design, one for the PC

    control platform and the other for the controller. For the

    application on the PC control platform, database is established

    by Microsoft Access 2000. Microsoft Visual Basic 6.0 is used

    to operate the database and form the browser of information.

    GSM module is connected to PC by RS-232 serial interface.

    Microsoft Comm. Control 6.0 (MSComm) simplifies the

    communication between application on the PC platform and

    the GSM module. Clicks on popup menu by mouse establish

    an order with a backup stored in the database. Another click on

    button activates the order and sent it to the controller by GSM

    message.

    For the controller, foreground application and backgroundapplication are included. The following is the flow chart of

    the foreground application.

    InitialSystem( );

    Start:

    If (EnablePresetPlan)

    {

    ReadTime( );/*Get time from DS1302*/

    FlagCheckPlan=CheckPlan ( );

    /*Check if meet the condition to operate by plan*/

    If (FlagCheckPlan)

    {

    OperationPlan( );/*Open or close the preset valves or pumps*/

    }

    }

    If (EnableFeedback)

    {

    ADConversion( );/*Start up AD conversion*/

    FlagCheckSensor=CheckSensor( );

    /*Check if get across the preset thresholds*/

    If (FlagCheckSensor)

    {

    OperationSensor( );

    /*Open or close the preset valves or pumps*/

    }

    }

    Goto Start;

    From the above description, two parts are included: one forirrigating by preset plan and the other for automatic irrigating

    to form feedback.

    The background application is interrupt handling: GSM

    communication and radio communication. The following is

    the flow chart of the background application.

    GSMInterrupt( )

    {

    ReceiveOrder( );

    FlagPassword=CheckPassword();/*Check

    password*/

    If (FlagPassword)/*Password is right*/

    {FlagAnalyzeOrder= AnalyzeOrder( );

    /* Check and classify the order*/

    If (FlagAnalyzeOrder)/*Format of order is right*/

    {

    ExecuteOrder( );/*Operate by the order*/

    }

    Else/*Format is error*/

    {

    OrderErrorHandle( );

    /*Send back message to report the error*/

    }

    }Else

    {

    PasswordErrorHandle( );

    /*Send back message to report the error*/

    }

    }

    RadioInterrupt( )

    {

    OrderToBit( ); /*Decode order to bits*/

    BitToPulse( );/*Decode bit to Pulses*/

    90usPulseOut( );

    /*Establish pulses to radio emitter module*/

    }The radio interrupt handling is enabled in the GSM

    interrupt handling when the order requires the controller to

    communicate with the action unit, otherwise the radio

    interrupt handling is disabled.

    The application of the controller and the action unit with

    microprocessor are developed by IAR C compiler for

    MSP430.

    FrD2.6

    2124

  • 8/4/2019 05524329

    6/6

    V. CONCLUSION New devices is brought forwards to used in automatic

    irrigation. The application of the devices in some farms for

    more than one year proves its feasibility. Also some problems

    appear such as misact of relay. The probability going wrong

    is 0.3%. As part of the devices can also function well, it is

    unnecessary to lay out all the devices especial the PC controlplatform. The solar batters supply power to the controllers

    and the action units, so additional power sources and wires

    are taken off. Any cell phone can send order to the controllers

    or browse the information from the controllers. GSM network

    and radio provides credible communication for the devices.

    REFERENCES

    [1] Ji Xiaohua and Tang Fangpin, The study and development of systemfor automatic irrigation, Irrigation and Drainage, Vol 21, no.4, pp.25-27, Dec. 2002.

    [2] Cui Yi, Technology and Application of Water Saving Irrigation,Beijing, China: Chemical Industry Press, 2005, pp. 345-349.

    [3] Liu Guihong and Sun Jian, The development and application ofautomatic system for irrigation management, Irrigation and Drainage,Vol. 20, no. 1, pp. 65-68, Mar. 2001.

    [4] Li Kai, Mao Hanping and Li Baijun, The development of automaticsystem for irrigation and fertilization, Journal of Jiangsu University ofScience and Technology (Natural Science), Vol. 22, no. 1, pp. 12-15,Jan. 2001.

    [5] Wang Weimin, Ran Gangjun and Guo Qinhai, Thecomputer-controlled management system of water-save irrigation,Water Conservancy & Electric Power Machine, Vol.23, no.1, pp.51-52,Feb. 2001.

    [6] Yang Genghuang, Guo Kairong and Li Yawei, Development ofcontroller for automatic irrigation based on GSM network, Journal ofShenyang Agricultural University, Vol. 36, no. 6, pp. 753-755, Dec.2005.

    [7] Gao Qiang, Wang Hehui and Hang Shuming, Research of greenhouseenvironment intellectual control system, Water Saving Irrigation, Vol.30, no. 4, pp. 35-37. Aug. 2005

    [8] Zhang Fan, Yang Ming and Ying Hao, The Application of GSMcommunication in agricultural automation, Journal of technology foragriculture. Vol.1, no.1, pp. 39-41, Jan. 2004.

    [9] Li Rui, Yang Jun and Gu Haiying, The Application of Microprocessorin Automatic Irrigation and fertilization, Journal for Application ofComputer, Vol. 21, no.8, pp. 219-221, Aug. 2001.

    [10] TI Inc (2005, Mar): Data Sheet of MSP430X14X [Online]. Available:http://www.TI.com

    [11] Maxim Inc. (2005, Mar): Data Sheet of DS1302, [Online]. Available:http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2685.

    FrD2.6

    2125