How IoT devices help us make sense of the green environment— A journey toward homemade plant monitor

Learn, build, and critique everything about IoT

Vivian Ku
9 min readNov 27, 2021

I am currently an MSc student in Connected Environments at the Centre for Advanced Spatial Analysis (CASA), The Bartlett, UCL. My experience has positioned myself at the intersection of the IoT solution, business analytics and built environment discipline and my aim is to apply my specialist knowledge to the digital twin solutions in the smart city industry. This project is my individual project for CASA0014 — Connected Environments.

Introduction

City has become a more powerful mover than ever, playing an imperative role in solving climate change issues [1]. There are so many things to do to upkeep the quality of urban life, but the green environment cannot be emphasised more. Green environment, such as open spaces, parks, roof gardens or even the windowsills, is well-known for being the stepping stones for wildlife, improving the biodiversity in urban environment, mitigating the flooding and landslide hazard, and sustaining physical and mental health of human being. Yet, green infrastructure helps citizens not only dealing with the uncertainty but also understanding the performance of our built and natural environments.

With the promising technology advances, IoT devices collecting data from the green space can help people better understand the performance of the man-made landscape and buildings. The “ENO Microclimate Sensor” project, deployed by ICRT at Queen Elizabeth Olympic Park (QEOP) [2], measures microclimate via the temperature and humidity sensors strapped on different trees on the wetland area to better know if the design of the wetland successfully achieves its goal of cooling the area.

In the field of architecture, engineering and urban planning, the methodologies we observe, interact, and design our built and natural environments are augmented by the live data from the real world. Even though deploying the IoT devices in the urban green infrastructure is too complicated to design and test under tight time and budget constrain, it is much easier for everyone to deploy plant monitor sensors, connect to the internet, collect live data, and store and visualise data for their houseplants. From this point, people can find more efficient way to take care of their plants and eventually have an opportunity to consider the performance of our built and natural environment and how people generate insight through a great volume of data.

A Journey toward Plant Monitor

Similar to applications in monitoring the large-scale green environment and agriculture, IoT-enabled houseplant caring solution can bring lots of advantages in saving time and resources for keepers and retaining the healthy condition of plant. My plant, Peace Lily, is well known for purifying air as a houseplant. It thrives in the area with around 60% humidity and low light environment with a temperature between 18–22 °C. The common unhappy signs for it are yellow leaves, reduction in blooms, and the tips of the leaves turning brown [3] [4] [5].

Peace lily

Process

This project has gone through five building stages from setting up experimental environment, building sensors, publishing data, storing data, and in the end, visualising data to end users. In addition, the real-time monitoring via website and app is built as an extended application.

Five stages of plant monitor project

1.Setup Environment — Arduino IDE & Feather Huzzah ESP8266 WIFI

The microcontroller is a programming chip or board containing a processor, RAM, and input/output, and usually the choice of board should depend on the required connectivity, input format, the constrains of voltage and the functionalities interface [6]. Since for this project the WIFI connectivity is required for publishing data to MQTT server, the microcontroller called “Feather Huzzah ESP8266 WIFI” is used here. Then the coding for setting up WIFI and ezTime is done via Arduino IDE. See the code here.

Specification of Feather Huzzah ESP8266 WIFI

2. Build Sensors — Temperature, humidity, and moisture sensors

DHT22 and nail soil sensor are used to capture the environmental and plant’s live data, including temperature, humidity and soil moisture level.

Specification of DHT22
Schematics (Source: CE Workshop, CASA, UCL)
Building sensors

3. Collect and Publish Data — MQTT server

MQTT (Message Queuing Telemetry Transport) is a lightweight protocol that transports messages between devices. By using MQTT server, people can publish and subscribe to the real-time data for the ad-hoc topics.

The following steps are taken through Arduino IDE for publishing data to the customised topics.

a. Connecting to WiFiSee the full code here.b. Getting the current timeSee the full code here.c. Publishing data to MQTT serverSee the full code here. Here the three “Topics” (Temperature, Humidity and Moisture) are setup in MQTT server.(Note: The data is not being stored anywhere during this stage.)

And the result in MQTT Explorer looks like this:

MQTT Explorer and the data published to topics

4. Store Data — Raspberry Pi 4 & InfluxDB

a. Raspberry Pi: Microcomputer

