Driving LEDs

Hi

I've bought a Nano V3.0 ATmega328P CH340 5V which I plan to power from the mini usb connector.

Can anyone tell me what the maximum load of LEDs is that I can drive? I'll be using 3v 20mA leds.

My initial aim is to only use the USB power supply to drive these rather than require an external power supply.
Is there a repository of spec sheets somewhere I could get this info from?

Thanks in advance

Michael

ONE per pin with a 220 ohm resistor in series to limit the current.

Paul

There is also a limit to the total current that can be supplied by the chip.

Google “ arduino specification”

Is there a repository of spec sheets somewhere I could get this info from?

Section 2.28 of the [u]ATmega datasheet[/u] says the "absolute maximum" is 40mA per pin and 200mA total. (And there is some other "fine print".)

There are lots of ways to drive/address more LEDs using additional circuitry...

I'll be using 3v 20mA leds.

The Arduino I/O pins are 5V. You should always have a "current limiting" resistor in series with the LED. Voltages divide in series circuits and (when used properly) the LED voltage falls "magically into place", even as current varies. The current is the same through all series components. So, we use [u]Ohm's Law[/u] to calculate the required resistance.

For example, with 3V across the LED we have 2V across the resistor. 2V / 0.02A = 100 Ohms. (With 220 Ohms you'd get 9mA which is OK unless you need "maximum brightness.)

DVDdoug:
Section 2.28 of the [u]ATmega datasheet[/u] says the "absolute maximum" is 40mA per pin and 200mA total.

Which is to say that is the figure that you want to ensure you do not go near. Stick to 20 to 25 mA at most.

Thanks everyone for the quick replies.

Michael

Hi,
If you want to drive more than one LED per output then you will need to use a BJT or MOSFET to control the current.


Tom... :slight_smile: