TinyML — Machine Learning on Microcontrollers
TinyML refers to running machine learning inference on ultra-low-power microcontrollers — devices with as little as 64 KB of RAM and consuming milliwatts of power. Unlike cloud AI or edge AI on powerful processors, TinyML brings intelligence directly to the smallest, cheapest, most battery-constrained devices in the IoT ecosystem.
Why TinyML
| Advantage | Description |
|---|---|
| Privacy | Raw sensor data never leaves the device — processed locally |
| Latency | Real-time inference in microseconds, no network round-trip |
| Power | Runs on coin cell batteries for years |
| Cost | No cloud compute bills, no data subscriptions |
| Reliability | Works without internet connectivity |
| Bandwidth | Only sends results (anomaly detected: yes/no), not raw data |
The TinyML market reached approximately $1.1 billion in 2024 and is growing at a CAGR of 34%, driven by IoT proliferation and the demand for privacy-preserving edge intelligence.
Common TinyML Applications
- Predictive maintenance — Vibration anomaly detection on industrial motors (accelerometer + MCU)
- Keyword spotting — “Hey Google” / “Alexa” wake-word detection on-device
- Gesture recognition — Wearable motion classification using IMU data
- Sound classification — Glass break detection, machine fault sounds, bird species identification
- Visual inspection — Simple defect detection using low-resolution cameras on MCU
- Environmental sensing — Gas leak detection, air quality classification
TinyML Deployment Frameworks
| Framework | Developer | Key Feature | Hardware Support |
|---|---|---|---|
| TensorFlow Lite Micro | Most established, broad ecosystem | ARM Cortex-M, ESP32, RISC-V | |
| Edge Impulse | Edge Impulse | No-code web platform, rapid prototyping | Nordic nRF, STM32, ESP32, Arduino |
| CMSIS-NN | ARM | Hand-optimized kernels for Cortex-M | ARM Cortex-M only |
| MicroTVM | Apache TVM | Compiler-based autotuning | STM32, ESP32, RISC-V |
| ExecuTorch | Meta | PyTorch-based inference | ARM, Apple, Qualcomm |
| MCUXpresso ML SDK | NXP | Integrated with NXP ecosystem | NXP i.MX RT, LPC |
TinyML Hardware Requirements
| Resource | Keyword Spotting | Vibration Anomaly | Visual Inspection |
|---|---|---|---|
| Flash | 64–128 KB | 32–64 KB | 256–512 KB |
| RAM | 16–32 KB | 8–16 KB | 64–128 KB |
| Inference time | <100 ms | <10 ms | <500 ms |
| Power | 1–5 mW | 0.5–2 mW | 10–50 mW |
| Typical MCU | Cortex-M4F | Cortex-M4F | Cortex-M7 or M55+Ethos-U55 |
TinyML Development Workflow
- Data collection — Sensor data from real-world conditions (not simulated)
- Model training — TensorFlow / PyTorch on desktop/cloud GPU
- Quantization — Float32 → INT8 (reduces model size by ~4x with <1% accuracy loss)
- Conversion — Export to TFLite Micro flatbuffer or ONNX
- Deployment — Flash model to MCU, integrate with RTOS task loop
- Validation — On-device accuracy testing vs. training dataset
- Continuous improvement — Field data feedback loop
Related Terms
- Edge AI — The broader category; TinyML is specifically for MCU-class devices (mW power, KB memory).
- RTOS — TinyML inference typically runs as a task within an RTOS scheduler.
- IoT — TinyML enables intelligent IoT devices that process data at the source.
We deploy TinyML models on Cortex-M and ESP32 platforms for anomaly detection, classification, and predictive maintenance. See our Edge AI and Embedded Systems Development services.