Jump to content
 

Some basic electronic calculations for led's


gordon s
 Share

Recommended Posts

I'm trying to build a control panel using various DCC components, but the basic electrical calculations have me a bit confused right now. I seem to have solved the issue by trial and error, but I would rather do it properly and understand what I am doing wrong.

 

I have a DCC Concepts Mimic panel with various led outputs. The leds I'm using are Kingbright L-7104PBC-A with a forward voltage of 3.2v and a max current of 30mA

 

I have put a meter across the working led on the DCC Concepts board and it is showing 2.8v across the led when lit.

 

I didn't have enough outputs from the DCC Concepts board to cover all the led's, so I've used a surplus NCE Switch 8 to cover the additional requirement. 

 

I'm trying to get all the led's to have the same level of brightness, but using various on line calculators, it appears I'm going wrong somewhere.

 

I've measured the output voltage of the the NCE Switch 8 and that is showing at 17v.

 

Using an online led calculator with 17v, 3.2v and 30mA it gave a resistor value of 470Ω for one led and 270Ω for 3 in series. I tried those values but they were too bright and the voltage across the led's was 3v.

 

After much trial and error, I've ended up with 2kΩ for the single led and 1kΩ for the three in series. The voltage across the led's in now 2.8v and they look fine.

 

Is there a reason why what I thought was the correct calculation meant the led's were too bright? I tried changing the figures to 17v, 2.8v, 20mA, but it made minimal difference.

 

 

Edited by gordon s
Link to post
Share on other sites

"Way to bright" is still probably LED running at its rated maximum.   But the brightness you wanted was much less than that, and comes out at 2kOhm.  This is pretty much normal; a calculated value will be at full brightness, yet many uses want a lower brightness. 

 

If you want to measure and see what's happening, you need to know the current flowing through the LEDs, which a multimeter can do if wired in series with the LED.   

 

Very roughly, calculation goes like this:  17v supply, 3v drop over LED, means 17-3=14v drop over resistor.   Now plug in resistor value, and use Ohm's Law V=IR,    14v=I * 2000ohms,  so I = 14/2000 = 0.007 (or 7mA).  Which is about 1/3rd of the maximum (20mA) for your LEDs.   

 

 

 

- Nigel

 

  • Thanks 1
Link to post
Share on other sites

  • RMweb Premium
25 minutes ago, gordon s said:

I didn't have enough outputs from the DCC Concepts board to cover all the led's, so I've used a surplus NCE Switch 8 to cover the additional requirement.

 

I've measured the output voltage of the the NCE Switch 8 and that is showing at 17v.

 

I'm trying to get my brain around that.

An NCE Switch 8 reverses it's output between normal and thrown, so how are you using it?

 

What are you using to power it? Mine connected across tortoises which draw about 10mA are only around 12v

Edited by melmerby
Link to post
Share on other sites

Thanks for the info. OK, I see now that the online calculator was correct but just providing figures for full brightness. The DCC Concepts panel must also be making allowances within the circuit to bring the brightness down.

 

The on line calculator also said I would need a 1w resistor for a single led. Just for testing, I used a 1/2w one and it was fine.  No sign of overheating at all. Would that be OK as is or will I need to add two 1k’s in parallel?

 

The NCE output was measured without a load at 17v. Power was coming from the DCC bus and I simply hooked up the led’s plus resistors across an output to see if it worked. Seemed fine, with the led’s switching on and off.

Link to post
Share on other sites

Watts = volts * amps

 

Assuming the 17 volt situation, and 14 volts over the resistor,  then 14*0.007 = 0.098W.  Or,  0.1W.   So a 0.25W resistor would have loads of head-room.  A 1W is over-the-top.

 

 

The volts being measured may well be wrong.   If you're just putting a multimeter set to AC onto DCC, then chances are its not reading correctly, as the meter will be designed for 50hz sine-wave AC, not 10kHz square wave.     Better to rectify the DCC signal to DC, then measure the DC voltage and make inferences as to the DCC voltage.  

