Welcome, %1$s. Please login or register. - Did you miss your activation email?

Login with username, password and session length
 

Author Topic: LED Wiring question  (Read 685 times)

Offline whb64

  • Captain
  • ****
  • Posts: 398
LED Wiring question
« on: May 23, 2017, 05:12:35 pm »
I asked this in another section but figured this specific question is probably better in this section.

I read the Arduino runs on 7-12VDC, but in another thread on here someone said it will run on 5VDC and the output is always 5VDC no matter what the input is.   Is this true?

Next question, do I need a resistor for each LED or since I am running NAV lights that are red and green and flash at the same rate, can they all run off the same pin and the strobes run off another pin, or does each LED have to connect to a different pin on the Arduino?  If I can run a set of NAV lights from one pin plus ground, couldn't I just put a resistor on that pin?  Which brings up another question- on here I see people putting the resistor on the - side (cathode), but on the LighthouseLEDs site they show the resistor going on the + side (anode).  Which is correct?  If I can use the anode side, why couldn't I just use one resistor on the Arduino output pin?


Offline Tankton

  • Admiral
  • *****
  • Posts: 2037
Re: LED Wiring question
« Reply #1 on: May 23, 2017, 06:03:43 pm »
I run my arduino's at 5v all the time. Yes you can run your nav lights all off of one pin as long
as you don't overload it I run up to 4 led's off of one pin. The most common way of resitoring
led's is on the anode side (positive) but it doesn't really matter. Using the positive side helps
you keep track of the wiring better. Also you can run a common ground easier. And yes each led
needs a resistor. Red run at a lower voltage than the rest. If you need to run more than four
led's then I suggest using a transistor circuit as a switch.
Live Long and Prosper

Cameron Lewis Sr.

Offline zhaith

  • Commander
  • ***
  • Posts: 187
Re: LED Wiring question
« Reply #2 on: May 23, 2017, 07:27:45 pm »
you could wire multiple led's in series or parallel with a single resistor, but this has it's downside in that if one resistor fails you loose multiple LED's, my personal preference is to wire them in parallel with an individual resistor for each LED. With series you also need to be aware of the forward voltage for the LED's you are using depending on the LED this could be between 1.7-3.5 volts, so you looking at 2 LED's per pin on an arduino before you start running in to voltage issue's, parallel circuit don't have this issue and you can wire more LED's just make sure you don't exceed the maximum current for the output.

Offline whb64

  • Captain
  • ****
  • Posts: 398
Re: LED Wiring question
« Reply #3 on: May 23, 2017, 07:41:21 pm »
Thanks Tankton.

It looks like there are 10 NAV lights total (2 red, 2 green, and 6 white) and 6 strobes.  What is the max number of LEDs that can on a pin?  It sounds like if I need more than 4 I should use a second pin, is that correct?  So I could use one pin for the red and green NAV lights, 2 for the white NAV lights 3 on each, and 2 for the strobes 3 on each... will that work?

I was looking at some wiring schematics online and they showed a parallel setup with one resistor, positive to resistor then anode to anode and a ground going cathode to cathode...

Offline Gadgetron_3000

  • Admiral
  • *****
  • Posts: 1185
Re: LED Wiring question
« Reply #4 on: May 23, 2017, 08:04:01 pm »
It looks like there are 10 NAV lights total (2 red, 2 green, and 6 white) and 6 strobes.

You can check out this Arduino example I posted a while back for the TMP Enterprise refit navigation and strobe lights:


And a quick demonstration video I put up on YouTube:


With this setup, there are still seven digital pins that are free to use, and the example sketch can be modified to take advantage of those free pins in order to add more lights.

If you get worried about overloading the Nano with LEDs, you can use transistors to cut down on the number of Arduino pin usage if that's something you want to try.

:)
"They've done studies, you know.  60% of the time, it works every time."

-----

Google+: https://plus.google.com/109660073537038906328

Offline whb64

  • Captain
  • ****
  • Posts: 398
