Author Topic: LED Layer Indicator  (Read 1967 times)

0 Members and 1 Guest are viewing this topic.

Offline Rose

  • Thread Starter
  • Posts: 62
  • Location: Raleigh, NC
LED Layer Indicator
« on: Thu, 23 April 2015, 16:28:46 »
I'm putting together a 70ish% keyboard and I intend to use the TMK firmware.  I ordered these LEDs so I can install one under the Ecs key to indicate when a secondary layer is toggled.  I've been having a hard time finding resources about installing one such light.

Do I just connect one end of the LED to a Teensy pin and handle the rest of the setup in the firmware?  Are there other hardware considerations?  Will one of those lights be visible under a black key?  There are no other keys in front of the Ecs so I am guessing it will shine out pretty well.  I think I read in the TMK documentation that controlling the brightness is an option. If it's too dim I might try installing several under different keys to all light up at the same time.

Obviously, a layer indicator LED is nonessential but I think it'd be a nice feature if I can manage it.


Offline TLExile

  • Posts: 22
Re: LED Layer Indicator
« Reply #1 on: Thu, 23 April 2015, 16:56:24 »
I achieved what you're looking to do in the firmware, TMK last time i checked didn't have a very well defined way of implementing it. What i did in the firmware was every time i pushed my fn lock key (i had a single key that locked the function layer on) i also sent or disabled the power going to the pin for the led.

Worst part was running a wire from that pin to the LED with an inline resistor but it was fairly easy.


Offline Rose

  • Thread Starter
  • Posts: 62
  • Location: Raleigh, NC
Re: LED Layer Indicator
« Reply #2 on: Thu, 23 April 2015, 17:04:12 »
I achieved what you're looking to do in the firmware, TMK last time i checked didn't have a very well defined way of implementing it. What i did in the firmware was every time i pushed my fn lock key (i had a single key that locked the function layer on) i also sent or disabled the power going to the pin for the led.

Worst part was running a wire from that pin to the LED with an inline resistor but it was fairly easy.
Okay great.  This was what I was wondering about.  So it's not as simple as wiring one end of the LED directly to the teensy.  What kind of an inline resistor did you use? 

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: LED Layer Indicator
« Reply #3 on: Thu, 23 April 2015, 17:10:52 »
If you can get it firmware controlled (EasyAVR can do it) you would connect one end to the numbered pin and the other to ground.  You still need a resistor, you'll need to find a calculator to work out the value :)
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline Rose

  • Thread Starter
  • Posts: 62
  • Location: Raleigh, NC
Re: LED Layer Indicator
« Reply #4 on: Thu, 23 April 2015, 19:36:57 »
If you can get it firmware controlled (EasyAVR can do it) you would connect one end to the numbered pin and the other to ground.  You still need a resistor, you'll need to find a calculator to work out the value :)
Do you mean connect one end to the ground pin on the teensy?

I'm looking at resistor calculators.  How can I know what supply voltage (volts) and desired current (milliamps) to use? 

Offline jonlorusso

  • Posts: 27
Re: LED Layer Indicator
« Reply #5 on: Mon, 13 July 2015, 12:02:48 »
Hey Rose,

Old thread here, but I was wondering if you ever ended up getting this working?  I've got the hardware end worked out, but I'm not clear on where in tmk this should go.  I'm admittedly not very well versed on tmk, but my first guess would be somewhere in action.c?

Offline vvp

  • Posts: 887
Re: LED Layer Indicator
« Reply #6 on: Mon, 13 July 2015, 14:52:38 »
I'm looking at resistor calculators.  How can I know what supply voltage (volts) and desired current (milliamps) to use?
https://geekhack.org/index.php?topic=22780.msg1573544#msg1573544