I'm currently in the early stages of creating my very first custom keyboard and I just had a couple questions on how the hardware aspect of it works especially with backlighting. I have researched for a couple hours (I'm pretty much electrically illiterate) and so far the most feasible thing I saw was to have a transistor connected to an external power supply that could provide the amperage and voltage I need. The question comes from how I would get this external power supply. How do I get this greater power supply just from the USB that will connect to the arduino anyways? Or am I just hallucinating from staying up too long?
thenoobyspartan: Or am I just hallucinating from staying up too long?
Suspect that may be the case. :roll_eyes:
You have a modest amount of power available from the USB port; let's say 500 mA.
Let's be more conservative, and restrict ourselves to 100 mA for the lighting. The keyboard electronics should take less than 100 mA. Current white SMD LEDs are very efficient; if you allow 5 mA each, you could operate twenty from the 5 V USB supply, with an individual series resistor for each (470 Ohm presuming the LEDs operate at about 3 V).
The trick is to arrange some "light pipes" around the keys so that one LED illuminates the surrounds to 4 or 5 keys and each key is receiving illumination from at least two LEDs on different sides.
So lets say that I want to try for the while shebang, 108 LEDs to light up each individual key, like on commercial keyboards. How would I go about that? I thought LEDs operated best around the 16-18 mA range? I'm just trying to figure it out since obviously commercial products can do it without much hassle :P
I very much doubt that commercial keyboards would use a LED for each individual key.
Huh? I mean like backlighting like on mechanical keyboards such as the Corsair k70 and the Razer Blackwidow Ultimates. They all have a 3mm LED for each key, around 100 of them. I'm just wondering how they managed to supply power to it.
Presumably from the USB port.
What do their specs say?
Hi, you should get one 3mm led, a 1K pot and a multimeter. Then you can experiment to find how much current you will need per key. Its probably less than you think.
So unfortunately, I don't own those tools, but I do have a bunch of resistors that I tested out different amperages with. So, with a 1k Ohm resistor, it seems I can get the LED to light up about as bright as the dimmest setting on my backlit keyboard. I'm sure I can get it to work within the 20mA range on the VCC pin, but if not, I could always use an additional I/O pin to have it work.
thenoobyspartan: So unfortunately, I don't own those tools
So, you would own them if you paid for them.
I could and should but right now, I have neither the job nor the permission as I am a minor who just has an interest in how things work.
A basic multimeter will cost less than £10, and components like leds and pots cost pennies. Have you posted your letter to Santa yet?
No need to treat me like I'm a two-year-old drooling over the carpet. LEDs wouldn't be a problem if I didn't live where I do, where the only decent place to get electrical components are online where shipping costs more than the actual product.