ProjectsAboutContact

fadayoayodeji@gmail.com

← All projects

Wi-Fi Smart Switch

A Wi-Fi-controlled switch built around an ESP32-C3. It lets me control a regular wall switch from a phone while keeping the electronics hidden behind the existing switch.

Date
Jun 2026
Type
Embedded Systems, Electronics
My role
Electronics, firmware, installation
Wi-Fi Smart Switch

Overview

A standard wall switch made controllable over Wi-Fi. An ESP32-C3 Super Mini and a relay sit behind the faceplate, powered by a phone charger. Typing the board's IP address into a phone browser opens a page with an on and off control.

Commercial smart switches mean replacing the faceplate. I wanted the switch to look exactly as it did before.

  • Controlled from any phone on the same Wi-Fi
  • No app, just the board's IP address in a browser
  • Everything fits behind the original faceplate
  • About ₦5,000 in parts

How it works

The setup is deliberately simple. A phone charger powers the ESP32-C3, the relay is wired to one of its pins, and the relay switches the light.

The firmware connects the board to Wi-Fi and serves a small web page at its IP address. Pressing on or off on that page switches the relay.

Phone browser
Home Wi-Fi
ESP32-C3 web page
Relay
Light

Challenges

Anything inside a wall switch is working at 240 V, so the first decision was how to get down to the 5 V the ESP32-C3 needs without building a mains power supply myself. An ordinary phone charger does exactly that: it is a sealed unit that converts the mains and keeps it isolated from the low voltage side. The relay is the only part that touches mains directly. The rest was fitting three parts into the space behind the faceplate.

Build Details

ControllerESP32-C3 Super Mini
SwitchingRelay module
PowerPhone charger, 240 V to 5 V
ControlWeb page at the board's IP address
PartsAbout ₦5,000