LED current greater than source

AI Thread Summary
Using an Arduino microcontroller to drive high-brightness LEDs rated at 100 mA is not advisable, as the Arduino can only handle a maximum of 40 mA per pin. It is recommended to use a separate LED driver circuit or transistor to manage the higher current requirements safely. Standard resistor values may not protect the Arduino or LEDs in the long term, especially in a museum setting. For optimal performance, utilizing LED driver ICs or transistors with appropriate resistors is essential to avoid potential damage. Ensuring the total current from all pins does not exceed the Arduino's limits is crucial for reliable operation.
sema4ever
Messages
1
Reaction score
0
This is probably a simple matter. I have tried to find an answer on the web without success.

All published data on current-limiting resistor values is for LEDs with current rating less than power source. I am putting together an array for a museum of high brightness LEDs rated at VF 4.2, IFM 100 ma. The LEDs will be lighted one at a time by an Arduino micro-controller with output pins rated max 40 ma. The question: if I use the standard resistor value will that degrade either the LEDs or Arduino? (Will the LEDs suck too much current out of the Arduino pins?)

A one-second burst using either 10 or 100 ohms and the Arduino does light the LEDs. My concern is for the long term use in a museum setting.
 
Engineering news on Phys.org
sema4ever said:
This is probably a simple matter. I have tried to find an answer on the web without success.

All published data on current-limiting resistor values is for LEDs with current rating less than power source. I am putting together an array for a museum of high brightness LEDs rated at VF 4.2, IFM 100 ma. The LEDs will be lighted one at a time by an Arduino micro-controller with output pins rated max 40 ma. The question: if I use the standard resistor value will that degrade either the LEDs or Arduino? (Will the LEDs suck too much current out of the Arduino pins?)

A one-second burst using either 10 or 100 ohms and the Arduino does light the LEDs. My concern is for the long term use in a museum setting.

You need to use a separate LED driver circuit -- the Arduino cannot sink 100mA.

Look at LED driver ICs, especially ones that use DC-DC converters for efficiency.
 
The non open-collector ports are usually current limited with ground or supply shorts and 40mA is optimistic directly from that type of port so if only one port supplies or sinks current each LED is safe with 10 ohm resistors. Open-collector ports could have a much higher drive capacity so it depends on how the circuit is constructed what current resistor should be used. I've used the 'high' drive outputs directly without resistors on micro-controllers to make displays but the little 10 ohm 1/4 watt resistors do make nice fuses if there is a wiring short from Vcc to ground at the LED. Staying within the chip total current limits (usually around 200mA for all ports) is what you need to keep in mind if you are lighting several LEDS directly from chip pins at the same time. If I were making something for long term display using a external driver chip like the ULN2308 would be better as then you could safely run each LED at full brightness.

A direct drive 100 ohm LED matix display running simple image transforms. It's not very bright driven directly from the uC.
https://flic.kr/p/e6xFR2
https://github.com/nsaspook/matrix_led
 
Last edited:
  • Like
Likes berkeman
So when folks say "Arduino", they mean more than the uC, they mean a uC eval board? I guess that makes sense if the eval board has higher current IO drive buffers. It would still be better to use DC-DC based current sinks to keep the efficiency high. Thanks NSA!
 
berkeman said:
You need to use a separate LED driver circuit -- the Arduino cannot sink 100mA.

Look at LED driver ICs, especially ones that use DC-DC converters for efficiency.
The Arduino name was chosen by a group of people in Italy who designed boards with a CPU programmed to accept C language programs via a USB port..
They made the schematics of these boards and the software open source so that manufacturers in other countries are producing them as well, and quite legally.
As a result, they are available on EBay at very reasonable prices. The non genuine Arduino UNO R3 costs about $7 delivered.

When used commercially, or for educational purposes, buying the genuine Arduinos helps fund the development of these devices in Italy.


You can read about them here:
http://arduino.cc/en/Main/ArduinoBoardUno
Although the CPU is only 8 bit, the Arduino software operates at 32 bit, so that very large numbers can be handled.
They are quite capable of handling the large calculations used in controlling AD9850 Direct Digital Synthesis signal generators.

There is also a thriving market in add-on boards (called "shields") for these devices and these can be delivered for a dollar or so in some cases.

As you can see from here:
http://arduino.cc/en/uploads/Main/Arduino_Uno_Rev3-schematic.pdf
the bidirectional output pins are driven directly from the CPU (see lower right side of the schematic).

The specs for the Arduino do say that the output pins can deliver 40 mA each, but I couldn't find any assurance that all the pins could do this at the same time.

It would be safer to assume even the 40 mA per pin is optimistic and limit the output to 10 mA or so. This is plenty to drive a transistor base and allow safe switching.
 
Last edited:
if you need higher current just use a transistor with the gate attached to the uC. then use a sense resistor to measure the current.
 
Just to clarify that, you would not connect a transistor's base directly to the output of a microprocessor. That could destroy the transistor.

You would connect a suitable resistor between the microprocessor's ourput and the base of the transistor.

Typically, this resistor would be about 10 K and this would limit the maximum base current to about 0.5 mA.

The emitter of the transistor would be grounded and the collector would be connected to the LED in series with a current limiting resistor to a suitable power source.
 
vk6kro said:
Just to clarify that, you would not connect a transistor's base directly to the output of a microprocessor. That could destroy the transistor.

A belated welcome to PF :)

You would connect a suitable resistor between the microprocessor's ourput and the base of the transistor.

That's correct and you probably wouldn't need a 10 k resistor, 1k should be enough. I have never used more when driving a transistor from a uPC or other logic output

look for an NPN transistor with a minimum Ic of 150mA to give a bit of headroom

cheers
Dave
 
  • #10
Some transistors don't have bases.

Want to point out that you can vary the brightness of LED's by varying the switching waveform.

Also, since you are only lighting 1 LED at a time, you only need 1 resistor.
 
  • #11
One other problem is that in many logic devices, logic "0" doesn't mean zero volts.

So, if an NPN transistor is used for the switching, even one volt of output is enough to turn it on via a small base resistor.

So if this might happen, a voltage divider or series diodes can be used to reduce the voltage and ensure that the switching device is turned off when it needs to be.

Or, as rightly suggested, enhancement mode FETs can be used for the switching.
 
Back
Top