Online course · AI

TinyML on Microcontrollers: Keyword Spotting, Gesture and Anomaly Detection

Train, quantise and deploy tiny models on Pico 2 and ESP32-C3 boards, measured

Created by TrainSkool Trainer

TinyML on Microcontrollers: Keyword Spotting, Gesture and Anomaly Detection course cover

Coming soon Launch price ₹2,499

This course is not open for enrolment yet.

About this course

For engineers and students who want models running on real boards. Prerequisites: basic Python machine learning and microcontroller programming. You follow Kaveri Embedded Labs, a fictional Coimbatore firm building three products for Indian farms and mills: a two-word voice indicator, a wrist-gesture counter and a pump vibration anomaly monitor. You will sample sensors at measured rates on a Raspberry Pi Pico 2 or ESP32-C3, build session-split datasets, compute vibration, frequency and log-mel features, train small Keras models on your PC, quantise them to int8, and deploy them with LiteRT for Microcontrollers (formerly TensorFlow Lite for Microcontrollers) using ESP-IDF and the esp-tflite-micro component, with golden-vector parity tests and measured latency and memory. Every lesson has a practical lab on the board with wiring, expected serial output and a PASS line. Included: 28 text lessons with slides and quick checks, 26 auto-checked Python exercises, 7 chapter projects, chapter quizzes, a rubric-graded capstone, a 20-question final exam and a certificate of completion. Lessons are text and slides; trainer videos with a real board are coming. Board results are yours to measure; no results are guaranteed. Not affiliated with or endorsed by Raspberry Pi Ltd, Espressif, STMicroelectronics, Arm or Google. What you will be able to do: - You will be able to judge whether a TinyML idea fits a microcontroller by estimating flash, RAM, latency and energy budgets. - You will be able to sample IMU, vibration and audio signals at verified rates on a Pico 2 or ESP32-C3 and build clean, session-split datasets. - You will be able to compute windowed time-domain, band-power and log-mel features identically on the PC and in C on the board. - You will be able to choose, count, train and honestly evaluate small dense, 1D CNN and depthwise-separable models in Keras. - You will be able to quantise models to full int8 with a representative dataset and check them against the float model. - You will be able to deploy int8 models with LiteRT for Microcontrollers on the ESP32-C3, size the tensor arena and benchmark latency. - You will be able to build keyword-spotting, gesture and anomaly-detection decision logic with smoothing, triggers, thresholds and persistence. - You will be able to calibrate sensors, monitor drift and document a field-ready device with measured results and honest limits.

What you'll learn

  • Judge whether a TinyML idea fits a microcontroller by estimating flash, RAM, latency and energy budgets
  • Sample IMU, vibration and audio signals at verified rates on a Pico 2 or ESP32-C3 and build clean, session-split datasets
  • Compute windowed time-domain, band-power and log-mel features identically on the PC and in C on the board
  • Choose, count, train and honestly evaluate small dense, 1D CNN and depthwise-separable models in Keras
  • Quantise models to full int8 with a representative dataset and check them against the float model
  • Deploy int8 models with LiteRT for Microcontrollers on the ESP32-C3, size the tensor arena and benchmark latency
  • Build keyword-spotting, gesture and anomaly-detection decision logic with smoothing, triggers, thresholds and persistence
  • Calibrate sensors, monitor drift and document a field-ready device with measured results and honest limits

Course content

Chapter 1 · Module 1: The TinyML Pipeline and Your Boards

  • Code lab: What TinyML Is and When It FitsKaveri Embedded Labs is a small electronics firm in Coimbatore with about fifteen people.17 topics · 27 min
  • Code lab: The End-to-End Pipeline: Data, Features, Model, Quantise, DeployWhen Divya started on PumpSense, her first instinct was to open a notebook and train a neural network.17 topics · 27 min
  • Code lab: Your Boards and Toolchains: Pico 2 and ESP32-C3Kaveri ships products on two boards. The Raspberry Pi Pico 2 is Divya's bench workhorse for recording data and testing signal-processing code; it has plenty of RAM and a floating-point unit.24 topics · 30 min

Chapter 2 · Module 2: Collecting Data on the Board

  • Code lab: Sampling Right: Rates, Timers and JitterDivya's first PumpSense recording looked perfect on a plot: a clean wave, nicely repeating.18 topics · 30 min
  • Code lab: Streaming an IMU over I2CWandCount and PumpSense both start with the same part: a 6-axis inertial measurement unit (IMU) that measures acceleration and rotation.18 topics · 30 min
  • Code lab: Capturing Audio: 16 kHz from a MicVoiceSwitch needs audio: one-second clips of people saying "on" and "off", plus background noise from real pump houses and farm sheds.19 topics · 30 min
  • Code lab: Building a Clean DatasetDivya's first WandCount model scored 98 percent on its test set, and then failed almost completely when Selvi, a line supervisor at the Tiruppur mill, tried it.24 topics · 32 min

Chapter 3 · Module 3: Features: From Raw Signals to Model Inputs

  • Code lab: Windows, Overlap and Ring BuffersA model does not look at a sensor stream; it looks at a window. PumpSense sees one second of vibration, WandCount two seconds of motion, VoiceSwitch one second of audio.19 topics · 30 min
  • Code lab: Time-Domain Features for Motion and VibrationA one-second PumpSense window holds 400 samples on each of three axes: 1,200 numbers.19 topics · 30 min
  • Code lab: Frequency Features: FFT and SpectrogramsTime-domain features tell Divya that a pump vibrates more than usual. They do not tell her why.19 topics · 32 min
  • Code lab: Audio Features: Log-Mel and MFCC for Keyword SpottingOne second of VoiceSwitch audio is 16,000 samples.25 topics · 32 min

