LED Array for backlighting a DIY USB Media Keypad/Keyboard

Thread Starter


Joined Dec 9, 2017
Hi All,

I am working on making a DIY Media Keypad from a repurposed USB Keyboard. The idea behind this was to get multimedia keys functionality because my main typing (mechanical) keyboard does not have any Media buttons, which I am missing that were there in my older (membrane) keyboard. So, I am repurposing the older keyboard (just the input controller board) which had the multimedia keys.

This is an example of a Keyboard Input controller board I am referring to:
And I am trying to do something like this in the Youtube video but just for the media Keys.

My proficiency in electronics is low, but I still like to tinker around with stuff and do some small DIY projects, as it's one of my major hobbies.

I need your help with making a reliable LED array to have those media keys backlit.

I have already sourced some Cherry MX Blue Plate Mount switches, which have two holes to accept 3mm LEDs.
I have already got 3mm LEDs of 6 different colours. (I do not know the specifics of those but these are mostly generic ones, Link: 3mm LEDs from Amazon India)

I've come up with a layout for the keypad, and it looks like this:
This Layout has 4 groups that will be backlit with a specific colour:
  1. Media Playback (Red LED-backlit)
  2. Volume Control (Green LED-backlit)
  3. Quick launch Apps (Yellow LED-backlit)
  4. Power Control (Blue LED-backlit)

I have the following Design considerations:
  1. Number of LEDs: 14 pieces of 3mm LEDs (as there are 14 keys in the layout)
  2. Independent from Input PCB: I want to power this LED array independent of the Keyboard, that is, the PCB/Keyboard controller board will NOT power these LEDs. One reason behind this is a preventive measure, that is, if anything goes wrong with the LED part of the circuitry, the Input part can still function.
  3. USB Power Supply from a phone charger: As I mentioned about the power supply to the LED Array being different from the Controller board, another microUSB Female breakout board (Link: microUSB breakout from Amazon India) will be put to use, whose job will be just to power these LEDs. The power output specification is 5V 1.5A (It is a charging station, meant to charge multiple mobile phones at once, Link: USB Charging Station from Amazon India). I plan to use one of the USB outputs from this Charging station.
  4. Colour coded grouping: The LED colour grouping is done for visual differentiation and to make the keyboard look funky (I love colours, but RGB LEDs will be for a later project, as the current Cherry switches will work with only a single colour LED!).

I have been going through various forums and articles and have understood that I cannot simply connect these LEDs in parallel because one of them might current hog, and potentially kill the entire circuit, including the expensive charging station! Also, I have come to know that LEDs are not linear devices and need a certain starting/forward voltage (and forward current) to function. So, I'll have to connect them in series and parallel combinations.
Since the LEDs were ordered from Amazon and the seller didn't provide any more specs for them, I am referring to these links:
  1. https://www.gravitech.us/led3mmburgry.html
  2. https://www.make-it.ca/3mm-led-specifications/

I have also tried out LED Calculator to help me with creating a schematic of how the array should look like. But in my case, I want to use 4 different colours of LEDs and they have different Forward Voltages.

So, this is something I have come up with for the time being:
I was trying this on Tinkercad!

And, the schematic is as follows:
This is a compilation of various schematics from LED Calculator website.
I have also thought about this circuit:
And I am aware that the LEDs will not run at maximum brightness in this setup, as I've put same resistor values for all colours.

So, my questions are as follows:
  1. Will something like this work?
  2. Which circuit schematic among the above two would be a better option?
  3. Do I need to add any diodes in series with the switch shown in the Schematic for protection?
  4. Do I need some other components like boost converters to convert 5V to 9V or 12V and have the LEDs in series?
  5. Will this be safe to run on 5V 1.5A Power supply/charging station, as mentioned above?
  6. Can this run off of a usual laptop USB 2.0 port which, according to the spec, will supply 5V 0.5A?
    1. In Tinkercad (which is not the real world!) it shows that it is drawing 5V 0.162A, as shown here:
  7. I know many RGB and other backlit keyboards (sporting Cherry MX and other switches) may also run more than 100 3mm LEDs (for single colour backlighting) and SMD LEDs for RGB functionality with transparent key switches, so something like this (with better circuitry, of course, should work)

You may also suggest or point me to some other articles/forum posts if this is a duplicate question.
You may also add your circuits as well, which I can try out.

Thanks in advance!
Last edited:


Joined Jan 23, 2014
Resistors are dirt cheap, so might as well go with the solution that uses the fewest different resistor values, the second arrangement. You'll need to experiment to determine how to balance the perceived brightness of the different colours. Maximum brightness from a blue LED may be painfully bright.

