Author Topic: would it be possible...  (Read 1542 times)

0 Members and 1 Guest are viewing this topic.

Offline Jixr

  • Thread Starter
  • Posts: 864
  • Location: Ireland
would it be possible...
« on: Mon, 21 October 2013, 15:54:20 »
would it be possible to mount LEDs to cherry switches, and then connect the led to the connection of the switch themselfs, so every time you press a key down, a led lights up, and then turns off when you release the key?

Offline phx

  • Posts: 361
  • Location: Boston, Massachusetts
Re: would it be possible...
« Reply #1 on: Mon, 21 October 2013, 16:03:42 »
not impossible just really difficult and time consuming.

Offline genkidama

  • Posts: 279
  • Location: Germany
Re: would it be possible...
« Reply #2 on: Mon, 21 October 2013, 16:05:44 »
I'm still new to this hole mech game, but doesn't the PCB need to have the possibility for LEDs built in factory-build-wise?
My finger training is over 9000!!!!

Offline Jixr

  • Thread Starter
  • Posts: 864
  • Location: Ireland
Re: would it be possible...
« Reply #3 on: Mon, 21 October 2013, 16:12:43 »
I don't know what type of voltage runs through the switches, but I would solder the leds to the switch prong itself, then when you press a key to complete a circuit, the LED would also light up until you release the switch.

though making it all fit would be pretty hard, but in theory, it would work right?

Offline SpAmRaY

  • NOT a Moderator
  • * Certified Spammer
  • Posts: 14667
  • Location: ¯\(°_o)/¯
  • because reasons.......
Re: would it be possible...
« Reply #4 on: Mon, 21 October 2013, 16:14:02 »
I don't know what type of voltage runs through the switches, but I would solder the leds to the switch prong itself, then when you press a key to complete a circuit, the LED would also light up until you release the switch.

though making it all fit would be pretty hard, but in theory, it would work right?

I don't know anything about electronics but I think there has to be a resistor involved somewhere.

Offline absyrd

  • CPT HYPE PADAWAN
  • Posts: 3300
  • Location: Philly Burbs
Re: would it be possible...
« Reply #5 on: Mon, 21 October 2013, 16:19:26 »
Didn't ducky make a board with reactive leds?
My wife I a also push her button . But now she have her button push by a different men. So I buy a keyboard a mechanicale, she a reliable like a Fiat.

Offline tp4tissue

  • * Destiny Supporter
  • Posts: 13721
  • Location: Official Geekhack Public Defender..
  • OmniExpert of: Rice, Top-Ramen, Ergodox, n Females
Re: would it be possible...
« Reply #6 on: Mon, 21 October 2013, 16:20:01 »
I don't know what type of voltage runs through the switches, but I would solder the leds to the switch prong itself, then when you press a key to complete a circuit, the LED would also light up until you release the switch.

though making it all fit would be pretty hard, but in theory, it would work right?

I don't know anything about electronics but I think there has to be a resistor involved somewhere.

that's usually just to protect the LED from burning out.. you don't "have to" have it..

Offline dorkvader

  • Posts: 6289
  • Location: Boston area
  • all about the "hack" in "geekhack"
Re: would it be possible...
« Reply #7 on: Mon, 21 October 2013, 17:05:41 »
I don't know what type of voltage runs through the switches, but I would solder the leds to the switch prong itself, then when you press a key to complete a circuit, the LED would also light up until you release the switch.

though making it all fit would be pretty hard, but in theory, it would work right?

I don't know anything about electronics but I think there has to be a resistor involved somewhere.

that's usually just to protect the LED from burning out.. you don't "have to" have it..
The resistor limits the current and therefore the power (since LED's are basically constant voltage devices) through the LED, and will prevent them from burning up. you only "don't have to" have it if your power supply is set up at the proper current limiting anyway. Even then it's a bad idea to forego resistors, as if one LED fails, power to the rest will go up, causing more to fail in a cascade of failure.

Cherry switches should be able to handle the LED voltages easily, as KB matrices are generally driven at 5V anyway, the problem with them (and most other switches) is that it can't handle the current.

Even if they could, the scheme would be further complicated with getting the microcontrolelr to output that voltage to the switch matrix, and you'd have to sample the matrix at a scan rate that's high (to avoid flicker), and have input / output protection on low current digital IO pins, etc. In short: a huge pain.

What has been done in the past is wiring up all the leds to a microcontroller individually. This was done before the pictures were removed from GH, so I don't think they survived. This is a much better solution, and has an added bonus of not having to worry about as many crazy issues with the microcontroller. (you dont want to be running a sensitive digital sensing circuit at high power.

An interesting solution is to use a sub PCB just for the LED matrix. With a PCB like the poker 1 that has disconnected LED holes, you can insert LED's through the PCB and solder to a sub PCB, making wiring much easier. I can do the hardware, and some of the electrical engineering of such a thing, but the programming is beyond me.

Offline Findecanor

  • Posts: 5081
  • Location: Koriko
Re: would it be possible...
« Reply #8 on: Mon, 21 October 2013, 22:38:35 »
Even if they could, the scheme would be further complicated with getting the microcontrolelr to output that voltage to the switch matrix, and you'd have to sample the matrix at a scan rate that's high (to avoid flicker), and have input / output protection on low current digital IO pins, etc. In short: a huge pain.
This. If you press down all the keys on one matrix row or column, then the microcontroller would have to provide current for all of those keys' LEDs on a single pin, and that might be too much for it.

I think that Ducky drives its LEDs on a matrix that is separate from the keyboard matrix, and drives those from a dedicated LED driver chip connected to the microcontroller. All LEDs are software-controlled.

There are lots of hobbyists that have made programmable LED matrices using a microcontroller and "shift registers"/"I/O expander"/"multiplexer" chip such as the 74LS156. Note that it must be able to provide sufficient current for the LEDs. Those solutions do update each LED column with strict timing.
An easier way is to use a LED matrix driver, such as the AS1130 - the µC needs only to tell it how to light the LEDs when the pattern needs to be changed.
You could possibly (I am not sure) also drive the LEDs using a setup with transistors triggered by the keyboard matrix, but then you would get only instant reactive typing and nothing else. The electronics for that are too complicated for me.
All these solutions require quite a bit of microcontroller programming. I am learning this myself right now, and even though I am a professional programmer there is a bit still left for me to learn.
🍉