Switch debouncing for an AC application - Page 1
Forum section: electronics / beginners

author: iroc86
author_rank: Regular Contributor
timestamp: November 09, 2021, 02:51:26 am
content: I posted a variation of this question over onStackExchange, but wanted to get some feedback from the EEVblog forums, too. I thought a few of you might have some additional input and ideas.In an AC switching application, how might one address debouncing? I have a simple circuit with a bimetallic thermostat that operates a heating element via a relay. Everything runs at 120 VAC. During transitions, the thermostat bounces and causes relay chatter. Sometimes it's quick and hardly noticeable; other times, it's quite excessive with a lot of contact arcing inside the relay. I want to eliminate the chatter either through debouncing or some kind of coil delay. I know how I'd do this in a DC application, but I'm not sure about AC.On StackExchange, people suggested a mercury thermostat (no thanks), SSRs (probably overkill), or a snubber (tried and didn't have much effect). I presume that relay chatter was an issue with industrial control systems before the advent of microcontrollers, so I'm hoping for a simple solution. Any ideas?

author: David Hess
author_rank: Super Contributor
timestamp: November 09, 2021, 04:53:08 am
content: Contact arcing can be suppressed with an RC snubber.In an extreme case, I would use the switch or relay to control an SSR.

author: IDEngineer
author_rank: Super Contributor
timestamp: November 09, 2021, 07:23:19 am
content: Quick idea: Rectify the AC that drives the relay coil, change to a relay with a DC coil, then you can use an RC circuit to filter the thermostat output. Three passives and you're done.

author: capt bullshot
author_rank: Super Contributor
timestamp: November 09, 2021, 07:23:24 am
content: Use a bimetallic thermostat that has a "microswitch" alike contact. A contact that snaps from on to off (and vice versa) at the setpoint, not a slowly moving one. These contacts make a noticeable "click" when switching.Try cleaning the contact.

author: Zero999
author_rank: Super Contributor
timestamp: November 09, 2021, 08:16:42 am
content: Use a delayed on timer/relay, to ensure it only turns on, after the thermostat has turned on for over a couple of seconds or so.Here are a couple of timers I found in Digikey.0.5s on delay, might be enough.https://www.digikey.co.uk/en/products/detail/crouzet/SDS-5S220A/5215608Or go with an adjustable one, in case it needs to be tweaked, but there's only one left in stock.https://www.digikey.co.uk/en/products/detail/crouzet/SASP100S110AD/5215555Other distributors and brands are available. You could even roll your own with a 555 timer, you'll need to convert 120V to 15V, to power it.

author: GerryR
author_rank: Frequent Contributor
timestamp: November 09, 2021, 12:55:48 pm
content: How about a zero-crossing SSR, turns on and off at zero-crossing, therefore no interuption of current at peak voltage and no arcing.

author: iroc86
author_rank: Regular Contributor
timestamp: November 09, 2021, 02:45:59 pm
content: Wow, these are all great ideas--thanks so much! It seems like there are a couple different ways to handle this issue, all with varying degrees of cost and complication.I did try an RC snubber (100 ohm and 100 nF, kind of generic) across the bimetallic switch. It reduced the chatter a reasonable amount, but I didn't like how the RC circuit still passed current--and made an audible buzz--when the thermostat was open. I haven't tried a snubber across the relay contacts. I wonder if it'd just reduce the arcing and still pass mechanical chatter from the bouncing coil signal.The SSR and time delay relays sound pretty foolproof. It'd add some cost to this project compared to a regular relay (four banks of heating elements, so four SSRs/relays), but it'd probably the most "turnkey" solution. I probably wouldn't want to roll my own due to the additional AC-to-DC conversion circuitry, but Zero, your schematic example is helpful to understand the operation!I am kind of liking the rectified AC idea with a DC relay. This was also suggested in the SE post. It seems simple enough and I was able to simulate the operation in LTspice to get an idea of component values. I could stick with low-cost relays and connect the RC filter inline with the wiring, so no additional board space would be needed.Changing out the thermostat could be an option, but I'd have to do some digging to find one in the same form factor (it's adjustable with a knob). I agree that a microswitch-style would be ideal with a relatively clean make/break response.I really appreciate the replies, everyone. I'll think this over a bit more and report back when I've selected a path forward and have some results to share.

author: WattsThat
author_rank: Frequent Contributor
timestamp: November 09, 2021, 03:51:02 pm
content: A zero crossing SSR is still going to chatter with full cycle turn on-off behavior.The ac to dc relay with some kind of delay is a reasonable solution.

