Source: https://mokxi.com/teachers/plans/build-smart-home-hub
Updated: 2026-11-11

Lesson plan

# Build a smart home hub lesson plan

A web dashboard on an ESP32-C3 that switches relays, reads sensors and runs schedules from a clock.

2 chapters, 3 lessons, about 3 hours, on the ESP32-C3-DevKitM-1. Every lesson runs in the browser, with nothing to install.

Start a class from this course

The unit

## Objectives and materials

### By the end, students can

- Serve a dashboard and switch real loads through relays and PWM.
- Let sensors, then a clock, decide when things switch.

### Materials for the whole unit

- Character LCD with I2C backpack
- DC motor
- ESP32-C3-DevKitM-1
- Filament lamp
- Full-size breadboard
- LED
- Motion sensor
- Real-time clock, DS3231
- Relay board, two channels
- Resistor
- Temperature and humidity, DHT22

Every part is already on the simulator’s bench, so there is nothing to buy or hand out. The counts are the most any one lesson uses, if you build it on real breadboards too.

Chapter 1. About 1 h

## Control

Serve a dashboard and switch real loads through relays and PWM.

Lesson | Time | What students do

A dashboard that switches real things Serve a web page from the ESP32-C3 and use it to switch a lamp and a fan through relays, and to dim a porch light. Why a relay, and why it is wired the way it is. | 60 min

- Your own web server
- Switch on the lamp
- And the fan
- Dim the porch

### Materials

- DC motor
- ESP32-C3-DevKitM-1
- Filament lamp
- Full-size breadboard
- LED
- Relay board, two channels
- Resistor

### Check for understanding

Each student finishes "A dashboard that switches real things" on their own, without opening the hints. The simulator checks 4 of its 4 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Dim the porch".

Chapter 2. About 2 h

## Automation

Let sensors, then a clock, decide when things switch.

Lesson | Time | What students do

Sensors and automatic modes Add a DHT22 and a motion sensor, and give each switch an auto mode: the fan follows the temperature and the lamp waits for someone to walk by. | 60 min

- Two sensors, two supplies
- A fan that thinks
- Hello, is anyone there?
- Humidity

Schedules and a status screen Finish the hub: a DS3231 clock that turns the porch light on at dusk and off at bedtime, and an LCD that shows the time, the climate and every switch. | 60 min

- A screen on the wall
- Dusk
- Bedtime
- Everything at a glance

### Materials

- Character LCD with I2C backpack
- DC motor
- ESP32-C3-DevKitM-1
- Filament lamp
- Full-size breadboard
- LED
- Motion sensor
- Real-time clock, DS3231
- Relay board, two channels
- Resistor
- Temperature and humidity, DHT22

### Check for understanding

Each student finishes "Schedules and a status screen" on their own, without opening the hints. The simulator checks 4 of its 4 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Everything at a glance".

Your class

## Teach this unit as a class

Start a class from this course and its 3 lessons are assigned in one go, in order. Students join with a six-character code or printed login cards, and each one’s work comes back to you.

The class tools are free for 30 days for one class of up to 20 students, with no card. The lessons themselves are free either way.

Start a class from this course See the demo class

More units

## Other lesson plans

Electronics basics 20 lessons, about 10 h. Embedded on the Arduino Uno 16 lessons, about 12 h. Embedded on the ESP32-C3 13 lessons, about 11 h. Embedded on the Raspberry Pi Pico 7 lessons, about 6 h. Build your own fight stick 5 lessons, about 4 h. Embedded on the STM32F411 6 lessons, about 6 h. C++ on a board 13 lessons, about 10 h. Digital logic and memory 4 lessons, about 4 h. Interactive devices on the Uno 9 lessons, about 8 h. From gates to a computer 23 lessons, about 16 h. Build a claw machine 8 lessons, about 6 h. Every unit All the courses as ready-made units, on the teachers page.