For many years, Artificial Intelligence (AI) application is mostly developed up in the clouds; however, applying Edge Computing, a computing paradigm that processes and stores data closer to the sources of data, is much more sensible under certain circumstances since it reduces the response time of sending data to the cloud and the cost of using large bandwidth. One of the most well-known hardware for edge computing is Raspberry Pi, it works as a microcomputer with a fully operating system and has huge potentials to perform deep learning and machine learning on the edge. To store and visualise data, InfluxDB, Telegraf and Grafana are installed in Raspberry Pi through SSH.

Raspberry Pi 4

b. InfluxDB: Time series database

InfluxDB is a time series database and can handle the epic volume and sources of time-stamped data generated from IoT sensors, applications and infrastructures [7]. There is always a need to gain insights from the time stamp data, especially for the manufacture, autonomous car, logistics, building, and financial industries. Using time series database can optimise the speed in writing data, the efficiency in the usage of capacity, and the rapid accessibility in querying and sorting data. To see more introduction of time series database, please refer to this. For this project, InfluxDB, now the №1 ranked time series database [8], is used to store data from MQTT server.

5. Visualisation — Grafana

Grafana is an industry standard for IoT data visualisation tool. It is a multi-platform open-source analytics and interactive visualisation web application, working well with time series databases like InfluxDB, monitor platforms and other data sources.

After connecting Grafana dashboard to the InfluxDB — mqtt consumer and grouping data by the tag(topic), three kinds of data are shown on the dashboard (Green for humidity; yellow for moisture; blue for temperature). Since the data is published every minute, the graphs are dotted lines and scattered in a time series manner.

Last 24hr data (Green for humidity; yellow for moisture; blue for temperature)
Last 1hr data (Green for humidity; yellow for moisture; blue for temperature)

Extension

1. Digital Plant: A real-time monitoring website

From user’s perspective, it is important to allow them to interact with the real-world environments by using a user-friendly interface (either through digital devices or real gauges). A website embedded a 3D model of Peace Lily is built for users to monitor live data from anywhere in network environment. The following steps have been taken to build the website:

a. Taking pictures of Peace Lily by smartphoneb. Building up a 3D point-cloud model by Metashapec. Designing and building an online monitor by HTML, A-Frame, jQuery and JavaScriptd. Collecting data from MQTT serverSee the website’s code here.
3D point-cloud modeling
Real-time monitor website

2. App monitor: A real-time monitoring app

3. Detect the unhappy signs remedy them at the early stage. (On-going)

As previously mentioned, the common unhappy signs for Peace Lily are related to the colour and morphology of leaves. The colour detection or computer vision methodologies by edge computing could be considered.

Reflection

Design and deployment of Plant Monitor

1. Power system

The power of microcontroller is USB power supply for this time; however, this will be a limitation when it comes to deploy devices remotely or in anywhere without wall socket. It is nice to use solar panel as it could sustain longer than battery and the plant needs sunlight as well.

2. Device enclosure

As for indoor plant monitor, usually the device will not get water into it; however, device is still possible to get wet because of watering so the water-proof enclosure should be taken into consideration.

3. Deployment location

The device should be close to the plant to get the environmental data the same as plant “feels”. However, since most houseplant is in the place where is accessible for people as well, the further care of device should be considered.

4. User interaction

The user interface would vary from user to user. For example, young people may prefer monitoring their plant through website or app; elder people may prefer to read the subtitles of current situation on larger screen; visually impaired may have to listen to the status of plant. User interface and interaction should be designed based on the end users’ needs.

Comments on other similar devices

There are other similar plant monitors which are built for different purposes but most of them share one common goal — achieving automation in taking care of the plant.

In one case [9], an automated watering system is design to control and reduce the wastage of water by using ultrasonic sensor to observe water level; In another example [10], LDR sensor is adopted to detect the level of sunlight and send notification when the value is beyond or under the requirement. Another research [11] designs smart pot embedded sensors and it also detect pH value of the soil as a symbolic indicator in plant thriving. Finally, another project [12] designs a gauge for better visualisation, allowing users to identify a range of values for plants by colours.

Gauge dashboard for plant monitoring (Source: Smart Plant Monitoring System using Arduino and IoT (survivingwithandroid.com))

--

--

Vivian Ku

科技轉型顧問@英國倫敦,關注解決都市議題之新創公司、商業模式與未來城市產業趨勢,寫作是為了保持學習的節奏。文章分類: Smart City | Growth Mindset | Entrepreneurship | Reading. Link: linktr.ee/vivianku.growth