EmbeddedRelated.com
Books

TinyML: Machine Learning with TensorFlow Lite on Arduino and Ultra-Low-Power Microcontrollers

Warden, Pete, Situnayake, Daniel 2019

Deep learning networks are getting smaller. Much smaller. The Google Assistant team can detect words with a model just 14 kilobytes in size—small enough to run on a microcontroller. With this practical book you’ll enter the field of TinyML, where deep learning and embedded systems combine to make astounding things possible with tiny devices.

Pete Warden and Daniel Situnayake explain how you can train models small enough to fit into any environment. Ideal for software and hardware developers who want to build embedded systems using machine learning, this guide walks you through creating a series of TinyML projects, step-by-step. No machine learning or microcontroller experience is necessary.

  • Build a speech recognizer, a camera that detects people, and a magic wand that responds to gestures
  • Work with Arduino and ultra-low-power microcontrollers
  • Learn the essentials of ML and how to train your own models
  • Train models to understand audio, image, and accelerometer data
  • Explore TensorFlow Lite for Microcontrollers, Google’s toolkit for TinyML
  • Debug applications and provide safeguards for privacy and security
  • Optimize latency, energy usage, and model and binary size


Why Read This Book

You will learn how to train, compress, and deploy real machine learning models that fit into kilobytes of memory and run on microcontrollers. This book gives a practical, project-driven path — from basic model building with TensorFlow to deploying TensorFlow Lite for Microcontrollers on Arduino and other ultra‑low‑power boards — so you can ship ML on the tiniest devices.

Who Will Benefit

Engineers and makers with basic programming skills who want to build practical on-device ML for Arduino and other ultra-low-power microcontrollers, including IoT and edge applications.

Level: Beginner — Prerequisites: Basic programming familiarity (Python recommended) and comfort using a command line and simple electronics; no prior machine learning or microcontroller experience required.

Get This Book

Key Takeaways

  • Train and optimize small neural networks suitable for microcontrollers using TensorFlow and TensorFlow Lite
  • Convert and quantize models into TensorFlow Lite and deploy them with TensorFlow Lite for Microcontrollers
  • Implement on-device projects such as keyword spotting (speech), simple vision/person detection, and gesture sensing on Arduino-class boards
  • Measure and optimize runtime, memory, and power to meet ultra-low-power constraints
  • Integrate ML models into firmware (C/C++/Arduino) and debug inference on real embedded hardware

Topics Covered

  1. Introducing TinyML: what, why, and where it fits
  2. Foundations of machine learning for tiny devices
  3. Tools and workflow: TensorFlow, TensorFlow Lite, and development toolchains
  4. Designing models for size: architectures, quantization, and optimization
  5. Training and converting models: TensorFlow to TFLite and microcontroller-ready formats
  6. Speech recognition and keyword spotting project
  7. Tiny vision: person/feature detection with small models and cameras
  8. Sensor and gesture examples: on-device feature extraction
  9. Deploying and running models with TensorFlow Lite for Microcontrollers
  10. Measuring latency, memory use, and power; profiling and debugging
  11. Advanced model size reduction techniques (pruning, quantization-aware training)
  12. Hardware, boards, and firmware integration (Arduino, Cortex‑M examples)
  13. Case studies and end-to-end TinyML projects
  14. Appendices: datasets, tool setup, and further reading

Languages, Platforms & Tools

PythonCC++Arduino (sketches)Arduino (Nano 33 BLE Sense and similar)ARM Cortex-M microcontrollersOther ultra-low-power MCUs (e.g., STM32, nRF52-class boards)TensorFlowTensorFlow LiteTensorFlow Lite for MicrocontrollersArduino IDE / PlatformIOPython tooling (Colab/Jupyter)GCC/arm-none-eabi toolchainsSerial monitors and basic measurement tools

How It Compares

Unlike general ML texts (e.g., Géron's Hands-On Machine Learning) or mobile/edge guides (e.g., Practical Deep Learning for Cloud, Mobile, and Edge), this book focuses end-to-end on microcontroller-class deployment with TensorFlow Lite for Microcontrollers and tiny-footprint models.

Related Books

Bryant, Randal, O'Hallaron,...