My RGB LED Stairs Illumination video

Interesting.

You learn something new everyday...even though i'm in college, that will be the one thing i learn today :stuck_out_tongue:

A few details on the project.....(
(click on the images for a larger version)

This is the opening I cut below the staircase to route the wires.....still need to patch it. I used 28ga and 30ga ribbon cable for the wiring...I cannot see any difference in brightness levels between them.

This shows the stacked boards with ATMega328 board on top. Basic setup with pin headers to allow reprogramming without removing the IC. Yes, that is a rubber band holding several heat sinks on the voltage regulator. That will be removed once it is in a box with a small fan. Currently, it barely gets warm with normal use but when I'm running it constantly for testing or demonstration, it does get a bit warm.

Side view of the boards that shows the pin headers and 6 TLC5940 LED driver ICs.

Bottom view of boards

Messy looking but will look better once it is mounted in a box...

are you addressing each RGB Led pin separately?

funkyguy4000:
are you addressing each RGB Led pin separately?

Yes. The 3 boards below the processor board are addressing each of the colors and each has 30 pins for each LED (2 on each step). I could have used multiplexing to reduce the number of TLC5940s, but the wiring would have been the same so I decided to ensure maximum brightness by driving each separately.

The processor board also provides the +5V pin headers for each of the LEDs.

I'm assuming that the led pins are all in a paralell circuit, right?
Otherwise what are you using to power the whole thing?

funkyguy4000:
I'm assuming that the led pins are all in a paralell circuit, right?
Otherwise what are you using to power the whole thing?

Not sure as to exactly what is meant by having all led pins in a parallel circuit but the circuit design uses 6 TLC5940s that are in series. The data out for the first drives the data in for the next and that data out drives the data in for the next and so on...

The first two TLC5940s drive the red, the second two drive the green and the last two drive the blue.

I used this library for the control of the TLC5940s: Google Code Archive - Long-term storage for Google Code Project Hosting.

Peak amperage that I saw was about 1.4A at 5V and I am using a 7.5V, 2.5A wall wart as a power supply.

Well i mean a series circuit is, for example, having leds one after another on one line of power. Where as a paralell would be more having 1 led part off into its own line and then reconnect.

Here

http://people.sinclair.edu/nickreeder/eet150/PageArt/SeriesParallel1.gif

R2, R3, R4 are all in series although R1 is in a paralell circuit with the other resistors.

Are you using any capacitors on your project?

funkyguy4000:
Well i mean a series circuit is, for example, having leds one after another on one line of power. Where as a paralell would be more having 1 led part off into its own line and then reconnect.

Are you using any capacitors on your project?

Gotcha.....the control circuit is series but the LEDs would be parallel. Each is individually powered and sunk to its own pin on the TLC5940. Yes, I am using capacitors. A 100nf and 10uf capacitor worked fine in breadboard but then when I powered the breadboard from my wall wart and 5v regulator, it had issues so replaced a couple 100nf with 1000nf and no more issues. It would have likely worked with just the 100nf once everything was on PCB because another noise issue on the breadboard causing intermittent flickering went away as well.

The VR I'm using is rated at 1.5A so I am pretty much peaking it out. When I used a 12V power source, it got over 300°F and went into thermal shutdown which is why I started using the 7.5V power source. If I run all the lights at maximum brightness (RGB on each LED) for an extended period of time, it will still get pretty hot but won't go into thermal shutdown. But since I'm not ever running at full power but for brief transitions, and most of the time it is well below 1A, it only gets slightly warm. I'm still putting small fan in the box it will reside in just to be on the safe side though.

Okay.
So i'm also curious, what kind of pressure sensor did you use? Like, say i stepped on the left side and then the sensor was in the center. How does the sensor cover the entire step?

funkyguy4000:
Okay.
So i'm also curious, what kind of pressure sensor did you use? Like, say i stepped on the left side and then the sensor was in the center. How does the sensor cover the entire step?

100# flexforce pressure sensor.

To ensure that it is activated, I sandwiched the sensor between two 1/16" stainless steel plates. The pressure sensor has a dab of hot glue on each side of it and the plates have dabs of hot glue between each corner. This ensures that even if you step on the outer edge of the plate, it will still transfer pressure to the sensor.

In the breadboard setup, I also experimented with:

  • IR LED emitter and IR detector - this was the most complex solution to set up since the emitter has to blink at 38kHz, be aligned with the detector, and require much more power. It would also be hard to eliminate dog triggering without mounting it high and then it would be hard to make it blend in.
  • IR proximity detector - this brought it down to one package to install but it requires a lot of depth to mount making it hard to blend in. The range is only about 36" on it but on a staircase, the width is only 30" so technically would work well.
  • PIR sensor - this also would require a lot of depth to mount (~2") although not as much as the IR emitter/detector above. Blending in issue is still there using this.
  • Ultrasonic sensor - this could be rigged up two ways for versatility. Either one at the top and bottom shooting across to the other wall or two in the middle of the facing staircase 180° from each other. The advantage of the middle is that I could do an installation of one box housing both of them and could track people on the staircase as well as where they were on the staircase. Theoretically, I could have lit the stair they were on a different color.

I decided on the pressure sensor for simplicity. It was easy to set up and easy to blend in. If after a period of time I discover these don't work as well as I would like, I still have the hardware to implement one of the options mentioned above.

Oh that makes sense.

So do you upload a new program each time or do you have like 1 microcontroller with 1 program and then another with a different one and then a main switch with on-off-1-2-3?
or how do you change from light show to light show?

Also did you need a carpet foot to get under the carpet?

funkyguy4000:
Oh that makes sense.

So do you upload a new program each time or do you have like 1 microcontroller with 1 program and then another with a different one and then a main switch with on-off-1-2-3?
or how do you change from light show to light show?

Also did you need a carpet foot to get under the carpet?

I upload a new program each time. Except when I want to demonstrate it, the program will be the basic light up and light down routines. I am going to code in a double tap on the pressure sensor to put it in demo mode so I don't have to upload a new program each time. Holidays will require uploading a new program to use special lighting patterns as well. But again, if I want to make it totally computer free, I could use a double tap to go into a mode selection menu that will alternate between patterns with tapping of a pressure pad.

Right now, since I'm changing the program fairly frequently, I have a laptop plugged into the board in the closet under the stairs and I log into the laptop from my upstairs office (Remote Desktop) to do the programming.

I have not placed the top pressure plate under the carpet yet. Downstairs, it is wood flooring and there was already a runner at the base of the stairs so the plate went below the runner. Upstairs, it is on the carpet and I threw a mat over it. Once I am confident enough that this solution will work long term, I will put the upstairs pressure plate under the carpet. I don't know what the 'carpet foot' you mentioned is though.

VERY cool. Just about the only comment I can make is that I'd suggest you may want to think about either LM2679 (which is a 5 amp version of the regulator) or splitting the sourcing between two regulators. Up under a staircase, out of sight, I'd just prefer to think there's not going to be anything that will get hotter than say, 150F. Thermal shutdown.. you are in the range of breakdown of some adhesives and such. You just don't want a concentrated source of heat in a hidden space.. and splitting the power will spread the heat out. Not sure which regulator you are using, but you shouldn't really be pulling 1.4A from a regulator that has a current rating of 1.5A. If you aren't seeing it regularly, don't rely on a fan. Spread that heat out, and running that close to maximum rating on any component isn't going to be a good thing. You'll definitely shorten the life of the component, save yourself some concern and beef up that regulator circuit. Regulators are cheaper than dirt, anyway..

I'd think about adding an lcd and a couple of switches in the closet, maybe one of liudr's keypad shields, whatever-- just a simple menu setup. From there you could even build out code to be able to build sequences within the interface.. but I'm thinking you would more likely just need a scroll-and-select from a list of pre-built sequences, like you have done.

AWESOME!!

focalist:
I'd suggest you may want to think about either LM2679 (which is a 5 amp version of the regulator) or splitting the sourcing between two regulators. Up under a staircase, out of sight, I'd just prefer to think there's not going to be anything that will get hotter than say, 150F. If you aren't seeing it regularly, don't rely on a fan. Spread that heat out, and running that close to maximum rating on any component isn't going to be a good thing.

I'd think about adding an lcd and a couple of switches in the closet, maybe one of liudr's keypad shields, whatever-- just a simple menu setup. From there you could even build out code to be able to build sequences within the interface.. but I'm thinking you would more likely just need a scroll-and-select from a list of pre-built sequences, like you have done.

Excellent suggestions. Thanks. I am also a bit concerned about using the regulator long term. At this point with the animations I have, the current may reach 1.3A for a few seconds and that is it. The regulator barely gets warm with the animations I have set up. But I have ordered some LM1084IT-5.0 from China. These will allow me to get more headroom and do an easy replacement of the one I have now without a redesign of the PCB i have on there now. I am going to also look at getting at least one LM2679, LM2676 or LM2670 to play with. These are more complicated to set up but appear to generate very little heat.

Currently, I'm working on using a pressure pad tapping routine to select different modes. It is very simple and elegant.

  • Ambient light level has to be high to enable the tap counting (at night, turning on the stair light is adequate)
  • When pressure pad is activated, count subsequent taps for 2 seconds
  • If there are at least 3 taps, flash the lights on the stairs indicating the selection mode has been selected
  • Start cycling through brief visual representations of each animation (about 2 seconds each)
  • After each animation, pause 1 second and check to see if the pressure pad is still pressed. If it is, go to the next animation. If it is not, select this animation as the one to use.

I have it all programmed out and it functionally looks great, but it is currently unstable going into and out of the tapping routines multiple times and becomes completely unresponsive. Trying to figure that out. If I can't, I'll have to come up with something else.

Is it a bounce issue? You might try using the debounce library if you aren't already...

focalist:
Is it a bounce issue? You might try using the debounce library if you aren't already...

No, not a debounce issue. I'm checking for a change in the pressure sensor reading to be below a certain threshold. It then monitors for it to go above the threshold to tell it my foot has lifted off before counting again. The counts are very accurate. It is in the functions that the system completely stops responding for some, as yet, unknown issue. Don't know if it is some kind of buffer overflow or too many functions called within other functions. I've been spitting out serial data to try to figure out when/why it happens but haven't found anything relevant yet.

A big and great work!

Congratulations! A very good start point for many projects!

Thank you!

I still love this thread, still great job!!
Have you made any changes to this since then?

Thanks.

I have not made any more changes since my last update; however, I am going to be changing out the pressure pads to switch to an infrared beam soon. The pressure pads work great but over time start to move around and the sensitivity decreases with repeated use.

The transition to IR is going to require a couple of addition circuits to be added but I shouldn't have to redo what I have. I plan on using a couple of 555 ICs to modulate the IR emitter so the receiver can accurately detect the beam. The only downside to this is that the IR emitters are power hungry as compared to the pressure sensors with each drawing up to 50mA. This will result in an additional $0.50/yr of electricity usage. But I think I can live with that. :wink:

Which rgb leds did you use?