SparkFun Forums 

Where electronics enthusiasts find answers.

Questions &/or issues related to products in the LEDs and Illumination category should be posted in this forum.
User avatar
By free-bee
I am working on a project and need to power some white LED's from either a 5 volt (regulated) source or 9 volt battery, but the circuit needs to be able to handle both. Based on previous experiences, I can go ahead and assume the LED's have a foreword voltage of 3v3 and current of 20 mA. I calculate that I need 85 ohms of resistance. The next highest value I can find (at least without 8+ weeks lead time) is 120 ohms. This is almost double what I need. I am wondering if I can just slap a 3v3 regulator in there and forget about needing resistors altogether. I mean, the math checks out and I have actually tested this before (sorta).

I have looked this up a few times and only ever found one answer ever. Some person on some forum said to use a resistor anyway of very low value. Something about the only thing stopping the LED from burning up is it's own internal resistance or the batteries? It sounded right but, to me, was actually an argument for why it would be okay without one; if the internal resistance is good enough to stop it from burning up, why include extra? That'll just make it glow dimly, won't it? Either way, I want a more educated answer before I stick to it.

The project has two separate power sources and can switch between them automatically. My circuit already includes a 5 V regulator for the battery. If I can (safely) get away with it, I'll just change it to a 3v3 regulator and rethink my connections. The cost of parts should stay roughly the same, but drop slightly from the removal of the resistor network. That is if the 3v3 regulator isn't somehow more expensive than the 5 volt regulator.
Code: Select all
5 v source: (5v - 3.3v) / .02A = 1.7v / .02A = 85 Ohm
3.3 source: (3.3v - 3.3v) / .02A = 0v/.02A = 0 Ohms
User avatar
By TS-Chris
You can get away without using a resistor when you're using a tiny battery like a coin cell, but anything larger than that is going to require a resistor or you will burn out the LED.

What I'd do is use a voltage regulator to provide power for all your circuit plus the LED and then size a resistor for the LED at 5 volts.

You could use a 5 volt regulator, but if you use a 5 volt power source your circuit will get a little less voltage than 5 volts due to losses in the regulator. As long as your circuit is happy with that the only other side effect is that the LED will be slightly dimmer with a 5 volt power source than a 9 volt battery. A 3.3 volt regulator will work as well and would be ideal if your circuit is happy at 3.3 volts.
User avatar
By free-bee
I know a coin cell would be okay to connect directly to the LED, whereas a 9 volt would end it very quickly.
*recalls a time when I had just started learning electronics and used two 9 volt batteries in series to power an LED*

The problem with using one power source for the *whole* circuit is..well...look at the schematic I drew assuming it would work how I intended. You should be able to find out what I'm trying to attempt.
You do not have the required permissions to view the files attached to this post.
User avatar
By darrellg
Unless you are using a current limited power source, your LED needs a series resistor to limit the current. It is not a resistive load (like an incandescent bulb), it is a diode. Once Vf has been reached, nothing will limit the current.

The reason you can use a coin cell without a resistor is that the coin cell has a very high internal resistance that limits its current potential.

I think you'll find that the difference in brightness between an 85 Ohm and 120 Ohm series resistor will be negligible.
User avatar
By free-bee
Okay so I added the resistor bus and swapped the regulator back to 5 v. It kinda saddens me that I had to swap back to the DPDT relay. I had finally managed to save some board space lol.
You do not have the required permissions to view the files attached to this post.