declare voltage and eliminate resistors for LEDs?

hey guys, just curious. I am trying to eliminate a lot of soldering for RGB LEDs. by that I mean the 330 ohm resistors used on each color with the 5v output from the digital arduino pins. do I HAVE TO use resistors?
can I simply drop the voltage? use an analog out at say 2 volts? or whatever the led is spec'd to operate on.

or is it a "MUST" use resistors situation when it comes to LEDs?

thanks!

It is a must. LED's are current driven devices.

Arduino doesn't have a DAC so you are pretty much stuck with 0 or the supply voltage which is 5V for an UNO or MEGA or 3.3V for some others.

If you don't plan to have more than one colour of R,G,B on at a time, you can put one resistor on the common lead and drive the individual LED connections. But if two LEDs are selected (e.g. R and G for yellow), they would share current and be uneven and dimmer.

There are current-sourcing and sinking chips for driving LEDs - they are (sometimes programmable)
current sources or sinks you can switch on and off from a logic signal. A current source or sink
drives a current, not a voltage, so they are perfect for LED control.

analogWrite() outputs PWM - basically turning the pin on and off rapidly. IT does not output an analog voltage.

So, while it was high (at 5v) it would burn out the LED.

LEDs should never be used without a current limiting resistor (or a constant current driver) in series with them, even at about the right voltage.

A look at the voltage/current characteristics of an LED will show you that a small voltage change produces a large current change. The resistor needed to stabilize the current is often referred to as a "ballast resistor". It serves the same function as the ballast inductor in a fluorescent lamp. If you are using a group of lamps and only one will be on at a time, then a single resistor common to all will serve.

Jerry

If you don't plan to have more than one colour of R,G,B on at a time, you can put one resistor on the common lead and drive the individual LED connections. But if two LEDs are selected (e.g. R and G for yellow), they would share current and be uneven and dimmer.

aarg thanks! I have it set up to run/blink only 1 color at a time B,G then R.

ok, researched and have another question? digital output can be changed to different voltages? the specs on this particular RGBLED, is (x) volts for red, (x) for green, an) (x) for blue.............so why not just change the v to match the spec sheet? also, I saw, seen LEDs (RGB) with common cathodes AND common anodes. so? why not 1 resistor on a "common" anode"?

" digital output can be changed to different voltages?"
Not without external hardware. The '328P has a small transistor that acts a switch to connect to +5 in an Uno, and another to connect to Gnd. Those transistors are either on or off.

"so why not just change the v to match the spec sheet?" External hardware would be needed to change that v - that hardware would most likely be a constant current driver.

"I saw, seen LEDs (RGB) with common cathodes AND common anodes. so? why not 1 resistor on a "common" anode"? "
1 resistor would limit the total current - if all 3 LEDs are on the current is shared between the 3 LEDs. If only 1 LED is in, it gets all the current - so you have a situation where the brightness would vary as the number of LEDs turned on/off varies.

Fredric58:
so why not just change the v to match the spec sheet?

So like said a few times before, you DON'T drive leds with a voltage because that is very unstable. You drive them with a current and the voltage across the led just happens and is specified. So you always need some sort of current source and a resistor is the easiest form.

Maybe read up on leds. :wink: