Short answer: this project is a custom two-relay Wi-Fi controller built around an ESP-01S—not just an ESP-01S module. It combines an ESP8266-based controller, relay drivers, optional AC/DC power conversion, status LEDs, buttons, screw terminals and a USB-to-TTL programming connection. It is well suited to low-voltage experimentation and local automation, but the mains-powered version should not be treated as a certified smart switch.
The original project was published on Hackster.io on September 13, 2023, and provides PCB files, a component list, a schematic and two firmware paths: an asynchronous web server and MQTT control. See the original project for the design files.
What the module does
The board is intended to control two relay outputs for applications such as lights, fans and other appliances. Its approximate reported size is 48.28 × 42.54 mm, although the current Gerber files should be checked before treating that as the final manufactured dimension.
The design includes:
- An ESP-01S Wi-Fi module based on the ESP8266.
- Two relay-control channels.
- An LM1117 3.3 V regulator.
- An optional Hi-Link AC/DC supply section.
- Optocouplers or transistor-output optocouplers in the control circuitry.
- 1,000 μF and 100 nF capacitors.
- Status LEDs, resistors, buttons, headers and screw terminals.
- A USB-to-TTL programming connection.
The exact relay model, contact rating, optocoupler part number, copper spacing and enclosure suitability must be taken from the actual schematic, bill of materials, PCB files and component datasheets. The project page alone does not independently verify those safety-critical details.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11#1 Best Overall
- 4MB Flash Memory
- Latest version esp-01s, with stronger signal
- Document: https://nurdspace(dot)nl/ESP8266
- About program: Please choose "Generic ESP8266 Module" board in Arduino-IDE to program
- What You Get: 1 X ESP8266-01S Module
Read this safety warning first
Use the DC-only configuration for initial experiments. The project describes versions accepting 220 V AC, 12 V DC or 5 V DC depending on the populated power-supply configuration. That does not mean every assembled board is universally safe for those inputs.
A mains version depends on the exact isolated power module, fuse arrangement, PCB creepage and clearance, terminal spacing, assembly quality, wiring, strain relief and enclosure. It also has to comply with the electrical rules applicable where it is installed. “Supports 220 V” is therefore a project description, not evidence of certification.
- Never prototype exposed mains wiring on a breadboard.
- Disconnect power before changing wiring.
- Keep low-voltage and mains wiring physically separated.
- Use suitable fusing, insulated terminals, strain relief and an enclosure that prevents contact with live conductors.
- Do not regard an optocoupler as proof that the complete PCB provides safe isolation.
- Have household-mains work inspected by a qualified person where local rules require it.
For a finished household installation, a certified, enclosed smart relay is normally the safer choice.
Why use an ESP-01S?
The ESP-01S is a very small and inexpensive Wi-Fi module with access to the ESP8266’s processor, memory, flash interface, UART, GPIO, PWM and other peripherals. Espressif documents the ESP8266EX as suitable for standalone Wi-Fi and compact IoT applications. Its electrical operating range is approximately 2.5–3.6 V, with 3.3 V the normal system target. See the ESP8266EX datasheet.
It is attractive for this project because it offers Wi-Fi without a separate microcontroller, has a mature Arduino ecosystem and can host either a small web interface or an MQTT client.
Rank #2
- 1, ESP8266 ESP-01S serial WiFi wireless transceiver module used 4MB Flash, not 1MB flash.
- 2, USB Programmer selectable working mode: On-board toggle switch. UART side for serial TTL debugging by AT commands, PROG for firmware programming.
- 3, Programmer USB to serial TTL chip: CH340G, please check if your computer has installed the driver before use it.
- 4, ESP-01 serial wifi module can be directly plugged into the yellow pin header of the USB programmer module without any connection wires.
- 5, What you will get: 1pc ESP-01S 4MB wifi module + 1pc USB programmer ESP-01S adapter module. If you have any question, please feel free to contact us by clicking "WISHIOT" under the shopping cart(you can find Sold by WISHIOT under Buy Now button) and then clicking "Ask a question".
Its limitations matter just as much:
- The ESP-01S exposes relatively few convenient GPIOs.
- GPIO0, GPIO2 and GPIO15 are boot-strap pins and must have the correct levels during startup.
- Relay circuitry, LEDs or pull resistors connected to those pins can prevent normal booting or flashing.
- Wi-Fi current peaks require a stable 3.3 V supply.
- The module has no established native Matter, Thread or Zigbee support in this project.
- The supplied project page does not document TLS, authentication, OTA rollback, watchdog behavior or a guaranteed fail-safe state.
There is also a current platform qualification: Espressif’s November 2025 ESP8266EX datasheet marks the chip NRND (Not Recommended for New Designs) and points designers toward newer devices. That does not make existing ESP-01S hobby projects unusable, but it is a reason to consider an ESP32-C3, ESP32-C6 or ESP8684 for a new product.
Power configurations
DC-only version
For bench work, power the board from a suitable regulated DC source and omit the mains AC/DC section as described by the project. The LM1117 then provides the ESP-01S’s 3.3 V rail, provided the input voltage, dropout margin, capacitors and heat dissipation are appropriate.
A linear regulator dissipates approximately (VIN − 3.3) × I watts. For example, a 12 V input at 100 mA would theoretically dissipate about 0.87 W before accounting for peaks and other loads. Wi-Fi transmission can expose an otherwise marginal supply, so calculate the actual load and check regulator temperature rather than assuming the 1,000 μF capacitor makes the design immune to brownouts.
Follow Espressif’s hardware design guidance for regulated power and 3.3 V logic. Place decoupling capacitors close to the relevant devices, use a supply with adequate peak-current capability and measure the rail during Wi-Fi activity and relay switching.
AC/DC version
The optional Hi-Link supply is intended to convert mains to a low-voltage rail, but the exact model, approvals, output rating and layout must be verified from the populated BOM and datasheet. Check the fuse strategy, clearances, terminal spacing, enclosure and local compliance before applying mains.
Rank #3
- Latest version esp-01s,comparing to ESP-01, ESP-01S will provide you stronger antenna singnal;
- ESP8266 can be widely used in smart grids, intelligent transportation, smart furniture, handheld devices, industrial control and other fields
- Applications: Home automation, sensor networks, industrial wireless control
- Model: Esp-01S. Compatible with Arduino. Support 3 modes: AP, STA, AP + STA.
- PUYA chips; 1MB Flash Memory. upgraded from 512KB,Integrated WEP, TKIP, AES, and WAPI engines. 802.11 b/g/n;
The instruction that the PCB can be split along guide lines to make two boards is a fabrication feature, not a general electrical-safety recommendation. Inspect the cut edge, copper spacing and remaining mechanical strength after separation.
Relay control and isolation
The board’s two relays separate the control signal from the switched contacts, and the listed optocouplers may provide signal isolation. These are different concepts:
Recommended Free Tools
- Signal isolation: whether the ESP8266 control signal crosses an optical barrier.
- Power isolation: whether the relay-coil supply is isolated from the logic supply.
- Contact isolation: the relay contacts are separate from the coil, subject to the relay’s construction and ratings.
- Safety isolation: the complete PCB layout, power supply, enclosure and wiring must preserve safe separation.
Before connecting an appliance, verify the relay coil voltage, contact voltage and current ratings, normally open/normally closed wiring, driver transistor rating, flyback-diode arrangement, fuse protection, creepage and clearance. Resistive loads are not equivalent to motors, fans, pumps or solenoids: inductive loads can have high inrush current, create transients, weld contacts or reset the ESP8266. Appropriate suppression may be required.
Also determine whether each relay defaults ON or OFF during reset, boot, Wi-Fi loss and firmware failure. A lamp or motor that switches unexpectedly at startup is a safety and operational issue, not merely a software annoyance.
Programming the ESP-01S
Use a USB-to-TTL adapter with 3.3 V logic. A 5 V UART signal can damage or overstress ESP8266 inputs unless proper level shifting is provided. UART0 uses GPIO1 for TX and GPIO3 for RX.
Rank #4
- 1, The ESP-01S WiFi module is based on ESP8266 chip, so ESP-01S has all the functions and performance of ESP8266
- 2, Compared with ESP-01, ESP-01S has stronger antenna signal, and its pcb layout changed for an improvement in WiFi radio performance
- 3, Flash memory upgraded from 512KB to 4MB, flash chip XMC 0H32BHIG, XM25QH32CJIG or XM25QH32CHIGU10Q shipped by random
- 4, The ESP-01S is with 2X4 Pin header, and you can plug it to the interface of Burner to download the firmware to ESP-01S/ESP01S. It isalso compatible with Ar-duino IDE, please choose "Generic ESP8285 Module" board in IDE
- 5, What you will get is 5pcs ESP-01S Wifi Serial Transceiver Module 4MB(pls note it supports 3.3V only). If you have any question, pls feel free to contact us by clicking "WISHIOT" under the shopping cart and clicking " Ask a question"
The project’s stated procedure is:
- Disconnect the appliance or other load from the relay contacts.
- Connect the converter’s RX to the module’s TX.
- Connect the converter’s TX to the module’s RX.
- Connect converter ground to module ground.
- Press the programming button once.
- Press reset.
- Flash the firmware.
- Press the button and reset again to return to normal operation.
The precise sequence can vary with the PCB revision. Electrically, the reason is that ESP8266 boot mode is selected by GPIO15, GPIO0 and GPIO2 at reset. GPIO0 must typically be low during reset or power-up for serial download mode. See Espressif’s boot-mode documentation and ESP8266 resources.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsCommon flashing failures
- No serial output: check RX/TX crossover, common ground, module power and serial baud rate.
- Download mode fails: GPIO0 may not be low at reset, the button sequence may differ, or relay circuitry may be loading a strap pin.
- Repeated resets: suspect a weak 3.3 V rail, voltage drop, regulator heating or relay noise.
- Flashing succeeds but the module does not run: GPIO0 may remain low, reset may be held active, or the firmware may target a different board configuration.
- Relay clicks while programming: GPIOs can change state during reset. Keep all loads disconnected until startup behavior has been verified.
Firmware choices
Asynchronous web server
The web-server option offers browser-based relay control over Wi-Fi and is convenient for a local demonstration. Before treating it as a finished control system, establish from the actual source code:
- Whether the device starts an access point, joins an existing network, or supports both.
- How Wi-Fi credentials are entered and changed.
- How the IP address is discovered.
- Which controls and status indicators the interface provides.
- Whether authentication and HTTPS are implemented.
- Whether relay state survives reboot.
- Whether OTA updates and a physical fallback exist.
Do not expose an unauthenticated HTTP server directly to the Internet. A local-only interface, network segmentation and a VPN are safer patterns than port-forwarding the device.
MQTT
The MQTT option is better suited to integration with an automation controller, but MQTT is a protocol—not a security configuration. The actual firmware source must establish the broker hostname and port, topic names, payload format, credentials, TLS support, retained-message behavior, last-will configuration, reconnect logic and state reporting.
“Control from anywhere” may mean access through a locally hosted broker, a broker reachable through a VPN, or an Internet-hosted broker. It does not automatically mean that the ESP-01S web server or MQTT endpoint should be publicly exposed. Use authentication, TLS where supported, per-device credentials, topic authorization and network isolation.
Free tools Windows power users keep installed
One-click scans. No signup required.
Best Value
- This module uses genuine relays and normally open interfaces. High stability and low power consumption.
- Strong driving ability, stable and reliable performance. High efficiency, fine workmanship, and durable.
- Add one more ESP-01S module. This smart relay module is based on the ESP-01S WIFI module design. It can be used to DIY your own smart switch. It can be remotely controlled by the mobile phone APP and provides APP and LUA source programs. It's easy to use right away.
- The package includes:2 pcs ESP8266 ESP-01S Relay module, relay WIFI smart socket (with ESP-01S)
- We are very grateful for all customers’ opinions to improve sales, if you are not satisfied, please contact us to find the best solution
Test what happens when Wi-Fi disappears, the broker is unavailable, authentication fails, a retained command arrives after reboot or the device reconnects after a power cut. The indexed project description does not document those behaviors, so they should not be assumed.
PCB fabrication and assembly
- Download the current schematic, PCB files, Gerber archive and bill of materials from the project page.
- Confirm that the Gerbers match the schematic, component values, GPIO assignment and stated board dimensions.
- Choose either the DC-only assembly or the AC/DC assembly; do not populate parts from both configurations casually.
- Inspect diode, capacitor, regulator, optocoupler, LED and relay polarity/orientation before powering the board.
- Check for solder bridges, shorts, damaged pads and insufficient spacing.
- Use the manufacturer’s design rules and ask for a safety review if the board carries mains.
The original project names JLCPCB as an example PCB manufacturer; its official site is jlcpcb.com. Fabrication service does not constitute electrical certification or approval of a mains design.
A safer commissioning procedure
- Begin with no appliance connected.
- With power removed, check continuity and confirm that low-voltage and mains nets are not shorted.
- Power the DC-only version from a current-limited supply.
- Measure the 3.3 V rail during boot, Wi-Fi connection and relay operation.
- Flash the firmware and verify the serial log.
- Test each relay with a low-voltage indicator or other non-dangerous load.
- Press reset repeatedly and observe whether either relay changes unexpectedly.
- Disable the access point or broker and record the relay behavior.
- Only after these checks should a qualified person evaluate any mains installation.
Is this project right for you?
| Choose this design when… | Choose another approach when… |
|---|---|
| You want a compact custom PCB, two relay outputs, local web control or MQTT, and the ability to modify firmware. | You need certified mains switching, a consumer-ready enclosure, guaranteed long-term availability or a documented fail-safe state. |
| You are comfortable testing a DC-only electronics project. | You need Matter, Thread, Zigbee, battery operation, many GPIOs, robust OTA rollback or modern security defaults. |
| You are learning PCB assembly, UART flashing and local automation. | You are building a commercially supportable product without time for electrical, thermal, EMC and safety validation. |
Compared with an off-the-shelf relay module, the custom PCB is smaller and cleaner but demands substantially more responsibility for power design, isolation, firmware recovery and enclosure safety. Compared with a newer ESP32-family design, the ESP-01S is familiar and compact but has fewer practical GPIOs and less headroom for current features.
Verdict
This is a worthwhile low-voltage maker project and a useful way to learn Wi-Fi relay control, UART boot modes, custom PCB assembly and MQTT integration. Reproduce it as a DC-powered board first, verify the actual schematic and firmware, and treat every relay rating and startup state as something to measure or confirm—not assume.
For household mains, use a certified enclosed product unless you can properly review, assemble, protect and test the complete design. For a new commercial design, the ESP8266EX’s NRND status makes a newer ESP32-family or ESP8684-based platform the more defensible starting point.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




