Working with AlgoBuilder – a tool to develop MEMS algorithms graphically

Author: Vishal Goyal, Senior Manager – Technical Marketing, South Asia and India, STMicroelectronics

AlgoBuilder

AlgoBuilder is a tool for Quick prototyping of applications for MEMS sensors on STM32 microcontrollers platform. It includes data processing blocks, additional functionalities, and already existing algorithms such as sensor fusion or pedometer.

AlgoBuilder enables to ease the process of implementing a proof of concept of MEMS-based algorithms using a graphical interface without writing the code. So an architect of systems can develop a proof of concept without knowledge of coding. Algorithm is very modular in approach. Developers can reuse previously defined blocks and even visualize the data in real time using plot and display tool can Unicleo-GUI.

The main feature of this application:

  • Simple graphical design (drag and drop, connect, set properties)
  • Libraries including motion sensor algorithms such as sensor fusion, gyroscope, and magnetometer calibration, and pedometer.
  • Function block creator for custom block creation
  • Automatic validation of the design rules
  • C code generated from the graphical design
  • Utilization of external compilers: STM32CubeIDE, IAR EWARM, Keil µVision®, System Workbench for STM32
  • Outputs from generated firmware can be displayed in Unicleo-GUI application
  • Open XML for function blocks and design storage
  • NUCLEO-F401RE or NUCLEO-L476RG with X-NUCLEO-IKS01A2 or X-NUCLEO-IKS01A3 or SensorTile STEVAL-STLKT01V1 or SensorTile.box STEVAL-MKSBOX1V1
  • Network update with an automatic new release notification

Architecture of AlgoBuilder

AlgoBuilder tool integrates firmware templates, sensors drivers, and sensor libraries. It integrates these blocks using the framework of XML and c codes and provider user a graphical user interface. AlgoBuilder tool has a provision to integrate external compilers which get seamlessly integrate for the compilation of any new user-generated code. Further, this tool allows the compiled program to be directly downloaded in compatible STM32 microcontrollers in Nucleo board ecosystems. Support for STM32 NUCLEO-F401RE, NUCLEO-L476RG with connected X-NUCLEO-IKS01A2 or X-NUCLEO-IKS01A3 expansion boards. AlgoBuilder also supports integrated tools such as SensorTile STEVAL-STLKT01V1 or SensorTile.box STEVAL-MKSBOX1V1.

develop MEMS algorithms

Libraries in Algobuilder

Libraries in Algobuilder

Steps to develop an example code on AlgoBuilder

Step 1:

Open AlgoBuilder and click on new design. User may also open a preexisting design.

Step 2:

Start placing the blocks. Start with Sensor Hub block as it simulates the block with raw data of every sensor. Change the full-scale reading according to the application requirements. Full-scale reading is the maximum acceleration desired to be read from the sensor.

Steps to develop MEMS algo code

Step 3:

Add the block to read acceleration output from the Sensor Hub. The output of Sensor Hub goes into the input of the accelerometer block.

steps to develop MEMS algorithm code

Step 4:

Add Graph block to visualize the accelerometer output on the Unicleo-GUI tool.

Step 5:

Add all the blocks in a similar way to develop the whole design graphically. Build the firmware to convert the C code into the compiled code.

Step 6:

Connect the compatible sensor hardware and program the STM32 on the hardware. After this step, the code is running inside STM32 microcontroller and interfacing with real sensors.

Step 7:

Open Uncileo-GUI using the button in AlgoBuilder and click on the start to run the application as mentioned in the picture below. Open the data visualization tool.

Step 8:

The relevant outputs generated in AlgoBuilder tool are now appearing in Unicleo-GUI. This tool can show out both in numbers as well as graphically. It also allows data to be logged for further analysis.

Conclusion

Sensors are essential components of IoT systems. Sensors provide the environment input to the IoT systems. Algorithms based on sensors are key element to utilize the sensor output according to application requirements. Working on embedded codes and sensors at the same time can be a daunting task sometimes. In an organization, a person who visualizes the algorithm and who indulge in coding may not be the same person.

AlgoBuilder enables developing algorithms for MEMS sensors graphically without coding knowledge. It is a great way to develop proof of concepts even before a single line of code is written.

More details of AlgoBuilder can be accessed at:

https://www.st.com/en/embedded-software/algobuilder.html

For more information on ST sensors:

https://www.st.com/sensors