Mini Wi-Fi Smart Relay – Single Channel
Mini Wi-Fi Smart Relay – Single Channel
This project is a compact, Wi-Fi-enabled relay controller designed for smart home automation and conventional wall-switch integration.
With a PCB measuring just 35 × 38 mm, the module combines an AC-to-DC power supply, a single relay output, an ESP32 microcontroller, and two wall-switch sensing inputs.
The design is similar in concept to the Sonoff MINI R4, providing a compact hardware platform for controlling electrical loads through wireless automation while retaining the ability to detect conventional wall-switch inputs.
Key Features
Compact dimensions: 35 × 38 mm
Input voltage: Designed for 85–265V AC, 50/60Hz
Relay outputs: 1 channel
Wall-switch inputs: 2 sensing inputs
Microcontroller: ESP32-based
Connectivity: Wi-Fi
Power supply: Integrated AC-to-DC conversion
PCB design: Optimized for a small footprint
The module is powered from an 85–265V AC supply through the LIN and N terminals. LOUT provides the relay-controlled live output for an external load, while the two N terminals share the neutral connection.
S1 and S2 are mains-referenced wall-switch sensing inputs, allowing the ESP32 to detect external switch states.
The PCB measures 35 × 38 mm and has been physically manufactured and tested.
Design Overview
The board integrates three main functions:
1. Power Supply
An onboard AC-to-DC power supply allows the module to operate directly from mains voltage without requiring an external DC adapter.
2. Relay Control
A single relay provides switching capability for an external electrical load. The relay is controlled through the onboard microcontroller.
3. Wall-Switch Detection
Two sensing inputs allow the microcontroller to monitor external wall switches, providing flexibility for smart-switch applications.
Applications
Smart home automation
Wi-Fi lighting control
Wall-switch integration
IoT relay controllers
Embedded electronics development
Compact automation projects
Hardware Testing
This PCB has been physically manufactured and tested.
The design is based on a working hardware prototype rather than an unverified schematic or simulation-only project.
PCB dimensions: 35 × 38 mm
Pinout
ESP32 Pin Assignments
GPIO3 REL1 Relay control
GPIO0 LED1 Status LED
GPIO9 SW2 User/BOOT pushbutton
GPIO18 S1OUT Wall-switch input 1
GPIO19 S2OUT Wall-switch input 2
EN SW1 Hardware reset button
TXD0 TX UART transmit
RXD0 RX UART receive
Additional Connected Pins
ESP32 GPIO Pin Connection
GPIO2 10 kΩ pull-up to 3.3 V
GPIO8 10 kΩ pull-up to 3.3 V
3V3 3.3 V supply
GND Ground
GPIO2, GPIO8, and GPIO9 are ESP32-C3 strapping pins, so their states during reset matter.
Summary
- Relay: GPIO3
- LED: GPIO0
- Reset: EN
- Button: GPIO9
- Wall-switch detection: GPIO18, GPIO19
- UART: TXD0, RXD0
- Pull-ups: GPIO2, GPIO8
Important Notes
This design operates with potentially hazardous mains voltage and is intended for experienced electronics developers.
The shared PCB design should not be treated as a certified, ready-to-install consumer product. Appropriate electrical protection, insulation, enclosure design, load-rating verification, and regulatory compliance are required for its intended application.
Firmware is not included.
Mini Wi-Fi Smart Relay – Single Channel
Project images are for reference only. Actual production is based on the manufacturing files on the project page.
Please review the designer's notes (e.g., PCB thickness) and select the appropriate options.
PCBWay is not responsible
for issues caused by unsuitable parameter selections.
For more important ordering information, please refer to
Read More
- ✖ | No sharing or redistributing in any way of the 3D files or derivatives
- ✖ | No remixing
- ✖ | Non-commercial Use (only for personal use)
Raspberry Pi 5 7 Inch Touch Screen IPS 1024x600 HD LCD HDMI-compatible Display for RPI 4B 3B+ OPI 5 AIDA64 PC Secondary Screen(Without Speaker)
BUY NOW- Comments(0)
- Likes(0)
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by joseph EL-MURR
-
Émetteur Récepteur Optique Expérimental (communication UART ATtiny + fibre optique)
138 0 1 -
SmallOLED - Live PC Stats, Animated Clocks & Audio Visualizer
979 0 3 -
"Talking Multimeter": Arduino-Based Speech Add-on for Multimeters with SCPI Protocol
561 0 1 -
Programmable Mist Maker - XIAO / QT PY Extension
3032 2 3 -
RadioHAT - Raspberry Pi radio development platform
2581 0 4 -
QWIIC-VL53L4CD Time-of-Flight Distance Sensor Module
2804 0 2 -
-







