Author Topic: 24VAC irrigation solenoid controller  (Read 12792 times)

0 Members and 1 Guest are viewing this topic.

Offline ilium007Topic starter

  • Frequent Contributor
  • **
  • Posts: 264
  • Country: au
24VAC irrigation solenoid controller
« on: June 26, 2021, 11:00:44 am »
Hi all - trying to design an ESP32 based irrigation controller that I will use with ESPHome / HomeAssistant to control a number of 24VAC garden solenoids. I spent time learning about TRIAC's but a TRIAC optocoupler driving a TRIAC to switch 24VAC had relatively large losses. Instead I am looking at using an optocoupled MOSFET device suitable for AC as shown in the schematic I have put together below.



Can I please get some feedback on the idea? I am unsure of how to properly protect against lightning, I have included a bi-directional TVS diode. Should I be including a MOV, gas discharge tube or something else? Should the protection shunt to ground / earth? To be honest, I don't really understand how the TVS diode provides protection, I found other designs that included one so I put one in my design. Any help appreciated.
« Last Edit: June 30, 2021, 12:15:52 pm by ilium007 »
 

Offline thinkfat

  • Supporter
  • ****
  • Posts: 2152
  • Country: de
  • This is just a hobby I spend too much time on.
    • Matthias' Hackerstübchen
Re: 24VAC irrigation solenoid controller
« Reply #1 on: June 26, 2021, 11:37:06 am »
I've used Opensprinkler hardware, which is effectively TRIACs driven by a HC595 shift register. The schematic is public and quite simple. I'm using a custom made board with a beaglebone wireless sbc. But Esp32 will do just fine.

For lighting protection I use a bidirectional TVS and a spark gap, but I guess a MOV won't hurt.
Everybody likes gadgets. Until they try to make them.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19523
  • Country: gb
  • 0999
Re: 24VAC irrigation solenoid controller
« Reply #2 on: June 26, 2021, 01:23:26 pm »
Why not just use a mechanical relay? It's far more resistant to high voltage pulses, than transistors.

If your circuit is struck by lightning, then it will be destroyed and there's virtually nothing which can be done to prevent it.+
 

Offline ilium007Topic starter

  • Frequent Contributor
  • **
  • Posts: 264
  • Country: au
Re: 24VAC irrigation solenoid controller
« Reply #3 on: June 26, 2021, 03:02:05 pm »
Because they wear out and the contacts arc. And…. I want to play with IC’s.
 

Offline AussieBruce

  • Regular Contributor
  • *
  • Posts: 51
  • Country: au
Re: 24VAC irrigation solenoid controller
« Reply #4 on: June 28, 2021, 07:13:27 am »
This suggestion involves the solution that you don't want, but in case it helps in any way.....

I've used the one home built retic controller for ages. The outputs are optocoupled MOC3021s driving BT136 triacs, with the few other passives exactly as per the 3021 datasheet. The only protection on the outputs is the standard fuse in the common line, no MOVs or other surge devices at all. The setup has run without a single failure of any sort for well over 20 years.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19523
  • Country: gb
  • 0999
Re: 24VAC irrigation solenoid controller
« Reply #5 on: June 28, 2021, 08:13:19 am »
Because they wear out and the contacts arc. And…. I want to play with IC’s.
Then that's the tradeoff you make. Solid state relays are very mechanically robust, but electrically vulnerable, whilst mechanical relays are the other way round.

Since you're swiching AC, arcing is less of an issue. A snubber such as a transient supressor diode, MOV, or RC circuit, across the relay is a good idea with a mechanical relay and manatory for a solid state device, switching an inductive load.
 

Offline emece67

  • Frequent Contributor
  • **
  • !
  • Posts: 614
  • Country: 00
Re: 24VAC irrigation solenoid controller
« Reply #6 on: June 29, 2021, 12:48:40 pm »
.
« Last Edit: August 19, 2022, 04:29:56 pm by emece67 »
 

Offline ilium007Topic starter

  • Frequent Contributor
  • **
  • Posts: 264
  • Country: au
Re: 24VAC irrigation solenoid controller
« Reply #7 on: June 29, 2021, 12:59:44 pm »
I haven't discarded it! I just thought there would be issues with voltage losses in the two triacs. If it works then I'll go this way.

Would the TVS diode suffice instead of a snubber circuit? I have no idea how to work out the values for a snubber circuit and I don't have an oscilloscope to look at the transient voltages on turn off.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19523
  • Country: gb
  • 0999
Re: 24VAC irrigation solenoid controller
« Reply #8 on: June 29, 2021, 03:17:27 pm »
A TRIAC will typically drop around 1V, irrespective of the load current.

TRIACs are typically rated of hundreds of volts, whilst the peak voltage of your 24VAC power supply is only 34V, so you have plenty of headroom. I'd use a 470R resistor, in series with a 100nF capacitor, across either the TRIAC, or solenoid.
 
The following users thanked this post: ilium007

Offline ilium007Topic starter

  • Frequent Contributor
  • **
  • Posts: 264
  • Country: au
