Creating "Runway Lights" effect with a chain of LED clusters

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
docmojoman
 
Posts: 11
Joined: Mon Jun 09, 2014 12:26 am

Creating "Runway Lights" effect with a chain of LED clusters

Post by docmojoman »

I am trying to create a "runway light" effect along my walkway to my house. I will be creating individual lamps each containing 9 LEDs each. There will be motion sensors at either end of the walkway. Depending on which direction one approaches, the lamps will light up one after the other in the direction of approach - kind of like an airport runway! (See illustration below)

Image

Any suggestions on how to get this done? Can I create this effect with just an arduino? Do I need to use an Adafruit 24-Channel 12-bit PWM LED Driver - SPI Interface?

Also, since I am a virtual noob, could any one point me to some additional useful resources that may help me on this?

eros
 
Posts: 31
Joined: Wed Jun 04, 2014 1:58 am

Re: Creating "Runway Lights" effect with a chain of LED clus

Post by eros »

BANNED wrote:I am trying to create a "runway light" effect along my walkway to my house. I will be creating individual lamps each containing 9 LEDs each. There will be motion sensors at either end of the walkway. Depending on which direction one approaches, the lamps will light up one after the other in the direction of approach - kind of like an airport runway! (See illustration below)

Image

Any suggestions on how to get this done? Can I create this effect with just an arduino? Do I need to use an Adafruit 24-Channel 12-bit PWM LED Driver - SPI Interface?

Also, since I am a virtual noob, could any one point me to some additional useful resources that may help me on this?
A simple motion sensor solution would solve this, each pair of lights (one right one left) will be hooked to their own individual motion sensor.

docmojoman
 
Posts: 11
Joined: Mon Jun 09, 2014 12:26 am

Re: Creating "Runway Lights" effect with a chain of LED clus

Post by docmojoman »

@eros, thanks for the quick reply!

Although your solution is ingenious and simple, this would create more of a Michael Jackson "Billy Jean" effect, what I am trying to achieve is a more animated airport runway landing strip effect - - sort of like a wave -where each adjacent pair of lights turn on in succession at rapid timed intervals until they are all lit. I would then disable both sensors while the lights stay on for - say... 3 or so minutes.

From my limited knowledge, I am imagining that I have to have individual control wires from each adjacent pair of lamps to the micro-controller. I guess my question really is:

- am I on the right track?
- can this be done with just an arduino or do I need a shield like the PWM LED Driver - SPI Interface?

User avatar
adafruit_support_bill
 
Posts: 88096
Joined: Sat Feb 07, 2009 10:11 am

Re: Creating "Runway Lights" effect with a chain of LED clus

Post by adafruit_support_bill »

Given the way these are strung out, I would suggest using something like Neopixels to keep the wiring simple. Using the 24 channel PWM board, you would need to run individual wires from the board to each location. Using Neopixels, you just need power, ground and one signal wire.

Neopixels are available in a number of forms ranging from individual LEDs to strips, rings and matrices. You can choose which are most appropriate for your application.
https://www.adafruit.com/search?q=neopixels

docmojoman
 
Posts: 11
Joined: Mon Jun 09, 2014 12:26 am

Re: Creating "Runway Lights" effect with a chain of LED clus

Post by docmojoman »

adafruit_support_bill wrote:Given the way these are strung out, I would suggest using something like Neopixels to keep the wiring simple. Using the 24 channel PWM board, you would need to run individual wires from the board to each location. Using Neopixels, you just need power, ground and one signal wire.

Neopixels are available in a number of forms ranging from individual LEDs to strips, rings and matrices. You can choose which are most appropriate for your application.
https://www.adafruit.com/search?q=neopixels
Thanks for the response, bill!

Brightness is important in this build. It must be bright enough to light the walkway - I won't need to change the color of the lights or anything. I was hoping to make each "lamp" brighter that those popular Home Depot solar powered units. To achieve this, I don't mind challenging wiring!

I'm thinking that I will need 10 control wires as each adjacent pair of lamps will work in unison. The overall length of the walk is just over 25 feet and I will be powering the whole shebang with a 12v battery (solar charged).

I'm not sure if I understand the full benefit of using the neopixels other than the fact that they can be controlled with 1 control wire. It seems to me that it if I were using neopixels, it would be quite expensive to get the brightness that I want unless I could do something like using 1 neopixel per lamp pair and have them to control additional daisy chained LEDs in each lamp pair? Can a neopixel control regular LEDs?

Lastly, does the length of this project add any special considerations to the data wire(s)?

-

User avatar
adafruit_support_bill
 
