LED array acting bizarrely.  Help! - Page 1
Forum section: electronics / beginners

author: CharlieWorton
author_rank: Regular Contributor
timestamp: March 25, 2020, 05:04:21 am
content: Hi, all - I decided to build an LED safelight using Chinese diffused red LEDs - about 1.1 cents each, common as dirt. They had a 2.0 volt requirement. I created 3 rows of 10 in series, and set my power supply for 20 volts.When I applied power, the first and third rows illuminated, but the second row did not. I assumed I had a problem with the continuity of the second row - LED soldered in backwards, bad solder connection, or something like that. So I checked the polarity of the LEDs, and they were all correct. Nor were there any bad solder joints; I did a continuity check from the anode of one to the cathode of the next, and they were all good.Mystified, I put the board back in the test harness, and applied power (20VDC, floating current). I got the same result. So I increased the voltage to 21 VDC. The second row illuminated, but 4 of the LEDs in the first row went out, leaving 6 illuminated. I dropped the voltage back to 20 volts, and those 4 LEDs came back on, and the second row went out.At this point, I'm thinking that I need to call Ghostbusters.I increased the voltage to 21 volts, and got the same result. I then increased to 22 volts, and the whole board died. Reducing the voltage back to 21 or 20 volts did not revive it.So I'm thinking that going to 22 volts killed one or more of the LEDs in each of the three parallel rows. That would make sense, sort of - although I would not have thought that they would be that sensitive to a 2/10th of a volt overage.But what really spins me is that I managed to get 6 LEDs in a 10 LED series array illuminated, leaving 4 dark. How can that happen? If current is flowing through the LED, it must illuminate. If current is not flowing through the LED, then it will kill the entire row. There is no circumstance in which some of the LEDs in a series wired array will illuminate, while leaving others dark.So, I want to confirm my understanding of how LEDs work.According to the manufacturer, each LED wants 2 volts. Multiply the 2 volts by the number of LEDs in the series to arrive at the voltage that will illuminate the entire string. 10 LEDs wired together in a string will need 20 volts.I have paid no attention to the current requirement; I am assuming that each LED will draw the amount of current it needs, so I've left my power supply current as floating.I haven't moved forward on this project, simply because the circuit - this very, very simple circuit consisting of 3 parallel rows of 10 series wired LEDs - is misbehaving in ways that I do not understand.Does anyone have any thoughts? Thanks - Charlie

author: floobydust
author_rank: Super Contributor
timestamp: March 25, 2020, 05:38:01 am
content: You must have a current limiting resistor for each string. LED's do not magically "draw the amount of current it needs", as you dial up voltage you are forcing more current into the LED string and the weaker parts will fail or get damaged if the current is too high. I'm not sure what power or current rating for the parts you used.This copypasta graph shows a red LED at Vf=1.75V for 20mA but forcing 60mA it would go to to 2.2V.A 5mm LED is typically 20mA rated and 60mA might damage it.Since the LEDs are not identical, one string might need say 1V less compared to another so resistors (even 10R resistor) will prevent one string (with the lowest forward voltage) from hogging all the current.So what happens when you have one string (of 10) good at 19V, another at 20V and another at 22V?The 19V string gets roasted at 22V.

author: CharlieWorton
author_rank: Regular Contributor
timestamp: March 25, 2020, 06:11:34 am
content: Okay... let's imagine the LEDs have a 20mW rating at 1.75VDC. If I put 10 of them in a row, I'll need 17.5 VDC. If I then apply 875 ohm of resistance to one end of the LEDs, I should have 20 mA of current applied to the string. Does this sound correct?(And, wattage rating of the resistor. Volts * Amps = watts; so 17.5 *.02 = .35 watts. I could probably get by with a 1/4 watt resistor, but best practice would be a half watt resistor. Correct?)I was not aware that it was necessary to limit current. In LED examples, they will typically hook up an LED to a 2 volt source, and demonstrate that it glows. No mention is made of the need to limit current.Thanks - Charlie

