Author Topic: making LED light bar from leftover keyboard switches  (Read 1543 times)

0 Members and 1 Guest are viewing this topic.

Offline berserkfan

  • Thread Starter
  • Posts: 2135
  • Location: Not CONUS Not CONUS Not CONUS Not CONUS
  • changing diapers is more fun than model f assembly
making LED light bar from leftover keyboard switches
« on: Mon, 22 September 2014, 13:46:04 »
I have gotten interested in creating my own LED light bar.

Reading online, it seems I can get a plastic strip, stick all LEDs to it, then wire them up a bit like Lowpoly’s keyboard matrix (positive to positive, negative to negative), then the last positive and the last negative to the power source.

However I am still not sure how to power this LED strip. Am I limited by the number of LEDs? Let’s assume I want to create a strip near the floor for night lighting purposes. Singapore has power 220V. I can use 100 220v leds right? And I will presumably need some kind of converter for AC DC? How does that work? I have limited power sockets at home and don’t want too many extra ac/dc power supply cables lying around for children to grab.

What about constructing a switch? I read that you only need single pole single throw switches, which should mean Cherry MX right? Any chance of being able to construct two or three places in the circuit (corresponding to different parts of the house) where I can install switches?

Another thing is, if all LEDs are 3.3v or 2.2v, does that mean I can use different colors on the same LED strip?

Are resistors needed? I don’t understand why keyboards use resistors, but none of the LED strips I read about online use resistors.

Does this work for slow blink LEDs that change color on their own?
Most of the modding can be done on your own once you break through the psychological barriers.

Offline Melvang

  • Exquisite Lord of Bumfluff
  • * Maker
  • Posts: 4398
  • Location: Waterloo, IA
  • Melvang's Desktop Customs
Re: making LED light bar from leftover keyboard switches
« Reply #1 on: Mon, 22 September 2014, 14:42:28 »
The reason they dont' need resistors is because they are wired up either in parallel or in a combination of parallel and series.  With 10 LED's wired up in series that are say 3 volts and 20 mAmps you would need to supply 3 volts with 200mAmps for full brightness and no resistors.  If you wired them up in parallel you would need 30 volts with 20 mAmps.  Or you could do a combination and have 10 groups of 10 with each LED in a group wired in parallel and have the groups wired in series and you would need 30 volts at 200 mAmps.

Someone correct me if I am wrong but I believe this is the basics. 

Essentially they are loading the power circuit enough to where the voltage nor the current needs to be regulated.  With a keyboard it does need to be.  They reason you need it with full backlighting (even though you have way more than what a USB plug can supply) is because of the driver circuit.  The circuit essentially turns LED's on and off very fast so that the load is ok for the USB plug to handle but doesn't fry anything.
OG Kishsaver, Razer Orbweaver clears and reds with blue LEDs, and Razer Naga Epic.   "Great minds crawl in the same sewer"  Uncle Rich

Offline dorkvader

  • Posts: 6288
  • Location: Boston area
  • all about the "hack" in "geekhack"
Re: making LED light bar from leftover keyboard switches
« Reply #2 on: Tue, 23 September 2014, 00:07:08 »
problem with leds in parallel with only one resistor is that if one fails, then more current goes to the others in the parellel row. You can have a cascade effect if you're not careful.

This is less of an issue if you are operating under the maximum current rating of the LEDs.

LEDs usually fail open (instead of short) so if you have some in series off of one resistor (this is how TG3 does it with the BL82) then if one LED fails then the other will go dark too.

having one resistor per LED prevents these issues but is harder to wire and more expensive.

I recommend reading up on semiconductor theory to better understand LEDs as (relatively) constant voltage devices.

So if you have the same voltage provided as the LED needs then you are OK. If you have less, the LED will want to pull up the PSU to it's voltage drop, one of 2 things will happen. 1: led will be dimmer. 2: LED will not turn on at all. This is dependant on the PSU in question.

If voltage is higher than LED, then LED will flow LOTS of current, as the resistance is the wires and the ESR of the PSU are usually quite low. This most often results in a blown LED.

If you have a resistor, it will drop some of the voltage from the PSU, limiting the current the LED will pull. The resistor value will determine the current, as the LED sets the voltage drop (voltage drop across led is constant (or close to it: Just hedging my post here against any pedants reading it) the resistor will drop the difference in voltage between the Vf of the LED and the supply voltage, setting the current via ohms law (it's actually a little more complex, but I'm being simple with the explanation for understanding.)

So a coin cell with 3.2V will drive a 3.5V white LED quite well. A 1.5V red LED might draw too much current and fail, but coin cells usually can't deliver enough to kill it and the current limiting inherent in it will keep it safe.

also, driving LEDs in parallel only works if they are the same Vf, otherwise one will take more current and burn out and the rest won't light up at all and then they will burn out due to overcurrent after the first one does. If you plan to do this , I recommend hand matching them. resistor is a safety feature here.
---
What this means: usually you get an LED driver for your supply voltage. There are ones for mains or for batteries. There are ones that are set to output to a string of LEDs in series, or a lot of them in parallel. there are ones with different brightness levels available, ones that do brightness via PWM or current limiting control. Lots of options.
The reason they dont' need resistors is because they are wired up either in parallel or in a combination of parallel and series.  With 10 LED's wired up in series that are say 3 volts and 20 mAmps you would need to supply 3 volts with 200mAmps for full brightness and no resistors.  If you wired them up in parallel you would need 30 volts with 20 mAmps.  Or you could do a combination and have 10 groups of 10 with each LED in a group wired in parallel and have the groups wired in series and you would need 30 volts at 200 mAmps.
You have series and parallel mixed up but this is otherwise mostly correct.

the series / parallel combination will take less current than the parallel and less voltage than in series, depending on how it's configured.
Are resistors needed? I don’t understand why keyboards use resistors, but none of the LED strips I read about online use resistors.

you can just supply AC mains to a string of LEDs, but it'll flicker at your mains frequency, and if one fails the whole section will go out.

anyway, the simple answer to why kbs have led resistors for current limiting is that kbs are low voltage.

Look at the techkeys businesscard: bunch of LEDs and no resistors: this is because it's driving them from LED driver chips in a very specific way (that is almost certainly more expensive than just using a bunch of extremely cheap resistors)
« Last Edit: Tue, 23 September 2014, 00:14:25 by dorkvader »