Posts: 88096
Joined: Sat Feb 07, 2009 10:11 am

Re: Creating "Runway Lights" effect with a chain of LED clus

Post by adafruit_support_bill »

So neopixels would not offer much of an advantage for your needs. The 24 channel board should work for you. But with the max 30v supply voltage, you can get just 9 leds per channel, so you will need 20 control wires if each light has 9 leds.

If brightness is important. I'd also look at using some 1-watt emitters driven by MOSFETs via the 16 channel PWM board.
https://www.adafruit.com/product/518
https://www.adafruit.com/product/355
https://www.adafruit.com/product/1411

docmojoman
 
Posts: 11
Joined: Mon Jun 09, 2014 12:26 am

Re: Creating "Runway Lights" effect with a chain of LED clus

Post by docmojoman »

adafruit_support_bill wrote:So neopixels would not offer much of an advantage for your needs. The 24 channel board should work for you. But with the max 30v supply voltage, you can get just 9 leds per channel, so you will need 20 control wires if each light has 9 leds.

If brightness is important. I'd also look at using some 1-watt emitters driven by MOSFETs via the 16 channel PWM board.
https://www.adafruit.com/product/518
https://www.adafruit.com/product/355
https://www.adafruit.com/product/1411
Maybe I'm not explaining this very well. I'm looking at it like this...

1. Each adjacent pair of lamps would be wired together as though they are one. So in reality I will be having 10 lamps with 18 LEDs each.
2. Each pair being 1 "actual" lamp would be controlled with 1 control wire each. So I'm thinking I will need 10 PWM slots.
3. All of the lamps will be run off of a large 12v (7amp probably) battery so, I will drive the Arduino through a regulator and the lamps with 12v.

I have done some math with an online calculator and come up with this:

Code: Select all

    Solution 0: 3 x 3 array uses 9 LEDs exactly
    +----|>|----|>|----|>|---/\/\/----+  R = 120 ohms
    +----|>|----|>|----|>|---/\/\/----+  R = 120 ohms
    +----|>|----|>|----|>|---/\/\/----+  R = 120 ohms
    
    The wizard says: In solution 0:
    each 120 ohm resistor dissipates 48 mW
    the wizard says the color code for 120 is brown red brown 
    the wizard thinks ¼W resistors are fine for your application
    together, all resistors dissipate 144 mW
    together, the diodes dissipate 576 mW              
    total power dissipated by the array is 720 mW      
    the array draws current of 60 mA from the source.  
 
After multiplying the above by the number of lamps, I get:

- 720 mW * 20 = 14.4 watts (total power)
- 60 mA * 20 = 1.2 amperes (total current)

How do I find out if I have enough battery power?

User avatar
adafruit_support_bill
 
Posts: 88096
Joined: Sat Feb 07, 2009 10:11 am

Re: Creating "Runway Lights" effect with a chain of LED clus

Post by adafruit_support_bill »

You can't run 18 leds from a single channel at 12v using that board. Certainly not at 20mA each, since the output of each channel is current regulated. See this page of the tutorial: https://learn.adafruit.com/tlc5947-tlc5 ... r-and-leds

To wire them the way you describe, you would need to go the MOSFET route I described above.

docmojoman
 
Posts: 11
Joined: Mon Jun 09, 2014 12:26 am

Re: Creating "Runway Lights" effect with a chain of LED clus

Post by docmojoman »

Okay, I think I am beginning to understand what you are getting at!

Could I achieve this with 10 relay switches controlled by an arduino? After all, all I am effectively trying to do is switch pairs of lights on and off.

I found this project where this guy is controlling 110v relays with an arduino - couldn't the same be done with 12-24v?

User avatar
jigsawnz
 
Posts: 180
Joined: Mon Mar 12, 2012 10:17 pm

Re: Creating "Runway Lights" effect with a chain of LED clus

Post by jigsawnz »

Relays have a fairly limited lifespan compared to mosfets. Yes it will work but at some stage the contacts might wear out.

User avatar
adafruit_support_bill
 
Posts: 88096
Joined: Sat Feb 07, 2009 10:11 am

Re: Creating "Runway Lights" effect with a chain of LED clus

Post by adafruit_support_bill »

You could use relays BUT:
  • The relay will cost more than a MOSFET
    You would need a transistor (such as a MOSFET) anyway to drive the relay coil.
    You will also need a diode to protect your transistor from the relay coil kickback.
    You would hear an annoying 'click-click-click...' as the lights went on in sequence
Don't fear the MOSFET. They are even easier to wire up than a relay.

docmojoman
 
