Skip to main content

Hacking Your Mouse To Fix The Misclick Of Doom

Micro-Switch Anatomy 101

There are many styles of micro-switches on the market. Personally, nearly all of my mice are Logitech and every Logitech mouse I have opened featured Omron D2F series momentary sub-miniature single-pole double-throw (SPDT) switches for the three primary buttons.

Based on Omron's datasheet, D2F-F switches are of the standard 1A variety with a mechanical endurance of a million cycles and electrical endurance of only 30,000 cycles. There is no indication of what the additional "-3-7" markings mean, which typically translates to some sort of customer-specific part number. The electrical endurance rating seems shockingly low. But for an extremely light load application like mouse buttons, they should be grossly conservative.

Image 1 of 2

Image 2 of 2

What do these look like on the inside? They have three static and three moving components, excluding the housing: the three contacts (the leftmost of which acts as the contact blade's and spring anchor), the contact blade (a thin metallic strip hooking around the anchor pin on the left extending into the other contacts' area on the right) and a simple ribbon spring stamped out from the blade to tension the switch's blade and the plastic plunger. It's a very simple and efficient design.

What does switch actuation look like in slow motion? Check out the video above, which I shot at 120 frames per second. As force is applied to the blade's bridge, the ribbon spring gets compressed by the blade's deflection. Once the blade's force going down overcomes the spring's force trying to hold it up, passing the tipping point, the two forces combine to snap the blade to the NO position. When force is removed from the bridge, the process repeats in the opposite direction.

As far as the fundamental mechanical aspect is concerned, I have no doubt that the switch can greatly exceed its million-cycle rating.

It does get more complicated than that, though. With use, friction slowly wears out material at the pivot points between moving parts and the electrical contacts, slightly increasing slack and altering the switch's mechanical properties. One of those properties is the force exerted by the spring to help the blade settle in either position faster. With less force clamping the blade to either contact, the switch bounces around for a longer amount of time, a little like extending a flexible ruler further out the side of a table before giving it a slap, which is why the process of removing unwanted transitions is called debouncing. The amount of debouncing applied dictates how much wear it can accommodate. When the switch bounces for longer than the debounce is designed for, you get unintended multiple clicks.

There are additional complications on the electrical side, too. Even after the mechanical snap action has settled, minor finger and other movement can still cause the contacts to rub against each other, introducing noise in the switch signal. As the force applied by the spring gets weaker and mechanical pivot points get worn down, electrical contact gets sloppier. Over millions of cycles, the contact surfaces also wear out and the worn surfaces oxidize. All of these factors combine to increase the severity of additional noise. On the plus side, contact noise should remain within the limits of what the debouncing implementation can cope with, unless of course non-conductive debris get stuck in-between and breaks contact for too long. When this occurs, you get drag-and-drop selections or other click-hold actions randomly releasing.