Start Here
Welcome to the AI pillar. The goal here is practical: put a model next to your sensors, camera or gateway, make it fast enough and small enough to run there, and connect its output to something useful such as an MQTT alert. This page helps you pick a track, shows where AI sits in an IoT pipeline, and gives a roadmap you can follow with cheap hardware.
Before you ship anything, read the Edge AI deployment checklist. Calculators and generators that support these projects live in the Tools hub.
Three tracks, one decision
Section titled “Three tracks, one decision”“Edge AI” covers very different workloads. Pick the track by what your input data looks like and how quickly you need an answer.
| TinyML | Edge computer vision | Local LLMs | |
|---|---|---|---|
| Typical stack | ESP32-S3, Edge Impulse, TensorFlow Lite for Microcontrollers | YOLO, OpenCV, Raspberry Pi (optionally with an accelerator) | Ollama, a small quantized model, FastAPI |
| Hardware | Microcontroller with a few hundred KB to a few MB of RAM | Single-board computer or mini PC with a camera | Laptop, mini PC or SBC with several GB of RAM; a GPU helps a lot |
| Input data | Accelerometer, microphone, simple sensor windows | Images and video frames | Text (logs, manuals, questions) |
| Skills needed | C/C++ or Arduino basics, signal windows, basic ML ideas | Python, OpenCV, dataset labelling, model export | Python, HTTP APIs, prompt design, basic retrieval |
| Typical latency | Milliseconds to tens of milliseconds per inference | Tens of milliseconds to a few hundred milliseconds per frame on small models and CPU-class hardware | Seconds per answer; token generation speed depends heavily on model size and hardware |
| Use cases | Anomaly detection on a motor, keyword spotting, gesture or vibration classes | Counting, helmet or PPE checks, meter reading, intrusion detection | Log summarising, offline help desk, natural-language queries over documentation |
| Difficulty | Medium (tight memory, firmware work) | Medium (data and tuning effort) | Easy to start, hard to make reliable |
| Cost | Lowest: a dev board and sensors | Moderate: SBC, camera, power supply, cooling | Moderate to high if you need a GPU or more RAM |
How to choose
Section titled “How to choose”- Your data is a stream of numbers from a sensor and you want to classify patterns: start with TinyML.
- Your data is pictures: start with edge computer vision. Begin with a pretrained small model before training your own.
- Your data is text and you want summaries or Q&A without sending it to a cloud service: start with a local LLM.
- You are a student with a tight budget: TinyML on an ESP32-S3 is the cheapest way to learn the whole workflow (collect, train, quantize, deploy, measure).
Where AI sits in the IoT pipeline
Section titled “Where AI sits in the IoT pipeline”AI is rarely the whole system. It is one stage between raw data and an action or an alert.
+----------+ +-------------+ +----------------+ +-------------+ | Sensors |-->| MCU / edge |-->| Inference |-->| Decision | | camera, | | device: | | (TinyML, CV | | threshold, | | mic, IMU | | sample, | | model, LLM) | | debounce | +----------+ | pre-process | +----------------+ +------+------+ +-------------+ | v +-----------------+ +-----------------+ +------------------+ | Dashboard / |<--| Broker / gateway|<--| Alert or command | | alert channel | | MQTT, Modbus | | JSON over MQTT, | | Grafana, Node- | | | | coil write | | RED | +-----------------+ +------------------+ +-----------------+Three things to notice:
- Pre-processing matters as much as the model. Windowing, filtering and resizing happen before inference and cost time and RAM.
- A decision layer sits after the model. Raw confidence scores flicker. Thresholds and debouncing turn them into stable events.
- The output goes into normal IoT plumbing. If you already know MQTT from the IoT start page or Modbus from the IIoT start page, you already know how the AI result leaves the device.
Learning roadmap
Section titled “Learning roadmap”| Stage | Focus | Done when you can… |
|---|---|---|
| 0. Foundations | Python, NumPy basics, the idea of training vs inference, train/validation/test splits | Explain why a model that scores well on training data can fail in the field |
| 1. Sensors and data | Collect labelled data from a real sensor, inspect it, clean it | Produce a small dataset with at least two clearly different classes |
| 2. First TinyML model | Edge Impulse project with an ESP32-S3 or similar board | Run on-device inference and read the result over serial |
| 3. Quantize and measure | INT8 conversion, model size, real inference time | Report model size, RAM use and latency from your own board |
| 4. Edge vision | OpenCV capture, a small pretrained YOLO model on a Raspberry Pi | Detect an object in a live camera feed and log it with a timestamp |
| 5. Connect to IoT | MQTT alert with threshold and debouncing; optional Modbus coil | See a stable alert on a dashboard when the event happens, and not when it does not |
| 6. Local LLM helper | Ollama with a small model behind a FastAPI endpoint | Ask it to summarise a day of device logs through an HTTP call |
| 7. Harden | Security, monitoring, model update plan | Explain how you would update the model and detect when it degrades |
Practical notes for India-based learners
Section titled “Practical notes for India-based learners”- An ESP32-S3 board and a few sensors are inexpensive and widely available from Indian electronics retailers. See the India student BOM guide for a parts list approach, and the pinout reference for wiring.
- Prototype in a simulator first where you can. The Wokwi lab is useful for the sensing and MQTT side, even though it will not run your trained model for you.
- Power cuts and unstable Wi-Fi are normal. Design edge inference so the device keeps working offline and sends results when the link returns.
- Wire carefully when your alert drives a relay. Read hardware wiring safety before connecting any load.
Security and privacy
Section titled “Security and privacy”Local inference is attractive partly because raw camera or audio data never leaves the site. Keep it that way: lock down the broker and the gateway, and do not expose a model API to the internet. The Cybersecurity start page covers the basics, and the Wireshark OT hardening guide helps you check what your device actually sends.
Where to go next
Section titled “Where to go next”- Edge AI deployment checklist: quantization, Netron, budgets and alerting.
- MQTT Topic Tester: validate the topics your AI alerts will use.
- IoT Battery Calculator: see what continuous inference does to battery life.
- Tools hub: everything else.