All packs

Connected

Wi-Fi switch hub

Two switches you flip from a web page on your phone, for low-voltage things such as a USB lamp or a small fan.

  • Medium
  • about 40 min
  • ESP32-S3
  • 5 parts
  • 4 wires
  • 60 lines of code
  • Uses Wi-Fi

ESP32 packs are built on real parts: the simulator runs Arduino Uno circuits only.

Idea

A relay is a switch moved by an electromagnet, so a 3.3 V signal can control a separate circuit without touching it. This is how smart plugs work inside.

Before you start

Switch low-voltage loads only: 5 to 12 V. Never connect mains electricity (220 V) to the relay. Mains wiring is for a qualified adult, and this build is not designed for it.

What you learn

Controlling outputs from a web page, and why a relay keeps two circuits apart.

How it works

  1. input

    A phone on the same Wi-Fi

  2. decides

    ESP32-S3 · Wi-Fi

  3. output

    2-channel relay

Powered with 5 V through the board's USB-C port.

It joins your home Wi-Fi. You type the network name and password into the sketch before uploading; they stay on the board.

A reference design. The sketch is compiled with the real ESP32 toolchain, and its pins are checked against the wiring table automatically. It has not yet been built and tested on real parts by us, so wire it on the bench and run the checks before you build it into a case. Real modules vary: follow the labels printed on yours, not their position in the picture.