# How do I fix an Omron d2fc-f-7n microswitch from unwanted clicks?

Omron d2fc-f-7n microswitches are used in computer mice all around, and they eventually start clicking several times per hit. AFAIK there is a flexible metal plate that wears out due to metal fatigue, so there must be a way to prolong its life.

The obvious solution is to remove the malfunctioning microswitch and replace with a spare, but where I live they aren't available at all.

-
Nowadays you can buy electronic components from online stores which deliver them all over the world (e.g. farnell.com | digikey.com | futureelectronics.com ) – m.Alin Apr 15 '12 at 11:09
Delivery costs many times more than the items themselves, so I'd rather repair it. – user1306322 Apr 15 '12 at 11:26

Delivery costs many times more than the items themselves

Even from eBay? Whereabouts do you live?

One way you can get spares is to smash open another mouse that's broken for some other reason. Perhaps a friend has a broken one?

It may be possible to repair them. Those little switches have a snap fit cover, and can be opened up.

carefully pull on the catch with a fine blade, and remove the cover.

At this point, plug in the mouse and test the switch. gently push on the metal spring on the switch, and see if the problem still happens. If not, try to push on it in such a way that the problem happens. After you have attempted to fix the switch, you will be able to test it again without re-assembling the whole mouse.

Unplug the mouse now.

The switches come in a variety of different designs, but they are fairly similar. There's a bistable metal spring which normally serves to ensure the contacts move rapidly and decisively. Either it's this spring which isn't pulling as hard, or the contacts are dirty.

You need to flatten it slightly. You might find it easier to remove the spring from the switch first. Place it on a table, and squash it slightly with your finger. Not too much. Better to err on the side of caution.

Then put the spring back in the switch. Test it again now. If it still bounces, then you might need to flatten the spring a little more. If this doesn't work, then try cleaning the contacts.

Tear off a thin (5mm wide) strip of J-Cloth or similar.

Apply a little abrasive cleaner (like CIF) to it. Thread it through the switch and pull it back and forth to rub away any dirt from the contacts.

Tear off another strip, and soak it in methylated spirits (or pure alcohol). Use this to clean off the abrasive cleaner.

Test the switch again. If it still doesn't work, then get a new switch.

-
Fantsastic, thanks! – user1306322 Apr 15 '12 at 15:40
Those look like SPDT switches, which can be trivially debounced with a couple of NAND gates (SR latch). Is the manufacturer not debouncing with an SR latch? Or does the switch really bounce so hard that it bounces between both contacts when pressed? – Richard Hansen Mar 6 at 21:06
You have just extended the life of my extremely expensive Razer Mamba mouse. Thank you! – Oli yesterday

You also might use the designated "Electrical Contacts Cleaner", if just spray on the switch. Those avoid the dismantles. Youtube has a video: Logitech MX Revolution mouse repair

-
 This does work but in the case of a high-use mouse expect to do this once every month or so. Nothing beats taking it apart and physically cleaning the contacts. – Oli yesterday

A small capacitor across the switch may do the trick. Say 100nF or so.

-
100nF combined with a 10k$\Omega$ pull-up gives you a 1ms time constant. Worn out switch contacts may bounce for several 10s of ms, so I'd pick a higher value for the cap. – stevenvh Apr 15 '12 at 10:12
Even seen some switches bounce for >100 ms.. – m.Alin Apr 15 '12 at 11:13
@m.Alin - Yes, this site even mentions a switch with a 157 ms(!) bounce when opening. – stevenvh Apr 15 '12 at 15:09
I had a switch that bounced the whole time you held it. That's when I gave up believing I'd ever find a max bounce time. – gbarry Oct 1 '12 at 17:33