creating an automatic greenhouse control · pdf filecreating an automatic greenhouse control...

1
Creating an automatic greenhouse control system David Harman Mentored by Mr. Kevin Gajdzis Introduction Farming and other horticulture based businesses rely heavily on greenhouses to start growing seedlings and other sensitive plants in a controlled environment. While large operations were able to use automated systems to control their greenhouses, small businesses and farmers were often not able to afford them (Jones, 2010). This project focused primarily on designing an efficient and inexpensive control unit capable of monitoring and responding to conditions found in the greenhouse. The system was created around the Arduino microcontroller which acted as the central control unit for the system. The system received data from three different types of sensors: a temperature sensor, a humidity sensor, and a soil moisture sensor. The control unit was intended to operate features such as vents and irrigation based on the sensor inputs which it received. It was also able to send any data collected from the Arduino’s sensors to an attached computer. A graphical user interface (GUI) was also designed to allow the user to access any data collected. Materials and Methods Initial research was conducted on current greenhouse control systems and the features that a standard greenhouse comes equipped with. The basic layout of the system was drawn out, showing how major components would be positioned. Individual components such as temperature and moisture sensors, set up in Figure 1, were tested to gain a better understanding of their function. The Grove Moisture Sensor was calibrated in order to convert the voltage received by each prong of the sensor into a soil moisture percentage. The moisture sensor was tested by incrementally adding water to a know amount of soil until the soil was saturated. The collected data was graphed and a line of best fit was acquired using linear regression analysis. Code was written to allow the Arduino Microcontroller and the sensors to communicate information accurately. The Xbee ® Radios were connected to an Arduino and a computer to test the link between the two. A MAX232 serial converter chip was used to convert the TTL serial protocol from the Arduino to the standard RS-232 protocol used by the computer. Once a connection was established, code written, that enabled the transmission of words and short phrases between all the components, relaying information. Conclusions & Discussion The anticipated outcome of this project was an inexpensive and accurate automated greenhouse control system. Although this initial goal was not completed, it has the potential to be completed given more time. It was also found that the system was much cheaper than commercially available ones because of the low control unit price. One of the first problems encountered was with the RHT03 temperature and humidity sensor. The sensor used a Maxim one- wire protocol to transmit data to the Arduino. After an initiation from the Arduino, the RHT03 would send a 40 bit transmission in response seen in Graph 1. However, the Arduino would receive only half of the transmitted bits. This problem was with the clock speed of the Arduino. The internal clock did not oscillate quickly enough to receive every bit sent from RHT03. To fix this problem, more efficient code was found that could be processed in the time between each bit of transmission. Unlike the RHT03 which used a digital signal, the Grove soil moisture sensor used a simple analog reading to give a soil moisture percentage. The Grove Moisture Sensor measures the resistance in the soil to determine the percentage of water. This is a relatively accurate measurement process, but can be interfered with by electrolytes present in the soil, which decreases resistance. A conversion equation had to be made to convert the analog reading into a usable number. From this, a linear regression analysis was performed on the points to find an equation of best fit (Graph 2). Using the conversion equation, the Arduino was able to output the relative soil moisture content. This process will have to be repeated each time the sensor is placed in a new soil type. In the future this system can be modified to include more sensors and additional features. Additional features include a database and a response system that opens and closes physical features such as vents and watering systems. References Jones, R. (2010, June 29). Greenhouse automation: rise of the machines. Greenhouse grower, Retrieved from http://www.greenhousegrower.com/article/3865/greenhouse- automation-rise-of-the-machines Materials and Methods Results Graph 1. Shows the response signal sent by the RHT03 containing the temperature, humidity and a checksum. Graph 2. Shows the relationship between the amount of a water present and the arbitrary number returned by the moisture sensor. 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 1.70 1.80 1.90 2.00 2.10 2.20 Voltage (V) Time (ms) RHT03 One Wire Signal 0 100 200 300 400 500 600 700 800 900 0 10 20 30 40 50 Voltage in Bits (0-1024) Amount of Water (mL) Voltage Based on Water Content Figure 1. Displays the board setup used while prototyping and testing components. The main components in the picture are an Arduino Uno, a Grove Moisture Sensor, a RHT03 Temperature and Humidity sensor, and a MAX232 Serial Converter Chip. Also included is a RS232 Serial connector, a Newhaven LCD, and a Solderless Breadboard.

Upload: lamkhanh

Post on 01-Feb-2018

