I am upgrading the lighting in a model with simple circuit which has 17 LEDs (approximately) plus one or two 555 timers. Presently, everything is powered by 3 AAA batteries. It drains between 150 and 250 mA (depending on how many LEDs I switch on). Heads up: I'm new to electronics and lighting, so please bear with me anyway if the questions if not challenging enough :)

Once the circuit is done, I plan to extend it with two variations:

  1. Arduino Version: connect the LED circuit directly to the output pins (5V) of an Arduino board, with a resistor in each wire to compensate for the +0.5V excess.
  2. USB wired powered version, using a wall charger USB that provides 5V 800mA.

My question is: What should I do to adequately protect the circuit when using the USB version? Do I need a voltage regulator? If yes, what type/part?

As per my research, I don't need a regulator for the Android version, but I'm not 100% sure (comments on that will be welcomed too).

Edit: As requested, I've added a simplified schematic. The final version will have more leds and probably drain arround 200mA-250mA.

enter image description here

  • 2
    \$\begingroup\$ Got a schematic? \$\endgroup\$ May 20, 2013 at 20:13
  • 1
    \$\begingroup\$ A wall-wart can basically be a DC power source, however, some of them use other technologies such as constant current. USB typically doesn't so it will match a computer USB output. You should be able to use the 5V source from the wall-wart however you want as long as you don't exceed the maximum current rating, but it will not work the same if powered form a computer USB port because that takes enumeration to supply more than 100mA. \$\endgroup\$ May 20, 2013 at 20:22
  • \$\begingroup\$ Some USB cables have regulators built in. Use a multimeter to find out if your USB cable has a regulator built in. \$\endgroup\$
    – user151324
    May 20, 2013 at 20:31
  • 3
    \$\begingroup\$ @coding_corgi what? What are you talking about? What cable has a built in regulator? \$\endgroup\$
    – Passerby
    May 20, 2013 at 21:44
  • 1
    \$\begingroup\$ @coding_corgi searched. Nothing but plain shielded wires. Copper and plastic. \$\endgroup\$
    – Passerby
    May 21, 2013 at 2:53

1 Answer 1


For the most part, an Arduino version and a USB powered version would be the same. The Arduino has a 5v regulated output.

The main problem is, if the schematic you post is accurate, is that 36Ω resistor, at 4.5v, with average led voltages (red 1.8v, yellow 2v, blue 3.3v) is pushing them past the ""standard"" max current draw of 20mA each. Is that 36Ω a typo? With 5v, its almost double that. The schematic implies with all 10 led/resistor series on, it's taking 151mA, so 15mA each. The math doesn't work.

Current = (Voltage Source - Forward Voltage Drop) / Resistance
Red: (4.5v - (1.8v * 2)) / 36 = 0.025A or 25mA. (5v - (1.8v * 2)) / 36 = 38mA Yellow: (4.5v - (2v * 2)) / 36 = 13.8mA. (5v - 4v) / 36 = 27mA Blue: (4.5v - 3.3v) / 36 = 33.3mA. (5v - 3.3v) / 36 = 47.2mA!

Only the yellow would be mostly safe, without increasing the resistance. Simply an extra resistor between 24~68Ω in series with the existing 36Ω for each led strand, would solve this with a maximum draw of 28mA to 16mA per strand. That's how you can protect the leds when using the USB power supply.

Now if you are going to power the leds from the Arduino, directly tied to the Microcontroller's pins, you will quickly eat through the 40mA per pin limit, or 200mA total limit. Especially on the blue section, where you have three leds in parallel. That's 47mA with the existing resistor, less if you add another resistor per led, but you would only be able to have 4 of the sections on at a time. In this case, if you need more, you would need a transistor with a resistor as well.


simulate this circuit – Schematic created using CircuitLab

The SW1 is the manual switch you have. The two 36Ω resistors are the same as a single 72Ω. The three leds are standard 3.3V Blue leds. The NPN transistor allows you to switch more current per pin than directly connecting them would (The 2n3904 tends to allow up to 200mA each). The 1k resistor provides ~4.5mA of current at the transistor base, which should saturate it.

In any case, with a bit of math as listed above, you should have all you need to figure any combination you need out.

  • \$\begingroup\$ Re: the math: I see you point. The simulation software I'm using is great (Yenka), however the included predefined set of LEDs use a different forward V and mA tolerance. The LEDs I'm using in "real life" have different values and tolerate up to 25mA, so I've adjusted the R values accordingly. Are you saying that the only thing I need is increasing R in series, providing that I do not drain more than the mA limit? I've read some warnings about USB wall charges, stating that some of then are not regulated. I plan to use my Kindle USB charger, which I guess is a high quality charger... \$\endgroup\$
    – Sebastian
    May 21, 2013 at 15:49
  • 1
    \$\begingroup\$ @Sebastian most usb chargers are well enough regulated. Haven't seen an unregulated on in quite a long time. And yes, all you have to watch out for is drawing too much current. Keep it within 80~90% of the maximum to be on the safe side. \$\endgroup\$
    – Passerby
    May 21, 2013 at 17:57

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.