How to use the STM32 MPU OpenSTLinux Expansion Pack for Predictive
Maintenance
Introduction
The STM32 MPU OpenSTLinux Expansion Pack for Predictive Maintenance enables the development of Edge processing
applications. It forms an end-to-end solution with corresponding hardware to allow environmental and inertial data from
industrial equipment to be sent to an IoT application with dedicated dashboard for data analysis and identification of conditions
that might require immediate or future maintenance intervention.
The application helps users manage many of the critical aspects of ef
such as registering remote devices, configuring gateways, and connecting to IoT cloud services. In particular, it interfaces with
the Amazon AWS IoT cloud and uses the AWS IoT Greengrass Edge Computing service on the gateway to run local logic and
transmit data seamlessly, even under conditions of intermittent Internet connectivity.
The development hardware for the application includes a vibration kit with motors, STEVAL-BFA001V1B IO-Link sensor boards
with inertial measurement unit, various environmental sensors plus on-board MCU for sensor data computation and
management, and the STEVAL-IDP004V1 IO-Link master board. A gateway node is set up with the STM32MP157C-DK2
Discovery board featuring various wired and wireless connectivity solutions, SD card data storage, LCD touch screen interface
and appropriate high performance STM32MP1 Series microprocessor.
The edge gateway collects environmental and FFT data from accelerometer sensors, which are then sent via MQTT over
Ethernet or Wi-Fi to a dashboard based on the AWS infrastructure.
fective condition monitoring with remote IoT sensor nodes,
Figure 1. Condition monitoring and Edge to Cloud: from sensors to gateway to cloud dashboard
UM2639 - Rev 3 - September 2020
For further information contact your local STMicroelectronics sales of
fice.
www.st.com
1Edge processing application overview
For the edge processing application setup, you need the following elements:
•
Gateway node:
–STM32MP157C-DK2 Discovery board with a minimum 4GB SD card
•Smart sensors and Master hardware:
–master board: STEVAL-IDP004V1
–sensor boards: STEVAL-BFA001V1B kit
•myST.com account for the Edge Processing Application dashboard.
•PC with the STM32 ST-LINK Utility and ST-LINK Programmer (standalone or integrated in STM32 Nucleo
boards).
•Internet connection with no proxy nor firewall.
The figure below shows a demo which integrates all the components required to monitor two motors that can be
driven at different speeds. The two motors can be balanced with different weights, and the dashboard shows the
time, environmental and frequency data of both, allowing the observer to easily identify which motor is not
performing appropriately.
UM2639
Edge processing application overview
Figure 2. Integrated demo with smart sensor nodes installed on two motors
UM2639 - Rev 3
page 2/31
DEPLOY
END
GATEWAY
(2)
GATEWAY
START
VISUALIZE DATA
Gateway
GREENGRASS
START
THE EDGE GATEWAY
INSTALL
EDGE GATEWAY
ASSIGN DEVICES TO
GREENGRASS
CONFIGURE THE
VIBRATION SETUP
STOP
THE APPLICATION
DEACTIVATE
REGISTER
IOT DEVICES
REGISTER AN
CREDENTIALS
Vibration setupDashboard
DEVICE
(3.2)
PROVISIONING
INSTALL
CREDENTIALS
(3.3)
(4)
DEPLOYMENT
APPLICATION
START
(5)
CONDITION
MONITORING
(6)
STOP
APPLICATION
Legenda
BEGIN
MASTERBOARD
INSTALL
(3) APPLICATION SETUP
FLASH THE
STOP THE
ST SDKS
SENSORS
GREENGRASS
INSTALL
(3.1)
VIBRATION SETUP
SETUP
(1)
SENSORS AND
MASTERBOARD SETUP
APPLICATION
ACTIVATE
FLASH THE
START
GREENGRASS
Edge Processing Application setup and operation
2Edge Processing Application setup and operation
The flow chart below provides an overview of the procedure involved in setting up and running the application.
Figure 3. Setup and operation
UM2639
UM2639 - Rev 3
page 3/31
2.1Sensor and master board setup
Follow the procedure below to flash the sensor board and the master board with the latest firmware.
Step 1.Download the binary files for the sensor and master boards from the following locations on the ST
website:
–
Sensor node: STSW-BFA001V1
–Master board: STSW-IDP4PREDMNT
Step 2.Flash the relevant binaries onto the STEVAL-IDP004V1 IO-Link master board and STEVAL-
BFA001V1B IO-Link sensor boards.
Use the STM32 ST-LINK (STSW-LINK004) Utility and an appropriate ST-LINK programmer/debugger
device (standalone or integrated in STM32 Nucleo boards).
2.2Gateway setup
To set up an STM32MP157C-DK2 Discovery kit as the Edge gateway for your Predictive Maintenance Platform,
you can either:
•
Flash a pre-configured image by ST:
–X-LINUX-PREDMNT
•Create and flash a custom image
UM2639
Sensor and master board setup
Figure 4. STM32MP157C-DK2 Discovery kit
STM32 MPU with dual-core Cortex-A7 CPU, 533 MHz GPU and Cortex-M4 MCU
Secure Boot and cryptography, LCD, Wi-Fi, Bluetooth Low Energy
Important:Set the micro-switches to OFF before flashing and to ON just after.
RELATED LINKS
You can use this free tool to master your binary images onto an SD card
isit the STM32 MPU wiki page for relevant guides and resources regarding the STM32 MPU
V
UM2639 - Rev 3
page 4/31
2.2.1How to create an image for the STM32MP1 Discovery kit
Follow the instructions below to configure an STM32MP157C-DK2 Discovery kit as a Linux gateway
Note:The instructions apply to the STM32MP1 DK2 C01 and C2 releases only.
Step 1.Set up your host environment according to the PC prerequisites page at the STM32 MPU wiki page:
This layer contains the recipes to install the Predictive Maintenance application, the Amazon AWS IoT
Greengrass service for edge computing (https://aws.amazon.com/it/greengrass/), and other required
Python packages (view meta-predmnt/conf/layer.conf file for further details):