Re: 24VAC irrigation solenoid controller
« Reply #9 on: June 29, 2021, 10:41:08 pm »
@Zero999 How do you calculate that resistor/capacitor combination? Isn’t the inductive spike from the solenoid coil going to be higher than the 34v peak AC voltage?
« Last Edit: June 30, 2021, 01:39:15 am by ilium007 »
 

Offline ilium007Topic starter

  • Frequent Contributor
  • **
  • Posts: 264
  • Country: au
Re: 24VAC irrigation solenoid controller
« Reply #10 on: June 30, 2021, 01:46:29 am »
I've used Opensprinkler hardware, which is effectively TRIACs driven by a HC595 shift register. The schematic is public and quite simple. I'm using a custom made board with a beaglebone wireless sbc. But Esp32 will do just fine.

For lighting protection I use a bidirectional TVS and a spark gap, but I guess a MOV won't hurt.

This is the AC driver schematic of the current v3 of the OpenSprinkler project. There are no optocouplers involved, gates of BT1308W TRIACs connected directly to the I2C shift register. I don't understand the ACRET, assume AC Return, connected to an LM358 Op Amp.

« Last Edit: June 30, 2021, 12:13:45 pm by ilium007 »
 

Offline ilium007Topic starter

  • Frequent Contributor
  • **
  • Posts: 264
  • Country: au
Re: 24VAC irrigation solenoid controller
« Reply #11 on: June 30, 2021, 01:50:26 am »
A TRIAC will typically drop around 1V, irrespective of the load current.

TRIACs are typically rated of hundreds of volts, whilst the peak voltage of your 24VAC power supply is only 34V, so you have plenty of headroom. I'd use a 470R resistor, in series with a 100nF capacitor, across either the TRIAC, or solenoid.

So if I used the 470R / 100nF R9 / C1 would I still need the TVS diode D5?

Do I need a resistor to limit current to the TRIAC in the MOC3023M (R10)?

if R10 is needed I can't work out how to calculate value. All I can find in datasheet is ITSM Peak Repetitive Surge Current at 1A. Would this mean at 33VAC peak I would need a 33Ω current limiting resistor?

« Last Edit: June 30, 2021, 12:12:45 pm by ilium007 »
 

Offline AussieBruce

  • Regular Contributor
  • *
  • Posts: 51
  • Country: au
Re: 24VAC irrigation solenoid controller
« Reply #12 on: June 30, 2021, 07:35:17 am »
Just noticed this, you may already be onto it already. The value of the current limiting resistor on your opto input looks way too high if as indicated it's driving an LED. I'd expect something under 1K.
 

Offline ilium007Topic starter

  • Frequent Contributor
  • **
  • Posts: 264
  • Country: au
Re: 24VAC irrigation solenoid controller
« Reply #13 on: June 30, 2021, 07:42:03 am »
Just noticed this, you may already be onto it already. The value of the current limiting resistor on your opto input looks way too high if as indicated it's driving an LED. I'd expect something under 1K.

ahh yes, it should have been 330Ω as an initial value. Picked up the wrong part in KiCAD.

**Updated schematic in thread**
« Last Edit: June 30, 2021, 07:47:01 am by ilium007 »
 

Offline ilium007Topic starter

  • Frequent Contributor
  • **
  • Posts: 264
  • Country: au
Re: 24VAC irrigation solenoid controller
« Reply #14 on: June 30, 2021, 09:15:22 am »
I have updated my schematic for two solenoids.

« Last Edit: June 30, 2021, 12:21:31 pm by ilium007 »
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19523
  • Country: gb
  • 0999
Re: 24VAC irrigation solenoid controller
« Reply #15 on: June 30, 2021, 11:03:45 am »
I can't see any of the schematics at the moment, as they're blocked by the firewall. Please attach them to your posts so I can see them.

The optimum values of R and C in the snubber, depend on the coil's inductance and resistance. Ideally the circuit should be critically or overdamped, so there's no high voltage kick-back. In reality, it's not that critical, so long as enough of the energy is dissipated in the resistor, to save the TRIAC from damage.
 
The following users thanked this post: ilium007

Offline ilium007Topic starter

  • Frequent Contributor
  • **
  • Posts: 264
  • Country: au
Re: 24VAC irrigation solenoid controller
« Reply #16 on: June 30, 2021, 11:57:05 am »
I can't see any of the schematics at the moment, as they're blocked by the firewall. Please attach them to your posts so I can see them.

The optimum values of R and C in the snubber, depend on the coil's inductance and resistance. Ideally the circuit should be critically or overdamped, so there's no high voltage kick-back. In reality, it's not that critical, so long as enough of the energy is dissipated in the resistor, to save the TRIAC from damage.

Damn it... I will go back and re-upload the images.

I don't yet have the solenoids in hand so I am unsure of inductance / resistance.
« Last Edit: June 30, 2021, 12:25:15 pm by ilium007 »
 
The following users thanked this post: Zero999

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19523
  • Country: gb
  • 0999