Re: LED Wiring question
« Reply #5 on: May 23, 2017, 09:21:29 pm »
Is there a spec sheet somewhere on the Arduino that lists the max current per pins and max for the whole board?

I will have 10 NAVs and 6 strobes and 4 photon LEDs- for a total of .4A, or 400mA  I'll have some white LEDs but they will be run from the 9V source for the tape LEDs and stepped down from there.

________________________________________________
Okay from what I just read here
https://playground.arduino.cc/Main/ArduinoPinCurrentLimitations
and here
https://www.arduino.cc/en/Main/arduinoBoardNano
Max current per pin is 40mA.  The LEDs I have are rated at 3-3.4VDC at 20mA.  That would mean two LEDs per pin, if I increase the resistor value to drop the current to 10mA per LED does that mean I can run four per pin?

I read on another forum the max total current output is 500mA, and another site listed it at 200mA

Offline whb64

  • Captain
  • ****
  • Posts: 398
Re: LED Wiring question
« Reply #6 on: May 23, 2017, 09:30:23 pm »
I'm thinking I may need two Arduino boards...

I may be wrong on the number of lights but I watched Boyd build several times and I count two red Navs (top saucer and bottom), two green Navs (top saucer and bottom), two white Navs at the front of the saucer top and bottom, and four Navs at the rear of the deck, one on each corner top and bottom for a total of 10 Navs.  Then there are the strobes-  one behind the bridge, one on the photon launcher, two by the rear deck blue crystal, and one on the top rear of each nacelle for a total of six strobes.

I want to do a photon effect, so there are four more LEDs that need to be controlled.  Like I wrote above, that's a total of 20 LEDs and here are the specs on the LEDs I got:

Size   3mm Round Top Clear

Luminosity/Brightness   10,000-12,000 mcd
Forward Voltage   3.0-3.4v
Current   20mA
Wavelength   515-525nm
Viewing Angle   20-30 Degrees
Mount Style   Through Hole (DIP)
Lens Color   Clear
LED Brightness Class   Super/Ultra/Extreme

I'm still not familiar enough with the Arduino Nano so I don't know how many LEDs I can control from one pin.
« Last Edit: May 23, 2017, 09:55:51 pm by whb64 »

Offline Gadgetron_3000

  • Admiral
  • *****
  • Posts: 1185
Re: LED Wiring question
« Reply #7 on: May 23, 2017, 09:54:17 pm »
I'm thinking I may need two Arduino boards...

Going with transistors would free up a lot of pins.  If you use transistors, all your navigation LEDs would only need one output pin and same goes for the strobe LEDs.

:)
"They've done studies, you know.  60% of the time, it works every time."

-----

Google+: https://plus.google.com/109660073537038906328

Offline whb64

  • Captain
  • ****
  • Posts: 398
Re: LED Wiring question
« Reply #8 on: May 23, 2017, 10:17:43 pm »
I'm thinking I may need two Arduino boards...

Going with transistors would free up a lot of pins.  If you use transistors, all your navigation LEDs would only need one output pin and same goes for the strobe LEDs.

:)
I would have no idea how to set that up right now.  It might be cheaper and easier to just get another Arduino.  Do you happen to have a schematic of using a transistor and what part number?

It looks like if I go with the LED specs and use 3VDC and 50 ohm resistors I can do two LEDs per pin at 20mA or four LEDs at 10mA.  If I am thinking this correctly then I should have enough pins.  I'd need 5 pins for all the NAVs and strobes and that should leave enough for the photons.

Geesh... and then I would need to find a sketch or write one that works with that configuration... and writing one at this point is out of the question :)

Offline whb64

  • Captain
  • ****
  • Posts: 398
Re: LED Wiring question
« Reply #9 on: May 24, 2017, 08:14:49 am »
More questions :)

I'm not understanding why this wouldn't work-