author: CharlieWorton
author_rank: Regular Contributor
timestamp: March 25, 2020, 06:24:35 am
content: I have some of these, dog paddling their way from China. Should be here any year now:https://www.ebay.ca/itm/100-500-1000PCS-5mm-Ultra-Bright-LED-Light-Bulb-Lamp-20000mcd-Super-Bright/142644848371?ssPageName=STRK%3AMEBIDX%3AIT&var=441624165981&_trksid=p2057872.m2749.l2649Size: 5mmForward voltage: 1.9 - 3.6V DCLuminous intensity: 20,000 mcdForward Current: 18-20mAForward Voltage: 3.0-3.4V (Blue, White, Green) ; 2.0-2.4V (Red, Yellow)I'm guessing I can treat them as 20 mA, 2 VDC units. So 10 in a row would need 20 volts; limiting the current to 20 mA would require a 1,000 ohm resistor. And that resistor would need to dissipate 0.4 watts of heat.

author: Psi
author_rank: Super Contributor
timestamp: March 25, 2020, 07:45:14 am
content: Post your schematic.Also it's not unusual to get a different LED mixed in with the LEDs you actually ordered. Usually the wrong color/size and you notice instantly, but not always. They make them in such large volume it's easy to get one fall in the wrong box.This can cause problems if one LED in your matrix is a 12V flashing LED, or some other specialized LED with a chip on board.They can do weird things at low voltage, might stay on/ stay off / flash slowly or randomly.You can usually tell them apart by looking down the end, the 'chip' ones have a little black blob visible inside.

author: mikerj
author_rank: Super Contributor
timestamp: March 25, 2020, 08:36:26 am
content: Quote from: CharlieWorton on March 25, 2020, 06:24:35 amFirstly the forward voltage of an LED is current and temperature dependant, 2v is just an approximation and when you have many in series the final voltage can be substantially different. LEDs are current driven devices, the forward voltage is used only to work out how much compliance your current source needs. Now a current source can be approximated by a voltage source with a resistor series, the higher the resistor the better this approximates a current source.Secondly if you have string of 10 LEDs with a combined forward voltage of 20v@20mA, and you have a 1000 ohm resistor in series, you will need a supply voltage of 20V + (0.02*1000) = 40V. 1000 Ohms would give a reasonably constant current for the strings of different LEDs and over temperature etc. but clearly results in a very high voltage overhead. Ultimately using a resistor is a compromise, a low value resistor means lower voltage overhead, but poorer current regulation. For matching strings of LEDs this isn't usually a big concern, so start with you power supply voltage, work out how many LEDs you can put in series to get a useful voltage overhead remaining to drop across your current limiting resistor.e.g. for a 20V supply, you could use 9 LEDs giving roughly 18v drop and then a (2/0.02)=100 Ohm resistor to drop the final 2v, or 8 LEDs giving 16V drop and a (4/0.02)=400 Ohm resistor to drop the last 4V. All figures approximate of course. If your supply is voltage regulated, and your LEDs are reasonably matched then 100Ohms is likely good enough to provide the level of current matching needed for a simple light. Poorly matched LEDs or poorly regulated supply voltage may benefit from losing another LED in the chain and using a higher value resistor.

author: CharlieWorton
author_rank: Regular Contributor
timestamp: March 26, 2020, 04:51:24 am
content: Hi, Psi! Schematic - in all its glorious complexity - is attached.

author: CharlieWorton
author_rank: Regular Contributor
timestamp: March 26, 2020, 05:13:50 am
content: Hi, Mikerj! You said:"for a 20V supply, you could use 9 LEDs giving roughly 18v drop and then a (2/0.02)=100 Ohm resistor to drop the final 2v".Okay, I've done a pile of reading since yesterday, and everyone seems to be following this "bunch of LEDs plus a resistor" approach. I'm not sure that this is why my circuit is acting haunted, but it's for sure my circuit is wrong. It needs a resistor.The thing I don't understand, is why.If the purpose of the resistor is to drop the final 2 volts, and an LED will also do that, then it seems to make sense to let the LEDs be their own voltage drop, and do without the dropping resistor. It would seem to be a more elegant approach, and more power efficient. Why use a resistor to turn 2 volts worth of power into heat - which you don't want - when you can use an LED to turn those same 2 volts into light - which you do want?The answer is, the resistor is doing something that the LED isn't. But i don't know what that is.Clarification, anybody?Charlie

author: james_s
author_rank: Super Contributor
timestamp: March 26, 2020, 06:46:05 am
content: Quote from: CharlieWorton on March 26, 2020, 05:13:50 amThe resistor is limiting the current, the voltage across it drops according to Ohms law. LEDs are semiconductors, they do not have a steady drop, they are driven by current, not voltage. The voltage of your supply must be high enough exceed the maximum voltage drop of the string of LEDs and the resistor must be there to limit the current. Since the forward voltage of an LED varies significantly depending on temperature and the amount of current you are pushing through it, if you try to drive it with a constant voltage (no resistor) it will be unstable and the current it draws will vary wildly.

author: mikerj
author_rank: Super Contributor
timestamp: March 26, 2020, 05:01:45 pm
content: Quote from: CharlieWorton on March 26, 2020, 05:13:50 amOhms law says the voltage dropped across a resistor is proportional to the current through the resistor, this gives you a nice straight line on voltage vs current chart. Now look at the equivalent chart in an LED datasheet, negligible current flows until some minimum voltage is applied, and then the current rises very quickly with increasing voltage. This means that with no resistor a very small change in your supply voltage will give a large change in the LED current, so adding some series resistance helps to reduce this effect.Thiswebsitemight help to explain the difference.

author: krayvonk
author_rank: Regular Contributor
timestamp: March 26, 2020, 06:33:51 pm
content: Id say add a resistor each line is not a bad thing to try... maybe diodes can be unstable at times, they are pn junctions after all.

author: james_s
author_rank: Super Contributor
timestamp: March 26, 2020, 10:08:49 pm
content: It's not just a good thing to try, it's absolutely mandatory, unless you have a whole array of very tightly matched LEDs from the same batch. Even that is difficult to get right, I've seen lots of cheap multi-chip LEDs with clearly mismatched chips.

author: Jeff1946
author_rank: Regular Contributor
timestamp: March 26, 2020, 10:44:31 pm
content: You need a constant current source. Use a transistor, 2N4401 would be a good choice. Connect it between the negative supply (emitter) and first led in a string. Connect the base to the positive supply with a 10k resistor. This will give you about 20 ma current. Do this for each string and adjust the resistors for equal light emission.

author: mariush
author_rank: Super Contributor
timestamp: March 27, 2020, 01:09:52 pm
content: I think it's time for some led driver ICs ... get some linear drivers, they're cheap and you can adjust the current with just a resistor or two.ex al5802 ... up to 30v, up to 120mA, one resistor to set current :https://www.digikey.com/product-detail/en/diodes-incorporated/AL5802-7/AL5802-7DICT-ND/2792446as low as 8 cents (at 100pcs) on lcsc :https://lcsc.com/product-detail/LED-Drivers_DIODES_AL5802-7_AL5802-7_C129160.html

author: james_s
author_rank: Super Contributor
timestamp: March 27, 2020, 05:33:37 pm
content: Those are all valid options, but if you have a reasonable stable voltage to begin with there's nothing wrong with just using a simple resistor in each string of LEDs. I only bkther with drivers when I need more current to drive power LEDs.

author: CharlieWorton
author_rank: Regular Contributor
timestamp: March 31, 2020, 12:33:52 am
content: Hey, I want to thank everyone that responded. This community is unmatched for its depth of knowledge and experience.I'm going to re-design the board to run with several daisy chained LEDs and a suitable resistor. When I get some results, I'll post them here.And, earlier, I mentioned this link:https://www.ebay.ca/itm/100-500-1000PCS-5mm-Ultra-Bright-LED-Light-Bulb-Lamp-20000mcd-Super-Bright/142644848371?ssPageName=STRK%3AMEBIDX%3AIT&var=441624165981&_trksid=p2057872.m2749.l2649...as being a source for ultra bright LEDs.Well, they showed up today, and they're nothing special at all; just the regular old red LEDs that we've all being using for years. The only difference is that I paid $22 for them, instead of $11 from other, more honest suppliers. I'm disappointed. But... c'est la vie. There are bigger problems in the world today.Again, thanks, everyone. I truly appreciate your help. >Charlie

