Can Low-Power MCUs Run AI? Unveiling TinyML Application Practices!

Can Low-Power MCUs Run AI? Unveiling TinyML Application Practices!

Artificial Intelligence(AI) on edge devices is revolutionizing the field of embedded electronics by enabling advanced computing capabilities directly on low-power devices. Traditionally, neural networks required powerful hardware and abundant resources, but with the development of technologies like TinyML, inference can now be performed directly on devices even with limited computational resources. Deploying neural networks on microcontrollers (MCU) can reduce latency, enhance data privacy, and improve energy efficiency without relying on expensive centralized cloud infrastructure.

TinyML and Edge AI

TinyML brings revolutionary advancements to embedded systems, allowing machine learning models to be deployed directly on devices with only a few tens of KB RAM. Its applications span various fields, including voice analysis, image recognition, and anomaly detection based on signal processing. With optimized frameworks like TensorFlow Lite for MCUs, neural networks can run on MCUs (STM32, ESP32, or nRF52) without the need for complex operating systems.

One interesting aspect of using TinyML is model optimization. Neural networks are typically designed for high-performance hardware and must be downsized and power consumption reduced to run on embedded devices. Techniques such as quantization and pruning can minimize memory usage and accelerate inference speed, making implementation on inexpensive low-power MCUs feasible.

Can Low-Power MCUs Run AI? Unveiling TinyML Application Practices!

Figure 1:TinyMLAI and Embedded Systems Intersection (Source: t4.ftcdn.net)

Optimizing AI Models for MCUs

Neural network training is typically performed on resource-rich computers and then converted into a format compatible with embedded devices. The first step is to select an appropriate model. Lightweight networks (for example, MobileNet) or models based on low-complexity convolutional neural networks (CNN) are well-suited for such applications. After training, the model is exported in TensorFlow Lite (TFLite) format to reduce model size and improve performance on resource-constrained hardware. To further optimize the model, quantization is one of the most effective techniques.

By converting network weights from 32 bit floating-point numbers to 8 bit integer format, memory usage can be significantly reduced without affecting accuracy, while also greatly enhancing computational efficiency. On the other hand, pruning can eliminate redundant neuron connections, thereby lightening the load without changing network behavior. Both processes can be executed using tools like TensorFlow Model Optimization Toolkit, and then the model is compiled into a format that can run on MCUs.

Deploying AI Models on MCUs

Once the model optimization is complete, the next step is to integrate it into a compatible MCU. A practical case is using ESP32 with TensorFlow Lite for MCUs. This MCU supports Wi-Fi and Bluetooth, making it ideal for transmitting processed data, thus particularly suitable for edge machine learning. The implementation process begins with converting the quantized model into a byte array, which is then included in the firmware code.

Using the TensorFlow Lite Micro library, the model is loaded into the MCU‘s RAM and can be used for real-time inference. A typical execution flow includes capturing data from sensors, preprocessing it, and then passing it to the neural network for prediction. For example, voice recognition is a common application. A microphone connected to the MCU captures audio samples and processes them using feature extraction techniques like Mel-frequency cepstral coefficients (MFCC). The preprocessed data is then passed to the neural network model to recognize specific keywords. The inference process takes only a few milliseconds, allowing the system to respond without needing to connect to an external server.

Practical Applications of TinyML on MCUs

TinyML applications have impacted multiple industries. In agriculture, sensors based on TinyML can monitor environmental parameters such as soil moisture and temperature, optimizing water usage and increasing crop yields. Microsoft FarmBeats has developed an innovative project that utilizes energy-efficient sensors integrated with TinyML to collect soil condition data for optimizing irrigation management, enhancing crop yields without wasting water resources. These devices can operate in remote areas without network coverage, as they can process data locally, eliminating the need for continuous cloud connectivity.

TinyML practical applications are changing the way data is collected and processed directly on MCUs, allowing systems to operate without a continuous connection to the network. During the development of many applications, tools available to developers include the well-known TensorFlow Lite for MCUs, which allows deep learning models to run on resource-constrained devices, while Edge Impulse simplifies the collection and management of training data. Development boards like Arduino Nano 33 BLE Sense and Raspberry Pi Pico provide excellent hardware platforms for implementing practical solutions.

