Introduction: Automatic Rainbow Staircase Lighting
I show you here how to create automatic and progressive lighting of stairs in the rainbow style!
No more getting up at night using the light on your cell phone to avoid switching on!
For this I used cable ducts where NeoPixel LEDs are installed. Detection is provided at the top and bottom by PIR presence detectors, installed in the 3D printed supports.
The "intelligent" part is entrusted to an Arduino Nano. A light sensor enables the system to be activated only if it is dark enough, and 2 potentiometers allow adjustments, one for light sensitivity, and the other for the duration of ignition (0 to 5 minutes)
Video:
Supplies
Material:
- 4 white solid wiring ducts 3x1 cm x 2 m (1.3 € x 4)
- 26 WS2812B addressable 5050 RGB NeoPixel LEDs (€ 14.23 for 100)
- 220V - 5V 3A power supply (€ 13.28)
- Arduino Nano
- 2 PIR sensors HC-SR501 (€ 9.59 for 5)
- Photoresistor LDR
- 2 Potentiometers 10 Kohms
- 2 Resistors 470 ohms
- 1 Restistor 10 Kohms
- Capacitor 1000 µF
Step 1: Solid Wiring Ducts
To support the LEDs and hide the wires at the same time I used plastic solid wiring ducts (Not sure about the English translation).
I drilled them with a 4mm drill bit according to the center distance of the stairs (It depends on your staircase).
Step 2: NeoPixel LEDs
For the leds, I chose WS2812B. These are addressable RGB LEDs that I bought in a set of 100.
I glued them with a hot glue gun, and to be well centered in relation to the hole, I installed the support above a mirror.
Be careful with the direction, these LEDs have an input and an output, so I turned them in the logical direction so as not to have to cross the wires.
Step 3: Wiring
The wiring is not difficult, there is a + and a - in common for all the LEDs (orange and blue).
Then there is an IN and an OUT pin. The OUT pin of one LED must be connected to the IN pin of the next.
Thin wire is sufficient, here I used wire from an old unused telephone cable.
Step 4: Programming
The heart of the system is an Arduino Nano.
I started by experimenting with Tinkercad Circuits and then I used a test board.
For the LEDs, I used the library Adafruit_NeoPixel.h
I added 2 potentiometers which allow the following settings:
- Light sensitivity (compared to the photocell)
- The ignition time (0 to 5 minutes)
Presence are detected by PIR detectors HC-SR501.
The electronic diagram and the Arduino code are available for download.
Step 5: Electric Circuit
Considering the low number of components, I used a pre-drilled test plate but you can make a real PCB.
Step 6: 3D Printing Support
I created the supports for the PIR sensors with Fusion 360 and I 3D printed them with imitation wood PLA.
The STL file is also to download.
Attachments
Step 7: Installation 1
The base of the wiring ducts is screwed inside the stringers of the stairs.
The top of the wiring ducts which contains the leds and the wires is clipped on the base.
The sensor supports are screwed onto the second and last step.The wires of the bottom detector also pass through the wiring ducts.
Step 8: Installation 2
The power supply and the circuit are installed at the top of the stairs.
The light sensor (photocell) is installed under the last step, and a cover hides the electronics.
Step 9: It's Glow Up!
Operation: if you arrive from the bottom, the LEDs light up one by one up to the top, then go out in the same direction (go out from bottom to top).
If you come from the top, it's the other way around of course.
If you liked it, please vote for me on the MAKE IT GLOW contest 😉

Grand Prize in the
Make it Glow Contest
35 Comments
8 months ago
Bonjour,
j'ai fait votre circuit pour mon escalier, comment fait-on pour accélérer l'allumage des leds, merci d'avance pour la réponse
Best Answer 8 months ago
Bonjour,
il faut diminuer la valeur des delay().
delay(5); et delay(15); pour le temps de variation d'une LED.
delay(200); et delay(500); c'est le temps entre 2 LED.
Donc essayer de diminuer ces valeurs et les LED s'allumerons plus vite.
Answer 8 months ago
Bonjour, merci pour l'info ca fonctionne
1 year ago
Congratulations on your grand prize win.
I love this project and tried it. I’m new to arduino and still learning the code.
Is there a way to comment out the LDR section and not install this component?
I would like to work in all lighting conditions.
Again, congratulations! Well done!
Reply 1 year ago
Thank you for the compliments!
Here is a version of the code without the photovoltaic sensor and without the brightness adjustment :
https://www.magicmanu.com/stairs2/
1 year ago
Very good project, but can I talk about it in detail in the Arduino programming section? I don't quite understand, thank you
Reply 1 year ago
Thank you ! Yes I admit that I have not detailed the programming part, what information do you need?
Tip 1 year ago
Here is an adaptation of the beautiful project of MagicManu for solid stairs (witht risers) and quarter-turn. In my case, I chose to put LEDs on one side.
I glued white solid wiring ducts with 10x20mm so flexible enough to be able to follow the curve of the stairs.
In order not to be dazzled by direct light, I stuck mini visors on each led. These visors are cut from 20mm PVC tube (IRL) for electrical installation.
1 single, very discreet 6mm diameter hole in a riser, for the passage of the wires and the fixing of the photocell.
Reply 1 year ago
Good job ! Well done !
And these cut tubes are a very good idea, they look good!
Thanks for sharing!
1 year ago
Now that is cool
1 year ago
There is some confusion about what has been used for the light detection.
Defintions:
As nouns the difference between photodiode and photoresistor is that photodiode is a semiconductor two-terminal component whose electrical characteristics are light-sensitive while photoresistor is an electronic component whose resistance is inversely proportional to the intensity of incident light; a photoconductor.
so, what did you use? A photoresistor (which is in fact a LDR) or a photodiode?
If it is a photo diode the the schema would be different. Can You please clarify, since this is crucial to the functioning of the circuit.....
Reply 1 year ago
Sorry, it's a A photoresistor (LDR), translation problem!
1 year ago
So eye-catching. Simply the stairs glaring with inexpressible sparkle. Awesome job.
Reply 1 year ago
Thanks ;)
1 year ago
I’m lost or I don’t know but LDR? And 10k resistor showing in the schematic doesn’t shows in the beginning of the list? And when I’m trying to figure out by pictures you don’t use the LDR? Can you explain to me please :) fantastic project btw
Reply 1 year ago
Sorry, I added the resistor R4 to the list at the beginning (10 kohms). And the LDR (LDR=photoresistor) is wired with 2 wires on the LDR1 and LDR2 terminals (black and blue wires). Thanks.
Reply 1 year ago
im trying to download the stl file but shows error all the time
1 year ago
Love it. Just voted for you. I wish I had your skills. Amazing. My dream staircase.
Reply 1 year ago
it's very nice thank you!
1 year ago
Great project, I love it!
I hope to get it done on my rounded stairs. Not so easy, I need some kind of flexible Material to hide the wires behind it.