element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • Experts & Guidance
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • Product Groups
  • Store
    Store
    • Visit Your Store
    • 'Choose another store...'
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Personal Blogs
  • Members
  • More
Personal Blogs
Legacy Personal Blogs AI Inference on ARM Cortex-M4 - Bringing AI to the Edge
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: stevaras
  • Date Created: 4 Dec 2020 6:48 PM Date Created
  • Views 464 views
  • Likes 1 like
  • Comments 1 comment
  • cortex-m4
  • ai
  • edge
  • arm
Related
Recommended

AI Inference on ARM Cortex-M4 - Bringing AI to the Edge

stevaras
stevaras
4 Dec 2020

The B-L475E-IOT01A is an IoT development board based on STM32L4 (ARM Cortex-M4) that includes a plethora of sensors and wireless connectivity options such as WiFi, Sub-GHz and BLE. It also supports expansion modules using the Arduino shield form-factor and via the single PMOD connector. Thus, it can be an ideal candidate for your next project covering many IoT use-case scenarios.

Here’s a list with the key features, below:

 

  • Ultra-low-power STM32L4 Series MCUs based on ArmRegistered CortexRegistered-M4 core with 1 Mbyte of Flash memory and 128 Kbytes of SRAM, in LQFP100 package
  • 64-Mbit Quad-SPI (Macronix) Flash memory
  • BluetoothRegistered V4.1 module (SPBTLE-RF)
  • Sub-GHz (868 MHz or 915 MHz) low-power-programmable RF module (SPSGRF-868 or SPSGRF-915)
  • 802.11 b/g/n compliant Wi-FiRegistered module from Inventek Systems (ISM43362-M3G-L44)
  • Dynamic NFC tag based on M24SR with its printed NFC antenna
  • 2 digital omnidirectional microphones (MP34DT01)
  • Capacitive digital sensor for relative humidity and temperature (HTS221)
  • High-performance 3-axis magnetometer (LIS3MDL)
  • 3D accelerometer and 3D gyroscope (LSM6DSL)
  • 260–1260 hPa absolute digital output barometer (LPS22HB)
  • Time-of-Flight and gesture-detection sensor (VL53L0X)
  • 2 push-buttons (user and reset)

 

On my purchase decision, I took into consideration not only the compelling net price (49€) and the rich collection of sensors included in a single board which can be hard to find but, mainly my desire to delve into the native STM32Cube.AI support. The latter, is a solution to embed Artificial Neural Networks in your project as offered by the X-CUBE-AI expansion package.

 

Therefore, the most intriguing part for me was to test data analytics and machine learning algorithms with the use of NN and actually perform deep learning directly on the MCU. Hence, I started by deploying the available examples already included in the package, using the STM32CubeIDE. In the screenshots below, I tried to depict the process:

 

  • load the project code:
Image for post

 

  • check/edit the user code:

 

Image for post

 

  • compile the code:

 

Image for post

 

  • firmware upload:

 

Image for post

 

  • and the board is ready to go:

 


 

Image for post

 

Hence, we are now ready to proceed with data acquisition. More specifically, using an android app(ST BLE Sensor), we are able to monitor, in real-time, data coming from the various sensors onboard, which are transmitted wirelessly, via BLE, to the app. Check below some screenshots taken from the running android app:

 

Image for post

 

Image for post

 

The most essential part comes next, though. More precisely, all the data being collected and logged locally, can also be fed into a pre-trained NN which is optimized to run on MCUs that have a floating point units like the STM32L4. Therefore, the NN can inference in real-time, based on the data values and the corresponding thresholds, the various “situations” (classification) of the person’s activity e.g. being stationary, walking, jogging, riding, or driving and even classify the ambient system, e.g. being in-house or outdoors. In the following screenshots you can check the classification status (activity type) along with the confidence levels of the algorithm being used:

 

Image for post

 

Image for post

You can read more on the ST’s official website: https://www.st.com/content/st_com/en/stm32-ann.html

 

In conclusion, the provided solution can offer to engineers and enthusiasts, a framework with all the tools needed to implement AI to the Edge, leveraging the ability to create predictive applications in various fields like industrial, medical and home automation.

 

Please note: this post originally appeared on Medium.

  • Sign in to reply

Top Comments

  • DAB
    DAB over 2 years ago +1
    Nice post. DAB
  • DAB
    DAB over 2 years ago

    Nice post.

     

    DAB

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2023 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube