cancel
Showing results for 
Search instead for 
Did you mean: 

How to develop an end-to-end IoT solution with ST AIoT Craft

Denise SANFILIPPO
ST Employee

Summary

This article showcases how to develop an end-to-end IoT solution with ST AIoT Craft.
In fact, ST AIoT Craft also sets up a full IoT system where the sensor board is connected to a gateway and the gateway communicates with a cloud application.

Introduction

ST AIoT Craft allows you to create an end-to-end solution. This means that you can create a complete project based on sensor nodes and a gateway, which provides meaningful data to the cloud.

You can start from the sensor nodes implementation, in particular from the machine learning core. Then you can move up to the gateway to collect sensor data logging and processing up to the cloud.

ST AIoT Craft offers multiple functionalities, starting from the developing of the AI experience to the IoT project.

1. Hardware prerequisites

  • Raspberry PI as gateway device
  • SensorTile.box PRO as ST MEMS sensor device
  • A USB to USB Type-C® cable to connect the sensor device to the gateway
  • microSD™ card reader to configure the gateway microSD™ card
  • microSD™ for your Raspberry Pi gateway
  • A USB Type-C® cable to connect the sensor device to your PC


2. Develop an end-to-end IoT solution

Visit the main page of ST AIoT Craft

Figure 1: ST AIoT Craft: Project examplesFigure 1: ST AIoT Craft: Project examples

Clone the Asset Tracking project: click on [Smart Asset Tracking], then click on the three dots near the yellow button [Try out] in the pop-up window. Finally, click on [Clone project] and name it Asset_Tracking_2.

Figure 2: Smart Asset Tracking projectFigure 2: Smart Asset Tracking project

This ends up in a new project, which is visible inside the section “My projects”. The cloned project also creates a new view inside the section “My IoT Systems”.

Here you can see a previously configured IoT system and the new one, called Asset_Tracking_2.

Figure 3: ST AIoT Craft: My IoT SystemsFigure 3: ST AIoT Craft: My IoT Systems

Open this new instance of the project. You land on a page which shows the bill of material, meaning the hardware needed for setting up the IoT system.

Figure 4: New E2E deploymentFigure 4: New E2E deployment

Here you need to set up an IoT system made up of a gateway. For example, a Raspberry Pi and a SensorTile.box PRO.
The Raspberry Pi is connected to the internet with Wi-Fi and the SensorTile.box PRO is connected to the gateway through a USB to USB Type-C® cable.

Then you need a microSD™ card, a microSD™ card reader and some cables which are considered later on.

Go ahead with the configuration procedure by clicking on the yellow button [Start].
As a first step, it is required to flash the leaf device, which in this case is the SensorTile.box PRO.

Figure 5: Connect to the sensor device SensorTile.box PROFigure 5: Connect to the sensor device SensorTile.box PRO

After that, you need to configure the gateway, by flashing a preconfigured gateway image that we are offering on the microSD™ card of the gateway.

To do that, you need to download the official Raspberry Pi software tool from the Raspberry Pi website.

You can download the preconfigured gateway image and flash it with the tool.

Figure 6: Gateway configurationFigure 6: Gateway configuration

The next step is related to the provisioning of the instances on the cloud. Click on the yellow button [Connect E2E System].

Figure 7: Cloud environment configurationFigure 7: Cloud environment configuration

The system creates the digital twins related to the gateway and to the leaf device directly onto the cloud.

In this way, all the events coming from those these two devices can be monitored remotely.

The next step is to configure the connection to the Internet of the gateway, and this can be done either over Ethernet or Wi-Fi connection. As an example, let us set the credentials for the Wi-Fi network.

Then click on the [Generate network configuration] button to generate a configuration file.

Figure 8: Generate gateway configurationFigure 8: Generate gateway configuration

Download the generated configuration file and store it on the flashed microSD™ card.

Plug the microSD™ card into the PC using a microSD™ card reader and save the configuration file staiotcraft_config.ini directly onto the FAT32 partition of the microSD™ card.

In the configuration file, there is useful information for the gateway connection to the ST AIoT craft back end. Additionally, the information related to the Wi-Fi network that you have just inserted.

Now, you are asked to plug the microSD™ card onto the gateway to connect the leaf device to the gateway and to power on the devices.

In the last configuration panel, the web portal is waiting for the Raspberry Pi gateway to boot and to connect to the ST AIoT Craft system. This step may require some minutes depending on the internet connection.

On the gateway, we are running the so-called Azure IoT edge software stack which is using some docker containers to boot. It takes some time to complete this operation.

Figure 9: System configuration monitoringFigure 9: System configuration monitoring

When the configuration is completed, you end up in this page where you see all the connected system.

Figure 10: My IoT Systems - Project statusFigure 10: My IoT Systems - Project status

There is the possibility to monitor the system. This new view makes it possible to run an inference by clicking on the yellow button [Start]. The gateway receives commands from the web portal.

Figure 11: Evaluate AI Model - InferenceFigure 11: Evaluate AI Model - Inference

The gateway is configuring the leaf device in inference mode. This means that the gateway is downloading the .ucf file, which is the inference model that you have just trained before. It sends it directly to the leaf device.

The leaf device has been configured and now you can remotely monitor this IoT.
As you see, the events are coming very slowly because there is a delay due to the cloud to device connection.

Figure 12: Evaluate AI Model - Stop inferenceFigure 12: Evaluate AI Model - Stop inference

After a while, you can stop the inference by clicking the yellow button [Stop].

Another important feature is the capability to make a remote data logging, which can tag automatically data while acquiring it. ST AIoT Craft can do that thanks to an algorithm which analyzes data statistics of the acquired data and automatically tag that data.  As soon as the algorithm is satisfied, the acquisition is stopped, and all the data gets uploaded to the ST AIoT Craft portal. Here again you can have a look at the dataset training model, as done up to now.

Conclusion

In this article, you have learned how to develop an end-to-end IoT solution with ST AIoT Craft tool. The sensor board is connected to a gateway and the gateway communicates with a cloud application.

Related links

Version history
Last update:
‎2024-12-09 06:44 AM
Updated by: