Driving LEDs without resistors - acceptable or not?

Go To Last Post
45 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This is an offshoot of the LED cube thread. Would you, in a commercial product, drive LEDs from AVR outputs without current-limiting resistors, adjusting the average current through the LED strictly via duty cycle?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No. Both the LED and the AVR have maximum peak current ratings.

You would probably exceed both devices in the typical case. It is certain that you will violate the ratings in the worst case. And any commercial design is bound to encounter "at-range-limit" devices as some time in its production.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:
No. Both the LED and the AVR have maximum peak current ratings.

You would probably exceed both devices in the typical case. It is certain that you will violate the ratings in the worst case. And any commercial design is bound to encounter "at-range-limit" devices as some time in its production.

David.


Just for the record, I completely agree, and I would never dream of doing such a thing. But I'm curious what others think.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It may be ok, as long as the instantaneous current does not exceed the limits of either device. [does the AVR specify a max pulsed current?] It can be done, and it is relatively reliable.

Personally I wouldn't recommend the practice. I'd rather design defensively, and have the liming resistor there, in case the software stalled. Otherwise you burn both the AVR and the LED. [cheap insurance, less than a cent on one of the I/O's driving the LED]

Writing code is like having sex.... make one little mistake, and you're supporting it for life.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You can omit resistors > > > IF < < < you use constant current driver chips.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would guess that the reason for the question is because the OP wants to avoid paying for resistors.

I would also guess that any driver chip will have more pins and is more expensive than resistors.

However you can buy LEDs that have integral resistors. So you will end up with no extra traces or pads on your PCB.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:
I would guess that the reason for the question is because the OP wants to avoid paying for resistors.

I would also guess that any driver chip will have more pins and is more expensive than resistors.

However you can buy LEDs that have integral resistors. So you will end up with no extra traces or pads on your PCB.

David.


Just to clarify, as the OP I would never consider not using resistors (assuming AVR ouputs, not special driver outputs, and assuming regular LEDs). But since the claim came up in the LED cube thread, I thought I'd get some discussion on the question.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

js wrote:
You can omit resistors > > > IF < < < you use constant current driver chips.

or if VF == VCC ;)

Constant current drivers aren't as helpful in multiplexed implementations. [which is the discussion this thread sprung out of]

Writing code is like having sex.... make one little mistake, and you're supporting it for life.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Use of resistance is fully suitable if you do not want to de-stable your project.

Otherwise you can do ????????????

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Can you not use the pull up resistor of another AVR input as the limiting resistor? I remember there was/is a tutorial that shows how to turn an LED on/off using AVR o/p and i/p pins.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you want to omit the resistor, the current
will depend on:

1) The on-resistance of the MOSFET inside the CPU.
This is not specified and depends on temperature
and technology. Both are not completely in your hands.

2) The U/I curve of the LEDs.
This also is not very well specified and dependent
on temperature.

3) The voltage supply of your system. Also this might
change from device to device.

For me that's too many unknowns. I prefer a resistor.
It gives a certain safety margin that should be built
into a good design.

I think its better to "prepare for the unknown"
than to "design with the unknown".

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Good explained.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Another point to think about is that a power source (battery, particularly coin cells) may have largish internal resistance, so putting a humoungous amount of current to a LED can drop the VCC voltage so low that AVR cannot work. An example, a red LED has about 1.6V of VF, AVR output stage has resistance less than battery, and poof.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Constant current drivers aren't as helpful in multiplexed implementations.
OHHH you mean all of my led displays that I have made for about 12 years aren't really working? :shock: could have fooled me and my clients. :wink:

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The meaning of the resistor in series except from the obvious, the voltage drop across of it,balances any small variations of the supply voltage and any differences of the forward voltage drop of the leds.Without any resistor any from the above differences can cause large difference in the current flowing through the led.Using smd resistors is a good choice for board space saving and is the simplest current source as we learned from the school ages.
This the formula:
Rled=Usupply-Uled/Iled
And Leds are constant current devices.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

js wrote:
Quote:
Constant current drivers aren't as helpful in multiplexed implementations.
OHHH you mean all of my led displays that I have made for about 12 years aren't really working? :shock: could have fooled me and my clients. :wink:

Sorry, I must have suffered a serious brain fart there, not sure what I was thinking. Certainly a CC driver is very appropriate for driving a LED.

Writing code is like having sex.... make one little mistake, and you're supporting it for life.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Apparently this thread is a result of comments I made in here:

https://www.avrfreaks.net/index.p...

I've only been designing LED signs (20'-30') for about 7 years now so hard to argue with Johns 12 but contrary to popular opinion when properly pulsed LEDs do no require constant current drivers or resistors.

The biggest issue when driving large matrix is getting as much current into the array as possible. This means use of high current low Ron FETs instead of bipolars and avoiding any other possible source of resistive loss.

That's not to say designers don't use these devices because there are engineers who still put electrolytics on every IC as part of archaic ritual. I am saying the cheap chinese modules used in most big signs sold today would never consider wasting power that way. The trick is to distribute current as efficiently as possible using high current zero loss drivers and duty cycle not resistors. In fact wire gauge and connectors supplying modules are of much bigger concern than limiting current.

You might also be surprised to find that 5v, 10v, or more can actually be measured across LEDs in commercial modules. Because duty cycle is short heating and lifetime are impacted little.

During firmware development current limiting is essential but once fully debugged it's removed. Watchdog, crowbar, and other circuits are employed in supplies for safety reasons but not resistors or CC drivers. Maybe in Hop-up Toyota light strings but not signs.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

johnwarfin wrote:
...The trick is to distribute current as efficiently as possible using high current zero loss drivers and duty cycle not resistors. In fact wire gauge and connectors supplying modules are of much bigger concern than limiting current.

OK, this is something quite different. Don't get the sense I'm picking a fight with you, because honestly I'm not. But you talked about driving LEDs with mega8 outputs and no resistors. Now you talk about high current drivers. I imagine the purpose-designed high current drivers are spec'ed for the operation you describe, but certainly AVR outputs are not spec'ed for such operation, and it's a gamble how long the chip will survive such abuse (and according to the datasheet it would be abuse).

Quote:
You might also be surprised to find that 5v, 10v, or more can actually be measured across LEDs in commercial modules. Because duty cycle is short heating and lifetime are impacted little.

Are the LEDs spec'ed for this? Or does the industry just know what standard LEDs can take? And what range of peak currents is one likely to find in such designs?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

kk6gm wrote:
Don't get the sense I'm picking a fight with you, because honestly I'm not.

Oh maaaaannnn... now I'm really dissappointed. :)

kk6gm wrote:
But you talked about driving LEDs with mega8 outputs and no resistors. Now you talk about high current drivers. I imagine the purpose-designed high current drivers are spec'ed for the operation you describe,

Nope. I'm talking about using cheap to220 FETs not special drivers or ICs of any kind. It's possible $200 modules used in military and domestic applications with more money than brains might but smart guys build modules for 1/10th that using common off the shelf discretes.

kk6gm wrote:
but certainly AVR outputs are not spec'ed for such operation, and it's a gamble how long the chip will survive such abuse (and according to the datasheet it would be abuse).

Not necessarily. Again it depends on duty cycle and how many are being driven. Certainly the 27 LED array that sparked this debate would not tax a mega8. Or several times that. If resistors were added then overheating of the chip might just start to be an issue.

One of my first designs used 90s8515 connected direct because it had more dissipation ability than any other AVR, Still probably true. Only reason for adding FETs later was because Atmel discontinued that part and prices started up so...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

johnwarfin wrote:

kk6gm wrote:
But you talked about driving LEDs with mega8 outputs and no resistors. Now you talk about high current drivers. I imagine the purpose-designed high current drivers are spec'ed for the operation you describe,

Nope. I'm talking about using cheap to220 FETs not special drivers or ICs of any kind. It's possible $200 modules used in military and domestic applications with more money than brains might but smart guys build modules for 1/10th that using common off the shelf discretes.


By purpose-designed I mean designed with parts spec'ed for the operation. Are the FETs you speak of operated outside their design ratings?

