Elitech 201324.apr 2013
    I was forced to write a small paper for local student conference at university where I am currently studying. I decided to put on paper one of my latest projects - it is about measuring temperature and controlling the heating inside a greenhouse. You can learn more about it on attached document. I think this could be interesting also for others, so after a long period I am placing something new on my webpage.

Tags: Arduino, temperature logging, greenhouse, mixing valve, PID, heating regulation

Abstract: Document deals with heating regulation system for growing plants. Using various sensors we monitor the life conditions for growing plants, computer controlled mixing valve of two circuit heating system allows us to precisely control the temperature of soil. PID regulator is used to compensate the long propagation delay of heat transfer. All measured variables are stored on a web server for later analysis of suitability of the regulator settings.

Keywords: Arduino, temperature logging, greenhouse, mixing valve, PID, heating regulation


Certain crops are sensitive to temperature changes of their environment during early stages of their growth, for growing them during winter seasons it is important to ensure that the temperature, air humidity and soil moisture levels are well set. The temperature is controlled by mixing valve what allows us to control the temperature of water running in pipes placed in soil where the plants are growing. The plants are placed on elevated desk to achieve better temperature isolation, in addition these tables are covered with plastic foil forming another greenhouse inside a greenhouse, in following we will refer to this as a cultivation chamber. Because the greenhouse where this system was installed was quite large (1800 m3 total volume, 16 m3 cultivation chamber), this regulation was controlled by PID controller. The first observation of temperature rise was after 30-45 minutes when the mixing valve was switched from fully closed position to its fully open position. The temperature of air inside greenhouse is very sensitive to weather changes and achieving a very narrow temperature range 18-20 °C was a challenging task.

Sensors and hardware

On the figure 1 we can see the diagram of heating system including all sensors: tout – measuring the outside temperature, ch – mixing valve controller, thi – water temperature at valve input, tho – heating water at output, slux – light intensity sensor, sap – atmospheric pressure sensor, tin – greenhouse air temperature; sensors inside cultivation chamber are following: sah – air humidity sensor, tcc – air temperature sensor, tgnd – soil temperature sensor, smo – soil moisture sensor.
The temperature sensors used in this project are DS1820 connected on one single wire bus with cables no longer than 10 meters. Humidity sensor is DHT11, barometric pressure sensor BMP085. The mixing valve is based on 24V AC motor with gearbox controlled by Komextherm RVT052. This controller couldn’t achieve desired performance, so we modified its circuit board for taking the control signals outside the box to Arduino UNO R3 microcontroller board. Arduino was connected to local area network using the ethernet shield equipped with Wiznet 5100 chip.

Firmware and communication

Firmware running on Arduino implements a PID regulator controlling the valve motor and hosts a simple webpage displaying current measurement values for each sensor. Every minute it creates a URL GET request to a predefined IP address where these measurements are stored in a database. As can be seen on figure 2, the ethernet shield (a) communicates with NAS server (b) placed on local network, simple script on this server waits for the data from arduino and stores it in database. The NAS server also hosts the webpage which visualizes the measurements. Tablet computer (c) is used for showing actual measured values 24 hours a day. For accessing this webpage from internet, the NAS relays all incoming request from arduino to another publicly available web server (d) which hosts actually the same PHP script as NAS server does and this allows anyone (e) to access the current greenhouse life conditions.

Visualization application

The layout of web application (figure 3) was optimized for displaying on tablet computer. In background there are 4 charts displaying measured values for the current day. In front there are large numbers displayed in contrast colour showing the most important measured values in real time, refreshed every minute. This application also allows the user to switch to any date to show and compare measurements from different dates. On figure 4 is long term measurement showing average and extreme temperatures for each day.


By using affordable and widely available sensors we developed measurement and temperature regulation system that allow us to monitor the environment variables directly influencing the growth of plants. All measurements are stored in database and by analysing this set of data we can improve the regulation algorithm by considering not only the temperatures but also the light penetration which influences the inner temperature at the most.

Pictures...24.apr 2013