EEVblog Electronics Community Forum

Electronics => Beginners => Topic started by: Freshman on August 13, 2024, 08:44:24 am

Title: Controlling the relay - When
Post by: Freshman on August 13, 2024, 08:44:24 am
I have an AC circuit where I have a relay which I will be controlling.

Is it OK if I turn ON the relay an any time during the AC 50Hz cycle? Or what are the advantages of turning on the relay at zero crossing of the AC signal using a ZCD?

Can someone tell me the advantages with using ZCD and what problems I may face if I don't use ZCD and turn the relay ON at variable times of AC input?
Title: Re: Controlling the relay - When
Post by: Phil1977 on August 13, 2024, 09:18:53 am
That´s really easy to answer: If somehow possible, use zero voltage switching with the relay.

It not only enhances the lifetime of the relay into the dimension of infinity, it also protects the connected appliances.

In my lab I have a so many devices connected to a central switch that I trip the breaker once each 5 times I switch manually. Since I´m using a DECT-remote-switching adapter that uses zero voltage switching (Fritz DECT 200) I´ve never had a single breaker trip. And the small relay in this adapter never stuck closed, as I´ve often experienced with cheaper WIFI switching sockets.
Title: Re: Controlling the relay - When
Post by: DavidAlfa on August 13, 2024, 09:25:12 am
Is it for large currents? Don't tell this is for 500mA and you're worried about it.
It's a relay, don't overthink it, just get it properly rated, I'd say at least twice the nominal current, will last for years.
Just see halogen cooktops, those relays switch 10-20A, operating hundreds of times each day, yet will easily last 10-20 years if not more, will often outlast the heating element.

ZVS on a relay ain't easy, you need a calibrated delay to the relay switching time, still the contacts will bounce several times and spark.
Title: Re: Controlling the relay - When
Post by: Siwastaja on August 13, 2024, 09:40:08 am
Nearly no one ever does that; relays are rated for random switching. But of course if you want and can do it, you can improve the relay lifetime beyond what the manufacturer guarantees. You would need to advance the timing by some kinda-sorta-calibrated value to compensate for the mechanical delay.
Title: Re: Controlling the relay - When
Post by: pcprogrammer on August 13, 2024, 09:52:34 am
Nearly no one ever does that; relays are rated for random switching. But of course if you want and can do it, you can improve the relay lifetime beyond what the manufacturer guarantees. You would need to advance the timing by some kinda-sorta-calibrated value to compensate for the mechanical delay.

That is just what I'm thinking too. A mechanical relay will have a delay that might even vary over temperature or other influences. This makes it very hard to guarantee a zero voltage turning on or off.

With a properly dimensioned relay, like DavidAlfa wrote it won't be a problem.

The tripping of a breaker or RCD depends on the load(s) being switched. The initial charging of capacitors in switching power supplies can cause peak currents above the ratings of a breaker and trip it.

If zero crossing switching is an absolute need, it is best to look into solid state relay's.
Title: Re: Controlling the relay - When
Post by: Phil1977 on August 13, 2024, 09:55:02 am
As mentioned, the Fritz 200 does it.

And for AVM it probably is an easy calculation: 20cent more for a heavier beefier relay that probably also needs more power, or one additional sense line to the microcontroller and a little bit more code.

For sure it´s not switching precisely at 0° or 180° of the sine. But if it´s only -20° to 20° then it´s already a lot better.
Title: Re: Controlling the relay - When
Post by: Phil1977 on August 13, 2024, 09:58:04 am


The tripping of a breaker or RCD depends on the load(s) being switched. The initial charging of capacitors in switching power supplies can cause peak currents above the ratings of a breaker and trip it.

Yep, but the intensity of the current surge heavily depends on the phase of first electrical contact.

Just think about what happens if you plug in e.g. apple power supplies, especially if their inrush-NTC still is hot. Sometimes nothing happens, sometimes you see sparks coming out of the (quite deeply recessed) schuko-socket.
Title: Re: Controlling the relay - When
Post by: pcprogrammer on August 13, 2024, 10:10:43 am


The tripping of a breaker or RCD depends on the load(s) being switched. The initial charging of capacitors in switching power supplies can cause peak currents above the ratings of a breaker and trip it.

Yep, but the intensity of the current surge heavily depends on the phase of first electrical contact.

Just think about what happens if you plug in e.g. apple power supplies, especially if their inrush-NTC still is hot. Sometimes nothing happens, sometimes you see sparks coming out of the (quite deeply recessed) schuko-socket.

That is what indeed happens with a lot of those (cheap) switched power supplies. You can also hear it. To avoid this soft start circuitry could be an option, but that makes things more expensive.

With smaller relays it probably is easier to do than with bigger ones where the switching might not be that fast. 10 or 20ms goes by easily. And bouncing of the contacts also depends on a lot of factors that can make it not as simple as adding a sense line and a bit of code to the system.

As per usual the question stated in the original post is open for wide interpretation due to lacking specific information, like how heavy a load is being switched, timing requirements of the switching, if any, the level of the AC voltage being switched, etc.
Title: Re: Controlling the relay - When
Post by: Gyro on August 13, 2024, 10:15:37 am
That´s really easy to answer: If somehow possible, use zero voltage switching with the relay.
...

Not such an easy answer. Never deliberately switch an inductive load such as a transformer at zero crossing. This can cause the magnetic core to saturate on the first half (or few) cycle, and cause a high inrush current. Most cores are designed to rely on remnant reverse magnetization from the previous half cycle to avoid saturation.

Occasional zero cross during random switch timing is fine, but deliberately doing it on every turn-on is asking for trouble. Switch it at some point approaching mains peak. The inductance will limit the rate of current rise and limit the inrush current.

Other loads, such as filament lamps and SMPSs prefer zero-cross switching to reduce inrush current, but mains transformers - no.
Title: Re: Controlling the relay - When
Post by: Phil1977 on August 13, 2024, 10:23:18 am

Other loads, such as filament lamps and SMPSs prefer zero-cross switching to reduce inrush current, but mains transformers - no.
Yes, large transformers can trip breakers in that case too, if they had bad luck with residual magnetization.

But do transformers of usual household appliances have this problem? I thought most small transformers survive one half-wave of saturation and larger ones have e.g. a dedicated transformer switching relay that uses several impulses to precondition the magnetization.

Can the OP specify what he wants to switch?
Title: Re: Controlling the relay - When
Post by: Gyro on August 13, 2024, 10:49:50 am
Can the OP specify what he wants to switch?

A good question.


Yes, it can affect smaller transformers too. Years ago I worked on traffic junction controllers. At the time QA were raising issues with multiple suppliers over the horrible 50VA lamp transformer failure rate. The failure mode was fusing of the primary winding terminations.

One day I walked into the lab to discover the S/W guys running a large test with about a dozen signal heads [Ed: x3 transformers] on reasonably fast cycle. It sounded as if somebody was playing a whole rack of bongo drums. That didn't sound right so I checked, and apparently, some time in the past, they had been instructed to use zero volt switch timing. I asked for the switching point to be moved to a few ms before mains peak and the lab descended into blissful silence. A combination of core saturation and resonant enclosures was the source of the horrendous noise. It was a really nice real world demonstration.

The QA manager was happy, so were the suppliers, who finally got him off their backs - The transformer failure rate dropped to zero. As the primary wire leaves the bobbin, it is exposed and has low thermal mass, so is a natural fusing point on high inrush current.

The inrush problem is particularly prevalent on toroidal transformers (the above were simple EI), which can take several cycles before they recover from a severe saturation event and drop to nominal current.
Title: Re: Controlling the relay - When
Post by: tooki on August 13, 2024, 11:26:59 am


The tripping of a breaker or RCD depends on the load(s) being switched. The initial charging of capacitors in switching power supplies can cause peak currents above the ratings of a breaker and trip it.

Yep, but the intensity of the current surge heavily depends on the phase of first electrical contact.

Just think about what happens if you plug in e.g. apple power supplies, especially if their inrush-NTC still is hot. Sometimes nothing happens, sometimes you see sparks coming out of the (quite deeply recessed) schuko-socket.

That is what indeed happens with a lot of those (cheap) switched power supplies. You can also hear it. To avoid this soft start circuitry could be an option, but that makes things more expensive.
Well clearly it’s not a behavior specific to “cheap” SMPSs, since Apple PSUs are famously well made, often being described as “spare no expense” designs.

Not that I can confirm the behavior Phil1977 describes, and I’ve used Apple stuff for decades. A spark on plugging in sometimes? Sure. A spark so big it jumps out of a recessed socket? Definitely not.