If you expect to use this in varying lighting conditions (like at night in a dim room), a resistor could be switched in series with the +5V input (the value is up to you to determine, and it may need to be a higher power value. (Maybe you can just use several 1/4W resistors in parallel.)

USB power is nearly always very close to 5.0 volts, so no need to worry. Although, the more voltage that's dropped across the resistors (as in the second circuit), the more allowance there is for supply voltage variation.

Paralleling LEDs has been considered taboo forever, but in reality they have enough internal resistance that LEDs of the same colour usually can be paralleled, and indeed an infinite number of cheap white LED light sources do exactly that. However, I can testify that it's annoying to discover one of your paralleled LEDs is defective and you have to desolder most of them to find the bad one, so if I'm tempted to do that again, I'll take the time to test the LEDs first. Also, paralleled LEDs draw more current, so the series resistor needs a higher power rating (and probably costs more than a handful of 1/4 watt resistors).

Thread Starter


Joined Dec 9, 2017
Hello @bassbindevil
(and Hello to others who may have viewed the previous post)

I really really appreciate your response. Thanks a ton for it!
Sorry for a late response, I was looking into multiple things and ideas that you gave me to consider while making this project.

I was reading more about Kirchoff's Voltage Law and getting more clarity on Ohm's Law that will be primarily used to calculate the correct values of the resistors here and what affect they'll have on the entire circuit.

As, you suggested, I'll be sticking to the 2nd schematic that I mentioned in my previous post, because of it's reliability in a simple parallel LED circuit.

I was doing some more pen-and-paper calculations and have also done the same calculations on an excel sheet:
This made a lot of concepts clearer to me and, I feel, this interpretation makes a lot of results clear (at least in theory).
I'll be consuming 271.18mA current for the entire LED circuit from 5V (1.5A USB power) supply and the wattage of the entire Load is 1.356W.

Now, I really liked the idea of having the LEDs dimmable for use in darker rooms.
(This is also a reason why I didn't revert back sooner, as I was pondering about it!).

I was doing some more research regarding switching in a Resistor in series with the switch, and I thought of using a DPDT (on-off-on) switch (Like this one, Link: DPDT switch from Amazon India), where the following will be the positions of the switch:
  • 1st position will be for ON with Low brightness (current goes through the dimming resistors)
  • 2nd position will be OFF
  • 3rd position will be ON with High brightness (current does directly to the LEDs)
This wound not require me to have another switch in series, as it's job will be done by this DPDT switch itself.

But, then I thought about having a potentiometer with a proper power rating to do this job. Of course, I don't know how to wire it up, but it wouldn't be a big challenge. But this would give more granular dimming ability to the circuit. Regarding wiring it up, I am speculating that, 1st Leg would be hooked to +5V supply, common Leg (I think, the wiper) would go to the LEDs +5V input and 3rd Leg would go to -5V/Ground. Do correct me if I'm wrong.

Whichever Resistance-based method I use for dimming the LEDs, this is what I am trying to figure out. The way we calculated resistance values for the resistors that are in series with the parallel LEDs, will the same KVL principle apply here?
The Total Resistance of the entire circuit is 18.44 Ohms, as shown in the Table above (in the far right column). I am getting confused with the calculation of resistance of this dimming resistor. I am trying to apply KVL here. The voltage drop across the entire Load of the Parallel LED circuit is 5V. If I add any resistor of value less than 18.44 Ohms, the LEDs may still glow but with lesser brightness. But, if I add any resistor of value Greater than equal to 18.44 Ohms, I may completely turn-off the LEDs, right?

Now, If I want to have this dimming done using a Potentiometer as I suggested, I am not finding a suitable potentiometer with the resistance rating that will suit my need. Do I need to get one or more resistors with another suitable value and have it connected in parallel between 1 pair of the Legs of the potentiometer for it to result into the right resistance value of 18.44 Ohms?

Finally, this is regarding the dimming functionality again. I thought of creating a PWM Signal generator using a NE555 Timer, and have the brightness controlled by the output of that circuit. I really liked the idea of using PWM for higher loads, as it is less wasteful. But, I don't know if my Load is high enough to be efficient along with the PWM circuit.
However, I'd power the PWM pulse generator circuit with the same 5V (in parallel to the LEDs) and the output Pin of the NE555 Timer IC will be connected to a Transistor (2N2222, TIP122 or IRFZ44N MOSFET) as shown in many articles where they have created a PWN Motor controller. I thought of making one that can run off of 5V supply and just dim the LEDs by changing the Resistance using a Potentiometer knob. If I have to go this route, that is use PWM signal to dim the LEDs, then I'd need help in selecting a specific Transistor. Currently, I am more inclined to use TIP122 as it's suitable for higher current and wattage, but do let me know what all I should look out for in the Datasheets of these.

Hopefully my questions are clear.

Thanks again for your inputs!