Author Topic: Modding a keyboard with Teensy  (Read 4160 times)

0 Members and 1 Guest are viewing this topic.

Offline jlebrech

  • Thread Starter
  • Posts: 8
Modding a keyboard with Teensy
« on: Wed, 12 September 2012, 05:26:44 »
I'm interested in being able to mod an off the shelf keyboard so that it can display rgb leds for each key, but so that an app on the pc can set what the color of those reds are.

Has anyone here does something similar?

Offline Icarium

  • Posts: 251
  • I AM A MONKEY!
Re: Modding a keyboard with Teensy
« Reply #1 on: Wed, 12 September 2012, 05:57:40 »
I don't think anybody here has ever done something similar but if you're not concerned about the wiring and are willing to use extra cables it's a pretty simple electronics project. But as I said I don't think anybody has done it. Work for the "light" is probably most related: http://geekhack.org/index.php?topic=26751.msg659069#msg659069
I had a sig once but it's gone. It used to display an icon of a Kinesis. Just imagine that.

Offline jlebrech

  • Thread Starter
  • Posts: 8
Re: Modding a keyboard with Teensy
« Reply #2 on: Wed, 12 September 2012, 06:19:12 »
Is the teensy capable of being a keyboard controller and also control leds?

I don't mind adding extra wires.

Offline Icarium

  • Posts: 251
  • I AM A MONKEY!
Re: Modding a keyboard with Teensy
« Reply #3 on: Wed, 12 September 2012, 06:59:57 »
How many pins you need depends on what kind of keyboard you have, how many leds you want and how you multiplex them. For most interesting things a Teensy will NOT have enough pins.
I had a sig once but it's gone. It used to display an icon of a Kinesis. Just imagine that.

Offline tp4tissue

  • * Destiny Supporter
  • Posts: 13722
  • Location: Official Geekhack Public Defender..
  • OmniExpert of: Rice, Top-Ramen, Ergodox, n Females
Re: Modding a keyboard with Teensy
« Reply #4 on: Wed, 12 September 2012, 07:07:02 »
There are very little benefits to be had by adding more microcontrollers to the circuit. Let's say you achieve nkro, but at the cost of latency.

latency is important throughout your keyboarding experience, while NKRO is only useful for very limited situations.

One should prioritize for latency above all else.

Offline jlebrech

  • Thread Starter
  • Posts: 8
Re: Modding a keyboard with Teensy
« Reply #5 on: Wed, 12 September 2012, 07:22:48 »
so another controller with more pins is needed?

I was thinking about find a cheap backlit mechanical keyboard and replace the leds with those.

http://www.kitronik.co.uk/products/components/leds/leds/colour-changing-and-rgb-leds/rgb-full-colour-led-5mm?tax_mode=inc

Offline tp4tissue

  • * Destiny Supporter
  • Posts: 13722
  • Location: Official Geekhack Public Defender..
  • OmniExpert of: Rice, Top-Ramen, Ergodox, n Females
Re: Modding a keyboard with Teensy
« Reply #6 on: Wed, 12 September 2012, 07:33:09 »
so another controller with more pins is needed?

I was thinking about find a cheap backlit mechanical keyboard and replace the leds with those.

http://www.kitronik.co.uk/products/components/leds/leds/colour-changing-and-rgb-leds/rgb-full-colour-led-5mm?tax_mode=inc

Arduino FTW. but expect a little more latency on that.

Offline Icarium

  • Posts: 251
  • I AM A MONKEY!
Re: Modding a keyboard with Teensy
« Reply #7 on: Wed, 12 September 2012, 08:20:57 »
so another controller with more pins is needed?

I was thinking about find a cheap backlit mechanical keyboard and replace the leds with those.

http://www.kitronik.co.uk/products/components/leds/leds/colour-changing-and-rgb-leds/rgb-full-colour-led-5mm?tax_mode=inc

That won't work. They're too big and they have to many legs.
I had a sig once but it's gone. It used to display an icon of a Kinesis. Just imagine that.

Offline alaricljs

  • I be WOT'ing all day...
  • ** Moderator Emeritus
  • Posts: 3715
  • Location: NE US
Re: Modding a keyboard with Teensy
« Reply #8 on: Wed, 12 September 2012, 09:09:30 »
There are no RGB leds that are directly compatible with what you are trying to do.  Cherry MX switches only fit 3mm LEDs, there are only 2 lead holes through the housing.  There is no such thing as a 3mm RGB led where you can control the LED.  There are only ones that color cycle on their own.

While the teensy doesn't have enough pins, it can be done by adding other components and using the teensy to control those components.  Either shift registers, IO breakouts, or LED controllers can accomplish the same goal in some way using fewer of the teensy's pins.
Filco w/ Imsto thick PBT
Ducky 1087XM PCB+Plate, w/ Matias "Quiet Click" spring-swapped w/ XM Greens

Offline dorkvader

  • Posts: 6289
  • Location: Boston area
  • all about the "hack" in "geekhack"
Re: Modding a keyboard with Teensy
« Reply #9 on: Wed, 12 September 2012, 09:43:41 »
You'd have to either modify the keyswitch to make room for the extra pins, or put the LED in next to or between (or under, somehow) keyswitches if you want RGB LEDs.

Offline alaricljs

  • I be WOT'ing all day...
  • ** Moderator Emeritus
  • Posts: 3715
  • Location: NE US
Re: Modding a keyboard with Teensy
« Reply #10 on: Wed, 12 September 2012, 09:45:00 »
Oh yeah... and there's no room for that anyhow.  Don't forget a keycap has to fit around the switch housing when pressed.
« Last Edit: Wed, 12 September 2012, 10:05:56 by alaricljs »
Filco w/ Imsto thick PBT
Ducky 1087XM PCB+Plate, w/ Matias "Quiet Click" spring-swapped w/ XM Greens

Offline jlebrech

  • Thread Starter
  • Posts: 8
Re: Modding a keyboard with Teensy
« Reply #11 on: Wed, 12 September 2012, 09:56:07 »
So single color would be best to start off with?

I could individually control the brightness using arduino by soldering wires onto the underneath of the board maybe.

Offline dorkvader

  • Posts: 6289
  • Location: Boston area
  • all about the "hack" in "geekhack"
Re: Modding a keyboard with Teensy
« Reply #12 on: Wed, 12 September 2012, 19:15:07 »
Oh yeah... and there's no room for that anyhow.  Don't forget a keycap has to fit around the switch housing when pressed.

There is: My TG3 has some threads from a mounting screw on the plate that doesn't interfere with the keycaps around it. It's about the size of an SMD diode. You'd have to go PCB mount for sure to try and get a larger (or more) diodes in there.

Bestbet is modding the switch housing, though. It already has four holes, though the outer two will be really hard to access unless you take out some plastic separating them.

I would say that since they are constant voltage devices, a good way to control the brightness would be with PWM. It does depend on how you're driving the matrix, though.