I’d like to swap the LED’s and am wondering if someone can school me on the proper way to calculate the LED resistor values for R2-R9. I could just wing it with a 1k value and see what happens, but I’d really like to understand what I’m doing / how this works.

As I understand it, I need to calculate the following values to determine the current limiting resistor value:

(Vs-Vf) / i = R

i = LED forward current in Amps = (20mA)
Vf = LED forward voltage drop in Volts = (3.2V)
Vs = supply voltage = ??

Is the supply voltage completely dependent upon the particular transformer used, and something that should ideally be measured with the multimeter - or - is this a known value that I can plan for beforehand? If the former, from where should it be measured?

Any help / advice on the topic is greatly appreciated. I want to do this right, and I want to learn as much as possible from this incredible community in the process.

Vs = 5V
Everything on the shruthi control board is running on 5V.
Once you have the value you can experiment a bit with the value. You can make it as high as you want to make them less bright. But not too much lower or you will burn your leds

Got it. Thank you so much for clarifying, @shiftr.

So plugging my numbers into the magical equation gives me…

i = LED forward current in Amps = (20mA)
Vf = LED forward voltage drop in Volts = (3.2V)
Vs = supply voltage = (5V)

(Vs-Vf) / i = R

(5V - 3.2V) / 0.02A = 90 Ohms

Sounds like 90 Ohms is the number I was looking for. Considering these are blue LEDs (which I understand can emit significantly more light than other colors), I will start with a 1k Ohm resistor and if it is too dim I can iteratively swap out the resistor with lesser values, not to go below say 100 Ohms to avoid burning out the LED.

I feel dangerous now. Lookout electrons, you’re about to get owned…

I am sorry to rain on your parade but this is not how you should do it and you are going to burn your eyes.

What you are missing is that there is not a single (i, Vf) pair at which the LED can operate. The (i, Vf) pairs published on digikey are the ones providing the maximum brightness for the LED, which is, here, 750 mcd.

So your calculations are not wrong if your goal is to maximize retina damage.

Let’s start again. First, you have to decide at which luminosity you want the LED to operate. 10 to 20 mcd are reasonable values.

Then, you have to use the curve giving the luminosity in mcd as a function as the operating current in mA, to figure out how much current must flow through the LED. Usually, this is linear, so if you don’t have the datasheet at hand, you can use proportionality. Here, it looks like the LED would only need to receive 0.5mA to provide a decent brightness of 20mcd.

Then, you have to look up what would be the operating voltage for this current. It’s a curve published in the datasheet, too! You can think of it this way: the LED responds to current by a voltage across its terminals and some light emission. There’s no “right answer” as to what this current is. Different current, different consequences in terms of voltage and brightness! So look for this curve (unfortunately missing in the ahem ‘datasheet’ of your product) to figure out that at 0.5mA, the voltage drop is only 1.7V for example.

Yes, the 74hc595 which drives the LEDs can source 20mA at most per pin, and 70mA at most over all pins (so no more than 3 LEDs lit up at once). At this scale, 20mA is a lot of current - that’s enough for a complete VCF/VCA circuit.

I figured I would screw up the calculations so I hooked up a little test board with a 6V power supply figuring that was close enough to what the LEDs would see from a Shruthi. For pink, blue, green and orange, a 3.9k resistor seemed to work fine. For red and yellow, 1.3k and for UV, 360ohms. You could easily go a bit less if you wanted to, they’re still fairly bright.

Well, of course it couldn’t be that easy… Crispy eyes = bad. 20mcd luminosity is my goal.

This DigiKey data sheet is useless. I’m trying to follow the proportional extrapolations you did based on the minimal data we have from the spec. Please bear with me.

It appears you divided the maximum mcd value of this particular LED (750mcd) by the desired mcd value we want in the end (20mcd). Is that correct? You then used this result (37.5) as the factor to divide the forward current (20mA) as stated for the maximum luminosity. This makes sense to me.

((750mcd / 20mcd) / 0.02A) = 0.0005A

Hopefully I’m tracking so far.

Can you elaborate a little more on how you arrived at a voltage drop value of 1.7V? We can’t use Ohm’s Law to get this as we have no resistance value to multiply our extrapolated current value against, correct?

I looked at the datasheet of a Kingbright LED which had roughly similar characteristics and found the curve there. I buy all my LEDs from Kingbright because I know I can rely on their datasheets.

This is a more reasonable 40mcd (max) rated LED. If I plan for a 20mcd luminous intensity (0.5%), for example, this would require a forward current of 10ma and a forward voltage of around 3.7v, based on my interpretation of the datasheet graphs:

20mcd luminosity - (5V – 3.7V) / 0.01A = 130 Ohms (min) R value
Or…
10mcd luminosity - (5V - 3.6V) / 0.005A = 280 Ohms (min) R value

I’ll lay this out on the breadboard and tweak the resistor value up from this range to arrive at the desired end brightness.

Thank you for taking the time to explain this, guys. I really appreciate it. It is nice to understand what exactly is going on, as opposed to just making guesses and hoping for the best.

This is good information…I used an online resistor calculator and its suggestion was way too small. I used a 1k for a blue LED and almost died at how bright it still was.

Agreed. The common answer on this topic is often a simple “use a 1k resistor or larger”, but as you allude to, depending on the specific LED you choose, individual results can vary considerably.

I know this is Electronics 101 for the more experienced souls here, and I was hesitant to start yet another “I want blue LEDs” discussion, but this thread IMO captures some valuable details on the “how” and “why” not clearly detailed elsewhere.

When all is said and done, I could very well end up using 1k resistors; but to independently understand how a given value was arrived at and to be able to make informed choices while sourcing components is the cat’s pajamas.