geekhack

geekhack Projects => Making Stuff Together! => Topic started by: Kaibz on Sun, 29 December 2019, 16:38:06

Title: Do you need add resistor in a keyboard matrix if a switch max current is 1mA?
Post by: Kaibz on Sun, 29 December 2019, 16:38:06
I guess my question is hard to summarize in one line for a title....I have build a keyboard using a 14X7 matrix + Teensy + TMK Firmware + CherryMX brown.

It works great but, now i would like to replace some of the keys by an omron D2LS micro switch https://omronfs.omron.com/en_US/ecb/products/pdf/en-d2ls.pdf (https://omronfs.omron.com/en_US/ecb/products/pdf/en-d2ls.pdf)

The problem is that, this micro switch seems to have a max current rating of 1mA.

So i am wondering if i need to add a resistor for those switches in the matrix, as the teensy 2.0 uses 5V, may be using a:

(5/0.001) 5Kohms resistor would make sens? Or is it simply not needed in a Matrix?

Update: link to screenshot of the matrix i am using with a Teensy 2.0:

https://imgur.com/zMlsHNq (https://imgur.com/zMlsHNq)
Title: Re: Do you need add resistor in a keyboard matrix if a switch max current is 1mA?
Post by: piit79 on Sun, 29 December 2019, 17:37:46
There's no need for any resistors - digital input pins have a very high impedance (in the order of megaohms IIRC), which means the current flowing through the switch into the pin is negligible (microamperes).

By the way, the screenshot of the matrix seems to be broken.
Title: Re: Do you need add resistor in a keyboard matrix if a switch max current is 1mA?
Post by: gipetto on Mon, 30 December 2019, 04:11:27
iirc the pullup resistor in a teensy 2.0 is about 14k ohms.
Title: Re: Do you need add resistor in a keyboard matrix if a switch max current is 1mA?
Post by: Kaibz on Mon, 30 December 2019, 20:03:55
Thank you very much.