Link to post
Share on other sites

As already stated, what you did is correct. You should rarely if ever need to run a LED at it's maximum rated current. Modern LEDs can be adequately bright at 5mA, depending on the LED and the application. The forward voltage will not vary very much over the normal operating current range so stick with the quoted 3.2V as a ball park.

 

Power in the resistor is I^2*R (current through resistor squared times resistance) or V*I (voltage across resistor times resistance) or V^2/R (Voltage across the resistor squared divided by resistance).

 

Your initial 30mA/470R would dissipate 0.03*0.03*470 or less than 1/2W.

 

As you reduce the current, the power goes down with the square of the current. Your 2K resistor has (17 - 2.8) V across  it so the power dissipation 14.2^2/2000 or 100mW.

 

[Edit: Nigel had posted whilst I was typing]

 

Edited by Crosland
update
Link to post
Share on other sites

Thanks, glad to know my basic understanding was OK. 
 

Thought I would try and measure the output of the Switch 8 with a RRampMeter, but the display simply flashes the DCC , AC lights and both numerical displays. It works perfectly with DCC track voltage and current.

 

Any ideas?  Tried Google but no luck so far.

Link to post
Share on other sites

  • RMweb Gold
2 hours ago, gordon s said:

The on line calculator also said I would need a 1w resistor for a single led. Just for testing, I used a 1/2w one and it was fine.  No sign of overheating at all. Would that be OK as is or will I need to add two 1k’s in parallel?

 

If you were to make up the 2k from two 1k's they'd be in series, parallel would give you 500ohm. Moot point though as others have shown a 1/4w resistor will handle it fine. :)

Link to post
Share on other sites

It’s OK, I was referring to the original on line calculation of 470 ohm and 1W, so the two 1k’s in parallel would result in 500 ohm as you correctly say.

 

Of course after the original calculation I changed to 1k’s ohm for a single resistor so if I really needed 1w, then it would be 2 x 2k resistors in parallel.

 

Thanks for flagging that up.

  • Like 1
Link to post
Share on other sites

3 hours ago, gordon s said:

Thought I would try and measure the output of the Switch 8 with a RRampMeter, but the display simply flashes the DCC , AC lights and both numerical displays. It works perfectly with DCC track voltage and current.

 

Any ideas?  Tried Google but no luck so far.

 

AH, I think Nigel made an assumption.

 

The outputs of the Switch 8 are not DCC and the RRAmpMeter is not appropriate. The voltage on the outputs should be measured with a normal multimeter, which I think you have done.

 

 

  • Thanks 1
Link to post
Share on other sites

  • RMweb Premium
2 hours ago, Crosland said:

 

AH, I think Nigel made an assumption.

 

The outputs of the Switch 8 are not DCC and the RRAmpMeter is not appropriate. The voltage on the outputs should be measured with a normal multimeter, which I think you have done.

 

 

The outputs from the Switch 8 are DC and in one position, either normal or reverse, will be applying a reverse voltage across the LEDs. 17v is also on the high side.

Which is what I was querying in my previous reply.;)

Link to post
Share on other sites

The “ old “ typical operating currents for red , green , yellow , blue, leds  are largely out of date , as modern small leds are significantly more efficient 

 

for mimic panel and general indicator use I use 2mA as a typical led forward current and even at that,  certain blue leds are too intense 

 

 

Edited by Junctionmad
  • Agree 1
Link to post
Share on other sites

Afternoon all....:-)

 

Just spent two hours going round in circles, where I want one led to be operated by two different circuit switching arrangements.

 

DSCF1231.jpg.72753c1ada3f96ed2d4a8fa7e4db167d.jpg

 

 

A very simple schematic of two parallel lines with a crossover. All the circles represent leds. With the straight ahead route selected, all the leds in black illuminate no problem. Likewise setting the crossover illuminates the three leds across at B.

 