I'm not trying to be argumentative or anything like that, I am just trying to get an understanding why there is a need for every LED to have its own resistor.  I see the above schematic everywhere I look and so far have only came across one source that had a resistor on each LED.  If the concern is that the resistor will fail, I'm not too concerned about that for a couple of reasons-

First when I was doing electronics and component level repair when I was in the military, resistors rarely failed, and when they did it was usually because of another component failure that shorted out and caused excess current.
Second, I will be placing the Arduino board in the base and also have the expansion board for it.  If I get a resistor failure I will be able to easily replace it.  Bulbs will be different, once the model is sealed up that's it for them.

I'll add a resistor per LED if it is really necessary, but I'd like to at least understand why the above diagram wouldn't work.


Offline LynnInDenver

  • Commander
  • ***
  • Posts: 203
    • My husband and I on YouTube - TG256
Re: LED Wiring question
« Reply #10 on: May 24, 2017, 08:38:31 am »
More questions :)

I'm not understanding why this wouldn't work-


LEDs can only do that if they're absolutely identical. Surprise, they're NOT. You'll get, at best, three different brightnesses. Odds are pretty good you're going to radically shorten the life of them. https://electronics.stackexchange.com/questions/22291/why-exactly-cant-a-single-resistor-be-used-for-many-parallel-leds

Resistors are so cheap that if you're trying to save money that way, don't bother with lighting. Regarding the time to solder in additional resistors, factor in how much more time it's going to be to crack the model back open in six months, redo the lighting, seal it back up and refinish it.

Offline whb64

  • Captain
  • ****
  • Posts: 398
Re: LED Wiring question
« Reply #11 on: May 24, 2017, 02:38:04 pm »
I wasn't trying to save money 'that way', rather just trying to understand why if is done this way in the modelling world.


Offline whb64

  • Captain
  • ****
  • Posts: 398
Re: LED Wiring question
« Reply #12 on: May 24, 2017, 02:54:19 pm »
More questions :)

I'm not understanding why this wouldn't work-


LEDs can only do that if they're absolutely identical. Surprise, they're NOT. You'll get, at best, three different brightnesses. Odds are pretty good you're going to radically shorten the life of them. https://electronics.stackexchange.com/questions/22291/why-exactly-cant-a-single-resistor-be-used-for-many-parallel-leds

Resistors are so cheap that if you're trying to save money that way, don't bother with lighting. Regarding the time to solder in additional resistors, factor in how much more time it's going to be to crack the model back open in six months, redo the lighting, seal it back up and refinish it.
Ok question, what value resistors would you use to run four LEDs in parallel?
« Last Edit: May 24, 2017, 03:09:24 pm by whb64 »

Offline Tankton

  • Admiral
  • *****
  • Posts: 2037
Re: LED Wiring question
« Reply #13 on: May 24, 2017, 03:19:46 pm »
If I may put in my two cent's worth, and no offense intended to any one here, but most wiring I've seen on here
has been over kill. Your diagram below is exactly how I wired the four nav lights on my 350 refit. I placed the resistor
on the pin on the arduino. Just make sure you use a 1/2 to 1 watt resistor not the 1/4 watt ones that you normally get
with led's. It works fine that way there is not enough discrepancy between brightness to see with the naked eye.
As long as you don't exceed the output rating of the arduino no problem. Life expectancy of the led's is the same if you do it this way or place a resistor
on each one. They are being hit with the same voltage and have the same current draw. I have a degree in electronic engineering and have done this for
over 20 years. This ain't rocket science it's just plastic.
Live Long and Prosper

Cameron Lewis Sr.

Offline madmonk

  • Commander
  • ***
  • Posts: 231
Re: LED Wiring question
« Reply #14 on: May 25, 2017, 04:17:22 am »
Quote
Ok question, what value resistors would you use to run four LEDs in parallel?

That will depend on the voltage of your source.

These are good sites to help calculate the resistor size.

Multi LEDs  http://led.linear1.org/led.wiz

Single LED  http://led.linear1.org/1led.wiz

 




Enterprise © Bloc