Re: 24VAC irrigation solenoid controller
« Reply #17 on: June 30, 2021, 12:47:03 pm »
I can't see any of the schematics at the moment, as they're blocked by the firewall. Please attach them to your posts so I can see them.

The optimum values of R and C in the snubber, depend on the coil's inductance and resistance. Ideally the circuit should be critically or overdamped, so there's no high voltage kick-back. In reality, it's not that critical, so long as enough of the energy is dissipated in the resistor, to save the TRIAC from damage.

Damn it... I will go back and re-upload the images.

I don't yet have the solenoids in hand so I am unsure of inductance / resistance.
Your circuit is fine. I've just remembered that there won't be much of a high voltage pulse, because the TRIAC always turns off, hen the current is near zero, which limits in considerably.
 

Offline ilium007Topic starter

  • Frequent Contributor
  • **
  • Posts: 264
  • Country: au
Re: 24VAC irrigation solenoid controller
« Reply #18 on: June 30, 2021, 02:17:10 pm »
Your circuit is fine. I've just remembered that there won't be much of a high voltage pulse, because the TRIAC always turns off, hen the current is near zero, which limits in considerably.

Any tips on the resistors R9 and R10? I am not sure if they are required.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19523
  • Country: gb
  • 0999
Re: 24VAC irrigation solenoid controller
« Reply #19 on: June 30, 2021, 08:58:29 pm »
Your circuit is fine. I've just remembered that there won't be much of a high voltage pulse, because the TRIAC always turns off, hen the current is near zero, which limits in considerably.

Any tips on the resistors R9 and R10? I am not sure if they are required.
They're there to limit the gate current spike, before the TRIAC fires. The data sheet for the MOC3023 recommends 180R for 120VAC and 24VAC is ⅕ of that so will require ⅕ of the resistance, which is 36R. It's not that critical. You'll probably find it's good with 27R, or 47R, but 33R the is common in the ballpark.
 

Offline ilium007Topic starter

  • Frequent Contributor
  • **
  • Posts: 264
  • Country: au
Re: 24VAC irrigation solenoid controller
« Reply #20 on: June 30, 2021, 09:47:56 pm »
Thanks. 33Ω is what I came up with back in this thread. I’ll go with that.
 

Offline Circlotron

  • Super Contributor
  • ***
  • Posts: 3180
  • Country: au
Re: 24VAC irrigation solenoid controller
« Reply #21 on: June 30, 2021, 11:51:51 pm »
Because they wear out and the contacts arc. And…. I want to play with IC’s.
Then that's the tradeoff you make. Solid state relays are very mechanically robust, but electrically vulnerable, whilst mechanical relays are the other way round.
A mechanical relay might have a lifetime of 100,000 operations under full load. With a bit of attention to snubbing of the contacts you can likely get quite a bit more out of it. What is the lifetime of the water solenoids by comparison?

But... wanting to play with ICs is a good enough reason for me.  :)
 

Offline ilium007Topic starter

  • Frequent Contributor
  • **
  • Posts: 264
  • Country: au
Re: 24VAC irrigation solenoid controller
« Reply #22 on: June 30, 2021, 11:54:44 pm »
Because they wear out and the contacts arc. And…. I want to play with IC’s.
Then that's the tradeoff you make. Solid state relays are very mechanically robust, but electrically vulnerable, whilst mechanical relays are the other way round.
A mechanical relay might have a lifetime of 100,000 operations under full load. With a bit of attention to snubbing of the contacts you can likely get quite a bit more out of it. What is the lifetime of the water solenoids by comparison?

I appreciate that.. I wanted to use this project to understand more about AC and TRAIC's. Yes, a relay would have been far easier and this project would be in the garden now but I wouldn't have learnt anything  ;D !!
 

Offline ilium007Topic starter

  • Frequent Contributor
  • **
  • Posts: 264
  • Country: au
Re: 24VAC irrigation solenoid controller
« Reply #23 on: July 01, 2021, 12:20:05 am »
I am close now to ordering parts to prototype this design, the only part that I am still unsure of is a resistor from TRIAC trigger to M1 as this particular component is considered a 'sensitive gate' TRIAC - https://www.ween-semi.com/sites/default/files/2018-10/z0109mn0.pdf

Is R21 required, if so how do I calculate value? I assume it is there to set a minimum voltage at the gate before triggering and stop noise / transients from triggering the main TRIAC. This TRIAC has a Vt of approx 1.4V

« Last Edit: July 01, 2021, 06:25:43 am by ilium007 »
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19523
  • Country: gb
  • 0999
Re: 24VAC irrigation solenoid controller
« Reply #24 on: July 01, 2021, 08:28:59 am »
R21 prevents any leakage through the opo-coupler from triggering the TRIAC. Frustratingly, the minimum trigger current is often not specified on the TRIAC data sheet, but the minimum voltage is, which is 0.2V. Looking a the graphs on the opto-coupler data sheet gives a maximum leakage of 4µA, so a <50k resistor would be required to ensure a voltage drop of under 0.2V. Intuitively, I think it will be fine without R21, but resistors are cheap.
 
The following users thanked this post: ilium007


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf