Christian Hollinger's Garden Gets Smart — with a Raspberry Pi, Sensors, and Grafana

After picking up embedded programming from first principles, Hollinger has big things planned — including machine learning analysis.

Software engineer Christian Hollinger has launched a project to smarten his home garden using a range of sensors, a Raspberry Pi, and Grafana — leveraging his experience in data engineering and analysis.

"I took this opportunity of a semi-real need to finally gets my hands dirty in the world of physical electronics and micro-controllers," Hollinger writes of his project to smarten a trio of raised beds, used for growing vegetables. "This is a topic that is entirely new to me, and given that I am the worst 'learning by doing'-type person you could think of, there was no better opportunity than this to haphazardly soldering together some circuits to collect data."

"Data is what I am after here — data on sun exposure, soil moisture, and temperature. This is actually a bit of an interesting question, because these metrics are hyper-localized and can be entirely different only a couple of feet away. So we’ll be collecting metrics like soil moisture, sun exposure UV, plus metadata like device ID and timestamp, send it to a server on the network using a REST API (bigiron.local, of course), store it in MariaDB, and analyze it using Grafana."

Hollinger turned to the popular Raspberry PI family of single-board computers, MCP9808 temperature sensors, an SI1145 digital UV index, infrared, and visible light sensor, an Adafruit VEML7700 light sensor breakout, and a simple resistive humidity sensor — then, before actually putting any of the sensors to work, set about relearning basic electronics, embedded programming, and soldering.

By the time Hollinger was done, the project had a home - a plastic box "sealed" with electrical tape, "since I don't own a 3D printer," he explains — and had gained a Raspberry Pi Camera Module for visual monitoring of the weather conditions. It immediately recorded something interesting: "The temperature doesn't match the recorded temperatures as per the iPhone weather app," Hollinger notes. "That should have been a constant 72F (or 22.2C), whereas during non-high intensity periods, the beds are hovering around 18-19.C (64.4 - 67F)!"

The full write-up, with breadboard layout and source code, can be found on Hollinger's website now; a second post is promised, looking at a move to a lower-cost model of Raspberry Pi, the deployment of multiple sensor nodes, automated camera use, and to "run some form of ML [machine learning] model on the structured + unstructured data from the camera."

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles