Author Topic: Custom Backlit board. Need help with leds.  (Read 3186 times)

0 Members and 1 Guest are viewing this topic.

Offline Tomliginyu

  • Thread Starter
  • Posts: 3
Custom Backlit board. Need help with leds.
« on: Mon, 09 January 2017, 20:44:51 »
Hi guys,

I could use some help. I'm building a custom keyboard (sandwhich case, no pcb) with a Teensy++ 2.0. I have 68 switches and would like to add leds but am having trouble calculating (or finding info about) what the Teensy puts out. I would like to add 68 blue/purple leds attached to the pwm pins in groups of 17 in parallel. Can anybody help me with resistors or give me info on what kind of power I can expect from the Teensy?

Thanks!

Offline a-c

  • Posts: 196
  • Location: USA
Re: Custom Backlit board. Need help with leds.
« Reply #1 on: Mon, 09 January 2017, 22:16:39 »
From the datasheet, Chapter 31, page 390.
http://www.atmel.com/images/doc7593.pdf

40mA max per pin. 200mA max total for entire device. It is not practical to power that many LEDs directly from the Teensy++.

You will need to build a driver circuit controlled by the PWM pins. Google "arduino high current output" for lots of ways to do this.

Offline Tomliginyu

  • Thread Starter
  • Posts: 3
Re: Custom Backlit board. Need help with leds.
« Reply #2 on: Mon, 09 January 2017, 22:34:20 »
Thanks the info.
Could I potentially take a jumper wire off the USB power to do this? I ask because I added leds to my magicforce this way using 1k resistors.

Offline a-c

  • Posts: 196
  • Location: USA
Re: Custom Backlit board. Need help with leds.
« Reply #3 on: Mon, 09 January 2017, 23:10:48 »
Is this where the LEDs are always on? You could do that. Your current limit will be the 500mA that you can draw from the USB port.

Offline kolec94

  • Posts: 111
Re: Custom Backlit board. Need help with leds.
« Reply #4 on: Tue, 10 January 2017, 00:19:52 »
best option would be a led control circuit connected to the teensy

kbparadise v60 blues


Offline Tomliginyu

  • Thread Starter
  • Posts: 3
Re: Custom Backlit board. Need help with leds.
« Reply #6 on: Tue, 10 January 2017, 10:46:51 »
Kolec,

How do I go about using a "led control circuit connected to the teensy"?

VVP,

How do I go about attaching a led driver to the teensy?

Sorry if I sound terrible, but I don't have a whole bunch of experience with IC items. My lack of understanding makes googling a little* overwhelming.
« Last Edit: Tue, 10 January 2017, 10:49:13 by Tomliginyu »

Offline kolec94

  • Posts: 111
Re: Custom Backlit board. Need help with leds.
« Reply #7 on: Tue, 10 January 2017, 22:13:34 »
i would use a tlc5940 led driver
https://www.pjrc.com/teensy/td_libs_Tlc5940.html
« Last Edit: Wed, 11 January 2017, 08:25:59 by kolec94 »

kbparadise v60 blues

Offline vvp

  • Posts: 886
Re: Custom Backlit board. Need help with leds.
« Reply #8 on: Wed, 11 January 2017, 11:39:12 »
I do not have schematic on my hands. If you cannot figure it out form the data sheets then go with the kolec94 proposal.
Anyway the significant difference between drivers is how you intend to use them.

If you want to dedicate one led driver output per each led then kolec94 proposal is better. But for a keyboard with N backlit keys you need floor((N+15)/16) led drivers: e.g. for 80 key keyboard you need 5 led drivers.

If you want to put the leds into a matrix (and possibly also merge one side of the matrix with the key scanning)* then my proposal is better: e.g. for a 80 key keyboard you would need one or two led drivers (depends whether your matrix will be 8x10 or 2x8x5).

(*) https://geekhack.org/index.php?topic=48851.msg2321035#msg2321035

Offline kolec94

  • Posts: 111
Re: Custom Backlit board. Need help with leds.
« Reply #9 on: Thu, 12 January 2017, 08:55:03 »
I do not have schematic on my hands. If you cannot figure it out form the data sheets then go with the kolec94 proposal.
Anyway the significant difference between drivers is how you intend to use them.

If you want to dedicate one led driver output per each led then kolec94 proposal is better. But for a keyboard with N backlit keys you need floor((N+15)/16) led drivers: e.g. for 80 key keyboard you need 5 led drivers.

If you want to put the leds into a matrix (and possibly also merge one side of the matrix with the key scanning)* then my proposal is better: e.g. for a 80 key keyboard you would need one or two led drivers (depends whether your matrix will be 8x10 or 2x8x5).

(*) https://geekhack.org/index.php?topic=48851.msg2321035#msg2321035
you can do more leds if you multiplex them or go with a tlc5958 i think

kbparadise v60 blues

Offline Data

  • Posts: 2608
  • Location: Orlando, FL
Re: Custom Backlit board. Need help with leds.
« Reply #10 on: Thu, 12 January 2017, 09:13:37 »
Something like this maybe?

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


Offline vvp

  • Posts: 886
Re: Custom Backlit board. Need help with leds.
« Reply #11 on: Thu, 12 January 2017, 17:15:44 »
you can do more leds if you multiplex them or go with a tlc5958 i think
Correct. But that means you are updating brightness data (192 bit per row) with each multiplex switch. You can update them for each key (128 bit per row) and use a cheaper LED driver.