What I would like to do is have the led at A illuminate for both straight ahead and crossover positions. I have tried every combination under the sun of a diode/diodes between A and B so that when set straight ahead, none of the three crossover led's illuminate and vice versa, when set for a crossover B and A will illuminate but not interfere  electrically with all the black dot led's. I've checked the orientation of the diodes and they all check through as correct. Voltage is 2.8v and I've checked all the polarities etc.

 

I know you guys can sort it in seconds, but I wanted to sort this out for myself and failed miserably.....:D

 

Edit: The two diodes I've tried are IN4004 and IN4148. What I don't understand is that the IN4004 worked OK when I was playing around with led's last week, so it it should be OK for this task.

 

2nd Edit: Cracked it! I now have the diodes up and working properly on the bench. Finally worked it through and thankfully it was as I had it this morning, so pleased I had the correct circuit. Problem appears to be with the output I was using. Just hoping it will now work with a different output as below.

 

3rd Edit: Back to square one. It works fine on the bench, but not via the DCC board. Checked the spec for the board and they say each output can handle up to 10 led's so the max output must be between 200-300mA. 

 

Is it the diodes that are the problem?

 

 

Edited by gordon s
Link to post
Share on other sites

I've done some more testing and I must admit I'm even more at a loss what's going on.

 

Here's a diode plus led fed from my Gaugemaster DC controller set at 2.6v.

 

DSCF1232.jpg.ba7ae5aa9fb787b7f658cd01531e81b1.jpg

 

I can apply power at both A & B and the led lights perfectly well.

 

When I take the same voltage from the DCC Concepts Mimic board with the same polarity, I can connect the led and it will illuminate at position A, but will not illuminate when the feed is applied to B.

 

Not sure if that helps, but may explain why I can't get the diode circuit to work.

 

Edit: Just tried a different output (102) and it lights the diode at both A and B, so I guess that means there's something suspect about output 101 I've been testing this morning. It still functions OK in terms of switching, just won't light the diode from position B.

 

Edited by gordon s
Link to post
Share on other sites

  • RMweb Premium

You need a series resistor, driving LEDs from fixed voltages is not a good idea.

A LED is a current driven device, which means the voltage varies just a little for a large current change.

e.g. 2.6v may be fine but 2.7v could destroy it. That is why apart from on a very few special occasions a LED always has a series resistor.

  • Agree 1
Link to post
Share on other sites

Thanks Keith

 

I assume they must all be part of the mimic driver board as there are no resistors, just a two pin plug from the board with a fitted led.

 

Here's the manual if it helps.

 

https://www.dccconcepts.com/themencode-pdf-viewer-sc/?tnc_pvfw=ZmlsZT1odHRwczovL3d3dy5kY2Njb25jZXB0cy5jb20vd3AtY29udGVudC91cGxvYWRzLzIwMTYvMDIvTUlNSUMtTWFudWFsLnBkZiZzZXR0aW5ncz0xMTExMTExMTEmbGFuZz1lbi1VUw==#page=&zoom=auto&pagemode=

Link to post
Share on other sites

On 25/08/2020 at 16:53, gordon s said:

I assume they must all be part of the mimic driver board as there are no resistors, just a two pin plug from the board with a fitted led.

 

In that case the resistor will have been chosen to give a certain current assuming a certain LED voltage. The extra voltage drop across your diode prevents the LED from illuminating. The fact that one output works and one doesn't may be down to component tolerances.

 

[Edit: Ignore this and read on...]

Edited by Crosland
Incorrect assumption
  • Thanks 1
Link to post
Share on other sites

Managed to find a work around. I had a few spare positions on the mimic boards, so allocated two of those to the leds that I want to be switched on in one or more routes and wired them up to the mimic panel to be permanently on.

 

Works just fine....

 

Thanks for all the info guys. I am grateful and slowly picking up enough to enable me to get on with the job in hand.

 

 

Link to post
Share on other sites

13 hours ago, gordon s said:

