-1

Sorry for having (again) a beginners question, but I was wondering something.

If I would want to drive like 20-30 LEDs from an Arduino (Uno), and I want to use an external adapter (12V, 1A), going into the Arduino, in what way I should drive the LEDs?

Problems I see:

  • I cannot connect too many LEDs per pin (max 20mA per pin)
  • I cannot connect too many LEDs per 'group' (I have to find out which pins are connected to what groups)
  • I cannot connect too many LEDS in total because of the max. 200 mA per VCC/GND (there are 2 or 3 GNDs, so that should be ok)
  • Using a relay/transistor etc, but how do I get the power? (there are also only 2 VCCs for 200 mA max)

So my basic question: how can I use the 1A from my adapter?

Michel Keijzers
  • 13,014
  • 7
  • 41
  • 58

1 Answers1

1

The simplest thing you can do is group the LEDs together into chains that almost add up to the voltage of the power supply.

If you have LEDs with a 2V forward voltage (typical red LEDs) you could have up to say 5 per chain.

Each chain, since it only has 20mA or so maximum, can be driven with a simple small transistor.

schematic

simulate this circuit – Schematic created using CircuitLab

Connect the 12V to either VIN or the barrel jack, and also drive the LED chain through a suitable resistor (R=V/I = (12 - (Num LEDs * Forward Voltage)) / 0.02). You can have as many chains as your supply can provide current for.

Majenko
  • 105,851
  • 5
  • 82
  • 139