Azure IoT and Wilderness Labs Project Lab

Azure IoT and Wilderness Labs Project Lab

Sandro Bormolini

Sandro Bormolini
Created on:
Created on:

Sandro Bormolini

Sandro Bormolini

Concept

Based on the theoretical knowledge from Microsoft Lean and the practical experience with the Wilderness Labs Project Lab, I have designed the following case study. The raw sensor data should be transferred from the microcontroller to Azure, where it is recorded, cleaned and normalized. This data will then be prepared for an analytics platform to gain insights and history of the sensor data. The end result is a system for monitoring the selected plant that is based on state-of-the-art technology, hence the name of the project "PlantMonitor".
Information technology is an industry that is constantly and rapidly changing, and this is especially true in the cloud. New technologies, programming languages and standards seem to emerge almost daily and what is considered the latest development today could be outdated tomorrow. Given this ever-changing landscape, continuous learning is not a luxury, but a necessity.
However, learning in the IT sector goes beyond getting to know the latest technologies. It's also about understanding how these technologies interact with each other and how they can be used to develop innovative solutions. It's about learning new approaches and ways of thinking that help us to work more effectively and efficiently.
With this in mind and out of great personal interest, I have set myself the goal of furthering my education in the field of IoT and consequently Azure IoT. In order to achieve my goal, I have set myself the task of self-studying with the help of the resources on the Online platform Microsoft Learn display the theory on the topic. I also try to realize a small project using Azure and an IoT board, which gives me a deep insight into this topic and valuable practical experience and finally I try to put my acquired knowledge to the test by aiming for the certification as Microsoft Azure IoT Developer and - hopefully 😊 - successfully complete it.

What is IoT actually?

The Internet of Things (IoT) may sound like a complex technology, but it is actually a simple idea. To put it simply, it is a network that connects everyday objects with each other. These objects could be anything - from your fridge at home to simple machines or complex production systems in a factory.
A practical area of application for IoT is industry, in this context IoT is often referred to as "Industry 4.0" or "Industrial IoT" (IIoT). This is a new phase in the industrial revolution that connects the physical with the digital world. For example, sensors on machines in a factory can collect data such as temperature, pressure, speed and many other types of information. This data is then sent over the internet to a central location, such as Azure, where it can be analyzed. This allows operators to recognize patterns, make predictions and make decisions based on this information.
This can improve efficiency, reduce downtime and improve product quality. It can also help to increase safety by identifying potential problems before they lead to serious accidents.
In summary, the IoT is a powerful technology that can revolutionize the way industries work. It enables unprecedented communication and coordination between machines and devices, which can lead to significant improvements in many areas.

Microsoft Learn

Microsoft Learn is an online learning platform that offers numerous learning paths and certifications for various Microsoft technologies, including Azure IoT. Due to my previous positive experiences with the platform and the always up-to-date content, I decided to use Microsoft Learn again. In my opinion, Microsoft Learn offers additional benefits:

  • Structured content: The platform offers well-structured and organized learning paths. The AZ-220 learning path, like all other paths, is divided into modules, each of which deals with a specific topic. As a result, concepts are presented in a logical order in a clear and understandable way.
  • Practical experienceMany modules include interactive exercises and labs in which the knowledge learned can be applied in practice. This helps to better understand the previously learned concepts.
  • FlexibilityMicrosoft Learn is online and can be accessed at any time and from anywhere. This allows me to learn at my own pace, especially in the context of self-study.
  • Free of chargeThe learning content on Microsoft Learn is free. This makes it an affordable way to learn new skills and prepare for certification exams.
  • Preparation for certificationThe AZ-220 learning path is specifically designed to prepare me for the Azure IoT Developer certification exam. It covers all the necessary topics and competencies that will be asked in the exam.

With a Raspberry PI, I would have had to procure this missing equipment as additional external sensors, which would have been a further challenge given the current supply bottlenecks for the Raspberry PI. So all I had to do was procure a capacitive soil moisture sensor and I was ready to develop my first IoT application for the Project Lab. Wilderness Labs provides an example GitHub repository, which makes it much easier to get started thanks to numerous examples. I find it particularly helpful that each example is clearly structured and highlights a specific aspect of Project Lab. This allows you to choose the example that best suits your current needs.
Fortunately, among the projects provided, there is one that uses an external sensor to measure the soil moisture of a plant pot - exactly what I need. There is also another project that uses the integrated Wi-Fi module, and just recently added is a sample project that transmits sensor data from Project Lab to Azure via the Azure IoT Hub using the AMQP protocol.

Thanks to the example projects mentioned and occasional support from an ice-cold mate, I was able to develop a Project Lab application relatively quickly. This not only reads the data from all the integrated sensors, but also from the external soil moisture sensor and forwards it to Azure. In addition, I created a simple user interface that displays the data color-coded on the LCD display. Now that I have a working application, I can focus on the next challenge: implementing the backend, i.e. the Azure infrastructure.

Concept

Based on the theoretical knowledge from Microsoft Lean and the practical experience with the Wilderness Labs Project Lab, I have designed the following case study. The raw sensor data should be transferred from the microcontroller to Azure, where it is recorded, cleaned and normalized. This data will then be prepared for an analytics platform to gain insights and history of the sensor data. The end result is a system for monitoring the selected plant that is based on state-of-the-art technology, hence the name of the project "PlantMonitor".

As already mentioned, the heart of the solution is the Project Lab, a powerful microcontroller system from Wilderness Labs. This IoT device is equipped with sensors that can collect a variety of measurement data from the plant, including humidity, temperature, light conditions and, in addition, the soil moisture of the plant pot via the external sensor. The collected data is then transferred securely and efficiently to Azure.
As soon as the data arrives in the Azure Cloud, Azure IoT Hub comes into play. This cloud gateway is responsible for receiving the incoming data and forwarding it to Azure Cosmos DB for further processing via a defined route.
In Azure Cosmos DB, each new data set is processed as a JSON document by the change feed event. This means that every time a new document arrives, the incoming sensor data is normalized and processed. But that's not all. The sensor data is also enriched with current weather data through Azure Maps Weather API. This additional information allows for an even more accurate analysis of the conditions the plant is exposed to.
Another feature of Azure Cosmos DB is the integration of Azure Synapse Link. This function enables the final data processing by Azure Synapse. This powerful analysis tool makes it possible to gain detailed insights from the data via Jupyter notebooks, for example, and use them to improve plant care.
Overall, this IoT solution offers simple monitoring of plants. By combining the power of Project Lab with the flexibility and scalability of Azure, you can better understand and optimize the conditions under which our plants grow. With this technology, everyone can have a green thumb - or at least try to 😉

Data flow summarized once again

  • The IoT application on the microcontroller reads sensor data and sends it to Azure via the Azure IoT Hub cloud gateway.
  • On arrival at the Azure IoT Hub, the package is forwarded directly to a CosmosDB container called "telemetry" via a defined route.
  • After the package has been created as a JSON document in the "telemetry" container, the change feed trigger triggers an Azure function. This function converts the Base64-encoded payload, restructures it and adds current weather data. The restructured document is saved in the "plantdata" container.
  • By activating Azure Synapse Link, another container is created in the CosmosDB database. This container normalizes the data provided from the "plantdata" container and optimizes it for analytical operations.
  • Thanks to Azure Synapse Link, it is possible to query data from the "plantdata" container in Azure Synapse Analytics using Jupyter Notebooks. This enables comprehensive insights into the collected sensor data. In addition, Azure Machine Learning can be used to create a model that can make predictions, such as when a plant needs to be watered next.
en_USEnglish