This is not quite completed but shows it almost done. I'm in process of testing animations and timing. Items to complete are:
add the pressure sensors
mount the RGB LEDs in blocks
put the PCBs in a box
patch the big hole I cut in the closet
I am illuminating the stairs using 30 RGB leds. Control of the LEDs is done using an ATmega328 processor (Arduino) and 6 TLC5940 LED driver ICs. Pressure sensors will be used to detect someone going on the staircase which also allows me to calibrate it so my dog won't trigger it. A light detector will be used to only trigger it at night.
I am adding themes to the animations so at the end of the video, you will see the Xmas theme. A halloween theme will be added that will have red pulsating lights. Other holidays, I haven't quite thought of yet.
This is the first project on the Arduino I started on a couple of months ago and while waiting for parts, I built some LED cubes. It took a long time to plan, breadboard a prototype and then install. There are 120 wires that had to be run under the staircase to the closet underneath. This project is not for the faint of heart! LOL.
Peak amperage is about 1.4A @ 5V being regulated down from a 7.5V 2.5A wall wart power supply.
Just finished getting the light sensor and pressure sensors installed and calibrated. Dog won't set it off but a person will. And it won't come on during the day.
Finished up the stairs this weekend. Pressure senors installed and calibrated. LEDs mounted. Light sensor installed and calibrated. All that is left is to tidy up the mess in the closet under the stairs.
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...
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.
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.
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.
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.
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?
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.