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.

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.

Daniel Sauvageau is a Contributing Writer for Tom's Hardware US. He’s known for his feature tear-downs of components and peripherals.
  • Rheotome
    I'll never look at a Mouse the same way after reading this !!!
    Reply
  • SirGCal
    My problem with my MS is just finding a mouse I can use well period.I have some mice like this trackball myself and still can't use it properly. I need one controlled with the mind instead of hand. Which is probably coming sooner then we think.
    Reply
  • mrface
    This is a really cool article. Thanks for sharing.
    Reply
  • theaudiophile
    Holy shit, you're crazy in many many ways. I am an electronics hobbyist myself, and you sir are simply insane. I hope this article gets enough traffic and ad clicks to make up for the time you put in instead of replacing switches.
    Reply
  • mikesinner
    Both me and a friend of mine have already bought new mice, but I did keep the old one, a logitech G700 with the terribly annoying double click glitch when only single clicking. It's not a very old mouse either, so I find it very disturbing that the switch is already worn!
    Reply
  • Daniel Sauvageau
    17690562 said:
    Holy shit, you're crazy in many many ways. I am an electronics hobbyist myself, and you sir are simply insane.
    You give me too much credit. This is a simple hack once you know what you are dealing with - finding out what you have to work with is usually the most tedious part of a modification job, especially when you don't have design schematics or someone else's instructions to start from.

    The hack might be more trouble than it is worth but it does show that there is no reason for mouse buttons with SPDT switches to glitch until the switch mechanically fails. Other than mice manufacturers choosing to design them this that way that is.

    17690678 said:
    Both me and a friend of mine have already bought new mice, but I did keep the old one, a logitech G700 with the terribly annoying double click glitch when only single clicking. It's not a very old mouse either, so I find it very disturbing that the switch is already worn!
    My G500S is about four years old and the glitching is at that early stage where I'm not sure if the glitches are caused by the mouse or by mouse movement when I click.
    Reply
  • BulkZerker
    http://www.epicpants.com/t-shirts/tek-syndicate-gaming-mouse-standard-issue


    Problem solved.
    Reply
  • razor512
    Wouldn't it be easier to just use hall effect switches (like with some industrial machines)?

    The switches can be magnetically shielded, and as long as the button actuation functions (no broken springs), the button will continue to work, along with any vibrations of the actuation being calibrated out in software.
    Reply
  • buzzrattie
    Wish there were a mouse that was cat-hair proof. Dang little buggers shedding all the time, and getting into the laser.
    Reply
  • Daniel Sauvageau
    17691040 said:
    Wouldn't it be easier to just use hall effect switches (like with some industrial machines)?

    The switches can be magnetically shielded, and as long as the button actuation functions (no broken springs), the button will continue to work, along with any vibrations of the actuation being calibrated out in software.
    I doubt switches that require additional calibration steps would be popular in a market where manufacturers are trying to optimize every penny of profit they think they can get away with out of their product.

    One option which does not require calibration is optical sensing: poke a slotted stem through the detector. Most mechanical mice used optical wheel encoders to convert ball motion to digital. The same thing could be done for switches.

    I doubt either option would be as inexpensive as a mechanical switch and with the "memory" version of my hack, it would be a practically free fix. Free is a tough price to beat.
    Reply