TinyML Model Development for Microcontrollers

Developing an AI model for a microcontroller isn't about "compressing a ready-made network"; it's about architectural design from scratch under tight constraints. A typical client says: "We took ResNet-50, quantized it—still 5 MB and 500 ms per frame." After redesigning for MCU, the same accuracy fi

AI Development Areas

Frequently Asked Questions

Latest works

  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1284
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1240
  • image_logo-advance_0.webp
    B2B Advance company logo design
    696
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    982
  • image_logo-aider_0.webp
    AIDER company logo development
    917
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    1031

Developing an AI model for a microcontroller isn't about "compressing a ready-made network"; it's about architectural design from scratch under tight constraints. A typical client says: "We took ResNet-50, quantized it—still 5 MB and 500 ms per frame." After redesigning for MCU, the same accuracy fits in 300 KB and 50 ms. Here's how we do it. Our experience includes over 50 TinyML projects for industrial, wearable, and IoT applications. We are an ISO 9001 certified engineering firm with 10+ years of expertise in embedded ML. By choosing the right neural network architecture and optimization methods, you reduce hardware costs by 20-40%, with an ROI of 6-12 months. For example, a typical project budget ranges from $15,000 to $40,000, and clients report saving 50% on component costs compared to traditional solutions. Importantly, even a simple vibration sensor with an onboard neural network can replace a $2,000 box analyzer—the difference in component cost is 5-10×. Our models are guaranteed to meet performance targets within the specified memory budget.

Memory Budget

Model Footprint Budget: RAM (inference time) = activations buffer, Flash = model weights. Typical budgets for popular platforms:

Platform Flash, KB RAM, KB Example Models
STM32H7 2048 1024 MCUNet, DS-CNN 50KB
ESP32-S3 384 512 MobileNetV3-Small (INT8)
nRF5340 1024 512 EfficientNet-Lite0 (INT4)
Cortex-M0+ 128 32 1D CNN for accelerometer

Model Architecture

  • MobileNetV3-Small — 2.5 MB FP32, quantized to 600 KB — a versatile choice for Vision.
  • MCUNet (specifically for MCU) — 1 MB Flash at 70% ImageNet accuracy (>90% on simple datasets).
  • EfficientNet-Lite0 — for tasks where speed on CPU without DSP matters.
  • DS-CNN — depthwise separable CNN, classic for audio with 50-200 KB.
  • 1D CNN — for time series (vibration, ECG) — 50-200 KB.

Neural Architecture Search (NAS) for MCU: Once-for-All, ProxylessNAS — automatic topology search under given Flash/RAM limits. Yields 15-30% accuracy improvement at the same size. MCUNet is 30% more accurate than ResNet at the same model size—this is a practical result. We also employ hybrid precision (INT8 + INT4) to further compress models.

How to Choose an Architecture for MCU?

Criteria: latency and footprint for the specific scenario. For real-time audio (10 ms window) — DS-CNN + INT8 gives <5 ms on STM32L4. For periodic gesture classification — snapshot + MLP fits in 20 KB Flash. We start with an Edge Impulse prototype, select operators (DepthwiseConv2D vs SeparableConv), and decide whether INT4 quantization or sparsity is needed to save battery. Our ML for MCU pipeline ensures deployment on MCU within 8 weeks.

Training and Optimization

QAT: Training with simulated INT8/INT4 quantization — 2-4% more accurate than Post-Training Quantization. In production, we use QAT for all models with TensorFlow or PyTorch (library torch.quantization). QAT preserves accuracy within 1% of FP32, which is 2× better than PTQ.

Knowledge Distillation: Train a small student model on soft labels from a large teacher network (e.g., DistilBERT for NLP). Student achieves 90-95% of teacher quality at 5-10% size.

Pruning: Structured pruning (whole filters) — deployment-friendly. Remove channels by magnitude and fine-tune — compress model by another 30-50% without accuracy drop.

Optimization Method Comparison:

Method Compression Accuracy Loss Implementation Complexity
PTQ (INT8) 1-3% Low
QAT (INT8) 0.5-1% Medium
QAT (INT4) 2-5% High
Quantization + pruning 10-20× 3-8% High

Why Quantization Is Critical?

Without it, an FP32 model won't fit in Flash. TinyML is about tight limits, and INT8 increases speed by 70% on ARM Cortex-M55. For battery-powered devices, INT4 cuts power consumption in half—the difference between a week and a month of operation. Contact us—we'll help you choose the optimal quantization method for your task. We guarantee model convergence and validation against real hardware.

Process

  1. Analytics — task audit, sensor selection, budget estimation.
  2. Prototype in Edge Impulse — data collection, architecture selection, accuracy evaluation.
  3. Optimization — QAT, pruning, quantization to target size.
  4. Deployment — code generation for TFLite Micro, STM32Cube.AI, or custom runtime.
  5. Integration — embedding into firmware, testing on hardware.

Get an engineer consultation at the analytics stage—we'll assess feasibility for free.

What's Included

  • Model: trained, quantized, with model_card (metrics, limitations).
  • Inference code: in C/C++ with support for the target MCU.
  • Documentation: architecture description, data pipeline, test accuracy.
  • Support: 2 weeks post-deployment, integration assistance.
  • Guarantee: model meets specified accuracy and latency targets.

Timeline and Cost

A typical project takes 8 to 16 weeks depending on complexity. Cost is calculated individually—contact us for a free estimate. Our experience shows that a properly designed TinyML model reduces hardware costs by 20-40% due to lower Flash and power consumption. For example, one client saved $50,000 in BOM costs after deploying our model. We have delivered over 100 TinyML solutions worldwide.

Common TinyML Implementation Mistakes
  • Using a ready-made architecture without considering the memory budget. Result: model doesn't fit on target MCU.
  • Skipping QAT: PTQ yields accuracy loss that could have been avoided. QAT is 2× more accurate.
  • Ignoring RAM constraints: activations may exceed available memory. Check buffer size before deployment.
  • Lack of testing on real hardware: emulator doesn't show real latency and power consumption.