In the field of industrial monitoring, MCUs equipped with machine learning models can be used to detect machine anomalies, analyze vibrations and noise, and implement predictive maintenance, thereby reducing costs and preventing unexpected failures. For example, a TinyML-based motor control system can be deployed in manufacturing plants, processing data collected from MEMS sensors locally and triggering intervention alerts when abnormal vibrations are detected.

In the security field, integrated AI MCUs can be used to identify suspicious actions or detect abnormal sounds, triggering real-time notifications without sending sensitive data to external servers. Arduino, in collaboration with Bosch, developed a specific application: a TinyML system based on Arduino Nano 33 BLE Sense that identifies sudden movements by analyzing gyroscope and accelerometer data, suitable for home security systems or monitoring valuable items. This way, real-time notifications can be triggered without sending sensitive data to external servers, ensuring privacy and security.

One practical application of Edge AI is building a voice recognition system for controlling home devices. This system is implemented based on the Arduino Nano 33 BLE Sense development board and trained using Edge Impulse, forming an ultra-low-power voice assistant capable of recognizing simple commands like “turn on the light” or “open the door” without a network connection. This system is particularly suitable for users with limited mobility who wish to operate household devices independently.

Another interesting project based on Arduino Nano 33 BLE Sense is indoor air quality monitoring. This device uses the HTS221 sensor integrated into the development board to detect the temperature and humidity of the environment. The first step in implementing the project is to connect the MCU to a computer via USB for programming. After completing this initial step, the corresponding library files, such as Arduino_HTS221, need to be installed to access environmental data.

Can Low-Power MCUs Run AI? Unveiling TinyML Application Practices!

Figure 2:Arduino Nano 33 BLE Sense Rev2 (Source: Arduino)

Can Low-Power MCUs Run AI? Unveiling TinyML Application Practices!

Figure 3:HTS221 Sensor on Arduino Nano 33 BLE Sense (Source: Arduino)

If you also want to include the detection of volatile organic compounds, you can integrate additional sensors (for example, the Sensirion SGP40 and its corresponding library files into your project, and refer to the data sheet.

Can Low-Power MCUs Run AI? Unveiling TinyML Application Practices!

Figure 4:Sensirion SGP40 Sensor (Source: Sensirion)

Environmental data collection can be achieved through Edge Impulse, recording temperature and humidity values under different conditions to train a machine learning model capable of recognizing patterns that may indicate abnormal conditions. Once trained, the model will be uploaded to the Arduino Nano 33 BLE Sense development board using TensorFlow Lite. The programming sketch reads sensor data and runs the model for real-time environmental analysis. If an anomaly is detected, the system can trigger corresponding actions, such as lighting a warning LED or sending a Bluetooth signal to external devices.

Below is an example code to read data from the HTS221 sensor and display it on the serial monitor:

#include <Arduino_HTS221.h>void setup() { Serial.begin(115200); while (! Serial); if (! HTS221.begin()) { Serial.println(“Error initializing the HTS221 sensor!”); while (1); }}void loop() { float temperature = HTS221.readTemperature(); float humidity = HTS221.readHumidity(); Serial.print(“Temperature: “); Serial.print(temperature); Serial.print(” °C, Humidity: “); Serial.print(humidity); Serial.println(” %”); delay(2000);}

In the air quality monitoring project, the provided code allows reading data from the HTS221 sensor integrated into the Arduino Nano 33 BLE Sense to detect the temperature and humidity of the environment. In the setup() function, serial communication is initialized, and it is verified whether the sensor initialization was successful. If the sensor is not detected correctly, the program enters an infinite loop and reports the error via the serial monitor.

In the loop() function, the code uses readTemperature() and readHumidity() methods to read temperature and humidity values from the sensor. Subsequently, the obtained values are printed on the serial monitor to display environmental conditions in real-time. Data is read every 2 seconds, achieved through the delay(2000) function, allowing for periodic updates. This basic structure can easily monitor environmental conditions and can be adapted to other applications, such as anomaly detection or integration with machine learning models to analyze and make intelligent data-driven decisions.

To ensure the reliability of the system, testing must be conducted under different environmental conditions, verifying the accuracy of the model and optimizing detection thresholds to minimize false positives. Further expansion of the project includes integration with mobile applications, enabling real-time monitoring of air quality through low-power Bluetooth (BLE) technology. Developing a simple user interface can be achieved using tools like MIT App Inventor or Flutter, which provide practical solutions for visualizing data directly on smartphones.

To learn more about the resources needed to develop this project, refer to the official documentation of the Arduino_HTS221 library. The Arduino forum is an effective support channel for resolving various technical issues. Edge Impulse provides step-by-step tutorials for collecting and training machine learning models for embedded devices, while TensorFlow Lite offers guidelines for implementing machine learning on low-power MCUs.

Resource Management and Performance Optimization

Executing AI models on MCUs imposes strict requirements on resource management, necessitating careful optimization of memory, computational power, and energy efficiency. One of the most critical aspects is memory management, as MCUs typically have very limited memory; therefore, memory allocation strategies that avoid waste must be adopted, and static buffers should be used whenever possible.

Additionally, using AI model quantization techniques helps reduce the size of neural networks, thereby decreasing memory consumption and improving performance, while using hardware accelerators (if available) represents an opportunity to enhance processing speed. Some advanced MCUs integrate digital signal processors (DSP) specifically designed for processing neural networks, thereby alleviating the computational burden on the main CPU and executing inference faster and more efficiently. Furthermore, using pruning techniques can reduce the number of required computations, improving performance without affecting model accuracy.

Regarding energy efficiency, especially for battery-powered devices, power consumption can be reduced during inactive periods by using low-power modes (such as deep sleep mode) and dynamically adjusting the model execution frequency based on operational demands. Additionally, employing event-triggered strategies is an effective approach to trigger inference only under specific stimuli, thereby reducing active processing time and optimizing the use of computational resources.

Carefully selecting AI model architectures also affects their implementation efficiency on MCUs: lightweight neural networks are designed for resource-constrained environments, achieving a good balance between accuracy and computational consumption. The integration of these techniques enables us to build AI models that are both high-performance and efficient enough to meet the resource limitations of MCUs.

Conclusion and Outlook

TinyML applications in embedded systems open up new possibilities for implementing AI on resource-constrained devices. The ability to perform inference directly on MCUs enables faster, safer, and more energy-efficient applications. As optimization technologies advance and dedicated hardware improves, machine learning on edge devices will continue to expand, bringing innovations to areas such as home automation, security, and environmental monitoring.

Integrating AI into embedded systems is no longer a distant dream but a reality achievable by everyone, even with inexpensive hardware. With the right optimization techniques and careful resource management, intelligent solutions can be implemented directly on MCUs, giving rise to a new generation of autonomous interconnected devices.

Author:Giordana Francesca Brescia

(Editor: Franklin)

THE END

100 Examples — “Charging Port” Design (Save for Reference)

2025-08-24

Can Low-Power MCUs Run AI? Unveiling TinyML Application Practices!

Why is there a resistor and a capacitor between the circuit board GND and the chassis GND?

2025-08-24

Can Low-Power MCUs Run AI? Unveiling TinyML Application Practices!

Why is FPGA technology becoming increasingly powerful? There are reasons for this.

2025-08-23

Can Low-Power MCUs Run AI? Unveiling TinyML Application Practices!

The mainboard of the American Sidewinder air-to-air missile: a very streamlined integrated circuit, quite different from the numerous transistors of the Soviet Union.

2025-08-23

Can Low-Power MCUs Run AI? Unveiling TinyML Application Practices!

I replicated a 500,000 NI HIL with Advantech industrial control machine!

2025-08-22

Can Low-Power MCUs Run AI? Unveiling TinyML Application Practices!Can Low-Power MCUs Run AI? Unveiling TinyML Application Practices!

Leave a Comment