Author Topic: Technical specs for Cherry MX switches for DIY project  (Read 7206 times)

0 Members and 1 Guest are viewing this topic.

Offline MrFex

  • Thread Starter
  • Posts: 112
  • Location: NL
Technical specs for Cherry MX switches for DIY project
« on: Wed, 15 April 2015, 06:39:03 »
Hi fellas,


My Cherry MX key switch tester (from WASD) is almost arriving and I am planning to hook it up to an Arduino and use it to hotkey my PC. Awesome right?

I'm looking for a PDF with a technical specification of the switch, something that will help me create a good circuit. At this moment I am having trouble finding good info. Some sites refer to a 12v input voltage while I expected it to be 5v or less. I can read a good schematic so I hope to find some DIY resources, can you help?

I've succesfully modded my Arduino into a USB HID Gamepad aka Joystick for better compatibility, plug and play and driver independence. The project is recognized as a USB gamepad and I use simple scripting to hotkey it.

Is anyone interested in the results? If anyone likes this and would like me to produce a guide of some sort, I would be more than happy to. Just let me know.


Offline MrFex

  • Thread Starter
  • Posts: 112
  • Location: NL
Re: Technical specs for Cherry MX switches for DIY project
« Reply #1 on: Wed, 15 April 2015, 14:50:24 »
The closest technical info that I have found is here, found this on the official Cherry product page:
http://2nxod5497ve018julv28ilzx3fd.wpengine.netdna-cdn.com/wp-content/uploads/2012/07/Keymodule_MX_EN.pdf

And this one:
http://www.mouser.com/catalog/supplier/library/pdf/cherrykeyswitch.pdf

That's my answer. The switches will work with an input voltage between 2v and 12v.
« Last Edit: Wed, 15 April 2015, 15:06:20 by MrFex »

Offline MrFex

  • Thread Starter
  • Posts: 112
  • Location: NL
Re: Technical specs for Cherry MX switches for DIY project
« Reply #2 on: Wed, 15 April 2015, 15:01:20 »
New question to DIY-ers. What is the recommended input voltage? Got any resources on it? What about resistors and capacitors?

The Cherry spec is pretty vague if you ask me. Look at this:

Electrical characteristics Module ML Module MX
Switching voltage 12 V AC / DC max.   12 V AC / DC max.
Switching current10 mA AC / DC max. 10 mA AC / DC max.
Dielectric strength  500 V / 50Hz500 V / 50Hz
Durability at 5V, 1mA linear actuation 50 x 106
Durability at 5V, 1mA tactile feel click20 x 106 50 x 106
Durability at 5V, 1mA alternate action0,5 x 106
Durability at 5V, 1mA alternate action50 x 106

Offline bpiphany

  • Posts: 1033
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Re: Technical specs for Cherry MX switches for DIY project
« Reply #3 on: Fri, 17 April 2015, 10:24:24 »
It's a mechanical switch. It doesn't "run" on electricity. Any input voltage below 12V/10mA that is useful to your controller will do.

Offline MrFex

  • Thread Starter
  • Posts: 112
  • Location: NL
Re: Technical specs for Cherry MX switches for DIY project
« Reply #4 on: Mon, 27 April 2015, 18:23:24 »
Thanks for clearing that up, I am up and running now :thumb:

It is working quite nicely on my breadboard setup so I am ready to eternalize this project. It'll be a tight fit so I am considering taking off the little plastic bumps that are on the back of those switches.

Like this one:


What are these for? Mounting support? How can I take them off easily?
I only have the one in the middle.

Offline Melvang

  • Exquisite Lord of Bumfluff
  • * Maker
  • Posts: 4398
  • Location: Waterloo, IA
  • Melvang's Desktop Customs
Re: Technical specs for Cherry MX switches for DIY project
« Reply #5 on: Mon, 27 April 2015, 18:28:48 »
Those are the pegs for PCB mount.  Those pegs are the only difference between plane and pcb mount switches.  You can clip them off with fingernail clippers or flush cutters.
OG Kishsaver, Razer Orbweaver clears and reds with blue LEDs, and Razer Naga Epic.   "Great minds crawl in the same sewer"  Uncle Rich

Offline nova779

  • Posts: 55
  • Location: Charlotte, NC
Re: Technical specs for Cherry MX switches for DIY project
« Reply #6 on: Mon, 27 April 2015, 18:39:09 »
Thanks for clearing that up, I am up and running now :thumb:

It is working quite nicely on my breadboard setup so I am ready to eternalize this project. It'll be a tight fit so I am considering taking off the little plastic bumps that are on the back of those switches.


What are these for? Mounting support? How can I take them off easily?
I only have the one in the middle.

I assume the middle one is for PCB mounting as well, here is a picture with all three of the pegs cut off, the switch still works perfectly fine.


