geekhack

geekhack Projects => Making Stuff Together! => Topic started by: SectorOMEGA on Wed, 05 April 2017, 03:47:10

Title: 60% keyboard LEDs
Post by: SectorOMEGA on Wed, 05 April 2017, 03:47:10
Hello, Everyone. Today I have collected my switches from the couriers and I will be starting my first build. I have also bought 2x3x4mm LEDs as I'm after full light. The only thing that bothers me is the connections. 62 LEDs is it possible to power them up(not full power of course) with the teensy. Tried to dig something from the internet but nothing useful. All advises welcome
Title: Re: 60% keyboard LEDs
Post by: flashjac on Sun, 09 April 2017, 20:17:57
The information you are looking for can be found in the ATMega32u4 datasheet. The footnote for Table 29.1 explains the groups of pins and the total current each group can sink or source. A Teensy 2.0 has 21 I/O pins, and 19 of those will be used for the keyboard (I am assuming you are building a 60%). If the remaining two pins are used to drive all the LEDs, the maximum current you can sink or source is 2 * 40mA (absolute maximum) = 80mA.
If you arrange the LEDs like this:
(I/O pin A --- Resistor --- LED --- LED --- Ground) x 15, and (I/O pin B --- Resistor --- LED --- LED --- Ground) x 16
then you can get 2.5mA per LED. This is about 1/10th of the nominal maximum LED current, so they will be very dim.

I would recommend you use a transistor or MOSFET controlled by the teensy to provide power to the LEDs instead of powering from the Teensy.
Title: Re: 60% keyboard LEDs
Post by: libertycannon on Sun, 09 April 2017, 20:44:42
good luck
Title: Re: 60% keyboard LEDs
Post by: SectorOMEGA on Mon, 10 April 2017, 09:33:46
This will be quite tricky to solder but worth giving it a shot :) Meanwhile, the whole thing is done finally. Awaiting the Dolch keycaps so I can enjoy my first DIY one :
 



Title: Re: 60% keyboard LEDs
Post by: TalkingTree on Mon, 10 April 2017, 09:53:32
Haven't you considered using a premade PCB? Most of them support ISO and backlighting. It would be just a matter of soldering components.
Title: Re: 60% keyboard LEDs
Post by: SectorOMEGA on Mon, 10 April 2017, 10:12:44
This was totally new to me, so it was more likely giving it a shot to see if I'm capable of doing this :) but 100% my next one will be on PCB. The soldering was pain in the... :D Right now I'm after 60% wooden case making. I have tried to find 60% ISO supporting boards but no luck. I have found that more of the PCBs are ANSI which is not so comfortable to me. Also looking at making it wireless probably with adafruit
Title: Re: 60% keyboard LEDs
Post by: SectorOMEGA on Fri, 14 April 2017, 13:50:38
And finally, there it is :) My first 60%
Title: Re: 60% keyboard LEDs
Post by: TalkingTree on Fri, 14 April 2017, 14:52:56
Nice job. Congrats.
Title: Re: 60% keyboard LEDs
Post by: SectorOMEGA on Sun, 16 April 2017, 03:23:59
Thank you :) But now I have a strange issue or more likely a bug. The left alt and win key are flipped. tried to reflash the code, but nothing. Looking at the wiring nothing visible. Any ideas would be great :)
Title: Re: 60% keyboard LEDs
Post by: TalkingTree on Sun, 16 April 2017, 03:55:35
The left alt and win key are flipped.
Post your code.
Title: Re: 60% keyboard LEDs
Post by: SectorOMEGA on Sun, 16 April 2017, 04:28:28
I'm using the QMK firmware builder. The strangest thing is that it was working brilliant until today and it got flipped.When I flip the lalt and win key in the builder is working normally. So this makes me think its and hardware issue :( Really stange
Title: Re: 60% keyboard LEDs
Post by: TalkingTree on Sun, 16 April 2017, 12:52:39
When I flip the lalt and win key in the builder is working normally. So this makes me think its and hardware issue
Most likely. You should visually inspect the area.
Title: Re: 60% keyboard LEDs
Post by: a-c on Sun, 16 April 2017, 14:17:41
Probably bootmagic

https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch