0
\$\begingroup\$

Can an Arduino turn on multiple leds at the same time?. I want make a home made lamp with several less controlled with an Arduino UNO light sensor and i already have the light sensor, also i know how to turn on one led.

But do not know if i can power several less.

Any advise?, thanks in advance.

asked Apr 11, 2014 at 22:09
\$\endgroup\$
5
  • 1
    \$\begingroup\$ Just FYI. There is now a stack dedicated to Arduino arduino.stackexchange.com \$\endgroup\$ Commented Apr 11, 2014 at 22:38
  • \$\begingroup\$ Where you say "less" do you mean LEDs? \$\endgroup\$ Commented Apr 11, 2014 at 22:47
  • \$\begingroup\$ @david context says yes. I blame auto core ect. \$\endgroup\$ Commented Apr 11, 2014 at 22:54
  • \$\begingroup\$ For a lamp, you don't want to use an Arduino to drive the leds, you want the arduino to control an LED DRIVER. Which is as simple as a NPN Transistor. \$\endgroup\$ Commented Apr 11, 2014 at 22:58
  • \$\begingroup\$ yes it is leds and yes... it is the autocorrect T.T, thanks guys. I want to make an small tutorial "easy and cheap to do", so i do not want expensive things involved and maybe led driver will be a little bit more expensive. \$\endgroup\$ Commented Apr 11, 2014 at 23:43

2 Answers 2

3
\$\begingroup\$

The Atmega328 chip used in many Arduinos has a limit on the amount of current it can provide directly. You can find this in the datasheet section 28.1 page 313.

  • A limit per pin - 40 mA max.
  • A limit per IC total - 200 mA max

schematic

simulate this circuit – Schematic created using CircuitLab

If you are using the Atmega IO pins to turn on transistors (FETs or BJTs) and use the 5V or 3.3V supply to provide current to the LEDs through these transistors then there is no problem with the Atmega328 current limits.

schematic

simulate this circuit

FET circuits are simpler. For larger numbers of LEDs it may be better to use a suitable LED-driver IC instead of using large numbers of transistors.

The voltage regulator on the Arduino board that is providing regulated 5V or 3.3V power will itself have a limit which may also prevent you using it to drive a large number of LEDs (or a lower number of high-power LEDs).

answered Apr 11, 2014 at 22:28
\$\endgroup\$
2
  • \$\begingroup\$ I was searching on the arduino web i found that info (40mA for every port), searching for some leds at the local web store i found a high brightness led (20mA ech one), i will try to attach one led ( checking the brightness ) and later try to attach to less on series (40mA). The transistor thing will be nice and useful i will research a little bit more. \$\endgroup\$ Commented Apr 11, 2014 at 22:34
  • \$\begingroup\$ Be careful not to draw too much current from the on board voltage regulator. As Klaus Warzecha strikingly wrote over on Arduino.SE: "The Arduino is just the brain, not the power station." \$\endgroup\$ Commented Apr 12, 2014 at 10:16
-1
\$\begingroup\$

Yes, an Arduino can turn on multiple LEDs (nearly) at the same time. The code you have to write is probably very similar to what you have now. Just attach the other LEDs to the other ports on your Arduino.

answered Apr 11, 2014 at 22:21
\$\endgroup\$
1
  • \$\begingroup\$ so i can turn on several less using several ports... nice, thanks. \$\endgroup\$ Commented Apr 11, 2014 at 22:31

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.