Sorry for the horrible image, all I have in the camera department is a phone.

Offline Melvang

  • Exquisite Lord of Bumfluff
  • * Maker
  • Posts: 4398
  • Location: Waterloo, IA
  • Melvang's Desktop Customs
Re: Technical specs for Cherry MX switches for DIY project
« Reply #7 on: Mon, 27 April 2015, 20:34:19 »
The middle one you need for use with any PCB. 
OG Kishsaver, Razer Orbweaver clears and reds with blue LEDs, and Razer Naga Epic.   "Great minds crawl in the same sewer"  Uncle Rich

Offline bpiphany

  • Posts: 1033
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Re: Technical specs for Cherry MX switches for DIY project
« Reply #8 on: Tue, 28 April 2015, 02:56:30 »
I assume the middle one is for PCB mounting as well, here is a picture with all three of the pegs cut off, the switch still works perfectly fine.

Do I smell sarcasm? Trolls? Wonderful thread =D

Offline nova779

  • Posts: 55
  • Location: Charlotte, NC
Re: Technical specs for Cherry MX switches for DIY project
« Reply #9 on: Tue, 28 April 2015, 06:08:47 »
I assume the middle one is for PCB mounting as well, here is a picture with all three of the pegs cut off, the switch still works perfectly fine.

Do I smell sarcasm? Trolls? Wonderful thread =D
I wasn't trying to be sarcastic, I just assumed he was handwiring and plate mounting so no point for the middle peg.

Offline Melvang

  • Exquisite Lord of Bumfluff
  • * Maker
  • Posts: 4398
  • Location: Waterloo, IA
  • Melvang's Desktop Customs
Re: Technical specs for Cherry MX switches for DIY project
« Reply #10 on: Tue, 28 April 2015, 18:54:13 »
I assume the middle one is for PCB mounting as well, here is a picture with all three of the pegs cut off, the switch still works perfectly fine.

Do I smell sarcasm? Trolls? Wonderful thread =D
I wasn't trying to be sarcastic, I just assumed he was handwiring and plate mounting so no point for the middle peg.

It can still serve a purpose.  If it is cut off, and then the switches are lubed with something that migrates over time, the lube will seep out of the switches and onto the desk over time.  Plus it is now another point of dust intrusion.
OG Kishsaver, Razer Orbweaver clears and reds with blue LEDs, and Razer Naga Epic.   "Great minds crawl in the same sewer"  Uncle Rich

Offline nova779

  • Posts: 55
  • Location: Charlotte, NC
Re: Technical specs for Cherry MX switches for DIY project
« Reply #11 on: Tue, 28 April 2015, 19:25:54 »
I assume the middle one is for PCB mounting as well, here is a picture with all three of the pegs cut off, the switch still works perfectly fine.

Do I smell sarcasm? Trolls? Wonderful thread =D
I wasn't trying to be sarcastic, I just assumed he was handwiring and plate mounting so no point for the middle peg.

It can still serve a purpose.  If it is cut off, and then the switches are lubed with something that migrates over time, the lube will seep out of the switches and onto the desk over time.  Plus it is now another point of dust intrusion.

What is the likelihood that this dust will effect switch performance, and could a solution be as simple as carefully placing tape or hot glue over the hole to still get the benefit of the space that MrFex would like to have.

Offline Melvang

  • Exquisite Lord of Bumfluff
  • * Maker
  • Posts: 4398
  • Location: Waterloo, IA
  • Melvang's Desktop Customs
Re: Technical specs for Cherry MX switches for DIY project
« Reply #12 on: Tue, 28 April 2015, 19:40:59 »
I assume the middle one is for PCB mounting as well, here is a picture with all three of the pegs cut off, the switch still works perfectly fine.

Do I smell sarcasm? Trolls? Wonderful thread =D
I wasn't trying to be sarcastic, I just assumed he was handwiring and plate mounting so no point for the middle peg.

It can still serve a purpose.  If it is cut off, and then the switches are lubed with something that migrates over time, the lube will seep out of the switches and onto the desk over time.  Plus it is now another point of dust intrusion.

What is the likelihood that this dust will effect switch performance, and could a solution be as simple as carefully placing tape or hot glue over the hole to still get the benefit of the space that MrFex would like to have.

Actually, now that I think about it, those switches that the middle part got cut out on, may not even be usable anymore.  I think that might be where the bottom of the spring sits.
OG Kishsaver, Razer Orbweaver clears and reds with blue LEDs, and Razer Naga Epic.   "Great minds crawl in the same sewer"  Uncle Rich

Offline nova779

  • Posts: 55
  • Location: Charlotte, NC
