Logging soil and air temperature in a polytunnel

I have used two Dallas DS18B20 sensors to log the soil temperature inside and outside a polytunnel, as well as a free-standing RF thermistor probe for the air temperature.

reading of soil and air temp inside and outside polytunnel
reading of soil and air temp inside and outside polytunnel

The air temperature reading clearly has issues in the day, but the soil temperature readings show the value of a polytunnel. The blue trace, inside, shows the soil temperature to always remain above 5C, which is apparently important for seed germination. The temperature excursions to be smaller, ranging over about 8C rather than 12 for the outside soil temperature, and the outdie soil temperature falls to 0 at one point.

The air temperature suffers in the day from the problem of the greenhouse effect, which is of course the whole point of a polytunnel, but the sensor additionally suffers from not being in thermal balance in the day.

Measuring temperature in a room is easy, and the one-box LLAP sensors do that fine. However, setting them up where the sun shines on them means the sensor gets heated by the sun and no longer accurately reflects the ambient air temperature, because the black case is heated up faster than it radiates / convects heat away, so it’s no longer in thermal equilibrium.

The way to address this is to use an aspirated thermomenter, which has a thermal screen from above to stop solar radiation heating the sensor and a fan to waft air across the sensor – it doesn’t need a high fan speed but it needs some.

However, at night solar radiation isn’t a problem, so the air temperature reading is useful in the night, where it shows the air temperature falling below zero inside the polytunnel from about 9pm to 6am.

The soil sensors are about 5cm below the surface, which is typically where seeds would be planted.

Project Overview – what I’m trying to do with the sensors

I have two applications for sensor networks. One is at home, where I’ve focused on temperature monitoring. I am trying to reduce gas costs by using a 6kW wood burner in the living room to heat the house, and it’s interesting to see how the heat propagates to the various rooms. Insulation is good and I achived this last year. It’s a fairly standard application of the IoT idea, so probably not of much wider interest.

The second is for gathering data over a 12 acre smallholding, the Oak Tree Low Carbon Farm. This is more challenegin as it is an island site without mains power or data communications. Remote sensing has a lot to offer a smallholding – temperature and light logging are interesting. Monitoring the state of the various 12V batteries used on site could make life easier, and control applications for managing the irrigation pumps may be feasible.

Initially I am using a Ciseco OpenKontrol Gateway to log the data. I’m not particularly using it as a gateway, more a generic Arduino kit connected to the sensors that happens to have a SD card interface and RTC on it. Eventually that could be used as its name indicates, to groom more significant status changes and alarm via SMS if necessary, for instance low battery or low water for the chickens.

At the moment I am using it as a straight datalogger for temperatures at home, to gain familiarity with the sensor and Arduino stuff. I will probably move to an EVE device for that, and move the OKG to the farm.

The first thing to do is get the OKG datalogging working right for a sensor network, in particular writing the data in a format that is usable for me. When I loaded the original version of the datalogger it didn’t work as I’d expected, specifically it didn’t log data. Some hacking was required.