Controlling the relay - When - Page 1
Forum section: electronics / beginners

author: Freshman
author_rank: Regular Contributor
timestamp: August 13, 2024, 08:44:24 am
content: 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?

author: Phil1977
author_rank: Frequent Contributor
timestamp: August 13, 2024, 09:18:53 am
content: 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.

author: DavidAlfa
author_rank: Super Contributor
timestamp: August 13, 2024, 09:25:12 am
content: 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.

author: Siwastaja
author_rank: Super Contributor
timestamp: August 13, 2024, 09:40:08 am
content: 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.

author: pcprogrammer
author_rank: Super Contributor
timestamp: August 13, 2024, 09:52:34 am
content: Quote from: Siwastaja on August 13, 2024, 09:40:08 amThat 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.

author: Phil1977
author_rank: Frequent Contributor
timestamp: August 13, 2024, 09:55:02 am
content: 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.

author: Phil1977
author_rank: Frequent Contributor
timestamp: August 13, 2024, 09:58:04 am
content: Quote from: pcprogrammer on August 13, 2024, 09:52:34 amYep, 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.

author: pcprogrammer
author_rank: Super Contributor
timestamp: August 13, 2024, 10:10:43 am
content: Quote from: Phil1977 on August 13, 2024, 09:58:04 amThat 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.

author: Gyro
author_rank: Super Contributor
timestamp: August 13, 2024, 10:15:37 am
content: Quote from: Phil1977 on August 13, 2024, 09:18:53 amNot 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.

author: Phil1977
author_rank: Frequent Contributor
timestamp: August 13, 2024, 10:23:18 am
content: Quote from: Gyro on August 13, 2024, 10:15:37 amYes, 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?

author: Gyro
author_rank: Super Contributor
timestamp: August 13, 2024, 10:49:50 am
content: Quote from: Phil1977 on August 13, 2024, 10:23:18 amA 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.

author: tooki
author_rank: Super Contributor
timestamp: August 13, 2024, 11:26:59 am
content: Quote from: pcprogrammer on August 13, 2024, 10:10:43 amWell 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.