Electronic – LED resistor calculation with variable voltage

ledresistors

I apologize as the original question was not accurate. I have updated the question.

My main goal is to design a polarity tester for battery packs. It will be used for multiple ranges of batteries to test their polarity. So the battery's voltage starting from 3.5 volts to 60 volts with different output current. The schematic below shows the exact diagram and PCB I made with Fusion 360.

I want to calculate the value of the resistor. The LED forward voltage is 2.5 volt, and the current of LED is 130 mA. 2.25 V Red LED 5mm Through Hole, Kingbright L-53HD.

The power source is variable from 3.5 volts to 60 volts with the variable unknown current. So, each time I connect the circuit to any voltage from 3.5-60 volts one of the LEDs will turn on. The problem is that as the source voltage is variable what type of resistor I need to resist the variable voltage so the LED does not burn.

I used 4 diodes, to block and allow the current for two LEDs, from one side one LED with green colour will light up and it will show that the polarity is correct. If the polarity is wrong then the red LED will light up.

I used U1 as a Bourns 1kΩ Thick Film SMD Resistor ±1% 25W – PWR163S-25-1001F for dropping the voltage. I know this might not be suitable but as the problem, I have with different voltage I thought this might work.

The power for the circuit will be taken from the battery packs and there will no external power supply for the circuit board.

On circuit "JP3" and "JP4" are circuit power input, JP1 and JP2 are LEDs.

enter image description here

Best Answer

The maximum current for the LED in the datasheet you provided is 25mA (130mA is a peak current).

The LEDs also have a diode in series, so 3.5V will allow for very little current on a green LED. Let's assume 2V for each LED.

At 60V the current must be < 25mA (let's use 20mA so as not to be too close), so R = 57.3/0.02 = 2.9K. The dissipation will be 1.13W, a bit high for a 1W resistor, so let's use 3.3K.

So the current with 60V in will be about 57.3V/3.3K = 17.4mA.

With 3.5V in, you'll have 0.8V/3.3K = 240uA (probably a bit more because the drops will be a bit lower).

240uA is not a whole lot of current but it may be acceptable with bright LEDs.

You can get a bit more current at the low end by replacing the diodes with Schottky diodes. Because your eyes respond logarithmically, the visual brightness difference will not be 70:1 as the current ratio, but it will be substantial. Only you can decide if it's acceptable.

Anything that is going to give you a more constant current will involve more parts, however since you're really going for a much lower current than originally stated, it will be simpler.

By the way, it would be better to use one resistor and have the two LEDs back-to-back:

schematic

simulate this circuit – Schematic created using CircuitLab

That increases the current at 3.5V to 450uA, about double, with fewer parts.