#Diagnosing 3->4 Key Ghosting on Cheapino Charlieplex

1 messages · Page 1 of 1 (latest)

flat cradle
#

I have a Cheapino that I recently built according to Tompi's guide, and it works great for single keypresses and all pairs of keys I have tried, but certain trios of keys cause a 4th key to be activated even though not physically pressed. I used 1N4148 axial through-hole diodes as indicated by the BoM and the build guide. The ghosting on the left side occurs regardless of whether I have the right side connected via 8p8c keyed connector.

#

#help message

flat cradle
#

The first trio that I noticed ghosting was, all on the left hand: middle thumb, bottom pinky, and middle-row middle, that is LH1 + LB4 + LM2. The ghost key is bottom-row middle: LB2. There is NOT any ghosting if I press LH1 + LB4 + LB2

#

Others that ghost with the LH1 + LB4 starting pattern; "A ghosts to B" means I physically pressed A and B gets activated unwittingly:

  • LM2 ghosts to LB2
  • LB1 ghosts to LM1
  • LM0 ghosts to LB0
  • LB3 ghosts to LM3
#

So, the pattern there seems to be that the false activation is one key higher or lower, spatially, and the direction alternates.

#

It also happens starting with the LB4 + LM2 pair: pressing LB3 with those two activates LM4 (so in QWERTY terms, ZDX -> A

#

With 123 on the thumb keys left to right
QWD: A
QWC: Z
QW1: X
QW2: S

#

QRG: A
QRB: Z
QR1: V
QR2: F

#

Seems like any given pair has exactly 4 other keys with which ghosting occurs 🤔

#

Pretty sure there is no chance for ghosting across halves, since their diode-ness is isolated from each other.

#

Some pairs have no ghosting at all: for example, QT plus any other key on the left hand is just fine.

#

Safe pairs in caps, semi-ghosty pairs in lowercase:

    qw, QE, qr, QT
QA, QS, qd, QF, qg
QZ, QX, qc, QV, qb
              q1, q2, Q3
#

If I flip the thumb keys to where they are electrically, I think it is more like:

Q3 -- qw QE qr QT
q2 QA QS qd QF qg
q1 QZ QX qc QV qb

simplified to, with Q held, X for bad and . for safe

.-X.X.
X..X.X
X..X.X
#

I really gotta diagram out one of the ghost situations to see what the relevant parts of the circuit look like.

#
#

The controller is a RP2040 on a WaveShare RP2040 Zero board. My expectation is that the RP2040 will consider anything above about 1.8V to be "high" (but maybe that is an ill-informed expectation?)

#

at any rate, I am guessing it might start being in ambiguous territory in the 1.0V to 2.0V range (very roughly)

flat cradle
flat cradle
#

Here is my stab at diagramming it in KiCad

#

Ok, so it looks like there is a path from D28 through K8, K10, and K13 to D26 that passes through 3 diodes. So maybe those three diodes are not enough to drop the voltage below the RP2040's "detect high" threshold?

#

3.3V - 0.5 - 0.5 - 0.5 = 3.3 - 1.5 = 1.8

#

(if these diodes only have a forward drop of 0.5V at 100 microamps)

#

If instead they are dropping it more like 700mV then it should be 3.3 - 2.1 = 1.2 ... still kinda in the "dunno" zone, but not as close to the "definitely high" range

flat cradle
#

Sounds like tompi was able to fix it in QMK/Vial; I wonder whether it would be easy to do the same in ZMK

#

Ah, looks like he fixed it by rejecting certain keypresses when their well-known ghosting cause combos were also pressed.

late bobcat
#

Could probably fix it in hardware by doubling some of the diodes

flat cradle
#

I will see if I can add them on the back side or something. I would want one per GPIO pin in use, right?

late bobcat