Overview

Keep forgetting to water your plants? Want to monitor the ambient temperature of your the room your plant is located in from across the world? 

In this guide, you will build an Internet-enabled plant monitoring display by combining Microsoft's Azure IoT Hub and CircuitPython! 

Using Azure with your CircuitPython IoT projects allows you to rapidly prototype (and even mass-prototype) advanced internet-of-things devices and connect them to Microsoft Azure services. 

Once your CircuitPython device's data is sent to an Azure IoT Hub, you can link your IoT Hub with all of the Azure Cloud Tools, such as:

You can find all the services compatible with the Azure IoT Hub here.

CircuitPython Code

CircuitPython is perfect for building Internet-of-Things projects. This project uses the ESP32SPI CircuitPython library, which can use the ESP32 as a WiFi-coprocessor to send web requests.

We've created a CircuitPython Azure IoT helper module to make interacting with an Azure IoT Hub incredibly simple.

You can rapidly update your code without having to compile and store WiFi and API secret keys on the device. This means that there's no editing code and re-uploading whenever you move the PyPortal to another network - just update a file and you're set. 

Stemma Soil Sensor

This soil sensor uses capacitive measurement. Capacitive measurements use only one probe, don't have any exposed metal, and don't introduce any DC currents into your plants. We use the built in capacitive touch measurement system built into the ATSAMD10 chip, which will give you a reading ranging from about 200 (very dry) to 2000 (very wet).

As a bonus, we also give you the ambient temperature from the internal temperature sensor on the microcontroller, it's not high precision, maybe good to + or - 2 degrees Celsius.

Prerequisite Guides

If you're new to CircuitPython, take a moment to walk through the following guides to get you started and up-to-speed:

Parts

Adafruit PyPortal - CircuitPython Powered Internet Display

PRODUCT ID: 4116
PyPortal, our easy-to-use IoT device that allows you to create all the things for the “Internet of Things” in minutes. Make custom touch screen interface...
$54.95
IN STOCK

Adafruit STEMMA Soil Sensor - I2C Capacitive Moisture Sensor

PRODUCT ID: 4026
Most low cost soil sensors are resistive style, where there's two prongs and the sensor measures the conductivity between the two. These work OK at first, but eventually...
$7.50
IN STOCK

STEMMA Cable - 150mm/6" Long 4 Pin JST-PH Cable–Female/Female

PRODUCT ID: 3568
This 4-wire cable is a little over 150mm / 6" long and fitted with JST-PH female 4-pin connectors on each end. These types of JST cables are commonly found on small rechargeable...
$0.75
IN STOCK

Materials

You'll need some extra supplies to finish this project. If you do not have them already, pick some up from Adafruit.

1 x PyPortal Stand
Adafruit PyPortal Desktop Stand Enclosure Kit
1 x USB Cable
Pink and Purple Braided USB A to Micro B Cable - 2 meter long
This guide was first published on May 24, 2019. It was last updated on May 24, 2019. This page (Overview) was last updated on Jun 27, 2019.