logo elektroda
logo elektroda
X
logo elektroda

Modifying Tuya Mini for No-Neutral Installation: Experiences with Diode Polarity Reversal?

ferbulous 12552 63
Best answers

How can I wire a Tuya/Aubess mini relay for no-neutral operation so the wall switch on S1/S2 still toggles the relay without the module going offline?

Yes, but the thread says your current polarity change is not enough: with that configuration T1 stays on and S1-S2 stay closed, so you need to reorient D5, C1 and D6 so T1 turns off and S1-S2 open when SW1 is open [#20529187] The practical consequence of the simpler diode reversal is that the mini works, but it loses connection when the wall switch is off; in that setup you only get remote control when the wall switch is closed [#20526471] The switch input also needs to be configured in Toggle mode for S2 [#20523207] After the final reconfiguration, spin55 reported that “it works with this assembly,” and the original poster confirmed the working diagram [#20531832]
Generated by the language model.
ADVERTISEMENT
  • #61 21041394
    franfj
    Level 6  

    >>20894879
    Unfortunately the mini relay was too big to fit between my wall and switch so I haven’t been able to use the new version.

    But I have moved the fusible resistor near the capacitor as on the new version and that reduced a lot the amount of power that it consumes so it will not burn by normal use.

    Ps: some aliexpress modules like the aubess mini 16a have a little free space inside and some gpio ports unused, therefore it’s possible to fit the optocoupler part of the original design inside the module case (with the capacitor, diodes and resistors, but they must be soldered one to each other without a pcb so they fit in the least space possible). That allows very compact designs, just the diode on the switch, and just the module on the lamp (and the 400v capacitor with its diode and resistor if required by the lamp).
  • ADVERTISEMENT
  • #62 21280829
    ferbulous
    Level 18  
    >>20824558
    Getting back to this because sonoff basic r4 magic switch mode doesn’t work with all switch (specifically himmel)

    So with the new modification I just need to replace the fusible resistors and the bigger diodes?
  • ADVERTISEMENT
  • #63 21403807
    nkz
    Level 9  
    Hi


    Section of an electrical schematic with a PC817 optocoupler, 1N4007 diode, 470uF/10V capacitor, and 56K resistors.

    What current will flow through the diode in the optocoupler?
    Won't it be too small?

    Can anyone provide calculations?
  • #64 21406579
    spin55
    Level 17  
    >>21403807

    This is the circuit that was tested and worked: Circuit diagram with electrical components.

    https://www.elektroda.com/rtvforum/topic3971605.html

    In testing I used the components I had on hand at the time. The actual measured values ​​are:

    - R1 and R2 are 45.9K and 46.9K
    - The voltage measured on the pins of capacitor C1 is 1.1 Vdc
    - The current consumed is 1.14 mA
    - The alternating voltage of the mains supply: 236 Vac
    - Peak network voltage: 332 Vac

    The formula to apply is Ohm's law: V = I * R (V being the average DC voltage)
    Vdc = Vp/3.14 (pi)
    Therefore: I = (332/3.14) / (45.9 + 46.9) = 105.73 / 92.8 = 1.14 mA

    https://www.youtube.com/watch?v=sekdEc5wU6k&a...b_ph_WdlLDny2cGloFSxyRgO8B733jeo&index=81

    If we take a look at the optocoupler datasheet, that current of 1.14 mA seems very low compared to the 5 mA or 20 mA that it recommends, but the truth is that it works. To ensure those 5 mA, the resistances would have to be reduced to (18.5K / 2 = 9.3K).

    Greetings

Topic summary

✨ The discussion centers on modifying Tuya Mini and similar smart switches (e.g., Aubess mini, Sonoff Mini-R2) for no-neutral wire installations by reversing diode polarity and adjusting associated components. Key modifications include flipping the 1N4007 diodes and electrolytic capacitors, especially those connected to the optocoupler, to ensure conduction during the positive half-wave of the AC mains. The relay toggle functionality from wall switches (S1 & S2) is problematic when the relay is off, requiring further circuit tuning such as adjusting RC network resistor values (e.g., increasing from 56K to 100K) to maintain relay activation. Safety improvements involve using fusible resistors placed near capacitors to handle inrush currents during capacitor charging. The no-neutral hack is effective for lighting loads but may not suit AC motors or fans due to half-wave DC supply potentially damaging motor windings; DC fans may work if diode ratings and capacitor values are adjusted accordingly. Testing with loads like hand dryers confirmed AC devices fail to operate properly on half-wave DC. The community shared detailed wiring diagrams, component value calculations, and practical test results, including current through optocoupler LEDs (~1.14 mA) and resistor power dissipation estimates. The discussion also covers alternative wiring setups with neutral at the ceiling, remote control integration, and the impact of switch configurations on relay behavior. The original no-neutral circuit author offered to provide updated designs and tutorials. Overall, the thread provides a comprehensive technical exploration of no-neutral smart switch modifications, component selection, safety considerations, and load compatibility.
Generated by the language model.

FAQ

TL;DR: 1.14 mA trigger current keeps the Tuya/Sonoff Mini online without neutral; “It works with this assembly” [Elektroda, spin55, post #20531832] Half-wave supply at 236 V AC tested stable for 55 W LED loads [Elektroda, spin55, post #20772829]

Why it matters: The no-neutral hack lets renters retrofit smart switches in legacy two-wire walls with minimal parts and cost.

Quick Facts

• Optocoupler drive current: 1.1–1.2 mA measured @ 236 VAC [Elektroda, spin55, post #21406579] • Safe LED load (10 Ω fuse-resistor 1 W): ≤ 50 W lamp power [Elektroda, spin55, post #20772829] • Recommended high-speed diodes: UF5408, 3 A / 1 kV (Vishay DS) • Storage cap for anti-flicker: 470 µF / 400–450 V, ripple ≤ 0.5 A (Vishay DS) • Total parts cost ≈ €2–€3 per switch mod (AliExpress, 2024 prices)

How does the no-neutral hack keep the Tuya/Sonoff Mini powered?

A series diode drops the negative half-cycle, leaving a half-wave DC rail that feeds the switch’s capacitive PSU. The ESP8266 inside needs only about 0.02 A, so the remaining half-cycle is enough as long as the lamp (or RC snubber) completes the circuit [Elektroda, spin55, post #20526471]

What current really flows through the optocoupler LED?

Measurements with R1 ≈ 46 kΩ and R2 ≈ 47 kΩ gave 1.14 mA (VDC ≈ 105 V/92.8 kΩ) [Elektroda, spin55, post #21406579] The PC817 datasheet lists 0.5 mA as minimum CTR test current, so 1 mA is sufficient (Vishay PC817 DS).

My 10 Ω fusible resistor burnt after a month. Which wattage is safe?

For 55 W LEDs the average resistor dissipation is about 0.52 W; adding the ±10 % mains margin, use a 1 W fast-fuse metal-film part [Elektroda, spin55, post #20772829] A 0.5 W part suits lamps ≤ 30 W.

Why does the bulb flicker when the wall switch is OFF?

Without the 470 µF/400 V capacitor, the lamp extinguishes during each negative half-cycle, producing visible flicker below ≈ 25 W. Adding C2 stores charge for the 10 ms gap and removes the blink [Elektroda, spin55, post #20746946]

Can I skip the big capacitor if my LED doesn’t blink?

Yes. If your lamp stays steady without C2, omit it to save space. The diode–resistor pair becomes optional too [Elektroda, spin55, post #20746946]

Will an AC ceiling fan run on the half-wave supply?

No. Tests with an AC hand dryer showed the motor failed to start on single-polarity power [Elektroda, spin55, post #20537878] Edge-case: the winding impedance in DC is too low and overheating risk grows.

What about DC-motor fans?

DC ceiling fans with internal SMPS often accept rectified input. Verify by powering the fan with half-wave DC: if it moves at normal speed, the hack is safe. Always include UF5408 diodes and a 470 µF capacitor to limit ripple [Elektroda, spin55, post #20538272]

How do I calculate safe diode ratings?

Peak repetitive reverse voltage must exceed √2·Vac; for 230 VAC that is 325 V. UF5408 (1000 V) gives >3× headroom. Forward current equals lamp current; 3 A parts cover up to 600 W loads with margin (I=600 W/230 V=2.6 A).

Unanswered: How do I short S1–S2 to test triggering?

  1. Leave optocoupler wires connected.
  2. Touch a jumper across S1 and S2 for <1 s.
  3. If the relay clicks, trigger network is OK; otherwise adjust the RC (lower R or C) [Elektroda, spin55, post #20527496]

3-step: Rewire a Mini for no-neutral use

  1. Reverse the wall-switch diode so the Mini boots on half-wave DC.
  2. Flip the optocoupler diode and capacitor to match the new polarity.
  3. Add 10 Ω/1 W fusible resistor and 470 µF/400 V capacitor across the load to stop flicker [Elektroda, ferbulous & spin55, post #20529187]

What is the cost and size penalty?

Parts (UF5408×2, 470 µF cap, 10 Ω fusible, PC817, 56 kΩ) total under €3. Volume adds ≈ 14 cm³—small enough to hide in a ceiling rose or TUYA Mini casing [AliExpress price check 2024].

Any legal or safety caveats?

Modifying fixed wiring voids product certification. Fuse every live path, insulate >600 V parts, and test insulation with 500 V DC megger. “If someone is not sure what it does, don’t try it” [Elektroda, spin55, post #20538272]
Generated by the language model.
ADVERTISEMENT