LITERATURE REVIEW
The present method used for controlling temperature in the greenhouse is by the use of ventilation. This ventilation entails of the restoration of the air inside the greenhouse. It involves natural ventilation that has lateral windows that are opened to allow fresh air to enter inside the greenhouse refreshing the entire internal atmosphere. This is operated manually. Also forced ventilation are used where the fans are used to vary the temperature by moving it. The constant movement of the fans inside the greenhouse keeps refreshing air inside. Another method employed is regulation is by employment of the fog system that allows easy water evaporation and cool down the temperature. These methods have been noted no to be very efficient because the temperature cannot be at controlled to the required level (Hellickson et al, 1983).
Also in the greenhouse there are irrigation practiced by many like overhead sprinkles and flood type wets the stems and lower leaves of the plant. The entire soil becomes oversaturated and stays wet even after sprinkling is over. This leads to rotting of the young seedlings and reduces the aeration of the soil. It was noted that a lot of water was consumed since there was no control over it (Zazueta et al, 1992). This led to the invention of automated drip irrigation by Israeris in 1970s. It was through this principle in which drip irrigation works that helped to implement an automatic greenhouse temperature regulator which is based in temperature sensor.
Introduction
Automatic greenhouse controller is designed to oversee the level of oxygen/temperature or C02 in the Greenhouse through the detection of the soil moisture. Once the temperature is high, the soil gets dry thus soil moisture is altered. Due to these changes, the motor are switched ON or OFF to regulate the temperature by opening the windows of the Greenhouse.
The Main components used in this project are:
- Motor
- Temperature sensor
- Microcrotroller
- LCD
The micro controller unit:
The automated control system consists of temperature sensors, moisture sensor, Signal conditioning circuit, Digital to analog converter, LCD Module and Relay driver. The main parameter to that is to control the whole project is the temperature change. This is achieved by placing the temperature sensor is various parts on the greenhouse. RTD like PT100 is to be used as a temperature sensor. These temperature sensors are placed in various positions inside the Greenhouse to detect the temperature changes/variations. Once the temperature rises, the temperature sensor sends a signal to the microcontroller to turn ON the relay which rotates the motor to open the Greenhouse windows and vice visa.
The signal that is sent by the sensor is boosted to a required level by the amplifier. Then the amplified signal is fed into A/D converter which in turn changes it to digital form that is accepted as an input for microcontroller use. The output is the displayed by the LCD through the line 16X1. Also the motors are controlled by the microcontroller through the relays which are connected to it. The Microcontroller is interfaced to the centralized computer which has a microcontroller with an inbuilt timer that assist to rotate the motor incase the temperature sensors fails to work. Once there is a failure of the relays, there is always a warning showing indicating the condition in the Greenhouse is not favorable.
LCD
The type of LCD used to interface with the Microcontroller is 16 x 2 which consists of a rod-shaped molecule that is sandwiched in-between an opaque substrate and a flat piece of glass. These rod-shaped are aligned into two separate positions depending on the electric charge which is applied to them. The plates are aligned when an electric charge is passed blocking the light that might enter through them while they become transparent when there is no charge applied to them. To produce a desired image, light is passed through which is a concept on how the LCD displays. The LCD is mostly preferred to be used as compared to other display technologies (Liquid Emitting Diode, LED and Cathode Ray Tubes, CRT) due to the following reasons.
- It is thin
- It is flat
- Consumes very small amount of power
Command for interfacing the LCD
In the PIC programming the following should be considered:
- Initializing the LCD function
- The R/W pin should be kept low to enable data writing
- Enable pin should be kept high
- Register select pin (RS) must be high for data to be written
- Sending a command
- R/W pin should be low
- RS should be kept low
- Enable pin should be kept high
Codes for initializing the LCD function
- lcdcmd(0×38);//Configure the LCD in 8-bit mode,2 line and 5×7 font
- lcdcmd(0x0C);// Display On and Cursor Off
- lcdcmd(0×01);// Clear display screen
- lcdcmd(0×06);// Increment cursor
- lcdcmd(0×80);// Set cursor position to 1st line,1st column
Sending command to the LC:
- rs=0; Register select pin is low.
- rw=0; Read/write Pin is also for writing the command to the LCD.
- en=1;enable pin is high.
Sending data to the LCD:
- rs=1; Register select pin is high.
- rw=0; Read/write Pin is also for writing the command to the LCD.
- en=1; enable pin is high.
Types of transistor
The NPN transistor is used to be used as a switch since it is easy to make it from the silicon. This transistor is either ON or OFF mode. When its ON, the voltage VCE across the transistor is said to be zero, therefore no more current is to pass since it will be saturated.
Operational amplifiers
Operational Amplifiers (OAs) are highly stable, high gain dc difference amplifiers. They don’t have a capacitive coupling in various stages making it to handle signal from zero frequency to a few hundred kHz . This OAs operates when supplied with two power suppliers; positive (+V) and negative (-V) voltage (Floyd, 1994).
Temperature sensor
The temperature sensor to be used is PT100. This sensor is a platinum resistance temperature detector with a resistance of 100 Ω at 0°C. The resistance of this sensor varies with the changes in temperature where the resistance increases as the temperature increases. This sensor is used in various fields like in industrial processes has it is stable, repeatable and accurate. It can also be used to measure up to temperature of 850 °C
PIC1F88 Microcontrollers
A microcontroller (or MCU) is a computer-on-a-chip that is use to control electronic devices). The microcontroller consists of interfaces and memory that are required by simple applications. The integrated chip contains a CPU, ROM timer, I/O ports and RAM. The internal bus is used to connect all the components attached to the microcontroller while the modules are connected via I/O pins to the outside world.
Microcontroller Modules
Processor core: This is the CPU of the controller containing the arithmetic unit, the registry and the control unit
Memory: Memory is divided into data memory and program memory.
Interrupt Controller: This is used to interrupt the normal program flow in case of internal or external event. It also helps to conserve power in sleep modes.
Timer/Counter: It is to measure intervals, timestamp events or count the events.
The Pulse Width Modulation (PWM) is used to drive motors.
Interfaces: There is at least one serial interface used to download the program and for communication with the development PC
The microcontroller to be used in this project is PIC16F88 which has the following features:
- 8 MHz internal oscillator
- 256 bytes of EEPROM data memory
- A capture/compare/PWM,
- An Addressable USART
- A synchronous serial port used for configuration by either 2- wire inter-integrated Circuit bus or 3-wire Serial Peripheral Interface
- 7 channels that has 10-bit A/D converter
- Two comparators
Summary of the Microcontroller
Microcontroller Interfacing
Microcontrollers are used for external communication with devices like sensors, motors, switches, displays, memory and keypads.
Programming Microcontrollers.
When programming a microcontroller, machine code, high level language or assembly language is used. Before deciding which language is to be used, factors like execution speed, convenience and program length should be put into consideration. In this project, machine code is used since it is the only language that can be understood by the CPU where assembly language is translated into a machine code.
Motor
The motor to be used in opening and closing of the Greenhouse window should be a dc motor since it can allow a bidirectional rotation and is able to provide enough torque to open and close the window. The 5V brush dc motor is the one used for this project for demonstration only. For a precise speed control, a stepper or servo motor is used to open/close the window at a definite angle.
Cited work
"Book: PIC Microcontrollers - Programming in C." Chapter 4: Examples -. N.p., 1 Jan. 1998. Web. 13 Dec. 2013. <http://www.mikroe.com/chapters/view/17/>.
Hellickson, M.A., and J. Walker. 1983. Ventilation of Agricultural Structures. American Society of Agricultural Engineers: St. Joseph, MI 49085.
ASABE.Engineering Practice. 1993. Heating, Ventilating and Cooling Greenhouses.ASAE EP 406.American Society of Agricultural Engineers. St. Joseph, MI 49085.
"Greenhouses: Heating, Cooling and Ventilation B 792." Greenhouses: Heating, Cooling and Ventilation. . Web. 13 Dec. 2013. <http://www.caes.uga.edu/publications/pubDetail.cfm?pk_id=6008>.
"PIC16F88." - PIC® Microcontrollers. Web. 13 Dec. 2013. <http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010243>.
Walter G. Jung, IC Op-Amp Cookbook, 3rd ed. (Howard W Sams and Co, Indianapolis, In, 1986.)
Microchip Technology Inc., PIC16F8X Data Sheet, Chandler, AZ, 1998.
Microchip Technology Inc., MPLAB User’s Guide, Chandler, AZ, 2000.
Fitchen, Franklin .ransistor circuit analysis and design. the University of Michigan: Van Nostrand, 1960.
Floyd, Thomas .Basic Operational Amplifiers and Linear Integrated Circuits. Macmillan Publishing Company, 1994.
Zazueta, F. S.; Smajstrla, A. G. Microcomputer-based control of irrigation systems.Appl. Eng. Agric. St. Joseph, Mich. American Society of Agricultural Engineers. Sept 1992. v. 8 (5) p. 593-596. 1992.