DIY-Sonoff
LoZioo·DIY-Sonoff·schematics/sonoff.kicad_pcb
About the DIY-Sonoff PCB
DIY-Sonoff is an open source ESP8266 PCB design by LoZioo, published on GitHub under the MIT license. It is a 2-layer board measuring 59.2 × 42.9 mm, with 16 components from 11 distinct parts.
Its main chip is the ESP-01_2x04, from the ESP8266 family. By type, the board carries 3 connectors, 3 resistors, 2 transistors, 2 relays, 2 diodes and 2 capacitors.
It belongs with the dev boards & breakouts designs in this gallery.
From the project
Simple sonoff PCB built around the ESP-01 devboard.
- Requirements - 3D enclosure - Assembly - GPIOs mapping Inputs and outputs ESP8266 bootloader GPIOs configurations ESP8266 GPIOs behaviour Suggested configurations - Firmware - Circuit and PCB - Previews - References
Note: On the ESP-01 dev board, the GPIO15 is not exposed and is held low by the hardware, so you can ignore the first column.
Said that, when booting the already programmed module, you must ensure that the second column configuration is selected. That's accomplished by the resistors R1 and R2 on the PCB.

Main components on the DIY-Sonoff
DIY-Sonoff bill of materials (BOM)
16 components, 11 distinct parts.
| Qty | Part | Footprint | Refs |
|---|---|---|---|
| 1 | ESP-01_2x04 | ESP-01 | U1 |
| 2 | 2N7000 | TO-92_Inline | Q1, Q2 |
| 1 | Screw_Terminal_01x06 | TerminalBlock_bornier-6_P5.08mm | J1 |
| 1 | Screw_Terminal_01x04 | TerminalBlock_4Ucon_1x04_P3.50mm_Horizontal | J2 |
| 1 | Conn_02x03_Odd_Even | PinHeader_2x03_P2.54mm_Vertical | J3 |
| 2 | Relay_SPDT | Relay_SPDT_Omron-G5LE-1 | K1, K2 |
| 1 | HLK-2M03 | Converter_ACDC_Hi-Link_HLK-2Mxx | PS1 |
| 2 | 1N4007 | D_DO-41_SOD81_P2.54mm_Vertical_KathodeUp | D1, D2 |
| 1 | 100nF | C_Rect_L7.2mm_W2.5mm_P5.00mm_FKS2_FKP2_MKS2_MKP2 | C1 |
| 1 | 100uF | CP_Radial_D6.3mm_P2.50mm | C2 |
| 3 | 10k | R_Axial_DIN0207_L6.3mm_D2.5mm_P2.54mm_Vertical | R1, R2, R3 |
DIY-Sonoff design files
The KiCad project lives in the LoZioo/DIY-Sonoff repository on GitHub; these links point at the commit this page was built from.
- Layoutschematics/sonoff.kicad_pcb
- Schematicschematics/sonoff.kicad_sch
DIY-Sonoff: common questions
What microcontroller does the DIY-Sonoff use?
The DIY-Sonoff is built around the ESP-01_2x04, from the ESP8266 family.
How big is the DIY-Sonoff PCB?
The DIY-Sonoff measures 59.2 × 42.9 mm, has 2 copper layers and is 1.6 mm thick.
How many components are on the DIY-Sonoff?
16 components, from 11 distinct parts. The full bill of materials is listed on this page.
Where can I download the DIY-Sonoff design files?
From the LoZioo/DIY-Sonoff repository on GitHub, which has the KiCad layout and the schematic; the links under Design files point to each one.
Can I use the DIY-Sonoff design in my own project?
Yes, under the terms of its MIT license, which LoZioo chose for the repository.
Can I test firmware for the DIY-Sonoff without the hardware?
Yes. HardLabs builds a simulation of the board from its netlist and BOM, so you can run and debug ESP8266 firmware against it before you order a PCB.
Similar boards
ESP8266
ESP8266ControllerCircuit
stuartpittaway
75 × 30 mm20 parts2LCC-BY-NC-4.01.1kESP8266
HASwitchPlate
aderusha
60 × 40 mm8 parts2LMIT738ESP8266
Goatgdo
Kaldek
32.9 × 53.3 mm23 parts2LMIT506ESP8266
RatGDO-OpenSource-D1Mini-ESP8266
Kaldek
47.8 × 63.3 mm12 parts2LMIT506ESP8266
RatGDO-OpenSource-Bare-ESP8266
Kaldek
55 × 82.7 mm20 parts2LMIT506ESP8266
Iaq board
nkitanov
70.1 × 43.2 mm17 parts2LNo license398