Posts: 11
Joined: Mon Jun 09, 2014 12:26 am

Re: Creating "Runway Lights" effect with a chain of LED clus

Post by docmojoman »

adafruit_support_bill wrote:You could use relays BUT:
  • The relay will cost more than a MOSFET
    You would need a transistor (such as a MOSFET) anyway to drive the relay coil.
    You will also need a diode to protect your transistor from the relay coil kickback.
    You would hear an annoying 'click-click-click...' as the lights went on in sequence
Don't fear the MOSFET. They are even easier to wire up than a relay.

LOL! Thanks for the help and encouragement! I have been reading up on the MOSFET and I think I am beginning to wrap my head around the concept!

I am going back to the drawing board on this, but be assured that I will be back to bother you for more help in due time! ; p

docmojoman
 
Posts: 11
Joined: Mon Jun 09, 2014 12:26 am

Re: Creating "Runway Lights" effect with a chain of LED clus

Post by docmojoman »

adafruit_support_bill wrote:Don't fear the MOSFET. They are even easier to wire up than a relay.
@adafruit_support_bill - thanks for the nudging! I am no longer fearful of the MOSFET!

I have taken a step back, done a little research, experimented a bit and re-designed my project! I now will be constructing lamp pairs with 6 total LEDs (3 LEDs per lamp node ~ see illustration):
walkway_lights-v3.png
walkway_lights-v3.png (8.31 KiB) Viewed 550 times
Here is the LED math:

Code: Select all

This solution is two lamp pairs with each lamp having 3 LEDs a piece.

    Solution 2: 3 x 2 array uses 6 LEDs exactly
    +----|>|----|>|----|>|---/\/\/----+  R = 120 ohms
    +----|>|----|>|----|>|---/\/\/----+  R = 120 ohms

    The wizard says: In solution 2:
    each 120 ohm resistor dissipates 48 mW
    the wizard says the color code for 120 is brown red brown 
    the wizard thinks ¼W resistors are fine for your application
    together, all resistors dissipate 96 mW
    together, the diodes dissipate 384 mW              
    total power dissipated by the array is 480 mW      
    the array draws current of 40 mA from the source.  

After multiplying the above by the total number of lamps, I get:

    480 mW * 10 = 4.8 watts (total power)  
    40 mA * 10 = .04 amperes (total current)
Although I have done all of this, I am still a little unsure of how to accomplish this. From what I have learned, I should be able to do it like this:

- 1 arduino
- 1 Adafruit 12-Channel 16-bit PWM LED Driver - SPI Interface
- 10 Logic level MOSFETs
- 1 12v 7Ah battery
- 1 5v power supply
- 10 LED lamps (as described above)

So basically, I would have the arduino connected to the SPI Interface - which is connected to a separate board with all of the MOSFETs (+accompanying resistors) - which is connected on the drain side to each lamp pair.

Am I getting close?

What should the rating of the resistors that I have connected to the MOSFETs be (in one primer they say 10k and another 220)?

From what I have read, I should power the LEDs from a separate power supply, but I should connect the ground to both the SPI and the arduino? I'm confused!

Lastly, will my 12v 7Ah battery battery handle all this?

User avatar
adafruit_support_bill
 
Posts: 88096
Joined: Sat Feb 07, 2009 10:11 am

Re: Creating "Runway Lights" effect with a chain of LED clus

Post by adafruit_support_bill »

Am I getting close?
Sounds like it. We also have a shield version of that PWM controller: https://www.adafruit.com/product/1411
Code and operation is the same. Just simplifies connections a bit.
What should the rating of the resistors that I have connected to the MOSFETs be (in one primer they say 10k and another 220)?
What resistors are you referring to? Your wizard recommends 120 ohm 1/4W for the current limiting which sounds right. If you use MOSFETs like these: https://www.adafruit.com/product/355 you do not need a gate resistor. You can drive them directly from the PWM output.
From what I have read, I should power the LEDs from a separate power supply, but I should connect the ground to both the SPI and the arduino? I'm confused!
You always need to connect the grounds together because they are your logic signal reference. The positive connection of your LED supply goes to the LEDs only. Not to the Arduino.
Lastly, will my 12v 7Ah battery battery handle all this?
For how long? Add up the total amps your system will draw, then divide 7A by that number. That will tell you how many hours of operation you will get.

docmojoman
 
Posts: 11
Joined: Mon Jun 09, 2014 12:26 am

Re: Creating "Runway Lights" effect with a chain of LED clus

Post by docmojoman »

Thanks Bill!

Time to get this party started! I will certainly post an update on my progress!

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”