Sorry, you need to enable JavaScript to visit this website.

You are here

Azure IoT garden project with Arduino

BY keith coutlemanis 10 November 2020

In this blog, I'll showcase some of the interesting things you can do with the Internet of Things (IoT) and Azure services at home, that could potentially be commercialised in an industrialised environment.

This blog was originally posted here by Keith Coutlemanis, Infrastructure Consultant at Telstra Purple on 02 Jun 2020 as part of a series. See also Part 2 and Part 3.  

An IoT garden project

In my latest project, I used Microsoft IoT in my garden, not only to provide basic monitoring but with scope to take it to the next level. I utilised Azure Machine Learning and Azure Services to create a complex reactive ecosystem controlled through cloud services and voice commands.

The mini-farm environment for this project includes two plots of garden beds: a worm farm and a chicken house. The main goal is for the IoT solution to monitor the environment and control the water and feeding systems for the plants and animals.

IOT Garden Concept

The chicken coup

The small chicken coup for two to four chickens will require automatic watering and feeding systems. The watering system is connected to the mains supply and will refresh the watering outlet of the coup daily.

The feeding system is a 10-litre container with food pellets. The dispensing system is an Auger connected to a servo motor to feed pellets into the feeding tray daily. The level of chicken food in the 10-litre container is monitored through an ultrasonic system measuring the height of the food in the main chamber. The IoT system will monitor for enough food in the main reservoir and alert when it needs attention.

The worm farm

Worms are susceptible to heat and so when it gets too hot in the worm farm, it may impact upon their health. The project calls for monitoring the temperature of the worm farm and to send and record telemetric data to Azure cloud for storage and alerts. If excessive temperatures are measured, then Azure event systems will send instructions to the IoT device to turn on a watering system to cool down and moisten the worm farm to keep the environment cooler.

The garden plot

Typical watering systems on the market today will measure moisture levels and turn on the sprinkler systems without any measurement or logical analysis behind the process.

I wanted to do something upscale, so I created an IoT solution that will send telemetric data to Azure for recording long term statistics for moisture levels at the surface and underground at 10 cm. In addition, it can be used to determine evaporation rates, water usage, fertiliser usage, etc.

Power BI

The IoT device will monitor the environment and send telemetric data to Azure storage. Environmental measurements of temperature, humidity, light levels, soil moisture levels, water flow in LPM are sent every few minutes to Azure IoT HUB for processing.

The statistics are measured for real-time alerts and stored for long-term trend analysis. The evaporation rates and temperature trends are of importance because they reveal soil moisture health and water-retaining ability, which in turn impact plant growth and water usage.

Power BI is used to provide a historical graphical representation of soil moisture and evaporation rates.

Sample Moisture report

Azure machine learning

The IoT device sends a small telemetric message to Azure blob storage every minute. That equates to over 500,000 status updates a year. From all this data, the goal is to determine evaporation deltas and use predictive algorithms to determine the minimum water requirements required in the current environment. The water requirements will change during the hot seasons, milder seasons and plant maturity.

I will use Azure machine learning to model an algorithm to determine evaporation rates and use reinforcement learning to determine the most efficient watering times and watering duration.

The Azure Machine learning service will then send web service commands to the IoT device to control the watering system.

Google IFTT

Just to show off, I have enabled Google Home assistant to turn on and off the watering system via voice commands. "Hey Google, water the garden." The sprinklers will turn on for 10 minutes.

The Office
Figure 1: The farm workspace with IoT solution

Above is an image of the solution on the workbench. You can see the water flow meter and water on/off solenoids, batteries and the Arduino MBK NB 1500 IoT device. In Part two, I'll show you how it was put together.

What's next? 

For further reading on this project, and to try it yourself, check out part two – where we'll introduce the hardware used for this project – and part three in this blog series, as well as others on Telstra Purple.

Related Blogs

anonymous's picture

By DIYODE Magazine


  • arduino
  • iot

IoT Arduino MKR NB 1500 and Telstra NB-IoT

We put the Arduino MKR NB 1500 to the test using the Telstra network and show you how to g...
anonymous's picture

By Michelle Howie


  • hackathon
  • iot

GovHack 2020: IoT sustainability

In the second TelstraDev challenge for GovHack 2020 (read part one: emergency comms and the Telstra...
anonymous's picture

By Michelle Howie


  • iot
  • developer experience

IoT guidelines for wireless developers

The Internet of Things (IoT) is an all-encompassing suite of technologies, with dozens of options fo...
anonymous's picture

By Michelle Howie


  • iot
  • captis

Introducing Telstra Captis

UPDATE [15/7/21]: This product is no longer available for purchase on TelstraDev. More details...
anonymous's picture

By Tiana Fong


  • iot
  • Telstra IoT Platform

Telstra's IoT Platform

  The Internet of Things (IoT) is a network of physical objects that collects data from the...
anonymous's picture

By Michelle Howie


  • messagingAPI
  • Tutorials

Get Started with the TelstraDev Messaging API

Have you ever wondered what an API is and why you should care? Have you ever had a mid-career cri...
anonymous's picture

By Michelle Howie


  • developer experience

Getting virtual in times of uncertainty

Here at TelstraDev, we hope you're continuing to thrive and innovate, staying safe and healthy i...
anonymous's picture

By Brendan Myers


  • arduino
  • MKR NB1500

Introducing the Arduino MKR NB1500

Last year, we were proud to announce our partnership with Arduino to help create an IoT-network...
anonymous's picture

By Christy Daguia


  • messagingAPI
  • replyRequest

Conversation via Telstra Messaging API

Creating a message thread can be done via Telstra Messaging API, whereby you can continue sending an...
anonymous's picture

By Rajeev Ramani


  • MMS
  • performance

Fine-tuning MMS performance on Telstra's Messaging API

  Here at TelstraDev, we strive to make the best possible developer experience, from the recen...
anonymous's picture

By Marcus Kennan


  • callbacks
  • Messaging SDK

Understanding Messaging API Callbacks - Part 2

Welcome to the second in a two part series on understanding the messaging API callbacks. In our firs...
anonymous's picture

By Marcus Kennan


  • callbacks
  • postman

Understanding Messaging API Callbacks - Part 1

The callback functionality of the messaging API is a great utility allowing you to track the deliver...