Re: Technical specs for Cherry MX switches for DIY project
« Reply #13 on: Tue, 28 April 2015, 19:52:02 »
I assume the middle one is for PCB mounting as well, here is a picture with all three of the pegs cut off, the switch still works perfectly fine.

Do I smell sarcasm? Trolls? Wonderful thread =D
I wasn't trying to be sarcastic, I just assumed he was handwiring and plate mounting so no point for the middle peg.

It can still serve a purpose.  If it is cut off, and then the switches are lubed with something that migrates over time, the lube will seep out of the switches and onto the desk over time.  Plus it is now another point of dust intrusion.

What is the likelihood that this dust will effect switch performance, and could a solution be as simple as carefully placing tape or hot glue over the hole to still get the benefit of the space that MrFex would like to have.

Actually, now that I think about it, those switches that the middle part got cut out on, may not even be usable anymore.  I think that might be where the bottom of the spring sits.

As I said earlier I took one of the switches and cut that part off and it still works fine in every aspect besides for mounting in a PCB, the only issue I can think of now is the one you mentioned with lube or dust seeping through the hole, but that shouldn't be a problem if you have some way like glue or tape to place there

Offline nova779

  • Posts: 55
  • Location: Charlotte, NC
Re: Technical specs for Cherry MX switches for DIY project
« Reply #14 on: Tue, 28 April 2015, 20:29:40 »
There might have to be a way to stop the leg of the stem from going through the hole, if it is pressed down far enough then the switch will get stuck, this might be nice for a makeshift mx lock but isn't ideal

Offline MrFex

  • Thread Starter
  • Posts: 112
  • Location: NL
Re: Technical specs for Cherry MX switches for DIY project
« Reply #15 on: Wed, 29 April 2015, 13:57:38 »
Thanks for all the responses. It turned out not to be the best idea since, well take a look:




I ended up taking off the blue peg as well .. doesn't bother me much but I reckon the switch will not be pleased.

Offline MrFex

  • Thread Starter
  • Posts: 112
  • Location: NL
Re: Technical specs for Cherry MX switches for DIY project
« Reply #16 on: Wed, 29 April 2015, 14:01:11 »
There might have to be a way to stop the leg of the stem from going through the hole, if it is pressed down far enough then the switch will get stuck, this might be nice for a makeshift mx lock but isn't ideal

This is so true! With the hole open, the blue peg got stuck often:


Here's a pic of the switch with the blue peg stuck in the hole. Great for those situation where you need to hold a key infinitly :)

Offline MrFex

  • Thread Starter
  • Posts: 112
  • Location: NL
Re: Technical specs for Cherry MX switches for DIY project
« Reply #17 on: Thu, 30 April 2015, 19:04:01 »
98987-098989-198991-298995-398993-498997-598999-699001-799003-899005-999007-1099009-11


Offline MrFex

  • Thread Starter
  • Posts: 112
  • Location: NL
Re: Technical specs for Cherry MX switches for DIY project
« Reply #18 on: Thu, 30 April 2015, 19:15:29 »
 :thumb:

Finally had some time to work on this and I am happy with the result.

I am using a Arduino Pro Micro that sends out a Gamepad HID and produces joystick reports for the switches. Since I am only using 6 keys I have individually wired them to an input pin. The board features pullup resistors that produce a HIGH on the pins when the switches are off and LOW when connected to ground while the switches are on.

Here's the code:
Code: [Select]
const int buttonPins[] = {3, 4, 15, 14, 16, 10};
const int size = sizeof(buttonPins) / sizeof(int);
const int pollRate = 50;

long m = millis();
JoyState_t joyState;

void setup() {       
  for (int i = 0; i < size; i++)
    pinMode(buttonPins[i], INPUT_PULLUP);   

  m = millis(); // You're screwed when this overflows
}

void loop() {
  if (millis() - m > pollRate)
  {
    m = millis();
   
    joyState.buttons = 0;
   
    for (int i = 0; i < size; i++) {
       int state = digitalRead(buttonPins[i]);
       if (state == LOW)
         joyState.buttons += 1 << i;
    }   
     
    Joystick.setState(&joyState);
  }
}

Since Windows recognized the input as a joystick I need an additional app that maps the keys to something meaningful. I use AutoHotKey to accomplish this. In my case I call a function that does a web request to another Arduino to control the LED lighting in my room using RF.  ;D

Code: [Select]
Joy1::SendCode("#Down")
Joy2::SendCode("#Up")
Joy3::SendCode("#Full")
Joy4::SendCode("#Change")
Joy5::SendCode("#Wheel")
Joy6::SendCode("#Fade")

AutoHotKey is great because you get to map the keys to virtually any action and can even specify different behaviours for different foreground applications. I'll be working on that but for now it is disco time ...

This was fun, thanks for reading!
« Last Edit: Thu, 30 April 2015, 19:17:28 by MrFex »