EEVblog Electronics Community Forum

Electronics => Beginners => Topic started by: Cricri on July 10, 2023, 09:58:46 pm

Title: Mercury switch debouncing
Post by: Cricri on July 10, 2023, 09:58:46 pm
Hello all!
I have some PC speakers with a wired remote, including a small surface mounted tactile switch as a power button. Those speakers are like 20 years old, and I already swapped the switch a couple of times, so decided that before burning out the PCB I'd implement a different solution.
I traced the vias from the switch to a couple of points on the bottom of the PCB, and soldered a mercury switch so that I could just tilt the remote to switch the speakers on and off. It "works", except that the switch bounces very badly to the point that the mercury switch is virtually unusable (i.e. you have 50% chances that the speakers will be either on or off regardless of what the current status is). Of course, I didn't touch the tactile switch, so at least the original switch is still working!
So anyway, my question:

Did I do something obviously dumb, e.g. are mercury switches unsuitable as a push button alternative, or are those switches supposed to be coupled with some debouncing circuit (e.g. do I need a 1nF in parallel or something)? Obviously, software debouncing is out.

I also have some switches using a ball, but when I test them with my multimeter, they seem even more unreliable by an order of magnitude. I also have some magnetic reed switches, but if I've got to keep a magnet nearby, grab it, swipe it by the remote, and store it away, I'd rather stick to a tactile push button. Very disappointed as I thought the mercury switch was going to be a neat way to turn my speakers on and off without wearing my aging remote, but clearly I was way overoptimistic about my expectations.

Thanks!
Title: Re: Mercury switch debouncing
Post by: Roehrenonkel on July 10, 2023, 10:07:27 pm
Hi,
 
since you're in antarctica my guess is that the mercury is starting to freeze up. ;->

Title: Re: Mercury switch debouncing
Post by: TimFox on July 10, 2023, 10:10:37 pm
I've never used actual Hg switches (with liquid mercury in a tube between contacts), but I have never seen bounce with Hg-wetted relays (which are orientation sensitive).
Title: Re: Mercury switch debouncing
Post by: Cricri on July 10, 2023, 10:34:00 pm
Thanks TimFox, I've been wondering if my switch (which is very old stock) is not a lemon in some way, e.g. maybe corrosion on the legs make the wetting unreliable. I've got another 2, so I could try to swap and see if it's the same.

@Roehrenonkel: that, or maybe being on the bottom side of the planet, gravity works on the switch the wrong way!
Title: Re: Mercury switch debouncing
Post by: james_s on July 10, 2023, 11:20:51 pm
I have seen very small mercury tilt switches where the actual blob of mercury bounces around inside the tube. You might be able to solve the problem by changing the orientation of the switch, otherwise put a capacitor in parallel with it.
Title: Re: Mercury switch debouncing
Post by: Cricri on July 11, 2023, 12:18:01 am
I'll try the cap, thanks. I have tried tilting very cautiously to minimise bouncing of the blob, but surprisingly it didn't help at all.
Title: Re: Mercury switch debouncing
Post by: gnuarm on July 11, 2023, 04:59:57 am
I have seen very small mercury tilt switches where the actual blob of mercury bounces around inside the tube. You might be able to solve the problem by changing the orientation of the switch, otherwise put a capacitor in parallel with it.

The mercury switches I've seen, were in thermostats, and worked just fine, without bounce.  However, they were mounted on a coil spring such that the change in the center of gravity when the switch flips, provides a hysteresis to the bulb. 

Also, the contacts are pretty much like a neon bulb, so that the mercury would make contact anywhere along the entire length of the contacts.  While a mechanical switch makes contact, then bounces, the mercury starts to make the electrical contact as soon as it touches the end of the contacts, can continue to make contact as it travels to the bottom of the tube. 

Perhaps the orientation of the OP's switch is not right.  Putting it in a remote control seems a bit odd, since that can be laid in many orientations.  But the real problem is, the push button being replaced is a momentary contact, push for ON, push for OFF.  The mercury switch works best where it directly controls the power.  If a debounce circuit is needed, they are easy to find. 
Title: Re: Mercury switch debouncing
Post by: Cricri on July 11, 2023, 07:19:26 am
Thanks.
Yes, I didn't tape the switch in the case so I will have to check orientation.
This is a wired remote by the way, so its position and orientation is normally fixed on the desk. I was planning to tilt it upwards to switch on/off the speakers.
The power button is the top right corner one and has seen heavy use for probably around 20 years!
Title: Re: Mercury switch debouncing
Post by: Cricri on July 11, 2023, 04:53:56 pm
A lot of progress:
- Checked my 3 Hg switches: they all have the blob somewhat bouncing, but 2 of them (included the one I used) was very much of the "do you want to come to my place bouncy bouncy" variety. So I now use the least affected one.
- I put a cap in parallel. 1st attempt was with a 22uF 16V cap, and the remote didn't know what was going on. So I switched to a 4.7uF 16V cap.

And with those 2 changes, it behaves a lot better. I wouldn't say flawlessly, but quite reliably. I was fearing that the stock tactile switch wouldn't be too keen having a cap in parallel, but it seems fine too.
I also had some mechanical fault on the holding rail (read "it was broken") which made the "natural" tilting of the remote not hold at a fixed angle, so with a bit of sheet metal and foam tape. I fixed this as well. So the remote is now more stable, and hopefully that helps reliability of the mercury switch too.

Thanks everyone!