AI Lab for the Internet of Things

From sensors to intelligent self-deciding systems: lessons, projects, architectures, interactive simulation labs and a specialist AIoT assistant.

20Lesson

Presence-based Home Automation

Turn on the lights when someone is present, with a manual override.

IntermediateIntermediateEducational design: not implemented on hardware

Educational content in scientific-draft form; a specialist should review it before it is adopted as an academic reference. No measurement or performance result that was not actually obtained is shown here.

The problem

Wasted lighting.

Goal

Reduce lighting consumption.

Components and requirements

  • ESP32
  • PIR sensor
  • Relay

Sensors

  • pir

Microcontrollers

  • esp32

Communication protocols

  • mqtt

AI model

Time-based rules; optional pattern learning.

System architecture

A local decision with status reporting.

Wiring diagram

Educational text table (check your parts' datasheets before wiring):
PIR → digital pin, relay → digital pin

Implementation steps

  1. Read the PIR
  2. Switch-off delay
  3. Manual override
  4. Send the status

Expected outcomes

In theory: lighting that follows presence. (Not measured)

These are results expected in theory from the design, not experimental results that were measured.

Project tests

  • Test motion and no-motion cases

Ideas for research development

  • Learn occupancy habits

Implementation status: Educational design: not implemented on hardware

Simulations and labs run inside your browser. Nothing you enter and none of the conversations is stored on the server. Privacy policy