Quote:
kk6gm wrote:
but certainly AVR outputs are not spec'ed for such operation, and it's a gamble how long the chip will survive such abuse (and according to the datasheet it would be abuse).

Not necessarily. Again it depends on duty cycle and how many are being driven. Certainly the 27 LED array that sparked this debate would not benefit from resistors. Or several times that.

One of my first designs used 90s8515 connected direct because it had more dissipation ability than any other AVR, Still probably true. Only reason for adding FETs later was because Atmel discontinued that part and prices started up so...


But then it's just a crap shoot as to whether the devices can stand up to the out-of-spec operation. How was the dissipation rating of the 90s8515 determined? From the datasheet, or "in-house"?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

kk6gm wrote:
By purpose-designed I mean designed with parts spec'ed for the operation. Are the FETs you speak of operated outside their design ratings?

No. They are run at about 1/4 dissipation spec which is almost completely defined by the heat sink. The FETs were never an issue with even the cheapest ones more than up to the task.

kk6gm wrote:
but certainly AVR outputs are not spec'ed for such operation, and it's a gamble how long the chip will survive such abuse (and according to the datasheet it would be abuse).

Well since there are no graphs or ratings in the microsecond pulse range you are technically correct about "not spec'ed". But way off on the abuse part. As everyone should know it's VCC/GND bonding wires that are limiting factor and not even close measured with an ammeter. Driving 27 LEDs the chip will run close to ambient using "fingerometer".

kk6gm wrote:
But then it's just a crap shoot as to whether the devices can stand up to the out-of-spec operation.

A crap shoot with billions of dollars at stake. And the chinese are not known for taking long shots.

kk6gm wrote:
How was the dissipation rating of the 90s8515 determined? From the datasheet, or "in-house"?

Both. In later versions the lifetime concerns definitely shifted from microcontrollers to LEDs themselves. One thing was clear: the chip ran much hotter with resistors in there for a given brightness.

Don't depend on my word but try experimenting with this yourself. It probably takes less than a dozen instructions to stretch out a pulse. Although remember that during debugging resistors are your friend. :eek:

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

WOW I know one of my clients will be much interested in the no resistors, no CC driver for leds. Some of the highway signs they make have about 40,000 leds in them and all of them driven by CC chips. Ok so they have to work reliably from below 0C to about 80C but I have been assured now that there will be no problems.

See BV you could save your company a lot of money by doing it Chinese style. :lol:

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For me it seems the following situation:

Those using a resistor or const. current driver
know in advance that the design works. Those
using no resistors only know it after having
made the experience that it works. Some
are playing the game taking higher risc and
expect higher gain.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

kk6gm wrote:
But then it's just a crap shoot as to whether the devices can stand up to the out-of-spec operation. How was the dissipation rating of the 90s8515 determined? From the datasheet, or "in-house"?

As I've mentioned a couple times now it's only a crap shoot if you don't bother to measure current or temperature before deciding on duty cycle and load. My original designs were wrung out via tedious calculations based on published specs and extensive testing.

Hundreds of thousands of field units lead me to belive I knew what I was doing. You've probably driven past billboards that contained modules I designed.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

js wrote:
Some of the highway signs they make have about 40,000 leds in them and all of them driven by CC chips.

I have no doubt many of the public works departments use such overdesigned products. There is a huge scandal locally over tens of thousands of mile markers placed every .1 mile which were procured at 600% over minimum bid. Not only totally not needed but way over-priced. Corruption runs rampant in these situations.

js wrote:
See BV you could save your company a lot of money by doing it Chinese style.

Absolutely true. However cost is usually not always the biggest concern in a domestic market. As implied above sometimes bids are rejected simply because they are NOT expensive enough and don't support the "right" vendors.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

johnwarfin wrote:
kk6gm wrote:
But then it's just a crap shoot as to whether the devices can stand up to the out-of-spec operation. How was the dissipation rating of the 90s8515 determined? From the datasheet, or "in-house"?

As I've mentioned a couple times now it's only a crap shoot if you don't bother to measure current or temperature before deciding on duty cycle and load. My original designs were wrung out via tedious calculations based on published specs and extensive testing.


