0
\$\begingroup\$

I am using a 3.7V (18650) battery, but its fully charged voltage is 3.85V.

When calculating a resister for an LED circuit, do I use the battery's voltage rating (3.7V) or the fully charged voltage (3.85V)?

\$\endgroup\$
  • \$\begingroup\$ Use 3.85V so you know the LED won't be damaged when the battery is fully charged. The LED will get dimmer as the battery dies though. You can look into constant current drivers to avoid this. \$\endgroup\$ – ACD Dec 10 '14 at 21:06
  • \$\begingroup\$ Thanks, that makes sense. The LED is rated at 3-3.4v. What is best practice to when calculating a resister, to use the lower rating or is it ok to use the higher? I want the led as bright as possible. \$\endgroup\$ – Jason Dec 10 '14 at 21:33
  • \$\begingroup\$ You need to look at the datasheet and find out its max current. Then use ohm's law, and the LED's voltage at that current to calculate the resistor value. \$\endgroup\$ – ACD Dec 10 '14 at 21:34
  • \$\begingroup\$ In general, you need to design your circuits so that they meet their performance requirements even though voltages, currents and component values vary over certain ranges. Obviously, your LED needs to work over a range of voltages coming from the battery, from fully charged to almost completely depleted. It also needs to work over the full range of the resistor tolerance and the full range of possible forward voltage values of the LED(s). \$\endgroup\$ – Dave Tweed Dec 10 '14 at 23:05
1
\$\begingroup\$

LEDs are not really "rated" to a certain voltage, they are rated to a certain current, and their forward voltage will depend on forward current. You need to limit current through them based on the max ratings. Keep in mind, the max ratings sometimes don't mention that you need additional heat sinking to actually operate properly at those currents on some of the higher power LEDs.

If the LED is rated to 20mA, do not think it's safe to just look at (3.85Vmax - 3.4Vf - 0.55V) and use ohm's law to get 27.5 Ohms and put a resistor in of that exact value. Resistors often have "tolerances" that are ~5% unless you get fancy ones which cost more (in small runs it's not so bad, but production volume this is important). The tolerances mean you may actually be over the rating and over-stressing/heating the component without realizing it. Always be conservative, so for this case I'd go with 33Ohms 5% resistor. This means it could be between 31 and 35 Ohms in reality. This is still safe enough for the LED but will be around 16mA. Because LEDs give off light in a non-linear fashion, and because the human eye also perceives light intensity in a non-linear fashion, you will not really notice the difference between the 20mA and 16mA currents. There will be a larger and more noticeable difference between 20mA and 10mA though.

EDIT2: The current rating for LEDs is continuous - as in, forever. If you over-current pulse them most can handle very high currents for a short duration (in the microsecond range, maybe tens of millisecond range) and I have done this myself in my Strobe light project. If your LEDs are not used often, but you want a bright pulse, you can over-current them. In this case you usually use FETs and other switching mechanisms to turn them on/off for a short time, and a low value resistor is used for the pulse current limiting.

EDIT: One final tip, is LEDs work best with constant current. For lower currents like 15,20mA you can get really cool 2-pin package JFETs (with integrated resistor) with their gate tied to the source pin which self-limits and can work with usually quite different voltage supplies. They can be found in very small surface mount packages, and will give constant current basically until the forward voltage is met from the battery being drained. You can read more about them from this Vishay app note.

\$\endgroup\$
0
\$\begingroup\$

First of all, isn't it 4.2V when fully charged?

Second of all, this is a poor way to drive an LED. There is likely to be a noticeable change in brightness as the battery drains, and if the load current is variable, the LED will appear to pulse as the load current changes, especially as the battery gets lower.

If you have at least one regulated voltage on the board, you can drive the LED with a much more consistent current using one transistor and three resistors. Depending on the diode forward voltage, this might provide constant current all the way down to 3V, and even if it does start to drop off, it will still provide more current at low battery than a simple current limiting resistor design.

schematic

simulate this circuit – Schematic created using CircuitLab V1 could be an IO pin from a processor or something. When it is off, the LED will be off, too. R1 and R2 are a voltage divider keeping the base of Q1 at around 1.2V. R3 will therefore always have around 0.6V on it (simulate or build and test to get a more accurate number, but this is ballpark). So the current through D1 will be be approximately 0.6/R3. I tried to set it for around 20 mA, but you can adjust R3 as needed. This circuit can be used in mass production as long as you are not designing a NIST traceable illumination source or something. The voltages I quote above may not be exactly accurate, but whatever the voltage is, it will be reasonably consistent from unit to unit.

If you don't have a regulated voltage suitable for creating a stable voltage divider for the base of Q1, you can use a current source with two diodes and a transistor (and a few resistors).

schematic

simulate this circuit

I haven't actually used this in a production design, but I think it will work OK. It is a common way to get a relatively constant current when there is no regulated voltage available. The voltage across D1 and D2 will be around 1.2V, and won't change much over the useable battery range. Rest of the circuit is the same as the first one.

\$\endgroup\$
  • \$\begingroup\$ I didn't notice at first that you mentioned a Vf of 3 - 3.4V. Obviously, if it really is 3.4V, then this won't work down to 3V. R3 eats up 0.6V, and Q1 will have some drop, too. In the first circuit, the one with the voltage divider, you can change R1 and R2 to lower the base voltage to reduce the voltage across R3. You will have to change R3 to maintain the same current, but this will give you more "headroom." If you are determined to drive the LED near its max, you will need all the headroom you can get. \$\endgroup\$ – mkeith Dec 11 '14 at 7:32
  • \$\begingroup\$ You are right the fully charged voltage is 4.2v. I had a junky 18650. I read that using an LED driver on a 20mA LED would be over kill, but given the fluctuation in battery voltage, drain, and resister tolerance it makes since. The driver circuits I see call for a LM317 voltage regulator and heat sink. I don't have the room for a heat sink. My circuit it super simple, just two LED's in parallel, powered by an 18650 and triggered by a hall effect sensor. I am using two - flashing RGB, two lead LED's at 3.4Vf @ 20 mA. I see your schematics do not call for a voltage regulator. \$\endgroup\$ – Jason Dec 11 '14 at 23:59
  • \$\begingroup\$ The LEDs = adafruit.com/product/680 \$\endgroup\$ – Jason Dec 12 '14 at 0:00
  • \$\begingroup\$ The LM317 wouldn't really help. The problem is that it will be hard to supply 3.4V when the battery gets below, say 3.7 or 3.6. After reading the description on the adafruit page, I would say just try the two diode circuit. The light may dim a bit near the end of life of the cell, but I think it will work OK. I am a bit concerned because you are not driving the LED directly. There is a little IC in the package that is driving the LED's. So it is conceivable that we should be supplying a voltage, not a current. But I suspect it will work. If not you will learn something. ;-) \$\endgroup\$ – mkeith Dec 12 '14 at 4:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.