Powering 4 LEDs with single output

At first, sorry for my Engrish. I would want to know: Can single arduino digital output power 4 LEDs? (Each LED: U= 3.2 V, I = 20 mA.)

Which resistor should I use?

Is 9V battery enough to power this for a reasonable time?

Picture:

Thank you very much!

zzzajda: At first, sorry for my Engrish. I would want to know: Can single arduino digital output power 4 LEDs? (Each LED: U= 3.2 V, I = 20 mA.)

No. Each pin can only provide 40mA. Trying to draw more than that can damage your Arduino.

If you want to switch more you use a transistor (or use multiple Arduino pins).

zzzajda: Is 9V battery enough to power this for a reasonable time?

What do you mean by "reasonable"?

I tought that transistor is used to reduce voltage... Reasonable time is about one hour.

I tought that transistor is used to reduce voltage...

No you are thinking of a resistor not a transistor, and even then a resistor limits current not reduces voltage.

Reasonable time is about one hour.

You must have deep pockets but you might just be able to run it for an hour. Normally these batteries are considered as rubbish.

Which battery would be better? And what should I use to reduce voltage?

You can purchase very bright LEDS at low current. You may be able to get away with 10mA per LED and drive them from the Arduino.

zzzajda: I tought that transistor is used to reduce voltage... Reasonable time is about one hour.

It should run for an hour, yes...but 9V batteries are very bad value for money (charge vs. price). Make sure it's rechargeable!

OK, but how should I reduce voltage from 5V to 3,2V?

zzzajda: Which battery would be better? And what should I use to reduce voltage?

There's a lot of options depending on your exact needs. 9V is the easiest option (although it can get expensive).

6xAA is best for powering an Arduino Uno, or 6xAAA of you need small.

You can also use 3xAA plus a voltage booster to get 5V.

If you need long life...the Arduino Uno is very wasteful. Over half the power goes into the other chips on the board. Something like this will last MUCH longer on batteries and it can run off 3xAA: http://evilmadscience.com/productsmenu/tinykitlist/180

zzzajda: OK, but how should I reduce voltage from 5V to 3,2V?

Might as well use resistors.

http://evilmadscience.com/productsmenu/tinykitlist/180

Thanks fungus!

I like that, it looks like the 328 is soldered.

zzzajda: OK, but how should I reduce voltage from 5V to 3,2V?

You do not reduce the voltage. You use a resistor to limit the current through the LED. See:- http://www.thebox.myzen.co.uk/Tutorial/LEDs.html

R = U / I R = 5V - 3.2V / 0.02A (Each led is 3.2V and takes 20mA) R = 90 Ohm --> Is 100 Ohm resistor before each LED right? Will it work, or will I damage my Arduino?

zzzajda: R = U / I R = 5V - 3.2V / 0.02A (Each led is 3.2V and takes 20mA) R = 90 Ohm --> Is 100 Ohm resistor before each LED right? Will it work, or will I damage my Arduino?

No...that calculation is for a 1.8V LED. The voltage isn't 5.0-3.2, it's 3.2.

R = 3.2V / 0.02A (Each led is 3.2V and takes 20mA)

R = 160 Ohm, minimum.

nb. That resistor value is the minimum. In practice you should use something a little bit higher than that in case one of your LEDs is only 3.1V (the datasheet will tell you the tolerances).

Your circuit doesn't need a resistor on the GND wire. Apart from that it's fine.

LarryD:

http://evilmadscience.com/productsmenu/tinykitlist/180

Thanks fungus!

I like that, it looks like the 328 is soldered.

Sockets are cheap ...