I want to showcase a project I have been working on to reflect the interesting things you can do with Internet of Things (IoT) and Azure services at home that could be commercialised into an industrialised environment.
My latest project is to utilise 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.
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. When it gets too hot in the worm farm it may impact on the health of the worms. 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. Also, to determine evaporation rates, water usage, fertiliser usage, etc.
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 is 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 it reflects on Soil moisture health and water-retaining ability and it will impact plant growth and water usage.
Power BI is used to provide a historical graphical representation of soil moisture and evaporation rates.
Azure Machine Learning:
The IoT device sends to Azure blob storage a small telemetric message every minute. That is 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 send web service commands to the IoT device to control the watering system.
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.
Figure 1: The Farm Workspace
Here is 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 2 I will show you how it was put together.
For further reading on this project, and to try it yourself, check our the next parts of this blog series and others on Telstra Purple Blog:
Make sure you check out part 2, where we introduce the Hardware used for this project. Here's a sneak peak:
In this project, the Arduino MKR NB 1500 and the ENV environmental sensor board works well for my requirements. Of interest is low power and Narrowband connectivity. As the microcontroller needed to work off a solar battery system and Mobile data network this board which I got from Telstra does the job
The Narrowband communication for the IoT Garden project with the MKR NB 1500 is perfect for devices in remote locations without an Internet connection, or in situations in which power isn't available like on-field deployments, remote metering systems, solar-powered devices, or other extreme scenarios. The board's main processor is a low power Arm® Cortex®-M0 32-bit SAMD21, like in the other boards within the Arduino MKR family. The Narrowband connectivity is performed with a module from u-blox, the SARA-R410M-02B, a low power chipset operating in the different bands of the IoT LTE cellular range. On top of those, secure communication is ensured through the Microchip® ECC508 crypto chip. Besides that, the PCB includes a battery charger and a connector for an external antenna.
The board connectivity is on TELSTRA LTE's Cat M1/NB1. The USB port or 5V pin can be used to supply power (5V) to the board. It has a Li-Po charging circuit that allows the board to run on battery power or an external 5-volt source, charging the Li-Po battery while running on external power. Switching from one source to the other is done automatically.
The MKR NB 1500 runs on 5 Volts. This provided a challenge as all my batteries and solar systems work on 12 Volts. I need one of the power supply regulator modules to turn 12v to 5v
High-Quality 3A Adjustable input 4V-35V Output 1.23V-30V dc-dc Step-down Power Supply Regulator module...