Thanks Keith

 

I assume they must all be part of the mimic driver board as there are no resistors, just a two pin plug from the board with a fitted led.

 

Here's the manual if it helps.

 

https://www.dccconcepts.com/themencode-pdf-viewer-sc/?tnc_pvfw=ZmlsZT1odHRwczovL3d3dy5kY2Njb25jZXB0cy5jb20vd3AtY29udGVudC91cGxvYWRzLzIwMTYvMDIvTUlNSUMtTWFudWFsLnBkZiZzZXR0aW5ncz0xMTExMTExMTEmbGFuZz1lbi1VUw==#page=&zoom=auto&pagemode=

 

The clue is in the statement "Use only Alpha-Mimic LED's". I'm willing to bet they have built-in resistors. You can buy LEDs with built-in resistors but it's a lot less expensive to simply "roll your own".

 

Do you have a meter? If you do please measure the voltage the board sends to an "ON" LED (it could be 5 volts) and we can tell you what would be an appropriate resistor value for the type of LED you want to use.

  • Thanks 1
Link to post
Share on other sites

Thanks Andy. Guilty as charged.....:D

 

As someone who started in engineering and then spent my life in sales environments, I tend to read the bits of manuals that interest me and skip the rest. Of course I’m not alone in this failing, but your post prompted me to go back and read the small print.

 

In my defence, the statements about only using DCC Concepts led’s wasn’t on the page when I read it, so must have appeared overnight...:D

 

Right, start again. Just measured the one of the outputs from the Mimic board and it is indeed 5v which probably explains why the led’s were over bright. When I was testing things off the panel I kept turning the voltage down below 2.8v on my DC controller to get an acceptable brightness. Surprised the led’s didn’t go pop with 5v across them........
 

The easy way out would be to go full circle and use the DCC Concepts led’s but they are much bigger and that means a much bigger panel. If it can be done easily with 3mm leds, then I’m happy to play around. The downside is having to fit 150 resistors and the associated wiring.

 

I’ll hook up my DC controller and try to find an optimum brightness for the blue led’s and the we can work on resistor values from there. 

 

I’m a bit pushed for time right now as the Kirkham Cup awaits and I have to pursue my other passion, but I’ll get back to you later today.

Link to post
Share on other sites

Afternoon all... Well, the walk was pleasant, but I failed to trouble the leaderboard....;)

 

Pulled out my DC controller and set that to 5v and started with a 900Ω resistor and checked the light output. Still too bright, so added some more. With 2.7kΩ the voltage across the led was down to 1.7v and the brightness was fine.

 

How does that sound? Any problem using 2.7kΩ?

Link to post
Share on other sites

Thanks for that. I was using a similar calculator, but they all seem to have the same problem in suggesting resistors for optimum brightness. They are all too bright for me, the blue light is particularly penetrating, so I prefer it toned down by 40% - 50%.

 

 

Link to post
Share on other sites

17 minutes ago, gordon s said:

Afternoon all... Well, the walk was pleasant, but I failed to trouble the leaderboard....;)

 

Pulled out my DC controller and set that to 5v and started with a 900Ω resistor and checked the light output. Still too bright, so added some more. With 2.7kΩ the voltage across the led was down to 1.7v and the brightness was fine.

 

How does that sound? Any problem using 2.7kΩ?

 

Sounds good Gordon. If you are using different colours you might need to select different resistor values for them.

  • Thanks 1
Link to post
Share on other sites

1 hour ago, gordon s said:

Afternoon all... Well, the walk was pleasant, but I failed to trouble the leaderboard....;)

 

Pulled out my DC controller and set that to 5v and started with a 900Ω resistor and checked the light output. Still too bright, so added some more. With 2.7kΩ the voltage across the led was down to 1.7v and the brightness was fine.

 

How does that sound? Any problem using 2.7kΩ?

 

It's amazing how efficient modern LED's are. You are only passing 1.2 milliamps through it.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...