Author Topic: Hand-wiring a backlit keyboard  (Read 9972 times)

0 Members and 1 Guest are viewing this topic.

Offline epicepee

  • Thread Starter
  • Posts: 35
Hand-wiring a backlit keyboard
« on: Sat, 08 November 2014, 16:14:00 »
I'm building what amounts to a hand-wired Poker II.  I want backlighting.  What are my options?

I could wire all of the LEDs together, so they only take one pin to adjust.  I'd need a transistor for that, right?  I kinda doubt one Teensy pin could push that much power.

I could also do row/column scanning, like the switches.  Could I use some of the same wiring as the switches themselves, to avoid a rat's-nest nightmare?  Would I need transistors?

Also, what about resistors?  Do I need one on every LED?  Is there a way to use fewer?  How would y'all recommend soldering them?

Thanks!

Offline neverused

  • Posts: 572
Re: Hand-wiring a backlit keyboard
« Reply #1 on: Sat, 08 November 2014, 19:40:47 »
Look up the build log for the minimal animal keyboard, he addressed how he did it there. If I find a link I'll post it later.

Offline dorkvader

  • Posts: 6288
  • Location: Boston area
  • all about the "hack" in "geekhack"
Re: Hand-wiring a backlit keyboard
« Reply #2 on: Sat, 08 November 2014, 23:41:50 »
I'm building what amounts to a hand-wired Poker II.  I want backlighting.  What are my options?

I could wire all of the LEDs together, so they only take one pin to adjust.  I'd need a transistor for that, right?  I kinda doubt one Teensy pin could push that much power.

I could also do row/column scanning, like the switches.  Could I use some of the same wiring as the switches themselves, to avoid a rat's-nest nightmare?  Would I need transistors?

Also, what about resistors?  Do I need one on every LED?  Is there a way to use fewer?  How would y'all recommend soldering them?

Thanks!
few quick answers:

