Skip to the content
2 layers29.8 × 36.3 mmMain board 24V, the printed circuit board in 3D

Sonoff ZBMINIR2 modded to run on 24V

Size
29.8 × 36.3 mm
Copper layers
2
Thickness
1 mm
Parts
24
Nets
22
Pads
80
Tracks, vias
54, 34
Pours
13
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
8 Jan 2026
Updated
1 Oct 2026

Overview

Main board 24V is an open-source printed circuit board by TimGoll, from the TimGoll/sonoff_zbminir2_24Vmod repository on GitHub, published under the MIT licence. It is a 2-layer board of 29.8 × 36.3 mm with 24 parts on 22 nets, routed with 54 tracks and 34 vias.

It is built around the LMQ66430R5RXBR, TLV75733PDBV and SMF24A, with the MMBT5551 and WJ126V-5.0-06P-14-00A among its other parts. Its parts include 8 capacitors, 4 ICs, 2 resistors, 2 diodes and 1 transistor.

Main components

5

README

README.md

Sonoff ZBMINIR2 24V Mod

I have a cupboard with an always-on 24V supply in it, and I wanted to switch a light in there via Zigbee. At the same time it should still look and feel like a normal electrical installation, with a regular wall switch (a standard 230V rated Merten switch) instead of some odd push button.

The Sonoff ZBMINIR2 does exactly that, just for 100-240V AC. So instead of building something from scratch, I designed a replacement mainboard that lets it run on 24V DC. Zigbee module, relay, enclosure and firmware all stay original.

The mod has been built, tested and in daily use since early 2026.

all parts side by side (from left to right: new 24V mainboard, Zigbee module, relay module, original mainboard)

The Original Device

After taking the ZBMINIR2 apart, it turned out to be built from three separate boards:

  • a Zigbee module based on the EFR32MG21
  • a relay module
  • a mainboard with the mains power supply and the switch input circuitry

Only the mainboard deals with mains voltage. The other two modules just need a few low-voltage supply and signal lines, which makes this mod possible in the first place: replace one board, keep the rest.

original mainboard (original mainboard backside (flatbed scan with scale), MINIR4 V1.0)

Reverse Engineering

To know what the new board has to provide, I reverse-engineered the complete original circuit by hand. Some parts of the drawing don't fully make sense and there are probably some errors in it, but it's good enough to see what is going on.

reverse engineered schematic (hand-drawn reverse engineering of the original mainboard, flawed but good enough)

The power supply is a BP2525X, a non-isolated offline buck converter that creates 5V for the relay, followed by an LDO for the 3.3V rail of the Zigbee module.

The switch input is the interesting part. Since the supply is non-isolated, the logic ground is tied to mains, so the board can look at the switch terminal more or less directly. The input is half-wave rectified, current-limited by a big 75kΩ resistor, clamped to a few volts by a protection diode, smoothed by a capacitor and then passed through two transistors into an active-low signal for the Zigbee module. No optocoupler, no extra supply.

Besides tracing the circuit, I measured the interface signals between the mainboard and the Zigbee module. The important finding: the switch input is active low. 230V on the switch terminal results in 0V at the controller, an open switch results in 3.3V. My circuit had to replicate that polarity, otherwise the stock firmware would see the switch inverted. The relay drive requirements were taken from the relay's datasheet.

The 24V Mainboard

The new board has the same outline, mounting points and module connectors as the original, so it drops straight into the stock enclosure.

Power Supply

The 24V input is converted to 5V for the relay coil by a LMQ66430 synchronous buck converter running at 2.2MHz. Honestly, a 36V/3A converter is way too powerful for a relay and a Zigbee module, but it is tiny and needs very few external parts and I used it a few times in the past already. So it was used for convenience.

A TLV757P LDO then generates the 3.3V rail for the Zigbee module.

The 24V rail has an SMF24A TVS diode for protection. This is tailored to a 24V supply. Since the buck converter has quite a bit of margin left, the board could be used with higher voltages as well by adapting the protection diodes.

Switch Input

At 24V DC there is nothing to rectify and no 325V peak to deal with, so the whole input circuit collapses into a single stage. The switch input drives an MMBT5551 NPN transistor through a 100kΩ base resistor, protected by another SMF24A. The open collector has a 100kΩ pull-up to 3.3V and goes to the Zigbee module.

  • 24V on the input (switch on) pulls the controller pin to 0V
  • an open switch leaves the pin at 3.3V

This is the same active-low behaviour as the original, so the Zigbee module can't tell the difference.

Relay

The original relay module is reused. Its coil runs on the 5V rail, and its contacts now switch 24V to the output terminal instead of mains. Relay contacts are usually rated much lower for DC than for AC, so I checked the DC characteristics against my load. It is fine for my use case.

Terminals

The terminal block keeps the original form factor:

TerminalFunction
1switch input
2, 3+24V
4switched output
5, 6GND

I also designed a new label for the enclosure that matches the 24V version.

installed device (the modified device with the custom label)

Result

The mod has been running without problems since early 2026. In Zigbee2MQTT and Home Assistant it shows up as a regular ZBMINIR2, since the firmware is untouched. The wall switch works like any normal light switch, just with 24V behind it.

Schematic, PCB, production files and the label can be found in this repository.

Parts

24
QtyValueFootprintReferences
5TPadTestPoint:TestPoint_Pad_D1.0mmTP1, TP2, TP3, TP4, TP6
2100kResistor_SMD:R_0402_1005MetricR1, R2
210uCapacitor_SMD:C_1206_3216MetricC3, C4
22u2Capacitor_SMD:C_0603_1608MetricC2, C6
247uCapacitor_SMD:C_1206_3216MetricC7, C8
2SMF24ADiode_SMD:D_SOD-123FD1, D7
11uCapacitor_SMD:C_0402_1005MetricC5
147uCapacitor_SMD:CP_Elec_6.3x7.7C1
14u7Inductor_SMD:L_Sunlord_SWPA4030SL1
1LMQ66430R5RXBR#TimGollLib:TI_VQFN_15_EPU2
1MCU Boardsonoff:pcb_mcuU3
1MCU Relaissonoff:pcb_relaisU4
1MMBT5551Package_TO_SOT_SMD:SOT-23Q1
1TLV75733PDBVPackage_TO_SOT_SMD:SOT-23-5U1
1WJ126V-5.0-06P-14-00ATerminalBlock:TerminalBlock_MaiXu_MX126-5.0-06P_1x06_P5.00mmJ1

Similar boards

  • 4 layers71.2 × 52.2 mmExample board, the printed circuit board in 3D

    Example board

    will-fritz/4-ch-mic-board

    4 ch microphone board to replace seed studio 6 ch microphone board stack

    35 parts3GPL-3.0
  • 2 layers89.8 × 10.2 mmODGIRON v1.0-F4x1-0412, the printed circuit board in 3D

    ODGIRON v1.0-F4x1-0412

    oldgerman/ODGIRON

    基于 ironOS 的 PD T12 电烙铁

    125 parts34GPL-3.0
  • 4 layers190 × 100 mmRioctrl controller, the printed circuit board in 3D

    Rioctrl controller

    festlv/rioctrl-hw

    Hardware design for modular CNC controller

    281 parts16CERN-OHL-S-2.0
  • 6 layers158 × 174 mmTritonECU Main, the printed circuit board in 3D

    TritonECU Main

    alpauna/TritonECU

    ESP32-S3 engine control unit — fuel injection, ignition timing, wideband O2 (CJ125/LSU 4.9), dashboard, and MQTT telemetry

    457 parts10
  • 2 layers58 × 100 mmFullBoardChargePumpCapMult, the printed circuit board in 3D

    FullBoardChargePumpCapMult

    z2amiller/pedalfx

    Replaces the Panasonic MN3102 (clock generator for MN3204/05/07/08/09 BBDs) with a CD4047B plus four passives. Two ways to use it:

    40 parts7
  • 4 layers70 × 60 mmTanklevel, the printed circuit board in 3D

    Tanklevel

    Th3Link/tanklevel

    This project provides a solution for measuring the liquid level in tanks, such as rainwater tanks, using the TL-136 pressure sensor.

    80 parts4CERN-OHL-S-2.0
  • 4 layers100 × 80 mmR2022-12, the printed circuit board in 3D

    R2022-12

    karlp/hubbish

    Cascading, per port power switching usb2.0-HS 7 port hub

    138 parts3
  • 2 layers101.9 × 82.3 mmNivara Controls, the printed circuit board in 3D

    Nivara Controls

    Gabriel-dot-hub/Gabriel_Ortiz_Electiva_2025_C2

    Repositorio para las clases de la electiva con el profesor Carlos Antonio Pichardo Viuque

    91 parts2

Questions

How big is the Main board 24V PCB?

It measures 29.8 × 36.3 mm and has 2 copper layers, 1 mm thick.

What parts does the Main board 24V use?

24 parts, built around the LMQ66430R5RXBR, TLV75733PDBV, SMF24A and MMBT5551. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Main board 24V KiCad files?

From the TimGoll/sonoff_zbminir2_24Vmod repository on GitHub, at the commit this page was made from: the board is main_board_24V/main_board_24V.kicad_pcb and its schematic main_board_24V/main_board_24V.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Main board 24V design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).