2010 International Symposium on Electronic System Design Microcontroller based Polyhouse Automation Controller G.K. Banerjee Rahul Singhal Electrical engineering dept., College of Technology G B Pant University Pantnagar, India gkb_1947@yahoo.co.in Electrical engineering dept., College of Technology G B Pant University Pantnagar, India rahulsinghal@gbpuat-tech.ac.in Abstract — In this paper a method for the control of temperature and relative humidity inside a polyhouse using microcontroller has been discussed. In the proposed method, the greenhouse controller senses the change in temperature and relative humidity with the help of input sensors and process the output to take appropriate control action. The proposed system is a low cost and user friendly system with high stability and reliability. Keywords – microcontroller based controller; intelligent polyhouse; polyhouse farm environment management; single chip microcomputer. Relative Humidity Sensor I. INTRODUCTION A polyhouse is a metal structure covered with polythene It is an automation industry which is developing very rapidly with a trend of shifting towards low cost, reliable in operation, stable in design and user friendly control system. The microcontroller based system provides a good platform for designing the polyhouse automation controller for a single unit. This makes a control system affordable, reliable in operation, easy to reprogram. It ensures the upgradation even in the working mode and provides low maintenance solution for polyhouse, especially in rural areas for the farmers having small lands [1]. The proposed system is a central one host system which is used in automating the data acquisition process of the various climatic parameters that governs the plant growth and allows information to be collected at the high frequency with the less labor requirements. The proposed methodology of farming reduces dependency on rainfall and makes the optimum use of land and water resources [2]. However, the farmers must be provided with the expert guidance so that they can use this new technology of polyhouse farming properly. II. PIC 16F877A Microcont roller Relay Operat ing Circuit Heating Pipes Exhausts Sprinklers Fig.1 General Structure of polyhouse automation controller 2) Signal collection: Signal collection includes analog signal collection from temperature and relative humidity sensor, analog to digital conversion and manipulations by microcontroller. 3) Control processing by system software: It consist of the real-time monitoring of the parameters through sensors and controlling the parameters prevailing inside the green house by generating actuating signal either to switch ON or to switch OFF the heating pipes (in which hot water flows into the pipe used for heating), sprinklers and exhausts. B. System working principle The TEMP and RH are the digital values obtained after the conversion of the analog signals from the temperature and relative humidity sensors. TMAX and TMIN define the desired operating range of temperature in polyhouse. The RHMIN is the lower limit of operating range of the relative humidity in polyhouse. The average temperature TAVG is calculated in order to restrict cooling and heating action. GENERAL STRUCTURE DESIGN A. General structure design of the polyhouse automation controller consist of 1) Two levels structure: The polyhouse automation controller was build with two levels. The first level is located outside the polyhouse consisting of LCD panel, switches and relay circuit. The second level is located in the polyhouse consisting of microcontroller, temperature and relative humidity sensors. 978-0-7695-4294-2/10 $26.00 © 2010 IEEE DOI 10.1109/ISED.2010.38 LCD Display Temper ature Sensor TAVG = (TMAX + TMIN) / 2 (1) In this system, we have used the Microchip PIC16F877A microcontroller which is inbuilt with a 10 bit analog to digital (AD) converter with 8 channels. CMOS technology is being used for designing the Flash / EEPROM memory of 158 The relative humidity sensor ensures the accuracy of ± 5% within its full range of 30% to 90%. The signals obtained from sensors do not require the signal conditioning as they are large enough to be converted to digital values by AD module. The microcontroller PIC16F877A analyses the digital data by the help of the system software and generates the actuating signal to the relay circuitry to switch ON the sprinklers, exhausts and heating pipes, in order to control the environment parameters of polyhouse [6]. We must have stable Vref+ to AD module for accurate and precise conversion. microcontroller. It ensures a very low-power consumption, fully static design, high speed operation and wider operating range (2.0V to 5.5V) that is they are excellent to use when operating on a battery. Large EEPROM data memory on microcontroller (256 x 8 bytes with 1,000,000 erase / write cycle) helps in saving the various data in non volatile memory which would be available to the microcontroller even if the power supply is interrupted. The user needs not to enter (RHMIN, TMAX, TMIN) again and again after each power supply interruption [3]. It communicates with the temperature and relative humidity sensors in real time in order to control the temperature and relative humidity inside the polyhouse. It gives actuating signals to relay circuit which helps in switching exhausts, heating pipes and sprinklers respectively according to the necessity of the desired crop. An integrated liquid crystal display (LCD) is used for real time display of data acquired from temperature and relative humidity sensors and the ON status of the sprinkler, heating pipes and exhausts [4-5]. Vref+ III. HARDWARE DESIGN The temperature and relative humidity are the parameters controlled by the microcontroller based polyhouse automation controller. Temperature sensor (LM35DZ) and relative humidity sensor (BHS220M) gives the analog signal to the analog input port of the microcontroller. A 10 bit analog to digital converter which is inbuilt in the microcontroller converts them to digital value. The temperature sensor (LM35DZ) ensures the accuracy of ± 0.75 °C within its full range from 2 °C to 150 °C. For the measurement of relative humidity, a capacitive sensor has been used. The sensor consists of a metal electrode, a coated glass substrate and a polymer layer placed between the two. The permittivity of the dielectric (polymer) depends on the relative humidity. For an optimal humidity exchange between the polymer layer and the surrounding air, the metal electrode is a porous layer of 0.1 to 1µm produced by the special process. The absence of additional insulation layer leads to the high sensitivity of the sensor. The relationship between the capacitance of the sensor and the relative humidity is expressed as CRH = Є0ЄRH Fig. 2 Pre regulator Circuit for precise Vref+ For the conversion of 5mV equivalent to 1 bit, we must have the Vref+ as 5mV = Vref+ / 210 (for 10 bit AD module) Vref+ = 5mV * 210 = 5.12 V (3) AD module requires 150µA from Vref+. The voltage output of the pre regulator circuit comprising of zener diodes will not be affected as it is operating at higher current. IV. CONTROL ACTION The controlled action is being designed to take the care of discontinuous and abrupt changes in the analog signal from the sensors. It is designed for a range in which control action will either switch ON or switch OFF the exhausts, heating pipes and sprinklers. In order to initiate the control action, initially AD converter is set for temperature. The microcontroller puts the delay of a half a second. Afterwards it calls for the AD conversion for the relative humidity again keeping the same delay. Control algorithm followed by the system software in PIC16F877A microcontroller is as shown in the figure 5. Where CRH is the capacitance at relative humidity RH Є0is the absolute permittivity ЄRH is the permittivity of the dielectric depending on humidity (ЄRH = 3 at 0% RH and 3.9 at 100% RH) A is the area of the electrodes d is the distance between the electrodes 159 Heating Pipes Status The controller checks which limit of temperature is violated, if lower limit TMIN is crossed that is if the temperature prevailing in the polyhouse is less than the TMIN then the heating action is taken by heating pipes till the temperature increases enough and crosses the TAVG. Actuating signal generated by system software for heating pipes with respect to temperature as shown in figure 4. OFF ON 0 10 20 30 TAVG TTMIN MIN T AVG TT MAX MAX 40 Temperature Fig.4 Heating Pipes Status Vs Temperature If the upper limit TMAX is exceeded that is if the temperature prevailing inside the polyhouse is greater than that of TMAX then cooling action is being performed by the exhausts till the temperature decreases enough and reaches the TAVG. Actuating signal generated by system software for exhausts with respect to temperature as shown in figure 5. Fig. 5 Exhausts Status Vs Temperature After that controller then checks for the relative humidity lower limit is violated that is the relative humidity prevailing in polyhouse is lower than that of the RHMIN. If it is so then the sprinklers are switched on to attain the level back till it is incremented by 10% above the RHMIN. Actuating signal generated by system software for sprinklers shown in figure 6. Fig.3 Control algorithm followed by the microcontroller 160 Fig.6 Sprinkler Status Vs Relative Humidity Control Action is being repeated again and again after a time delay of one second by the system software in the microcontroller. Fig. 7 showing the Temperature below TMIN and control status VI. V. SYSTEM SOFTWARE DESIGN The temperature and relative humidity are the parameters monitored and controlled by the controller. As the 10 bit AD module is inbuilt in microcontroller simplifies the all over design. The data obtained needs manipulation to get the actual value of temperature and relative humidity. The system works in two modes. POSSIBLE ENHANCEMENT As we level up we have the central control unit which will receive the data through CAN from the microcontroller installed in the polyhouse. The control action will be performed by the central control unit, by providing the actuating signal to the microcontroller which will take necessary action inside the desired polyhouse. A. Internetworking of the various polyhouse Various polyhouses can be controlled together if they are connected through CAN. This will help in exchange of information between polyhouses and the central control unit. In central control unit actual value of different parameters inside the polyouse will be saved periodically. After completion of life cycle of the crop, actual parameter variation will be compared to the desired range. This comparison will help in drawing important conclusion regarding that crop. A. System Software in initializing mode In this mode first of all, the ports of the microcontroller are configured according to the hardware connections. Then the predefined values of temperature range as TMIN and TMAX along with the RHMIN is being displayed on the LCD screen for a second it automatically shifts to the working mode. B. Web networking of the central control unit We can make our system more users friendly and easy to access by connecting the central control unit with the web. Then polyhouses can be monitored and controlled through TCP/IP anywhere in the world. C. Other parameter control Several other parameters such as light, soil PH, CO2 etc. can be added for precise control over the yield and quality of the crop planted in the polyhouse. D. Full automation with robotics The robots can be controlled through the central control unit. The main advantage of the robots would be to prevent human contamination and ensures careful nursing of the plants. Fig. 6 displaying the predefined values on LCD B. Visual control by system software in working mode In this mode the real time values of temperature, relative humidity and ON status of the sprinkler, heating pipes and exhaust will be refreshed and displayed on LCD screen by the system software. VII. CONCLUSION Intelligent polyhouse is an effective way to reduce labor cost, fertilizer cost, water resources and to increase the 161 productivity of the plants on the small land holding. It is boon to farmers with small land in their hand for cultivation. Low cost and power polyhouse automation controller can be achieved by using PIC16F877A microcontroller which provides a very simple design with affordable and reliable control action. The scheme employs LCD operation making the system user friendly and can be easily understood by the farmers. Moreover it is not restricted to a particular plant type or specific temperature and humidity ranges as the PIC16F8877A is easy to reprogram. It operates at high speed (Max 20 MHz clock input) which ensures faster execution of the codes, essential for the real time interaction with the environment. The objective of the project is to design an autonomous control for temperature and relative humidity in a close environment of the single polyhouse unit. REFERENCES [1] [2] [3] [4] [5] [6] 162 S. K. Sanwal, K. K. Patel and D. S. Yadav, “Vegetable Production under Protected Conditions in NEH Region”, ENVIS Bulletin: Himalayan Ecology, Vol. 12, No. 2, 2004. J. L. Chavez, F. J. Pierce, T. V. Elliot and R.G. Evans,”A remote Irrigation Monitoring and Control System for continuous move system Part A: description and development”, Precision Agriculture, DOI 10.1007/s11119-00909109-1, 2009. Microchip ® PIC16F877A © user manual, 2003 edition S. Bhutada, R. Ramamoorthy, R. Malye, “Implementation of a fully automated Greenhouse using SCADA tool like Lab VIEW”, proceedings of the IEEE / ASME , 2005. S.Li, S. Liu, L. Ju, ”Application of Adaptive Fuzzy Controller in Intelligent Greenhouse Control System”, proceedings of the IEEE, International Conference on Automation and Logistics Quigdao, China September 2008 D. E. Upasani, S. B. Shrote and V. P. Wani,” FPGA implementation of intelligent climate control for greenhouse”, International journal of Computer application, vol. 1 – No. 18, pp. 18 – 25, 2010.