1. awesome, you can go with any MX or alps switch and any LED colour. Lots of options for DIY :p MX has the most support for stabilizers and keycaps.
2. you could do that but you would absolutely need a transistor. You wire the gate to the LED control pin and hit it with PWM out from the microcontroller to adjust brightness. Keep PWM frequency under 100 MHz because many transistors cant switch faster. 1khz is probably fine.
3. if you want to do row/colum scanning for the LEDs (that is to say have the microcontroller individually address every LED) you can't just wire them all together. you have to wire the LED-resistor pair (see below on that) in a matrix to the microcontroller. You can't wire them through the switches or it'll interfere with the KB trying to scan the switch matrix to see what's being pressed or not. Also MX switches are not rated for much current. Another option is to run them trough dedicated LED controller ships (corsair RGB uses one kind of LED matrix controller chip) or some other way to address that many individual units.
4. You usually need resistors. There are a few cases where you don't really require them but its much much easier to just get some resistors and be happy. 1k is a decent value and cheap, but if you let us know what LED colour and some further details about what you're thinking on  how to power this, I can further narrow it down for you (and show you how the calculation work (and why). Basically they limit the current (brightness and power consumptions) of the LED because the LED is constant voltage and tries to always drop the same voltage. you need them to keep under the 500mA maximum limit for USB and to keep the LEDs from burning themselves out with too much power (and blinding people)

Hope this helps
Look up the build log for the minimal animal keyboard, he addressed how he did it there. If I find a link I'll post it later.

http://deskthority.net/workshop-f7/minimal-animal-complete-build-log-t7779.html


Offline neverused

  • Posts: 572
Re: Hand-wiring a backlit keyboard
« Reply #3 on: Sat, 08 November 2014, 23:51:22 »

Offline epicepee

  • Thread Starter
  • Posts: 35
Re: Hand-wiring a backlit keyboard
« Reply #4 on: Sun, 09 November 2014, 16:25:16 »
This may help:

https://www.adafruit.com/products/1427

That looks awesome, except it can't do individual PWM.  I bet I could pull off PWM over the whole thing but it would be ugly -- powering an IC with PWM doesn't sound like a good idea.

EDIT:  So apparently it *can* do dimming, 16 levels at least.  Thank you for the suggestion!
« Last Edit: Sun, 09 November 2014, 16:40:11 by epicepee »

Offline dashing_girlboy

  • Posts: 41
Re: Hand-wiring a backlit keyboard
« Reply #5 on: Sun, 16 November 2014, 02:25:59 »
I think you can do row/col if your teensy still have sufficient pins remaining. that way, you can just have a resistor every row/col provided that you are going to have just a uniform lighting with the same color LED. You will have to remember that different LED have different optimal working voltage.

Offline DrHubblePhD

  • I am star stuff
  • Posts: 828
  • Location: Observable Universe, Virgo Supercluster, Local Group, Milky Way Galaxy, Solar System, Planet Earth
Re: Hand-wiring a backlit keyboard
« Reply #6 on: Sun, 16 November 2014, 09:58:54 »
Definitely want to know how you work this out!

Offline Puddsy

  • nice
  • * Elated Elder
  • Posts: 12275
  • Location: RSTLN E
  • "Do you shovel to survive, or survive to shovel?"
Re: Hand-wiring a backlit keyboard
« Reply #7 on: Sun, 16 November 2014, 12:55:03 »
I've seen a few people do it, so I can assure you that it IS something possible. I think that they don't get PWM on every individual key, so you can only have all on or all off AFAIK.

I could be totally wrong though, this isn't something I've done deep research into.
QFR | MJ2 TKL | "Bulgogiboard" (Keycon 104) | ctrl.alt x GON 60% | TGR Alice | Mira SE #29 | Mira SE #34 | Revo One | z | Keycult No. 1 | AIS65 | First CW87 prototype | Mech27v1 | Camp C225 | Duck Orion V1 | LZ CLS sxh | Geon Frog TKL | Hiney TKL One | Geon Glare TKL



"Everything is worse, but in a barely perceptible and indefinable way" -dollartacos, after I came back from a break | "Is Linkshine our Nixon?" -NAV | "Puddsy is the Puddsy of keebs" -ns90

Offline dorkvader

  • Posts: 6288
  • Location: Boston area
  • all about the "hack" in "geekhack"
Re: Hand-wiring a backlit keyboard
« Reply #8 on: Sun, 16 November 2014, 17:06:24 »
I've seen a few people do it, so I can assure you that it IS something possible. I think that they don't get PWM on every individual key, so you can only have all on or all off AFAIK.

I could be totally wrong though, this isn't something I've done deep research into.

you can get individual control on every key (via PWM or current limiting) with some dedicated LED control chips like what the corsair KB and the backlit QFR thing use.

won't make wiring any easier though.

Offline epicepee

  • Thread Starter
  • Posts: 35
Re: Hand-wiring a backlit keyboard
« Reply #9 on: Sun, 16 November 2014, 22:10:07 »
Do you know of any PCBs that allow for individual-key backlight control?

Offline Nightlane

  • Posts: 7
  • Location: Spain, Madrid
Re: Hand-wiring a backlit keyboard
« Reply #10 on: Mon, 17 November 2014, 08:59:25 »
I am looking for a somewhat similar project, but I am looking to use a PCB and not really a poker2 clone. Looking too at backlit... https://geekhack.org/index.php?topic=64663.0

3. if you want to do row/colum scanning for the LEDs (that is to say have the microcontroller individually address every LED) you can't just wire them all together. you have to wire the LED-resistor pair (see below on that) in a matrix to the microcontroller. You can't wire them through the switches or it'll interfere with the KB trying to scan the switch matrix to see what's being pressed or not. Also MX switches are not rated for much current. Another option is to run them trough dedicated LED controller ships (corsair RGB uses one kind of LED matrix controller chip) or some other way to address that many individual units.
But, can we get our hands over that chip? I guess not :p. Something similar?

About K70 RGB: http://www.reddit.com/r/MechanicalKeyboards/comments/2jhe9h/corsair_rgb_keyboards_only_capable_of_512_colours/

As I was saying in my thread, I (we) could design a circuit to do backlit... the problem is that it is better to be condensed in the same chip (or some chips, but few) so it does not cost much money nor space...

Offline dorkvader

  • Posts: 6288
  • Location: Boston area
  • all about the "hack" in "geekhack"
Re: Hand-wiring a backlit keyboard
« Reply #11 on: Mon, 17 November 2014, 14:05:24 »
yeah you can just look it up. It's listed in the rgbgate topic here on GH and on the corsair forums. You can just buy it form mouser or digi-key.

Or just look up similar chips that might be cheaper, easier to solder, or easier to use.

I think bpiphany uses "4-10 Decoder Logic IC"s to expand the matrix. You might be able to do the same to control a large number of switches and LEDs.
Some info here:
http://deskthority.net/wiki/Costar_replacement_controllers

Look up the datasheet of the 74hc42 chip for more info.

Offline Euf0ria

  • Posts: 21
  • Location: Sweden
Re: Hand-wiring a backlit keyboard
« Reply #12 on: Tue, 18 November 2014, 02:04:26 »
I will subscribe to this thread=) Im in the making of my own hand wired keyboard and aim for individually controlled LED backlight for all switches as soon as i get the basic keyboard up and running. I will give you more info about my build soon and maybe if we share the same goal we could share some idéas back and forth too.

There seems to be a whole lot of choices for controlling a LED matrix today and many big panels use these to control hundreds of leds! Please check out this video talking about the Texas TLC5940
Two of these in a keyboard would be enough (i think) to make real magic!
All your base are belong to us