226 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Creating an automatic greenhouse control · PDF fileCreating an automatic greenhouse control system . ... humidity sensor, and a soil moisture sensor. ... The Grove Moisture Sensor

Creating an automatic greenhouse control system

David Harman Mentored by Mr. Kevin Gajdzis

Introduction Farming and other horticulture based businesses rely heavily on greenhouses to start growing seedlings and other sensitive plants in a controlled environment. While large operations were able to use automated systems to control their greenhouses, small businesses and farmers were often not able to afford them (Jones, 2010). This project focused primarily on designing an efficient and inexpensive control unit capable of monitoring and responding to conditions found in the greenhouse. The system was created around the Arduino microcontroller which acted as the central control unit for the system. The system received data from three different types of sensors: a temperature sensor, a humidity sensor, and a soil moisture sensor. The control unit was intended to operate features such as vents and irrigation based on the sensor inputs which it received. It was also able to send any data collected from the Arduino’s sensors to an attached computer. A graphical user interface (GUI) was also designed to allow the user to access any data collected.

Materials and Methods Initial research was conducted on current greenhouse control systems and the features that a standard greenhouse comes equipped with. The basic layout of the system was drawn out, showing how major components would be positioned. Individual components such as temperature and moisture sensors, set up in Figure 1, were tested to gain a better understanding of their function. The Grove Moisture Sensor was calibrated in order to convert the voltage received by each prong of the sensor into a soil moisture percentage. The moisture sensor was tested by incrementally adding water to a know amount of soil until the soil was saturated. The collected data was graphed and a line of best fit was acquired using linear regression analysis. Code was written to allow the Arduino Microcontroller and the sensors to communicate information accurately. The Xbee® Radios were connected to an Arduino and a computer to test the link between the two. A MAX232 serial converter chip was used to convert the TTL serial protocol from the Arduino to the standard RS-232 protocol used by the computer. Once a connection was established, code written, that enabled the transmission of words and short phrases between all the components, relaying information.

Conclusions & Discussion The anticipated outcome of this project was an inexpensive and accurate automated greenhouse control system. Although this initial goal was not completed, it has the potential to be completed given more time. It was also found that the system was much cheaper than commercially available ones because of the low control unit price.

One of the first problems encountered was with the RHT03 temperature and humidity sensor. The sensor used a Maxim one-wire protocol to transmit data to the Arduino. After an initiation from the Arduino, the RHT03 would send a 40 bit transmission in response seen in Graph 1. However, the Arduino would receive only half of the transmitted bits. This problem was with the clock speed of the Arduino. The internal clock did not oscillate quickly enough to receive every bit sent from RHT03. To fix this problem, more efficient code was found that could be processed in the time between each bit of transmission.

Unlike the RHT03 which used a digital signal, the Grove soil moisture sensor used a simple analog reading to give a soil moisture percentage. The Grove Moisture Sensor measures the resistance in the soil to determine the percentage of water. This is a relatively accurate measurement process, but can be interfered with by electrolytes present in the soil, which decreases resistance. A conversion equation had to be made to convert the analog reading into a usable number. From this, a linear regression analysis was performed on the points to find an equation of best fit (Graph 2). Using the conversion equation, the Arduino was able to output the relative soil moisture content. This process will have to be repeated each time the sensor is placed in a new soil type.

In the future this system can be modified to include more sensors and additional features. Additional features include a database and a response system that opens and closes physical features such as vents and watering systems.

References Jones, R. (2010, June 29). Greenhouse automation: rise of the

machines. Greenhouse grower, Retrieved from http://www.greenhousegrower.com/article/3865/greenhouse-automation-rise-of-the-machines

Materials and Methods

Results

Graph 1. Shows the response signal sent by the RHT03 containing the temperature, humidity and a checksum.

Graph 2. Shows the relationship between the amount of a water present and the arbitrary number returned by the moisture sensor.

00.5

11.5

22.5

33.5

44.5

1.70 1.80 1.90 2.00 2.10 2.20

Volta

ge (V

)

Time (ms)

RHT03 One Wire Signal

0

100

200

300

400

500

600

700

800

900

0 10 20 30 40 50

Volta

ge in

Bits

(0-1

024)

Amount of Water (mL)

Voltage Based on Water Content

Figure 1. Displays the board setup used while prototyping and testing components. The main components in the picture are an Arduino Uno, a Grove Moisture Sensor, a RHT03 Temperature and Humidity sensor, and a MAX232 Serial Converter Chip. Also included is a RS232 Serial connector, a Newhaven LCD, and a Solderless Breadboard.