Author Topic: Power consumption of LED backlighting?  (Read 5064 times)

0 Members and 1 Guest are viewing this topic.

Offline blueangel2323

  • Thread Starter
  • Posts: 82
  • Location: Toronto
Power consumption of LED backlighting?
« on: Sun, 27 September 2015, 20:01:40 »
Does anyone know how much power your typical white or blue LEDs consume? I can build a wireless keyboard powered by 2x AA batteries, but I'm worried that battery life would be really crappy if I added LED backlighting. I'm thinking of getting a USB controller instead for this reason. Is this a valid concern? Or would 2x AA's be able to power a backlit keyboard for months on end?

Offline njbair

  • Posts: 2825
  • Location: Cleveland, Ohio
  • I love the Powerglove. It's so bad.
    • nickbair.net
Re: Power consumption of LED backlighting?
« Reply #1 on: Sun, 27 September 2015, 20:10:22 »
Does anyone know how much power your typical white or blue LEDs consume? I can build a wireless keyboard powered by 2x AA batteries, but I'm worried that battery life would be really crappy if I added LED backlighting. I'm thinking of getting a USB controller instead for this reason. Is this a valid concern? Or would 2x AA's be able to power a backlit keyboard for months on end?
I don't have numbers for you, although the seller should provide wattage specs for LEDs. That said, it's not realistic to expect both LEDs and wireless on the same board.

It would take some doing, but a cool idea would be a board that can do USB or Bluetooth, and backlighting could be configured based on the power source.

As a side note, if you're building a board from scratch, why not use LiPo instead of AA?

Alpine Winter GB | My Personal TMK Firmware Repo
IBM Rubber Band "Floss" Mod | Click Modding Alps 101 | Flame-Polishing Cherry MX Stems
Review: hasu's USB to USB converter
My boards:
More
AEKII 60% | Alps64 HHKB | Ducky Shine 3, MX Blues | IBM Model M #1391401, Nov. 1990 | IBM SSK #1391472, Nov. 1987, screw modded, rubber-band modded | Noppoo EC108-Pro, 45g | Infinity 60% v2 Hacker, Matias Quiet Pros | Infinity 60% v2 Standard, MX Browns | Cherry G80-1800LPCEU-2, MX Blacks | Cherry G80-1813 (Dolch), MX Blues | Unicomp M-122, ANSI-modded | Unicomp M-122 (Unsaver mod in progress) | 2x Unitek K-258, White Alps | Apple boards (IIGS, AEKII) | Varmilo VA87MR, Gateron Blacks | Filco Zero TKL, Fukka White Alps | Planck, Gateron Browns | Monarch, click-modded Cream Alps

Offline blueangel2323

  • Thread Starter
  • Posts: 82
  • Location: Toronto
Re: Power consumption of LED backlighting?
« Reply #2 on: Sun, 27 September 2015, 22:06:50 »
Does anyone know how much power your typical white or blue LEDs consume? I can build a wireless keyboard powered by 2x AA batteries, but I'm worried that battery life would be really crappy if I added LED backlighting. I'm thinking of getting a USB controller instead for this reason. Is this a valid concern? Or would 2x AA's be able to power a backlit keyboard for months on end?
I don't have numbers for you, although the seller should provide wattage specs for LEDs. That said, it's not realistic to expect both LEDs and wireless on the same board.

It would take some doing, but a cool idea would be a board that can do USB or Bluetooth, and backlighting could be configured based on the power source.

As a side note, if you're building a board from scratch, why not use LiPo instead of AA?
Are there specific types of LEDS that are commonly used for keyboards?
AA because I want to re-use the controller from an existing rubber dome keyboard I have instead of having to buy one and programming it from scratch. Also I already have AA/AAA chargers and lots of rechargeable AA batteries so I don't need to buy a special battery specifically for the keyboard.

Offline twiddle

  • Posts: 165
    • Portfolio
Re: Power consumption of LED backlighting?
« Reply #3 on: Sun, 27 September 2015, 22:22:25 »
Standard through-hole LEDs in blue or white consume about 20-30mA typically. Sometimes you can run them at significantly less current, but it will depend on the product in question so you'd have to check first.
I would consider looking into alternatives for your battery - standard AA batteries don't provide enough voltage for running a kb controller (typically 3.3v) meaning that you would have to add additional circuitry so that you can boost it. Even standard Lipos require extra circuitry to regulate down to 3.3 when the battery starts, and then boost back up as it drops past 3.3 towards 3v.
I don't know a lot about them but the newer lithium chemistries like LiFePO4 are supposed to be much better for providing around the right voltage for the majority of the battery's life. Might be worth a look?

