How to test Alps Switches?

User avatar
darkcruix

20 Oct 2022, 14:10

I have been soldering several Alps switches to PCBs lately and found that at least one or two switches per board have issues. double-presses when only pressed once, working only sporadically etc.
While de-soldering is not always the nicest thing to do, I wanted to test the switches before I even solder them.

Up till now, I used to test only continuity before adding them. While I used only vintage Alps switches I did verify them with a continuity test before soldering. I had an issue with one out of 30 switches (approx.). By replacing those faulty ones, it always solved the problem. I also checked the solder joints under a microscope, so I didn't miss anything obvious.

How do I properly test the switches by e.g. using an oscilloscope or other means?

User avatar
vvp

21 Oct 2022, 13:45

Do a simple continuity test with ohm-meter first. If it is OK then continue with oscilloscope:
  • Connect the switch in series with about 5k to10k resistor to a battery (1.5 - 10 V).
  • Connect scope probe on the switch.
  • Set up one-shot trigger on the falling edge on the scope and press the switch.
  • Check out the results on the scope.
  • Press the switch, set up one-shot trigger on the rising edge on the scope and release the switch.
  • Check out the results on the scope.
Switch voltage should stabilize to a new level in about 5 ms. Otherwise it is faulty.

User avatar
vvp

21 Oct 2022, 13:48

Last edited by vvp on 22 Oct 2022, 17:26, edited 1 time in total.

User avatar
darkcruix

21 Oct 2022, 20:09

vvp wrote:
21 Oct 2022, 13:45
Do a simple continuity test with ohm-meter first. If it is OK then continue with oscilloscope:
  • Connect the switch in series with about 5k to10k resistor to a battery (1.5 - 10 V).
  • Connect scope probe on the switch.
  • Set up one-shot trigger on the falling edge on the scope and press the switch.
  • Check out the results on the scope.
  • Press the switch, set up one-shot trigger on the rising edge on the scope and release the switch.
  • Check out the results on the scope.
Switch voltage should stabilize to a new level in about 5 ms. Otherwise it is faulty.
Huge thanks - this really helps. I will do a few checks over the weekend.

User avatar
darkcruix

22 Oct 2022, 19:09

My setup was a quick hack with a 4.7kOhm resistor in series with the switch. I drove it with a coin cell at 3.6V.
Spoiler:
hack_01.jpg
hack_01.jpg (231.76 KiB) Viewed 5696 times
The results have been different to what I have seen on your screenshots:

200µs
NewFile1.png
NewFile1.png (29.66 KiB) Viewed 5696 times
In my case the switch press looks actually too smooth in my eyes ...
Last edited by darkcruix on 22 Oct 2022, 20:30, edited 1 time in total.

User avatar
Muirium
µ

22 Oct 2022, 19:46

Yeah, too perfect. Surely there must be some sort of signal smoothing going on.

User avatar
darkcruix

22 Oct 2022, 21:32

Yeah, I am definitely doing something wrong. I checked all smoothing settings in the OSC and there is nothing. To be sure, I also tested a few other switches.

Alps Blue - 10µs:
10us_blue.png
10us_blue.png (29.29 KiB) Viewed 5662 times
Cherry MX Green - 50µs:
50uscherry.png
50uscherry.png (31.26 KiB) Viewed 5662 times
The breadboard hack is likely the root cause. I am going to change this to measure directly on the switch and clip things together directly next. More to come ;)
Spoiler:
IMG_3110.jpg
IMG_3110.jpg (223.77 KiB) Viewed 5662 times

User avatar
vvp

22 Oct 2022, 23:41

4k7 resistor is ok as well. You only want any low voltage setup which leads to currents of around 0.1 - 1 mA. Not too high voltage, not too high current since keyboard switches are low voltage and low current. If your probes have switchable attenuation then set it to 10x. It has higher bandwidth than 1x.

Maybe it is possible. It would mean that your switch is pretty much perfect. The other option is that there is some capacitance parallel to the measurement probe. The probe itself should have around 15 - 20 pF. But that is not enough to smooth it as much.
Is the probe properly compensated?
https://www.youtube.com/watch?v=gSa_1Rs4qbQ
Is the battery good (i.e. it does not have too big internal resistance)?
You can check by connecting the probe to the resistor instead of the switch. When switch is pressed, you still should get full 3 V on the resistor (i.e the same voltage as when the battery is not connected).

It is hard to decipher the pictures of your setup. The schematic should be something like this:
screenshot.png
screenshot.png (4.85 KiB) Viewed 5639 times
Connect the probe either across the switch or across the resistor. It does not really matter.
Keep the wires short to avoid parasitic inductance & capacitance.

If you are still getting the same results then I guess that your switches are pretty much perfect.
Do official specifications for your Alps switches define debounce time in the range of 20 us only? I.e. does the manufacturer say that the switches should actually be pretty much perfect?

Cherry MX switches (and their clones) have typical debounce time around 4 ms. This is caused by the leaf spring in the switch bouncing a few times from the contact when the switch is connected. May be some "micro-arcing" as well.

User avatar
vvp

23 Oct 2022, 00:08

I tried to measure only connecting of the probes of my scope directly to a battery. I managed to simulate a switch without any bounce this way. So I must conclude that perfect switches must be possible and you may have them :D

Regardless, if your switches will pass this scope test then they are pretty good for a keyboard. Don't worry about them.