author: CharlieWorton
author_rank: Regular Contributor
timestamp: March 31, 2020, 01:04:26 am
content: Okay, I have a 24V 3A DC wall wart on order from AliExpress. The current plan is to put 8 LEDs in series with a 330 ohm, 1 watt resistor. If my math is right, that should provide 2.175 volts to each of the 8 LEDs, with 6.6 volts being soaked up by the resistor. Or, I suppose 9 LEDs, with each one getting 1.93 volts. Any thoughts on which approach would be better? Will I burn out these LEDs at 2.175 volts?Regarding resistor wattage: I'm calculating that on the basis of 24V *.02A = .48W - or about a half watt resistor, but i don't have any, so I'm going with 1 watters, which i do have. Is my math right on this?And a 24V 3A power supply will generate 72 watts. If each string will draw 0.48 watts then I should be able to run 150 strings, which is vastly more than I intend to run. So I think the wall wart is up to the task.Any comments would be welcome. I'm ready to lay out the board. Thanks, all - Charlie

author: james_s
author_rank: Super Contributor
timestamp: March 31, 2020, 01:18:05 am
content: Forget voltage for a moment, you don't supply LEDs with voltage, you drive them with *current* and the voltage goes up to whatever the LED drops at that current. Obviously the power supply must deliver a voltage at least as high as the total forward drop in order to push the desired current through the LEDs but it is the current that matters. You decide how much current you want to drive them with then consult the datasheet to get the forward drop at that current. Multiply that by the number of LEDs in each string and subtract that from your supply voltage, this will give you the voltage that the resistor needs to drop. Plug these numbers into Ohms law and you get the resistance you need.Next you're not calculating the power rating of the resistor correctly, you only need the voltage dropped by the resistor (which you calculated earlier) not the entire supply voltage. Take that voltage drop and multiply it by the drive current you selected and that gives you the power rating you need.You can probably use the same board you already have, just remove one LED from each string and replace it with a resistor.Also if you have not already, learn Ohms law, V = I * R, rearrange as needed depending on which of the three values you are calculating. Memorize it, know it like the back of your hand. It is a very simple but very, very important mathematical relationship used in every facet of electronics. Until Ohms law is second nature you will struggle.

author: greenpossum
author_rank: Frequent Contributor
timestamp: March 31, 2020, 01:21:21 am
content: Quote from: CharlieWorton on March 31, 2020, 01:04:26 amAhhhh, you're still thinking of giving a LED a particular voltage. Wrong way around. At a given current the LED will have a certain voltage across it. The way to approach it is to decide on the current you want to run it at, then look up the V/I curve for the temperature you will run it at to see what the voltage will be. That will then feed into your resistor calculation.

author: CharlieWorton
author_rank: Regular Contributor
timestamp: March 31, 2020, 01:42:04 am
content: Hey, GreenPossum... all I have for specs on these LEDs are .18 - .20ma forward current, and 2.0 - 2.4 V forward voltage. No curves, no graphs. I admit my core understanding of what is happening is seriously flawed... I just want to arrive at values that should work, so I can get the circuit built and running properly. In the fullness of time, I believe that light will eventually dawn. Maybe. But for right now: Is my math correct? Should the components as I've described them work? Thanks, Charlie