My point is that there are no published specs for driving AVR outputs the way you describe. When the datasheet says absolute maximum current per port 100mA and you drive that port to 200 or 300mA (just example numbers) how can that be called anything but a crapshoot (even if it paid off in your case). Or are you saying that you never violated any of the published output current specs of the AVR?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As far as I know there is no published info on pulse current for AVR output pins.

I would be quite happy to extrapolate the published data for many transistors and FETs and make some assumptions about the AVR bond-outs and the die thermal dissipation. However I would not like to implement a commercial design on that basis.

At the end of the day you are still going to have an unspecified peak current. You would need an effective mechanism for adjusting the PWM to maintain an average current within the data sheet limit. The system will be prone to thermal runaway.

Incidentally many years ago, a company had great problems with TO3 cased transistors. The base and emitter currents were well within the data sheet limits. But the bond-out wires could not handle the steady current.

I have no doubt that johnwarfin's high current drivers can work. It is almost certain that they are specified for peak currents.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

kk6gm wrote:
When the datasheet says absolute maximum current per port 100mA and you drive that port to 200 or 300mA (just example numbers) how can that be called anything but a crapshoot (even if it paid off in your case). Or are you saying that you never violated any of the published output current specs of the AVR?

Well to be honest, depending on client, I HAVE gone a bit over on occasion. I've also been known to overclock. Up to 45mhz on a 16mhz part in fact. :eek:

Also guilty of tearing tag off matress. I'm out of control!

Atmel m8 spec wrote:

PDIP Package:
1] The sum of all IOL, for all ports, should not exceed 400 mA.

TQFP and MLF Package:
1] The sum of all IOL, for all ports, should not exceed 400 mA.

You would be very surprised how many LEDs can be lit with half an amp. MODERN ones that is.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

glitch,

I disagree with this:

Quote:
or if VF == VCC

Remember LEDs are semiconductors and Vf is different between them even if they are taken from the same reel.
Usually manufacturers characterise them with letters (A, B, C, D...), according to their Vf at a constant current value.

LEDs, especially when are used for lighting (Not as indicators), must be driven with constant current circuits - NOT CONSTANT VOLTAGE.

Michael.

User of:
IAR Embedded Workbench C/C++ Compiler
Altium Designer

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A note from the other side:

Look at page 15. Diagram upper right:
Do not use current below 100mA.

http://www.led1.de/downloads/LCW...

So you not only can make the current too high
for LEDs, but also too low. I wonder whether
it is allowed to switch these LEDs off.
:lol:

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

icarus1 wrote:
LEDs, especially when are used for lighting (Not as indicators), must be driven with constant current circuits - NOT CONSTANT VOLTAGE.

Apparently you have not dissected 35 LED Dealextreme replacement bulbs yet.

Binning is common for displays but culls are generally used for lighting.

Also note that mfg specs do not recommend 10v or more Vf which is common in large scale sign modules.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

icarus1 wrote:
glitch,

I disagree with this:

Quote:
or if VF == VCC

Remember LEDs are semiconductors and Vf is different between them even if they are taken from the same reel.
Usually manufacturers characterise them with letters (A, B, C, D...), according to their Vf at a constant current value.

LEDs, especially when are used for lighting (Not as indicators), must be driven with constant current circuits - NOT CONSTANT VOLTAGE.


I'm willing to bet that glitch was making a joke. Or a high-efficiency display, like the Chinese do it. :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well I would not even think of using any led without a resistor (for a few leds) or a CC driver for many leds. One still needs some form of driver even if a fet so maybe there is not even the cost saving aspect?? For a highway sign or billboard I would think that a few cents in resistors or maybe a few $ in CC drivers would not win or lose a bid.

But to each his/her own.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Would you, in a commercial product, drive LEDs from AVR outputs without current-limiting resistors, adjusting the average current through the LED strictly via duty cycle?

I would modify your original question to include series resistors or a constant current driver, then the response is:

Of course not! As John (JS) and many others have stated above.

Of course if johnwarfin wants to swing by he can test my EKG without power isolation and my ventilator running on a triple overclocked slab of silicon! Both designs save lots of $, (but don't save any lives ...) :wink:

Some people learn life's, (and electronic's), lessons the hard way, others learn from other's mistakes.

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello

