

Debounce
Adding a debouncing circuit to a Logitech G305
- Size
- 11.6 × 25 mm
- Copper layers
- 2
- Thickness
- 1.58 mm
- Parts
- 10
- Nets
- 12
- Pads
- 39
- Tracks, vias
- 76, 3
- Routed
- Yes
- KiCad
- KiCad 6 (file 20211014)
- Created
- 4 Mar 2022
- Updated
- 7 Mar 2022
Overview
Debounce is an open-source printed circuit board by gschwaer, from the gschwaer/Debounce-G305 repository on GitHub, published under the Unlicense licence. It is a 2-layer board of 11.6 × 25 mm with 10 parts on 12 nets, routed with 76 tracks and 3 vias.
It is built around the 74HC00D and BSS138. Its parts include 4 resistors, 3 connectors, 2 transistors and 1 IC.
Main components
274HC00D
SOP-14-40℃~+125℃ 1.5V、3.15V、4.2V 1.9V、3.7V、5.9V 100mV、400mV、400mV 2 2V~6V 4 40uA 5.2mA 5.2mA 500mV~1.8V 74HC Series 7ns@6V,50pF NAND Gate SOIC-14 Logic Gates ROHSNexperiaLogic GatesBSS138
SOT-23-55℃~+150℃ 1 N-channel 1.1Ω@10V、1.2Ω@4.5V 1.2V 1.7nC@10V 17.5pF 340mA 350mW 50V 6.5pF N-Channel SOT-23 MOSFETs ROHShongjiachengMOSFETs
README
Readme.mdDeboucing Logitech G305
Searching the internet you can find several reports of Logitech G305 mice that started to do random double clicks after a while of usage. The problem lies in the buttons that develop a bouncy contacting behaviour. It looks something like this:

Below you can see the signal of my mouse's left button. It sometimes bounces even longer than 1ms (like shown here).

One way to solve this is to replace the switch with a new one. But after some time that will also start to bounce again.
From a comment by Richard Hansen under a stackoverflow post I got the idea to use the single pole double throw (SPDT) nature of the used buttons and a Set/Reset-Latch (SR-Latch) to defeat the problem forever. Like this:

Which is what I did. This is the new output signal:

Fixed. Here is what I did...
Design
I designed a small PCB that fits into the mouse's case. On the PCB is an SR-latch and some components to pass the signals to the mouse's controller. First I wanted to use a dedicated SR-latch, but I had none that supported the required 2 V supply voltage. So I made the latch from NANDs.
I used the following parts I had at hand:
- a through-hole SN74HC00N,
- SMD (SOT-23) BSS138 n-Channel MOSFETs, and
- 1206 SMD resistors.
Since the controller seems to drive the inputs (pull-up resistors) I am using transistors to augment a have an open drain output for the SR-latch. This "simulates" the open and closed states of the switch for the controller instead of driving both from the SR-latch.



(I used the pin headers only for the footprint, I soldered the wires directly to the PCB.)

Design files are in pcb/. Also the gerber files in pcb/gerber.zip.
A similar solution was proposed on reddit (contains extensive background information on the topic).
Assembly
I am using very slim cables (0.6 mm outer diameter) because the case is very tight in some places.
To open the case you need to peel of the glider pads on the bottom:

The PCB of the switch only exposes two pins. The third needs to be soldered separately:

Switch pinout:
- pin on the side of the button: GND
- middle pin: pressed
- pin away from the button: unpressed
It is helpful to pull the cables from the left switch through the end of the battery compartment (see below). This way they will not be in the way of the LED or the DPI switch.

I found a supply voltage of 2 V at TP11
that is available as long as the mouse is switched on.

(I used smaller cables in the end, because this area in the casing is very tight. Careful not to melt the case with the soldering iron.)
I used 15 kOhm resistors that is approximately equal to the controller internal pull-ups (I measured 142 uA at 2 V).

(Note: I switched the cables on the right to slimmer ones as well.)

(The wires could be shorter. Would probably make the assembly a bit easier.)
I sealed the board in a shrink tube. When assembling, the latch board is on the right side of the mouse. The cables can easily be caught under the mounting posts or on the switches, so assembling takes some time.

Notes
- If you want to replicate this and have any questions, just write an issue.
- Since I use pull-up resistors also for the unpressed button state, the battery will probably drain faster. I will get back to this if it will become an issue.
Parts
10| Qty | Value | Footprint | References |
|---|---|---|---|
| 4 | R | Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolder | R1, R2, R3, R4 |
| 2 | BSS138 | Package_TO_SOT_SMD:SOT-23 | Q1, Q2 |
| 1 | 74HC00 | Package_DIP:DIP-14_W7.62mm_LongPads | U1 |
| 1 | BTN1 | Connector_PinHeader_2.00mm:PinHeader_1x03_P2.00mm_Vertical | J1 |
| 1 | BTN2 | Connector_PinHeader_2.00mm:PinHeader_1x03_P2.00mm_Vertical | J3 |
| 1 | Conn_01x05 | Connector_PinHeader_2.00mm:PinHeader_1x05_P2.00mm_Vertical | J2 |
Similar boards
- 4 layers78 × 58 mm

- 2 layers50 × 50 mm

- 2 layers245.1 × 160 mm

8-Bit CPU 32k
slu4coder/Minimal-64x4-Home-Computer
My DIY TTL home computer with VGA and PS/2 and 4x the processing power of a Commodore C64 or Apple II.
139 parts326 - 2 layers191.8 × 121.3 mm

8-Bit CPU 32k
slu4coder/Minimal-UART-Computer-1-2
Legacy: Version 1 and 2 of my TTL-only CPU featuring UART I/O, an expansion port, 512KB SSD at up to 10MHz clock speed
109 parts184 - 2 layers203.2 × 149.9 mm

- 2 layers99.1 × 88.9 mm

1002 EPROM EMU NG 2.2d
Kris-Sekula/EPROM-EMU-NG
EPROM Emulator Project with Arduino
49 parts161Apache-2.0 - 4 layers120 × 98 mm

- 2 layers99.1 × 99.1 mm

BE6502 SBC
tebl/BE6502-Build-a-65c02-computer
A PCB being made while watching Ben Eaters "Build a 6502 computer" video series. Includes the computer itself, a standalone slow clock and an Arduino Mega shield for the bus monitor sketch..
61 parts129
Questions
How big is the Debounce PCB?
It measures 11.6 × 25 mm and has 2 copper layers, 1.58 mm thick.
What parts does the Debounce use?
10 parts, built around the 74HC00D and BSS138. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
Where can I download the Debounce KiCad files?
From the gschwaer/Debounce-G305 repository on GitHub, at the commit this page was made from: the board is pcb/debounce/debounce.kicad_pcb and its schematic pcb/debounce/debounce.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the Debounce design in my own project?
Its repository publishes it under the Unlicense licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).