author: iroc86
author_rank: Regular Contributor
timestamp: November 13, 2021, 10:55:13 pm
content: I can confirm that the rectifier with RC filter solves the relay chatter problem. Since this is the Beginners forum, I figured I'd share my design approach, as well as a couple traps, in case it helps others.First, I selected a different relay with a DC coil. The main constraint here was availability and cost, but also the activation voltage range. Nearly all of the relays I found were rated for 80-110% nominal, including the LY1F series I was originally using. Without any kind of DC regulation circuitry, that's a little too close for comfort, so I settled on the G2R series from Omron (70-170%).I simulated the circuit above using LTspice to experiment with different series resistors and to determine if a 24 VDC or 48 VDC relay coil was more appropriate for my application.G2R 24 VDC (16.8-40.8 VDC activation) - 1100 ohm coilR (ohms) Vrms I (mA) P (W)*-------- ---- ------ -----1.8k 26.2 39 2.72.2k 22.3 33 2.42.7k 18.9 28 2.1G2R 48 VDC (33.6-81.6 VDC activation) - 4170 ohm coilR (ohms) Vrms I (mA) P (W)*-------- ---- ------ -----2.2k 56.9 24 1.32.7k 50.0 21 1.23.3k 44.3 18 1.1Obviously, the higher voltage relay consumes less energy, so I opted for the 48 VDC relay. I selected a value for R, 3.3k, that produced an output voltage that was reasonably close to the nominal coil rating. (*) Note that these power calculations are based on Vrms, which don't capture the pulse loads seen by the series resistor. More on that later regarding thermal performance and real-world testing.Choosing C was rather arbitrary. Somewhere around 100 uF is reasonable; it was a compromise between ripple voltage and time constant (I wanted to minimize ripple, but not delay the relay significantly). I ended up using a 68 uF 100 V cap, which adds a delay of a couple hundred milliseconds before the relay hits its 80% must-operate voltage (33.6 VDC according to the datasheet).Testing on the bench showed that the circuit really helps to absorb contact bounce from the bimetallic switch and minimize relay chatter. In the two plots below, the AC signal (channel 2) is the mains-level output from the bimetallic switch that feeds the rectifier. Channel 1 is the output from the RC filter. You can clearly see the contact bouncing as the switch transitions between states. In some cases, the transition is so slow that there are a number of pulses before the switch fully makes contact. Sometimes these pulses would last upwards of 4-5 seconds, which contributed to the relay chatter in the original design.The next two plots show the relay timing. Channel 1 is again the output from the RC filter. Channel 2 is a low-voltage sinusoidal input from my function generator (I don't have a high voltage scope probe, so using mains voltage to demonstrate here would make the screen cluttered at 50 V/div).The RC delay works as intended with a delay of about 300-400 ms. Note that the "off" delay is longer because the must-release voltage is considerably lower than the must-operate voltage. In my testing, I found the G2R relays to operate around 27 VDC (56%) and release around 10 VDC (21%).It's also worth noting how cleanly the relay switches now (second plot). Compared to the waveforms I posted in the original question, this is a million times better. The little jiggle is likely due to relay contact bounce, but it's certainly not an issue, and nowhere near as significant as the bounce from the bimetallic switch.Earlier, I mentioned about some thermal considerations with the series resistor. When I calculated power dissipation, I used the RMS voltage after the rectifier, not the full pulse load seen by the resistor. This was the wrong approach. I selected a 2 W resistor, thinking that I'd have plenty of margin, since the RMS power calculation was only 1.1 W. I became aware of my error after I measured the temperature of the resistor during bench testing--I knew it would get warm, but definitely not upwards of 100 degrees C.Vishay has agood appnotethat discusses continuous pulse loads. There are a couple equations that govern this situation. Suffice to say that with a peak pulse voltage approaching 130 V, a 2 W resistor is not appropriate for my application.The first equation below identifies a maximum pulse voltage of 81 V for a 2 W, 3.3k resistor, but this is dependent on component warm-up time, which I haven't measured (nor do I care to do so). However, it assumes "not small" pulses, which seems like a reasonable starting point for half-wave rectified AC (50% duty cycle).Using the subsequent equation for rectangular pulses, I came up with an average power dissipation of about 2.6 W for 130 V pulses with a 50% DC. Since the pulses in my circuit are sinusoidal, I think this is a little conservative. It's possible that I'm right at operating limits with the 2 W resistor, but it's still getting warmer than I want.In practice, there are even more variables, not to mention the fact that this resistor will be inside a metal case with heating elements, so the ambient temperature is going to be higher than the 20 degrees C at my bench (and maybe higher than the 70 degree C ambient "P_70" rating in the resistor datasheets). So, I intend to try a 5 W resistor, measure the temperature in circuit, and probably call it good enough.The last bit here is packaging. I was going to attach the components inline with the relay wiring, but I think a PCB is a better option. Here's a plug-and-play idea that mounts to the top of the relay.

author: IDEngineer
author_rank: Super Contributor
timestamp: November 14, 2021, 02:39:00 pm
content: Good analysis and bench testing! Glad this relatively simple solution worked for you. Thanks for documenting the result here for the benefit of others.