I want some opinion about the next scheme. I wonder if many LEDs connected in parallel can be driven using PWM ( generated from a microcontroller ), with a Vcc = 5V . NO resistors and NO CC. ( see img attaced )

If it is possible , what will be the correct duty cycle and ON time period?

Lets consider the number of LEDs could reach hundreds in parallel, and for that I'm using a FET to resist such current.

It is possible or not?
Also what will be the difference between 3 - 3,2V LEDs ( green , blue, white ) and 1,9 - 2V LEDs ( red, yellow )

Thanks

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This is getting too much for me, where is my valium...

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

raptoru wrote:
Hello

I want some opinion about the next scheme. I wonder if many LEDs connected in parallel can be driven using PWM ( generated from a microcontroller ), with a Vcc = 5V . NO resistors and NO CC. ( see img attaced )

If it is possible , what will be the correct duty cycle and ON time period?

Lets consider the number of LEDs could reach hundreds in parallel, and for that I'm using a FET to resist such current.

It is possible or not?
Also what will be the difference between 3 - 3,2V LEDs ( green , blue, white ) and 1,9 - 2V LEDs ( red, yellow )

Thanks

That will not work well because, regardless of color, LEDs are not the same in terms of light output vs voltage. Even if they are matched initailly some will appear much brighter than others as they age. In this case resistors are recommended.

Remember, you can NEVER apply DC either w/o a resistor or other current limiting.

PS Note that internet people can be very opinionated on subjects they have zero actual experience with. So I suggest you do not take my word but do further research elsewhere and actual experimention on your own. Remember: NET=Not Everything's True. :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

johnwarfin wrote:

Remember, you can NEVER apply DC either w/o a resistor or other current limiting.

Thats the thing: when you get down to it, there is resistance. Internal battery resistance, (marginal) wire resistance, resistance within the LED, etc. It's nothing to ever rely on, but can work in very specific circumstances.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I noticed that a single Led can be driven without resistor using a Lithum Battery CR2032 and a Low-Voltage AtTiny. The battery delivers 2-3mA, I tried several different ones of the same size.

However I think this is not a good hardware design. I decided to use a stronger battery (2x AG13) for my case and a resitor.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
a single Led can be driven without resistor using a Lithum Battery CR2032
A BLUE led?

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

CR2032 has a very high internal resistance, thus it may be safe to do so. Other sources with lower internal resistance, or higher drive capability will require current limiting to be safe.

Writing code is like having sex.... make one little mistake, and you're supporting it for life.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What if you had just one resistor on the VCC of the AVR that limited the current of all the AVR's I/O to 10 mA? Then all LEDs on the AVR's I/O would have different brightness according to how many were actively lighted, but there would only be one resistor.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

and the AVR would likely brown out, depending on the Vf of the LED's being used.

Writing code is like having sex.... make one little mistake, and you're supporting it for life.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I cant believe i just read 3 pages of this haha

I dont see how people can get away with not using CC or resistors in their designs... For the sake of a few cents of component cost and placement cost. Its well worth KNOWING that your LEDs will work, will work reliably and will work for their expected lifetime, not 80% less from abusing the crap out of them by pulsing them with 10V

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

http://tinkerlog.com/2009/04/05/driving-an-led-with-or-without-a-resistor/

Push it to the limit! :twisted:

According to that page and my own experiments, pulsing an LED can be reasonably safe if you stare at all the datasheets long enough to convince yourself that all will be well. I am pulsing a 7 segment LED right now without a problem and I can even just set the pin to each segment high and apparently the effect seen in the current vs voltage graph takes over and the LED fights with the voltage available at the pin and the LED lights without any emission of smoke from either the LED or the AVR. Of course this is probably abusing something, but it works. I discovered this effect while writing a program to pulse my LEDs and accidentally forgetting to set one low.

It turns out that looking at the voltage vs current graph for the LED and laying it over the one for the avr I am 10ma overspec on each of them, but if you had a slightly different LED this method could allow you to stay within the limits of both components.