author: james_s
author_rank: Super Contributor
timestamp: March 31, 2020, 01:47:20 am
content: Since I have a few minutes to kill I'll run through an example here using hypothetical parts, substitute the data for the LEDs you are actually using.Let's just say the LED is rated for 20mA max and has a 2.3V drop at that current. 15mA is a reasonable current to shoot for so you look at the datasheet and find out what the forward drop is at 15mA, let's say it's 2.1V.Now you said 9 LEDs, we've decided on 15mA, and we know the forward drop at that current so we get 9 * 2.1V which is 18.9V, that is your forward drop for the whole chain and the power supply you use must deliver *at least* this much, plus a little bit more to give you some headroom to drop across the resistor so that you end up with a reasonably constant current.For the sake of simplicity let's say you go with a 24V power supply. Subtract the forward drop of your LED string from the total power supply voltage. 24V - 18.9V = 5.1V, this is the leftover voltage you need to drop across the resistor.Now is where Ohms law comes in, this is V = I * R where V is the voltage in Volts, I is the current in Amps, and R is the resistance in Ohms. Algebra says you can rearrange this into two more ways, R = V / I or I = V / R.We already decided on 15mA so I is 0.015 amps.We calculated V already, it is 5.1 volts.By now it should be apparent that you want to calculate Ohms so...R = 5.1 / 0.015, so R = 340 Ohms. In this case it conveniently worked out to a standard value but often you will calculate some oddball value in which case you want to select the closest standard value that will not overshoot the max current rating of the LEDs.Now you need to calculate the power dissipation of the resistor, that is simply V * I, so 5.1 * 0.015 = 0.0765, rounding up to 0.1W or 1/10th W for this example.That's about it really, the beauty of the math is that once you know it, you can plug in whatever values you want, try calculating the result using other resistors or other supply voltages, see what it does to the result.*Edit: I see you've posted again while I was writing this, the real LEDs you have are pretty close to the example I made up, you can substitute yours if you want and see what that does to the overall result. You'll find that in the real world the datasheet is a guideline, real components are imperfect, some more imperfect than others and you will find that the forward drop of real LEDs varies quite a bit, maybe +/- 15% or so depending on all sorts of things. This is why it's important to leave yourself some wiggle room, don't try to drive them right up to the max current, a 20mA LED will appear almost as bright run from 15mA, your eye probably won't even see the difference so that's why I suggest aiming for 15mA. If the natural variation of parts means that you end up pushing 18mA instead of what you calculated, no big deal. If you end up with less and want to squeeze a bit more brightness, try bumping the resistor down to the next lower value. You will find that in practical engineering the calculations will get you into the right ballpark, but unless you are using precision ($$) components you often need to massage things a little to get it just right, if it needs to be just right in the first place. For many things being in the right ballpark is close enough.Another neat trick you may not be aware of, if you know the actual value of the resistor, you can measure the voltage across it in circuit and use your friend Ohms law to calculate the actual current passing through the resistor, which according to Kirchoff's laws is identical to the current passing through the LEDs that are in series with it.

author: greenpossum
author_rank: Frequent Contributor
timestamp: March 31, 2020, 02:09:58 am
content: Quote from: CharlieWorton on March 31, 2020, 01:42:04 amIf you want to be sure, connect the LED in series with a variable resistor and a milliammeter, adjust for the current you want, then measure the voltage across it.

author: CharlieWorton
author_rank: Regular Contributor
timestamp: March 31, 2020, 02:59:26 am
content: JamesS, GreenPossum, I am profoundly grateful. Above and beyond what I expected. The math all makes sense to me, it's just that it's all new and I tend to make dumb mistakes frequently. And... it seems to me that I have a box of low value pcb size pots kicking around somewhere. If i can find it, that might be the simplest way to get what i want. Thanks again - Charlie

author: greenpossum
author_rank: Frequent Contributor
timestamp: March 31, 2020, 03:15:26 am
content: Quote from: CharlieWorton on March 31, 2020, 02:59:26 amPut a fixed resistor in series with the pot calculated roughly to about 1.5x the desired current so that you won't blow the LED by turning the pot to zero.

author: CharlieWorton
author_rank: Regular Contributor
timestamp: April 02, 2020, 03:04:04 am
content: Hey, everyone - thanks for all your help. Last night I spun up a board and populated it with 90 red LEDs and 10 340 ohm resistors. The circuit worked perfectly, thanks to all the help I received from everyone on this forum.In order to keep the LEDs aligned during assembly, I made a simple alignment tool on my 3D printer - just a block of plastic with holes the size of the LEDs. Once I had the LEDs inserted, I placed the tool on the LEDs, and it did a great job of keeping them all aligned during the soldering process.I've also spun up a case to hold everything together. Have to get some glass yet, but everything else is pretty much done. I've also attached a graphic, which can be used to create a board. The size of the external rectangle is 8 cm X 10 cm.Well, I was going to attach pictures, but I got a warning that my maximum message size was too large. So I deleted some images in order to insert some smaller ones, and discovered that the alert system doesn't dynamically track your file usage - once you trip the alarm you're hooped, even if you delete images. This board software really does hate me. I'll try making some new posts with the images. Maybe that will work.Thanks again, everyone. With your help, I got it done. >Charlie

author: CharlieWorton
author_rank: Regular Contributor
timestamp: April 02, 2020, 03:06:36 am
content: And, you can't leave the message box empty when posting images only. Sigh. >Charlie

author: CharlieWorton
author_rank: Regular Contributor
timestamp: April 02, 2020, 03:09:19 am
content: Ši plokštės programinė įranga nekenčia manęs su aistra. > Čarlis

author: greenpossum
author_rank: Frequent Contributor
timestamp: April 02, 2020, 03:10:31 am
content: 👍👍👍