Build your own Raspberry Pi terrarium controller

Tom Bennet grows Nepenthes, tropical carnivorous plants that I know by the name of pitcher plants. To stay healthy they need a temperature- and humidity-controlled environment, and Tom ensures this by housing them in a terrarium controlled by a Raspberry Pi 3 and Energenie’s Pi-Mote starter kit, which provides an easy way to control mains electrical sockets from a Pi. He has written step-by-step instructions to help you build your own terrarium controller, the first such guide we’ve seen for this particular application.

A terrarium in a cuboid glass tank with fluorescent lighting, containing six Nepenthes plants of various species

Nepenthes plants of various species in Tom Bennet’s Pi-controlled terrarium. Photo by Tom Bennet

Tom’s terrarium controller doesn’t only monitor and regulate temperature, humidity and light, three of the four main variables in a terrarium (the fourth, he explains, is water, and because terrariums tend to be nearly or completely sealed, this requires only infrequent intervention). It also logs data from its sensors to Internet-of-Things data platform ThingSpeak, which offers real-time data visualisation and alerts.

Line chart plotting terrarium temperature and humidity over a 24-hour period

24 hours’ worth of temperature and humidity data for Tom’s terrarium

One of the appealing aspects of this project, as Tom observes, is its capacity for extension. You could quite easily add a soil moisture sensor or, particularly for a terrarium that houses reptiles rather than plants, a camera module, as well as using the online data logs in all kinds of ways.

The very clear instructions include a full and costed bill of materials consisting of off-the-shelf parts that come to less than £90/$125 including the Pi. There are helpful photographs and wiring diagrams, straightforward explanations, practical advice, and Python scripts that can easily be adapted to meet the demands of different habitats and ambient conditions. Thank you for writing such a useful guide, Tom; we’re certain it will help plenty of other people set up their own Pi-controlled terrariums!