#Using KY-040 Encoder Pushbutton

11 messages · Page 1 of 1 (latest)

elfin flume
#

I am making a keyboard using a Raspberry Pi Pico W as the microcontroller and a 6 row, 17 column matrix. I'm having a problem integrating the KY-040 Rotary encoder in it though. I know how to use just the encoder part, but not the pushbutton.

The issue is that the pushbutton shorts SW to GND when pressed (iirc), so I can't use it in my matrix. I think a solution could be using a GPIO pin just for the pushbutton and not connected to the matrix, but I don't know how to, or even if I can configure that in QMK.

If I can't, or the configuration is difficult, I am open to using another rotary encoder with a pushbutton I can wire into my matrix .

arctic timber
#

Oh, it's one of these?

#

Just take it off the PCB breakout and wire it up properly?

acoustic wharf
#

Yeah I don't know why they are connected like that, turn 5 pins on the encoder to 5 different and less usable pins on the board

#

I've seen circuits to incorporate the common ground into a matrix, but I don't know how well they work, and if you're going to use extra components you may as well just not use the unhelpful breakout board at all

elfin flume
#

Thank you. This is literally my first keyboard so the help is appreciated.

#

Also, im assuming that the CLK, DT, and GND are connected to the microcontroller and the SW and its individual ground is connected into the matrix with a diode?

elfin flume
#

Anither question, Would i need to use the pullup resistors or can I just wire the encoder directly to GND, CLK, and DT?

acoustic wharf