As far as repurposing an existing controller you would have to re-wire it *exactly* to the same pins in the same order, just bear that in mind. Would probably be easier to just grab a teensy and burn existing firmware onto it, you still wouldn't need to program it that way.

Offline vvp

  • Posts: 887
Re: Power consumption of LED backlighting?
« Reply #4 on: Mon, 28 September 2015, 05:23:53 »
Select the low current LEDs with high efficiency, i.e. the ones which give you at least 1 cd at 20 mA. Add resistor so that you are below that maximum current. I set my LEDs to current in the ragne 10 - 14 mA. They are insanely bright at this current. I drive them with PWM to adjust the brightness. E.g. my 2.2 cd LED at 20 mA is actually run at about 10 mA and I use 0x01C0/0x10000 duty cycle for it ... i.e. the effective current is about 68 ľA.

If you use 3.3V controller and blue/green LEDs (these have forward voltage of about 3V - check the precise value in the LED specification) then you may be able to drive the LED directly from your output pin (depending on the IO pin output voltage vs. source current characteristics - check it out in the controller specification). This allows you to leave out the resistor and therefore save some power.

Offline blueangel2323

  • Thread Starter
  • Posts: 82
  • Location: Toronto
Re: Power consumption of LED backlighting?
« Reply #5 on: Mon, 28 September 2015, 13:02:32 »
Isn't USB 2.0 limited to 500 mA? If your LEDs run at 10 mA each, and assuming the controller itself draws 100 mA, then that only allows for 40 LEDs. How does that allow for having an LED at every switch? Or am I missing something? Sorry, I'm not very well-versed in electrical theory.

And I'm assuming that the LEDs have to wired in parallel, because 5 V will only power one or two LEDs wired in series.

Offline twiddle

  • Posts: 165
    • Portfolio
Re: Power consumption of LED backlighting?
« Reply #6 on: Mon, 28 September 2015, 13:45:32 »
Isn't USB 2.0 limited to 500 mA? If your LEDs run at 10 mA each, and assuming the controller itself draws 100 mA, then that only allows for 40 LEDs. How does that allow for having an LED at every switch? Or am I missing something? Sorry, I'm not very well-versed in electrical theory.

And I'm assuming that the LEDs have to wired in parallel, because 5 V will only power one or two LEDs wired in series.
The trick is that you use PWM (ie a square wave) so that you aren't running all the LEDs at full power. As vvp says, you can keep the effective current down low via this method.

Offline vvp

  • Posts: 887
Re: Power consumption of LED backlighting?
« Reply #7 on: Tue, 29 September 2015, 08:49:23 »
Yes the LEDs should be connected in parallel to each other.
And yep, you should prefer PWM (despite the fact that it is more complicated from the software point of view) for few reasons:
  • it allows you to control brightness of blocks of LEDS from software
  • it even allows you to control brightness of each LED separately if you connect it wisely (i.e. into a matrix or (less wise for a lot of LEDs) each diode at a separate port)
  • if you have only few green/blue LEDs and power each one from a separate port of a 3.3V controller then it is a high chance you do not need resistors (useful for simple status LEDs (caps/scroll/num))

Capacitors will take care of averaging the transient currents to a lower average value at the USB input but you still should use different phase shifts for different blocks of LEDs. This way you can always stay below 500 mA (even with the spikes). Also use high frequency, if possible (enough timers/cpu resources).

From power consumption point of view it does not make much difference whether you go PWM or simple resistor. Depends where you are located in the LED voltage-current chart.

If you go for a dedicated LED driver chip then you must select LEDs based the driver specs. But it is still good to find as efficient ones as possible (highest luminous intensity per 1 mA).

Though full keyboard USB backlight (all 105 keys) for a battery powered keyboard sounds like something for a masochist. Maybe you can go only for a few LEDs and a light guide/spreader.

Offline Findecanor

  • Posts: 5042
  • Location: Koriko
Re: Power consumption of LED backlighting?
« Reply #8 on: Tue, 29 September 2015, 11:21:00 »
More specifically, LEDs for backlighting are usually in a matrix (similar to a keyboard matrix) with only one logical row lit at once and cycling really fast. The resistors in a LED matrix are sometimes not one-per-LED but one per column.

Lots of people have made LED matrices with Arduino, so there are quite a few schematics out there that you could take inspiration from. Arduino boards use AVR microcontrollers, the same family as in the Teensy 2.0 and Teensy++ 2.0.
« Last Edit: Tue, 29 September 2015, 11:56:58 by Findecanor »
🍉