Azure Percept – AI on the EDGE

Thank you for everyone that attended the two AI on the Edge talks at MSDUG Johannesburg and Cape Town.

As promised I’m sharing the additional content from the Azure Percept.

https://www.meetup.com/cape-town-ms-dev-user-group/events/287139061/

https://www.meetup.com/johannesburg-ms-dev-user-group/events/287592457/

Some more information about Azure Percent

Learn about Azure Percept 

AZURE.COM page
Product detail pages
Pre-built AI models
Azure Percept – YouTube

Purchase Azure Percept
Available to our customers – Build your Azure Percept
    

Product Launch
Roanne Sones & Moe Tanabian Presentation from Ignite
MyIgnite – New innovations to bring AI to the edge (microsoft.com)

Announcement blog

Architecture and Technology

Technical Overview of Azure Percept with Microsoft Mechanics by George Moore 
Build & Deploy to edge AI devices in minutes

Azure Percept enables simple AI and computing on the edge: Check out the blog here

Audio Demo:

How to easily set up and use audio Edge AI with Azure Percept – YouTube

AI Models:

AI models supported by Azure Percept DK (microsoft.com)

Getting started with Advanced Development on the Percept DK via Jupyter Lab and Azure Machine Learning: Access here

Industry Use Cases and Community Projects

Internet of Things – Microsoft Tech Community

Azure Percept showing Edge Computing and AI in the Agriculture Summit keynote by Jason Zander – YouTube

Using Azure Percept to build the next Smart Building

BlueGranite’s Smart City Solution

Building the next smart city with Azure Percept

Industrial IoT and Preventive Maintenance

Technology for Ranching | upperyellowstone and Smart Video Cameras | upperyellowstone

Set up your own end-to-end package delivery monitoring AI application on the edge with Azure Percept

Live simulation of Azure Percept from Alaska Airlines: Azure Percept dev kit to detect airplanes and baggage trucks on an airport runway.

Using Azure Percept to build an Aircraft Part Checker

Azure Percept Audio – Home Automation with Azure Functions, Azure IoT Hub and Raspberry Pi

Face your fears, learn new stuff, and push out on the edges with Azure Percept

Perceptmobile: Azure Percept Obstacle Avoidance LEGO Car

Outdoor Irrigation

For this outdoor farm to be truely sustainable I decided to water it with rain water tanks and have it self powered by the sun with solar panels.

Eco Rain water tank and solar panel
Starting the sustainable solar powered watering system
Irrigation piping and fittings
Installing microjet sprayers in planters
Microjet sprinkler
Prototyping the solution using ESP32 and .NET Nanoframework
Testing Solar Panel and controller

The Outdoor IoT Farm Begins

It’s time to start moving the indoor IoT Farm to being an outdoor IoT farm. The idea I have is to do some experimentation and research into creating automated constrained space farms. I’m going to turn this into a hands on hack series for the CPTMSDUG user group and also share the learnings. Hopefully it goes well. 😁

Today was the big shopping day to get everything I need.

Shopping at the nursery with the much needed coffee.
Some nice wooden planters from the Pole Yard.
Preparing the soil
The offerzen Basil that was grown at a hack event was planted
Getting there
The first evening of the indoor crop being outdoors
New crops added to the indoor IoT Grow station

Azure Percept

Woohoo!! So excited my Azure Percept arrived. Time to do some playing. 😊

Learning Resources

Azure Percept DK and Vision device overview https://docs.microsoft.com/en-us/azure/azure-percept/overview-azure-percept-dk

Azure Percept sample AI models https://docs.microsoft.com/en-us/azure/azure-percept/overview-ai-models

AI @ the Edge https://www.youtube.com/channel/UCa8_TsUuotIMuzkLzGNQPIg

Azure Percept Audio Overview- set up and use your voice assistant https://www.youtube.com/watch?v=K9HfwsDGVnU

Azure Percept | Build & Deploy to edge AI devices in minutes https://www.youtube.com/watch?v=zSBNsEqU5NA

Azure Percept showing Edge Computing and AI in the Agriculture https://youtu.be/1H-U8psvxYE

Unboxing the Azure Percept
Unboxing of the Azure Percept Audio

Cool logo
It arrived!!!
Azure Percept Vision

The full Azure Percept unit

Azure Percept Ports

Lets try some Agri models

Microsoft Developer Cloud Summit 2021

I hope you enjoyed the Microsoft Developer Cloud Summit today! Thank you very much for attending my session: Automating your home or office with IoT Central and Power Apps” It was a lot of information in 30 min, so here’s the content, resources and source code.

This whole session was done using Home Automation devices combined with OBS. Camera Scene changes were controlled with a standard home remote control. So automation doesn’t have to be traditional garage doors or lighting, you can control you PC life too! 😎 Controlling your OBS Scenes with a Home Automation device

Link to Presentation: Microsoft Developer Cloud Summit 2021 Presentation

Topics

Connecting a Pimoroni Environment Monitor to IoT Central

Connecting Azure IoT Central to Power Apps and Power Automate

Arduino Smart Watering Kit with Azure IoT Central

Building an Azure IoT Central “Gateway” using Node-RED

Flashing Sonoff Devices with TASMOTA

Controlling your OBS Scenes with a Home Automation device

Installing Node-RED in a Container

Installing Eclipse Mosquitto in a Container

Other Resources

IoT Central

https://azure.microsoft.com/en-us/services/iot-central/

Power Apps

https://powerapps.microsoft.com/en-us/

Node-RED

https://nodered.org/

Tasmota

https://tasmota.github.io/docs/

Environmental Monitor

https://www.pishop.co.za/store/enviro–for-raspberry-pi?keyword=enviro&category_id=0

Sonoff

https://www.takealot.com/all?filter=Brand:Sonoff

Arduino Smart Watering Kit with Azure IoT Central

I came across this Smart Watering Kit by Elecrow. It was really great, but one thing missing is internet conectivity. We all know that we can’t grow plants without the “I” in IoT! So let’s see what we can do about that!

Electrow Ardunio Smart Plant Watering Kit
Inside the box

The kit comes with everything you need to water four different plants automatically.

The box contains

  • Arduino Leonardo
  • Power Supply
  • Pump
  • 4 Capacitive Moisture Sensors
  • 4 Way valves
  • Pipes

The kit is very comprensive and includes and LCD display which can show at a glance the conditions of your plants.

The board
Serial Port

The board unfortunately does not have built in wifi connectivity. But what it does have is a serial port. That’s perfect, so what we could do is use that to send telemetry out to another device that is internet / wifi enabled.

A good device for that is a good old (and cheap) 8266 board. I had a NodeMCU in my box of tricks, so I decided to use that.

Parts List

  • Arduino Smart Watering Board (Arduino Leonardo)
  • NodeMCU board
  • 2.2 K ohm resistor
  • 1 K ohm Resistor
  • 470 ohm Resistor
  • Breadboard
  • Wires
  • Power Supply

Connecting an Arduino Leonardo to a Node MCU via Serial Port

First step is to make it work on a breadboard.

Parts List

  • Arduino Smart Watering Board (Arduino Leonardo)
  • NodeMCU board
  • 2.2 K ohm resistor
  • 1 K ohm Resistor
  • 470 ohm Resistor
  • Veroboard
  • Wires
  • Power Supply
Connecting an Arduino Leonardo to a Node MCU via Serial Port

Once working, the next step is to build that onto a more permanent solution. I decided to use just veroboard as it was quick and easy.

Two boards up and running

IoT Central

Device Templates

Device Capabilities

Create device capabilities for the moisture sensors as telemetry (Moisture1, Moisture2, Moisture3, Moisture4). [Device Definition json file is in the github repository along with the source code]

Create properties for the 4 relay states for each of the 4 valves. [Device Definition json file is in the github repository along with the source code]

Create a property for the pump state. [Device Definition json file is in the github repository along with the source code]

Publish the template and create an instance of the template as a device.

Instance of a device template

Note the “connection” information for the new device instance.

Device “Connection” information

Take note of the following:

  • Scope ID
  • Device ID
  • Primary Key
iotcserialrelay.ino

Update the iotcserialrelay.ino file with the:

  • WIFI_SSID – The wifi hotspot ssid
  • WIFI_PASSWORD – The wifi hotspot password
  • SCOPE_ID – The Device Instance’s Scope Id
  • DEVICE_ID – The Device Instance’s Device Id
  • DEVICE_KEY 0 The Device Instance’s Key

Deploy iotcserialrelay.ino to NodeMCU.

Deploy watering_kit.ino to the Arduio Smart Watering Board.

Telemetry in IoT Central

Once deployed and connection is made, telemetry starts appearing within IoT Central’s dashboard.

Finished Product with happy plants powered by Microsoft Azure 😎😎

Source code: https://github.com/apead/SmartWateringKit

Product Information: https://www.elecrow.com/arduino-automatic-smart-plant-watering-kit.html

Where to buy? https://www.robotics.org.za/AAK90039K

Controlling your OBS Scenes with a Home Automation device

You can easily set up a standard 433 Mhz remote control that you use every day in your home to control scenes in OBS (Open Broadcast Software) if you don’t own a fancy Stream Deck.

All you need is a remote, a 433 Mhz Wifi Bridge and some Node-RED magic.

Sonoff 433 Mhz Bridge

Flash the bridge using these instructions: https://explorationspace.co.za/2021/02/10/sonoff-rf-bridge-433-tasmota/

Standard Home Automation Remote control
433 Mhz Wifi Bridge to OBS via Websockets Node-RED Flow

Install the OBS Websocket plugin: https://github.com/Palakis/obs-websocket/releases/tag/4.9.0

Node-RED Switch using button codes to control flow

The 433 Mhz Bridge when it detects a signal, it publishes a message with it’s contents via MQTT. These will have codes attached to them and in the case of a remote, that code / data that is sent via the message payload translates to the button pressed. You can “train” your solution with the remotes you have. These can be standard house-hold remotes.

Scene flows per button press

The switch statements routes the flow based on the button data to a specific function.

Scene switch command to OBS Socket Server

The function sends a message with the “scene-name” with the parameter of the scene created in OBS.

Scenes in OBS

For additional commands refer to the protocol document:

https://github.com/Palakis/obs-websocket/blob/4.x-current/docs/generated/protocol.md

Happy streaming! 😎