User avatar
darkcruix

23 Oct 2022, 11:04

Thanks a ton for all the tips - I still have way too good results (IMHO), but they look a bit more convincing. I have set my probes to 10x btw. With further tests not shown below, I could see that in most cases I can confirm it is 4 to 5ms until the active state is reached. I am building something more reproducible, so I can quickly get my switches tested. For now I show the pictures below of my latests records, but I will post something at a later stage, when I have the configuration locked in ;)

Huge thanks - this really helps!

Cherry Green 20µs:
cherry_gr2.png
cherry_gr2.png (38.22 KiB) Viewed 5582 times
Alps Blue 20µs:
alps_bl20.png
alps_bl20.png (31.85 KiB) Viewed 5582 times
Alps Blue 50µs:
alps_bl50.png
alps_bl50.png (29.74 KiB) Viewed 5582 times

User avatar
vvp

23 Oct 2022, 13:50

That cherry green scope output looks OK. The blue alps scope output may be OK.
I would expect clicky switches to bounce more.

User avatar
darkcruix

23 Oct 2022, 18:09

I have done further tests.
Here's an Alps Green Linear switch - roughly 1 second until it normalizes: Still, it doesn't look like bouncing:
alpsgl_100.png
alpsgl_100.png (38.09 KiB) Viewed 5540 times
I have tested a not so great White Alps Clicky and it just can't be a proper measurement:
white_alps.jpg
white_alps.jpg (213.63 KiB) Viewed 5540 times
My wiring of the above:
whote_alps_photo.jpg
whote_alps_photo.jpg (151.22 KiB) Viewed 5540 times

User avatar
vvp

23 Oct 2022, 19:17

The HW test setup looks OK.

It should not be a problem to do a measurement. Check you have setup a one-shot trigger at about 1.5 V (first falling for switch press, then rising edge for switch release). Time scale about 100 us is OK. Time position somewhere in the centre of the display.

It looks like your trigger voltage is set to 0 V. That is not good. Set it to about 1.5 V.
I may be wrong. You have a different scope than me. There may be a difference in the symbols on the screen.

User avatar
darkcruix

23 Oct 2022, 21:36

Here are my settings for the trigger:
  • Type: Edge
  • Slope is falling
  • Sweep is Single (One Shot)
  • At 1.50V (and later to 1.14V for rising slope)
IMG_3116.jpg
IMG_3116.jpg (80.04 KiB) Viewed 5506 times
Additionally, I've set the NoiseReject to Off:
IMG_3118.jpg
IMG_3118.jpg (134.84 KiB) Viewed 5506 times
Green Cherry, rising slope, 1.14V trigger:
IMG_3119.jpg
IMG_3119.jpg (214.16 KiB) Viewed 5506 times

User avatar
darkcruix

23 Oct 2022, 22:01

After 11 switches I found a faulty one (in my eyes):
NewFile2.png
NewFile2.png (34.78 KiB) Viewed 5496 times

User avatar
vvp

23 Oct 2022, 22:42

Your trigger setup you have shown is correct now.

Yes, the last switch has issues. It may not be critical. Valid CMOS levels are 1/3 of the Vdd. If the signals do not drop by more than 1/3 then it will not glitch yet. Anyway, I would replace the switch. It will likely get only worse as the switch is used.

User avatar
darkcruix

22 Nov 2022, 10:51

Thanks again for the tips, I want to circle back as I built (a quick hacked together) switch tester with quick inserts for Alps and Cherry switches. It can either do a simple continuity test with LED indication or more advanced Oscilloscope tests with probes. It is basically the earlier shown cable mess compressed into a PCB with an easier insert mechanism to check bulk of switches.
IMG_3178.jpeg
IMG_3178.jpeg (220.13 KiB) Viewed 4910 times
IMG_3180.jpeg
IMG_3180.jpeg (180.08 KiB) Viewed 4910 times

User avatar
guidemetothelight

23 Nov 2022, 08:41

darkcruix wrote:
22 Nov 2022, 10:51
Thanks again for the tips, I want to circle back as I built (a quick hacked together) switch tester with quick inserts for Alps and Cherry switches. It can either do a simple continuity test with LED indication or more advanced Oscilloscope tests with probes. It is basically the earlier shown cable mess compressed into a PCB with an easier insert mechanism to check bulk of switches.
That is amazing ! Do you have an extra pcb laying around by any chance ? ;)

User avatar
darkcruix

23 Nov 2022, 11:04

guidemetothelight wrote:
23 Nov 2022, 08:41
darkcruix wrote:
22 Nov 2022, 10:51
Thanks again for the tips, I want to circle back as I built (a quick hacked together) switch tester with quick inserts for Alps and Cherry switches. It can either do a simple continuity test with LED indication or more advanced Oscilloscope tests with probes. It is basically the earlier shown cable mess compressed into a PCB with an easier insert mechanism to check bulk of switches.
That is amazing ! Do you have an extra pcb laying around by any chance ? ;)
I do have four more, but the parts aren't soldered in, yet :)

User avatar
morbid42

22 Dec 2022, 04:15

1-IMG_20220105_234811.jpg
1-IMG_20220105_234811.jpg (1.09 MiB) Viewed 3899 times
1-IMG_20220105_234922.jpg
1-IMG_20220105_234922.jpg (1.19 MiB) Viewed 3899 times

Post Reply

Return to “Workshop”