logo elektroda
logo elektroda
X
logo elektroda

Sonoff 4CH Setup for Sequential Solenoid Valve Operation in Garden

Oddawajsanki 2883 19
Best answers

Can I use a Sonoff 4CH to switch 12V solenoid valves one after another on a schedule for garden watering?

Yes, it can work in principle, but it is better to power the Sonoff from 220 VAC and use it only to switch the 12 VDC valve supply, so coil back-EMF does not damage the controller [#18707006] Put a 2 A fuse in each valve circuit and also in the 220 VAC supply circuit [#18707057] The cheap 12 V, 1/2" valves linked in the thread are not ideal for irrigation: their flow is too low, they can heat up if held open too long, and dedicated irrigation valves such as 24 VAC types are a better choice [#18712385][#18716622] One reply also notes that Sonoff relay outputs can be used for this kind of switching, so sequential opening/closing is possible if you wire and schedule each channel separately [#18706909][#18707006]
Generated by the language model.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 18706880
    Oddawajsanki
    Level 8  
    Posts: 84
    Rate: 5
    Hi. I will be installing automatic watering in my garden, I am a bit green and have a few questions for you regarding the operation of such a watering system. The whole watering system will be based on a sunoff 4ch (4 channel) to each channel I want to connect an inverter/power supply from 230v to 12v. To the power supply I will connect a solenoid valve on 12v which will be open when power is applied. I will set the appropriate schedule in the application. What I mean is that each electro-valve will open one after the other. That is, 1 solenoid valve open for 30m, the rest closed, then the 2nd solenoid valve open for 30m. Is there any chance of this working?
  • ADVERTISEMENT
  • #2 18706909
    Krzysztof Kamienski
    Level 43  
    Posts: 21874
    Help: 2030
    Rate: 5128
    Oddawajsanki wrote:
    Is there any chance of this working ?
    Yes, but why 12 VDC valves ? I have noticed in practice more corrosion of e.g. electro-valve terminals on DC supply due to electrolysis. Small 220 /24 V transformers would be more appropriate.
  • #3 18706915
    Oddawajsanki
    Level 8  
    Posts: 84
    Rate: 5
    Krzysztof Kamienski wrote:
    Oddawajsanki wrote:
    Is there any chance of this working ?
    Yes, but why 12 VDC valves ? I have noticed in practice more corrosion of e.g. electro-valve terminals on DC supply due to electrolysis. Small 220 /24 V transformers would be more appropriate.



    I chose 12v valves because of the 25,- price on allegro. I found a sonoff 4ch pro model, there you can use 12v power supply but I do not know how to connect it.
  • ADVERTISEMENT
  • #6 18706937
    Krzysztof Kamienski
    Level 43  
    Posts: 21874
    Help: 2030
    Rate: 5128
    What power supply, such an output voltage. Sonoff has relay outputs.

    Oddawajsanki wrote:
    is this separate power supply for each section
    And why so ? One 12 VDC power supply for everything.
  • ADVERTISEMENT
  • #7 18706969
    Oddawajsanki
    Level 8  
    Posts: 84
    Rate: 5
    Wait, I power the sonoff 230v by connecting 2 +- cables or through this socket with a 12v power supply. And I connect the 4 valves, do I also connect the power supply to them or what, I'm a bit green :p
  • #8 18706986
    Krzysztof Kamienski
    Level 43  
    Posts: 21874
    Help: 2030
    Rate: 5128
    @Oddawajsanki What power supply voltage does this Sonoff have ? 220 VAC or 12 VDC ?
  • #9 18706996
    Oddawajsanki
    Level 8  
    Posts: 84
    Rate: 5
    Krzysztof Kamienski wrote:
    @Oddawajsanki What power supply voltage does this Sonoff have ? 220 VAC or 12 VDC ??
    .

    Sonoff 4CH Setup for Sequential Solenoid Valve Operation in Garden .

    How is the connection supposed to look in this picture ? Sonoff 4CH Setup for Sequential Solenoid Valve Operation in Garden

    in yellow I have marked the input I will use
  • ADVERTISEMENT
  • #10 18707006
    Krzysztof Kamienski
    Level 43  
    Posts: 21874
    Help: 2030
    Rate: 5128
    It is better to power the Sonoff from 220VAC, in parallel with the input of the 12 VDC power supply. This will prevent damage to the Sonoff, through feedback pulses generated by valve coil inductions.
  • #11 18707029
    Oddawajsanki
    Level 8  
    Posts: 84
    Rate: 5
    Krzysztof Kamienski wrote:
    Preferably power the Sonoff from 220VAC, in parallel with the input of the 12 VDC power supply. This will prevent damage to the Sonoff, through feedback pulses generated by valve coil inductions.


    ok, I will still ask. I will be buying these valves: https://allegro.pl/oferta/elektrozawor-12v-1-2-cala-dn15-nc-0-8mpa-9256815456
    I have a pressure of about 4 bar. Is it sensible to buy such valves or is it better to go for better ones, I will have this whole controller in the garage and the cables will go outside to the box where these valves will be, in case something leaks and makes a short circuit could something happen, should I additionally install fuses on each one.
  • Helpful post
    #12 18707057
    Krzysztof Kamienski
    Level 43  
    Posts: 21874
    Help: 2030
    Rate: 5128
    A 2 A fuse can be inserted in the circuit of each valve and the same in the 220VAC supply circuit.
  • #13 18707114
    Oddawajsanki
    Level 8  
    Posts: 84
    Rate: 5
    Krzysztof Kamienski wrote:
    I can insert a 2 amp fuse in the circuit of each valve and the same in the 220VAC supply circuit.

    OK, in that case many thanks for your help :) .
    Greetings.
  • #14 18711298
    krzbor
    Level 29  
    Posts: 1731
    Help: 40
    Rate: 1044
    Why are you thinking about 12V? In watering, 24V and valves of this type are standard Link and here is the whole list: Link .
  • #15 18712231
    Oddawajsanki
    Level 8  
    Posts: 84
    Rate: 5
    krzbor wrote:
    Why are you thinking 12V? In watering, 24V and valves of this type are standard Link and here's the whole list: Link
    .

    Because of the price I want to use a cheaper. 12v because the solenoid valve I want to use is powered by this voltage. I have included the link below.
    LINK .
  • #16 18712385
    krzbor
    Level 29  
    Posts: 1731
    Help: 40
    Rate: 1044
    And have you noticed that in irrigation valves the standard is 1" possibly 3/4" and your valve is 1/2"? The auction description doesn't mention flow rate, and this is an important attribute if you're going to have sprinklers - simply put, the valve can't dampen the flow. Another parameter of your valve - a run time of 45 minutes. With irrigation valves I have not seen such a restriction anywhere.
  • #17 18716622
    piotr411
    Level 22  
    Posts: 483
    Help: 43
    Rate: 45
    Poorly selected electro-valve. Too little flow, but for watering plants in pots it can be. If you are already very insistent on these valves they have a flow of about 6-10L/mim also depends on the pressure. They could be used if you increase the number of sprinklers with a smaller intake, e.g. from the mprotator 1000 or 2000 series. Considering the larger number of sprinklers, pipes, fittings, electro-valves, the installation will be expensive and quite unreliable. As the valves from the link heat up a lot and cannot run open for too long. A not much more expensive dedicated valve (e.g. PGV100) 24VAC will be a better solution. Apart from that, the industry case for the Sonoff controller somehow doesn't particularly lend itself to being programmed as a sequential controller, unless you write the program for the ESP yourself. Somehow this is not a very cost-effective, labour-intensive and uncertain solution you want to use.
  • #18 18723931
    pitron
    Level 24  
    Posts: 811
    Help: 51
    Rate: 99
    Let us know how it goes for you too I was thinking of auto watering vegetables but from a barrel.
    The ready-made ones from Aliexpress are terribly expensive.
  • #19 18723973
    piotr411
    Level 22  
    Posts: 483
    Help: 43
    Rate: 45
    Irrigation or fertilisation of vegetables is very cheap when compared to greenhouses or lawns. 100 nozzles cost 40PLN, the number of pipes depends on the size of the crop. I think that if you have a voltage source and you don't have to put up photovoltaic cells or build a windmill, the cost of such a small vegetable garden should not exceed 250-500zł. Making a lawn irrigation system is already a thousand zlotys. The valves which the author of the subject wants to apply will raise one medium sprinkler. Taking into account that on average you will need about 15-20pcs if the lawn is not a rectangle, these valves will come out quite expensive. The price would come down if he used dedicated valves. Like the aforementioned PGV100 or any other for irrigation systems with a cross-section greater than 25mm. That is, a water throughput of about 60L/min.
  • #20 18725364
    Oddawajsanki
    Level 8  
    Posts: 84
    Rate: 5
    The automatic watering will be used for watering the shrubs, using pulsating sprinklers, and one valve for watering the greenhouse, where I will use a hose with holes.