Chapter 4 · Module 4: Training Small Models on Your PC

  • Code lab: Choosing a Model That FitsWith features in hand, Fathima's instinct was to reach for the model she knew from her previous job at a Bengaluru analytics firm: a stack of wide layers with hundreds of thousands of parameters.19 topics · 30 min
  • Code lab: Training and Validating in KerasFathima's first WandCount training run reached 100 percent training accuracy after 80 epochs and 61 percent on validation.20 topics · 32 min
  • Code lab: Evaluating Honestly: Confusion Matrix, Thresholds, False Alarms per Hour" She said "92 percent accurate". He asked what that meant for a farmer.25 topics · 30 min

Chapter 5 · Module 5: Quantisation and Budgets

  • Code lab: Int8 Quantisation Maths: Scale and Zero Point3 KB. The VoiceSwitch model will be tens of thousands of parameters, and its activations are larger still.18 topics · 30 min
  • Code lab: Post-Training Full-Integer Quantisation with the Converter1 showed the arithmetic.18 topics · 32 min
  • Code lab: Flash, RAM, Latency and Energy Budgets1, now with real numbers: model bytes from the converter, arena bytes from the runtime, latency from the board, and energy from a current measurement.25 topics · 30 min

Chapter 6 · Module 6: Deploying with LiteRT for Microcontrollers

  • Code lab: Inside the Runtime: Interpreter, Op Resolver and Tensor ArenaDivya's first deployment of the int8 WandCount model printed one line and stopped: "Didn't find op for builtin opcode 'MEAN'".19 topics · 32 min
  • Code lab: From .tflite to C Array and a First Inference on ESP32-C3A microcontroller has no file system in the usual sense, so the model cannot be "opened".17 topics · 32 min
  • Code lab: Feature Parity: Making the Board Match the PCThe most dangerous TinyML bug produces no error at all.18 topics · 32 min
  • Code lab: Measuring on the Board: Latency, Arena, and the Pico 2 PathUntil now every latency and memory figure in this course has been an estimate or an example.26 topics · 30 min

Chapter 7 · Module 7: Three Applications: Keywords, Gestures and Anomalies

  • Code lab: Keyword Spotting: Streaming Audio to DecisionsA keyword spotter does not get neat one-second clips. It hears a continuous stream: a pump starting, birds, a radio, people talking, and once in a while someone saying "on".19 topics · 32 min
  • Code lab: Gesture Recognition with an IMUIn chapter 6 WandCount ran every half second on whatever two seconds of motion the ring buffer held.19 topics · 32 min
  • Code lab: Anomaly Detection: Learning Normal VibrationPumpSense has a problem that VoiceSwitch and WandCount do not: Kaveri cannot collect examples of the thing it most wants to detect.19 topics · 32 min
  • Code lab: Making It Robust: Drift, Field Testing and UpdatesThree weeks into the WandCount trial, the count accuracy Selvi's supervisor reported started to fall.26 topics · 32 min

Chapter 8 · Module 8: Capstone: PumpSense Vibration Anomaly Monitor

  • Reading: Capstone Brief and System DesignKaveri Embedded Labs has its first paying PumpSense customer: a farmer-producer company near Pollachi whose members run about forty monoblock pumps on coconut and banana farms.8 topics · 35 min
  • Code lab: Build Guide: Data, Model, Deployment and Field Test1. Each step names the course lesson it relies on, the command or code to use, and the check that tells you to move on.14 topics · 60 min
  • Assignment: Deliverables, Rubric and Next StepsSubmit one folder (or repository) named pumpsense-capstone containing the items below.12 topics · 27 min

Assessments and certificate

  • Module 1 quiz: The TinyML Pipeline and Your Boards7 questions · 15 min · pass mark 70%
  • Module 2 quiz: Collecting Data on the Board7 questions · 15 min · pass mark 70%
  • Module 3 quiz: Features: From Raw Signals to Model Inputs7 questions · 15 min · pass mark 70%
  • Module 4 quiz: Training Small Models on Your PC7 questions · 15 min · pass mark 70%
  • Module 5 quiz: Quantisation and Budgets7 questions · 15 min · pass mark 70%
  • Module 6 quiz: Deploying with LiteRT for Microcontrollers7 questions · 15 min · pass mark 70%
  • Module 7 quiz: Three Applications: Keywords, Gestures and Anomalies7 questions · 15 min · pass mark 70%
  • Module 8 quiz: Capstone: PumpSense Vibration Anomaly Monitor7 questions · 15 min · pass mark 70%
  • TinyML on Microcontrollers: Keyword Spotting, Gesture and Anomaly Detection — final assessment20 questions · 40 min · pass mark 70%

Related courses

Frequently asked questions

Can I get a refund for TinyML on Microcontrollers: Keyword Spotting, Gesture and Anomaly Detection?

Yes. You can request a full refund within 7 days of purchase, provided you have completed no more than 25% of the lessons, not started the final exam and not been issued a certificate. Pre-orders of a course that has not launched yet can be refunded in full any time before launch. Email refunds@trainskool.com with your order reference; approved refunds go back to your original payment method.

How long do I have access to the course?

Lifetime access. A one-time payment of ₹2,499 keeps the course in your TrainSkool learning dashboard, on the web and in the TrainSkool apps, with no subscription to cancel.

Do I get a certificate?

Yes. TrainSkool issues a certificate when you meet the course requirements, including passing its 9 graded assessments. Every certificate has a public verification link that employers can check.

Are there any prerequisites?

No other course is required. The course level is intermediate, so check the curriculum to confirm it matches your experience.

How is the course delivered?

Online and self-paced: 8 modules and 28 lessons, about 14h 50m of study, with graded assessments. Learn in your browser or the TrainSkool Android and Windows apps.