Go Down

Topic: Beginner question: Arduino & External Power Supply (Read 2979 times) previous topic - next topic

peej

This is probably an easy question to answer, but I've having some problems powering my circuit properly.

I'm using an Arduino pin to use a transistor as a switch, to turn on an array of LEDs.  The array of LEDs is currently being powered by the 5V pin out of the Arduino.  All is well.  But it's a limited number of LEDs (4, and I want to add more) and I imagine that the current limit will soon be reached. 

So I tried using an external, variable-voltage power supply (wallwart) -- two of them, actually, set to 5V -- instead of "5V out" on the Arduino, but I can't get it to work.  The LEDs are very very dim.  The "current output" on one of the wallwarts is 300mA, and the other 500mA.  Neither seem to be giving it enough power.

I also tried using one of those modified ATX power supplies and that works just fine.  But 450 watts is a little overkill for my application.

Can someone help me understand what's going on with those wallwarts?  I'm assuming that it's not enough current, but since I only have 4 LEDs in parallel (so -- I think -- 80mA to 100mA), I'm confused.

Thanks in advance!

kf2qd

Tie all your grounds together. If the Ardiuino and the transistors grounds aren't tied together you don't know what voltage/current the transistors are seeing (and it can change randomly).

Without a good ground reference things won't work reliably.

CrossRoads

Your LEDs are connected like this?

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

peej


Tie all your grounds together. If the Ardiuino and the transistors grounds aren't tied together you don't know what voltage/current the transistors are seeing (and it can change randomly).

Without a good ground reference things won't work reliably.


Well, that did it! 

As soon as I tied the Arduino GND to the negative rail of my breadboard, it came alive again.  Thanks so much!

peej


Your LEDs are connected like this?


Thanks for your reply.

Yes, like the third circuit, except the resistor is outside of the group of LEDs (i.e. the resistor is in series with the group of parallel LEDs).  But I think kf2qd has traced where I was going wrong.

Can either of you point me in the direction of supplying power to both the Arduino and the LED "path" using the same wallwart?  I'm currently powering the Arduino through USB and the LED path using the wallwart (thanks!).  I want to do this because the circuit I have in mind would exceed the current output of the Arduino (if I were to use the 5V line).

Can I just split the power supply, one line to the Arduino and the other the LED path?  Thanks again for your help.

CrossRoads

Supplying power to both the Arduino and the LED "path" using the same wallwart:
Just split the power supply, one line to the Arduino and the other the LED path.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

peej


Supplying power to both the Arduino and the LED "path" using the same wallwart:
Just split the power supply, one line to the Arduino and the other the LED path.


Okay, great.  And in the future I'll refrain from asking silly questions without trying them out first.

Thanks again!

CrossRoads

Doesn't hurt to ask. Little time to ask & confirm beats smoking something & losing a lot of time getting replacement parts.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

peej


Doesn't hurt to ask. Little time to ask & confirm beats smoking something & losing a lot of time getting replacement parts.


Cheers :)

bibre


Quote
Yes, like the third circuit, except the resistor is outside of the group of LEDs (i.e. the resistor is in series with the group of parallel LEDs).


Don't you think you should have one resistor in series for EACH LED? One resistor for several LED's in parallel is not generally a good idea. :)
Billy     http://www.z-world.com/operations/gbremer/

When you've eliminated the impossible,
whatever remains, however improbable, must be

peej


Don't you think you should have one resistor in series for EACH LED? One resistor for several LED's in parallel is not generally a good idea. :)


Correct me if I'm wrong (and there's a good chance), but doesn't it add up to the same thing?

Oh wait, would this be exceeding the 1/4 watt max for the resistor..?

CrossRoads

No, the difference is LEDs can have different current draws, or one can fail open and then the allowed current goes to the other 2 and takes them out.

Your mileage may vary - I have 8 digits wired up with 3 LEDs in parallel being driven by a MAX7221, has been working great for a year+ now.
These were made from superbright LEDs, and I have the current set lower as otherwise it was waaaay too bright.

Here it is photographed from ~30 feet way. Haven't figured out the camera settings needed for capturing multiplexed LEDs.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

peej


No, the difference is LEDs can have different current draws, or one can fail open and then the allowed current goes to the other 2 and takes them out.

Your mileage may vary - I have 8 digits wired up with 3 LEDs in parallel being driven by a MAX7221, has been working great for a year+ now.
These were made from superbright LEDs, and I have the current set lower as otherwise it was waaaay too bright.

Here it is photographed from ~30 feet way. Haven't figured out the camera settings needed for capturing multiplexed LEDs.


Ah yes, I can see your point there -- if one fails it will be overloaded (or "underloaded", as it were).

And I was looking at LED drivers, but I was hoping I could get away without one.  I don't have a good reason for this mind you (except for the cost and having to wait for the mail to arrive); do you think it would be advisable?

The end project I have in mind is for some translucent kitchen cabinets.  All four cabinets would have a string of four or five LEDs which would react to various sensors (cabinet open, darkness, etc.). 

bibre

Hi peej,  :)

The following quote is from the URL link further below. It is for regular diodes but this should also apply to LED's. Current will always 'seek' the least resistance path and since it is hard to find identical diodes (or LED's) it will choose one of them and start the following process.

It works like an endless cycle which ends up with only one diode conducting or broken down. The more current, the more heat; the more HEAT, the more CURRENT, and so on. If you get lucky with well matched LED's and nothing happens, you will at least have one LED brighter than the others.

Maybe this explains the problem a little bit better.

Quote
Can you put two diodes in parallel in order to obtain the double load?


Answer:
  Improve
As a rule, NO!

The main reason is thermal runaway:
When you warm up a diode, its "conductance" at any particular voltage increases.
(The Shockley diode equation gives the exact equation).
Even with two identical diodes in parallel, if the temperature of one diode was even slightly hotter than the other diode, more of the current would go through the hotter one. The one with more current would heat up more rapidly, lowering its conductance even more, and after a short time the hotter diode is hogging most of the current.

The final effect is that a diode will carry almost all the current, while the other stays almost unused.

There are a variety of things that cause two diodes to *not* be identical, which only speeds up the thermal runaway.
*the unavoidable imbalance between the two diodes voltage drops.
*(with an AC signal): the diode with slightly faster turn-on time will absorb more turn-on loss
*(with an AC signal): the diode with slightly slower turn-off time will absorb more turn-off loss


There is an obvious exception: use identical diodes, with exactly the same electrical and themal chracteristics. Individually selected diodes with voltage drop matched to less that one mV, and carefully assembled for thermal matching, may carry the same current, so effectively double the rating.
It is a very unstable condition, like keeping a coin vertical on a table.
Another arrangement is to add current sharing resistors in series to each diode, at least 0.3/0.4 V of additional voltage drop is required, so is a very unefficient solution.
Considering high frequency signals (as in switching power supply) adds even more problems, so the answer is always: use just one diode, leave the task of paralleling only to very skilled people dealing with such high currents that no single diode in the market can withstand.


Read more: http://wiki.answers.com/Q/Can_you_put_two_diodes_in_parallel_in_order_to_obtain_the_double_load#ixzz1soYT1Tgu

Billy     http://www.z-world.com/operations/gbremer/

When you've eliminated the impossible,
whatever remains, however improbable, must be

CrossRoads

Ah, that's a lot simpler.
You can buy LED strips that are powered from 12V, with built in resistor & everything.
All you need is a buffer chip like ULN2803 to control the ground to turn them on & off.

https://www.adafruit.com/products/357
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up