Topic summary

✨ The discussion revolves around setting up a Sonoff 4CH device for controlling sequential solenoid valves in an automatic garden watering system. The user plans to connect 12V solenoid valves to the Sonoff, powered by a 230V to 12V inverter. Concerns were raised about the choice of 12V valves due to potential corrosion and the need for proper voltage management. Recommendations included using a single 12V power supply for all valves and ensuring the Sonoff is powered from 220VAC to avoid damage from feedback pulses. The user also inquired about the suitability of specific solenoid valves for their application, considering flow rates and pressure requirements. Suggestions for using fuses in the circuit for safety were provided, along with alternatives for more reliable valve options.
Generated by the language model.

FAQ

TL;DR: Cheap 1/2-inch 12 V valves flow about 6–10 L/min; "a 24VAC valve will be a better solution." Power Sonoff on 230 VAC, feed valves via one 12 V PSU, and add 2 A fuses per valve. Schedule channels to run one at a time. [Elektroda, piotr411, post #18716622]

Why it matters: This FAQ helps DIYers wire and choose valves for Sonoff 4CH to automate sequential garden watering safely and reliably.

Quick Facts

Will a Sonoff 4CH handle sequential solenoid valve watering?

Yes. Each Sonoff 4CH channel is a separate relay, so you can schedule channels to run one valve at a time. Configure start times and durations per channel so only one is on during each 30-minute slot. This approach matches the “one-after-another” plan described and confirmed as workable. Ensure proper power and protection as outlined below for reliability and safety. [Elektroda, Krzysztof Kamienski, post #18706909]

Should I choose 12 VDC or 24 VAC irrigation valves?

Choose 24 VAC irrigation valves when possible. The expert noted more corrosion with DC due to electrolysis and recommended small 230/24 V transformers. Quote: “Small 220/24 V transformers would be more appropriate.” 24 VAC valves are the industry norm and pair well with off-the-shelf irrigation hardware. If you already own 12 V DC valves, protect wiring and keep duty cycles modest. [Elektroda, Krzysztof Kamienski, post #18706909]

How do I wire Sonoff 4CH Pro with one 12 V PSU and four valves?

Follow this 3‑step plan:
  1. Power Sonoff from 230 VAC in parallel with the 12 VDC PSU input. “Preferably power the Sonoff from 220VAC.”
  2. Route the PSU’s +12 V through each Sonoff relay COM to NO, then to each valve coil.
  3. Tie all valve negatives to the PSU negative. This topology reduces back‑EMF reaching Sonoff logic and keeps supply rails stable. Mount fuses near the controller for serviceability. [Elektroda, Krzysztof Kamienski, post #18707006]

Do I need a separate power supply for each valve?

No. Use one adequately rated 12 VDC supply for all valves. The Sonoff 4CH provides relay outputs that simply switch your supply to each valve. Because you plan sequential operation, only one valve draws current at a time. Size the PSU comfortably for a single valve’s load, with margin. Keep wiring neat and grounds common. [Elektroda, Krzysztof Kamienski, post #18706937]

What fuse ratings should I use to protect my irrigation circuits?

Install a 2 A fuse in the circuit of each valve, and another 2 A fuse on the 230 VAC supply to the system. Place fuses close to the controller to simplify troubleshooting and to protect downstream wiring. This adds inexpensive, effective protection against shorts or moisture-related faults in outdoor junction boxes and valve boxes. [Elektroda, Krzysztof Kamienski, post #18707057]

Are 12 V 1/2-inch solenoid valves OK for lawn sprinklers?

They are a poor fit for sprinklers. Expect only about 6–10 L/min, and these valves heat up if held open too long. “A not much more expensive dedicated valve (e.g., PGV100) 24VAC will be a better solution.” Use 24 VAC irrigation valves for higher flow and reliability. Reserve the 12 V 1/2-inch type for low-flow tasks. [Elektroda, piotr411, post #18716622]

Is a 1/2-inch valve a bottleneck for my sprinklers?

Yes, likely. Irrigation valves are typically 1 inch or 3/4 inch. Your 1/2-inch auction valve lacks a flow rating and even lists a 45‑minute run limit. That restriction signals it can throttle flow and isn’t intended for continuous sprinkler duty. Choose a proper irrigation valve with known throughput and no duty‑time limit. [Elektroda, krzbor, post #18712385]

How do I prevent back-EMF from damaging the Sonoff when switching coils?

Power Sonoff from 230 VAC in parallel with the 12 V PSU input. This arrangement isolates the logic supply from coil transients. Quote: “This will prevent damage to the Sonoff, through feedback pulses generated by valve coil inductions.” Keep wiring short and use proper grounding to further reduce spikes. [Elektroda, Krzysztof Kamienski, post #18707006]

Should I power the Sonoff 4CH from 230 VAC or 12 V when driving solenoids?

Use 230 VAC input and place the 12 V PSU in parallel, as advised. This keeps the Sonoff’s logic supply robust and reduces risk from inductor kickback. Quote: “Preferably power the Sonoff from 220VAC, in parallel with the input of the 12 VDC power supply.” It’s a simple change that improves durability. [Elektroda, Krzysztof Kamienski, post #18707006]

What’s a budget-friendly irrigation setup for vegetables?

Vegetable irrigation can be inexpensive. Example costs: about 100 drip nozzles for 40 PLN, with total system cost around 250–500 PLN if you already have a power source. Lawn systems are costlier. Keep pipe runs short, group beds sensibly, and use low-flow emitters to stretch capacity. This delivers a practical, low-budget solution. [Elektroda, piotr411, post #18723973]

How many sprinklers can a low-cost 12 V 1/2-inch valve drive?

Expect it to lift only one medium sprinkler. For context, a typical non-rectangular lawn may need roughly 15–20 sprinklers total across zones. Plan multiple zones with proper irrigation valves to maintain pressure and coverage. The 12 V 1/2-inch option is best avoided for multi-sprinkler zones. [Elektroda, piotr411, post #18723973]

Is a 12 V 1/2-inch valve enough for drip or greenhouse watering?

It can work for low-flow uses like potted plants or drip lines, but mind duty time and heating. These valves have limited throughput and don’t like prolonged continuous operation. For long watering windows, pick a 24 VAC irrigation valve designed for continuous service. That reduces failures from overheating. [Elektroda, piotr411, post #18716622]

What voltage appears at the Sonoff 4CH outputs—do they supply 12 V?

They are relay contacts, not a fixed-voltage output. Whatever supply you route through the relay is what appears at the output. Quote: “What power supply, such an output voltage. Sonoff has relay outputs.” Feed your 12 V to the relay COM, and switch it to the valve via NO. [Elektroda, Krzysztof Kamienski, post #18706937]
Generated by the language model.
ADVERTISEMENT