on 2024-12-09 06:48 AM
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.
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.
Visit the main page of ST AIoT Craft
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.
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.
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.
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.
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.
The next step is related to the provisioning of the instances on the cloud. Click on the yellow button [Connect E2E System].
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.
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.
When the configuration is completed, you end up in this page where you see all the connected system.
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.
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.
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.
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.