Author Topic: Malfunctioning G key on my TMK-based Sentraq S60-X keyboard  (Read 2432 times)

0 Members and 1 Guest are viewing this topic.

Offline bgoodr

  • Thread Starter
  • Posts: 14
Malfunctioning G key on my TMK-based Sentraq S60-X keyboard
« on: Sun, 04 December 2016, 21:52:26 »
My keyboard (see it in https://geekhack.org/index.php?topic=81777.0) has developed a problem. I have uploaded a very short (sorry for the low video quality!) video at:


Has anyone seen this sort of behavior whereby the key does not consistently "fire" and sometimes doubles up on output?

Could this simply be a bad soldering job on my part, or would it be more likely to be a bug in the TMK firmware (and note that I'm using a forked copy which probably needs to be refreshed from upline)?

If it is in the firmware: I have now figured out how to use hid_listen to see debugging output, and can modify my forked version of TMK source code as needed.  Then where in the code would I start instrumenting with "printf" (or whatever is the equivalent that sends output to hid_listen) to start debugging?

My leaning is toward a bad soldering job on my part (and I can open up the case and closely examine the G key's soldering points), but am first soliciting opinions as the best place to start debugging this.

Thanks,
bg
Current keyboard: Sentraq S60-X 60% DIY Keyboard Kit
Utility I use to build TMK firmware on Ubuntu: Keyboard firmware build utils
Current layout: keymap_spacefn_capslockctrlswap_mousekeys.c

Offline Tactile

  • Posts: 1434
  • Location: Portland, OR
Re: Malfunctioning G key on my TMK-based Sentraq S60-X keyboard
« Reply #1 on: Sun, 04 December 2016, 23:45:32 »
Since this is a standard ANSI layout, I'd first flash to a plain standard firmware. That should give you a yes/no answer as to if it's a hardware problem. I can't guess why it would be just one key but I'd do this test first just to be able to say, "Yes, I tried that, too".
REΛLFORCE

Offline bgoodr

  • Thread Starter
  • Posts: 14
Re: Malfunctioning G key on my TMK-based Sentraq S60-X keyboard
« Reply #2 on: Mon, 05 December 2016, 17:30:16 »
Since this is a standard ANSI layout, I'd first flash to a plain standard firmware. That should give you a yes/no answer as to if it's a hardware problem. I can't guess why it would be just one key but I'd do this test first just to be able to say, "Yes, I tried that, too".

Thanks. So I did that and flashed back to standard firmware at https://github.com/VinnyCordeiro/tmk_keyboard/blob/master/keyboard/s60-x/keymap_standard.c and the problem is still there. That would lend weight to it being a hardware issue.

I actually have two identical keyboards, one for use at work and another for use at home (the problematic "g" key is on the keyboard at home). I will check the "g" key on the other keyboard the next time I am in.
Current keyboard: Sentraq S60-X 60% DIY Keyboard Kit
Utility I use to build TMK firmware on Ubuntu: Keyboard firmware build utils
Current layout: keymap_spacefn_capslockctrlswap_mousekeys.c

Offline Tactile

  • Posts: 1434
  • Location: Portland, OR
Re: Malfunctioning G key on my TMK-based Sentraq S60-X keyboard
« Reply #3 on: Mon, 05 December 2016, 17:58:44 »
Since this is a standard ANSI layout, I'd first flash to a plain standard firmware. That should give you a yes/no answer as to if it's a hardware problem. I can't guess why it would be just one key but I'd do this test first just to be able to say, "Yes, I tried that, too".

Thanks. So I did that and flashed back to standard firmware at https://github.com/VinnyCordeiro/tmk_keyboard/blob/master/keyboard/s60-x/keymap_standard.c and the problem is still there. That would lend weight to it being a hardware issue.

I actually have two identical keyboards, one for use at work and another for use at home (the problematic "g" key is on the keyboard at home). I will check the "g" key on the other keyboard the next time I am in.

What is the debounce time set at?
REΛLFORCE

Offline bgoodr

  • Thread Starter
  • Posts: 14
Re: Malfunctioning G key on my TMK-based Sentraq S60-X keyboard
« Reply #4 on: Mon, 05 December 2016, 22:13:55 »
What is the debounce time set at?

I believe it is set to 5 at https://github.com/VinnyCordeiro/tmk_keyboard/blob/master/keyboard/s60-x/config.h#L38
(or at https://github.com/VinnyCordeiro/tmk_keyboard/blob/master/keyboard/s60-x/matrix.c#L32 as I cannot readily tell which takes precedence). I believe that debouncing value is used at https://github.com/VinnyCordeiro/tmk_keyboard/blob/master/keyboard/s60-x/matrix.c#L82

The other thing is that if the debounce is the culprit, then why only the G key is being affected?  I have not been able to check my other keyboard that is identical to this one yet.
Current keyboard: Sentraq S60-X 60% DIY Keyboard Kit
Utility I use to build TMK firmware on Ubuntu: Keyboard firmware build utils
Current layout: keymap_spacefn_capslockctrlswap_mousekeys.c

Offline Tactile

  • Posts: 1434
  • Location: Portland, OR
Re: Malfunctioning G key on my TMK-based Sentraq S60-X keyboard
« Reply #5 on: Mon, 05 December 2016, 22:20:54 »
What is the debounce time set at?

I believe it is set to 5 at https://github.com/VinnyCordeiro/tmk_keyboard/blob/master/keyboard/s60-x/config.h#L38
(or at https://github.com/VinnyCordeiro/tmk_keyboard/blob/master/keyboard/s60-x/matrix.c#L32 as I cannot readily tell which takes precedence). I believe that debouncing value is used at https://github.com/VinnyCordeiro/tmk_keyboard/blob/master/keyboard/s60-x/matrix.c#L82

The other thing is that if the debounce is the culprit, then why only the G key is being affected?  I have not been able to check my other keyboard that is identical to this one yet.

That switch might be the only one which is at the maximum spec from Cherry. I doubt it'll make a difference but I'd raise the debounce time to 6, which is where I run all my programmable keyboards, anyway.

It's beginning to smell like a bad switch, IMO.
REΛLFORCE

Offline OfTheWild

  • * Esteemed Elder
  • Posts: 1308
  • Location: Cary, NC
  • Make things. Have fun.
    • Studios of the Wild
Re: Malfunctioning G key on my TMK-based Sentraq S60-X keyboard
« Reply #6 on: Mon, 05 December 2016, 22:22:33 »
I had an H key on my Ducky here at work that would not register intermittently... and then occasional double or triple hit. Turned out it was a bad switch or solder job since i simply swapped out the switch and it has been perfect since.

That being said, since you have the tmk controller you can always try flashing it again. Thats the least intrusive thing to rule out.
-Dana

Offline bgoodr

  • Thread Starter
  • Posts: 14
Re: Malfunctioning G key on my TMK-based Sentraq S60-X keyboard
« Reply #7 on: Mon, 05 December 2016, 23:25:04 »
That switch might be the only one which is at the maximum spec from Cherry. I doubt it'll make a difference but I'd raise the debounce time to 6, which is where I run all my programmable keyboards, anyway.

It's beginning to smell like a bad switch, IMO.

I agree that this smells like a bad switch. These are Cherry red switches and I have a spare.

About bouncing, I enabled debug output for how the firmware it is doing debouncing: I used Magic + d along with Magic + x and tried various keys. I would get this output on the G key:

Code: [Select]
r/c 0123456789ABCDEF
00: 0000000000000000
01: 0000000000000000
02: 0000010000000000
03: 0000000000000000
04: 0000000000000000

r/c 0123456789ABCDEF
00: 0000000000000000
01: 0000000000000000
02: 0000000000000000
03: 0000000000000000
04: 0000000000000000
bounce!: 04
bounce!: 01
bounce!: 01

Notice the bounce! lines. I observed that when I a "g" is not sent back to the host, I see the bounce! lines, but when the "g" is sent to the host, I do not see bounce! lines.

The bounce! lines are coming from https://github.com/VinnyCordeiro/tmk_keyboard/blob/master/keyboard/s60-x/matrix.c#L80 AFAICT.

I'll try increasing the debouncing value to see what happens.
Current keyboard: Sentraq S60-X 60% DIY Keyboard Kit
Utility I use to build TMK firmware on Ubuntu: Keyboard firmware build utils
Current layout: keymap_spacefn_capslockctrlswap_mousekeys.c

Offline bgoodr

  • Thread Starter
  • Posts: 14
Re: Malfunctioning G key on my TMK-based Sentraq S60-X keyboard
« Reply #8 on: Mon, 05 December 2016, 23:33:27 »
I had an H key on my Ducky here at work that would not register intermittently... and then occasional double or triple hit. Turned out it was a bad switch or solder job since i simply swapped out the switch and it has been perfect since.

That being said, since you have the tmk controller you can always try flashing it again. Thats the least intrusive thing to rule out.

Thanks. I have tried reflashing it and that had no effect. I am thinking now it is a bad switch. I'll have to wait until this weekend before I can solder in a new switch, as I want to first check the behavior on my other Sentraq S60-X at work once I am able to get there again (and this is my working keyboard at home).

The soldering job on the switch itself seems reasonable to my poor untrained eyes:


Current keyboard: Sentraq S60-X 60% DIY Keyboard Kit
Utility I use to build TMK firmware on Ubuntu: Keyboard firmware build utils
Current layout: keymap_spacefn_capslockctrlswap_mousekeys.c

Offline Tactile

  • Posts: 1434
  • Location: Portland, OR
Re: Malfunctioning G key on my TMK-based Sentraq S60-X keyboard
« Reply #9 on: Mon, 05 December 2016, 23:39:41 »
I had an H key on my Ducky here at work that would not register intermittently... and then occasional double or triple hit. Turned out it was a bad switch or solder job since i simply swapped out the switch and it has been perfect since.

That being said, since you have the tmk controller you can always try flashing it again. Thats the least intrusive thing to rule out.

Thanks. I have tried reflashing it and that had no effect. I am thinking now it is a bad switch. I'll have to wait until this weekend before I can solder in a new switch, as I want to first check the behavior on my other Sentraq S60-X at work once I am able to get there again (and this is my working keyboard at home).

The soldering job on the switch itself seems reasonable to my poor untrained eyes:

Show Image


Since you're into it that far why not see what happens when you short the contacts with a pair of tweezers, bypassing the switch altogether?
REΛLFORCE

Offline bgoodr

  • Thread Starter
  • Posts: 14
Re: Malfunctioning G key on my TMK-based Sentraq S60-X keyboard
« Reply #10 on: Mon, 05 December 2016, 23:51:54 »
Since you're into it that far why not see what happens when you short the contacts with a pair of tweezers, bypassing the switch altogether?

Good point. I've put the keyboard back together already. I'll try that once I open it up again sometime later this week, probably the weekend, and report back.  :D
Current keyboard: Sentraq S60-X 60% DIY Keyboard Kit
Utility I use to build TMK firmware on Ubuntu: Keyboard firmware build utils
Current layout: keymap_spacefn_capslockctrlswap_mousekeys.c

Offline bgoodr

  • Thread Starter
  • Posts: 14
Re: Malfunctioning G key on my TMK-based Sentraq S60-X keyboard
« Reply #11 on: Fri, 09 December 2016, 20:38:55 »
Since you're into it that far why not see what happens when you short the contacts with a pair of tweezers, bypassing the switch altogether?

I shorted the contacts repeatedly and didn't see any odd behavior.

I have since replaced the switch on the g key and now it works without any issues. So it was a bad switch.

Thanks for your and everyone elses help! I learned a lot through this exercise!

bg
Current keyboard: Sentraq S60-X 60% DIY Keyboard Kit
Utility I use to build TMK firmware on Ubuntu: Keyboard firmware build utils
Current layout: keymap_spacefn_capslockctrlswap_mousekeys.c