VehiclesFashionRecipesBlogsHuntTravelsSportFunHandmadeITEducation
Mini-Games
x

x
zakruti.com » Knowledge, science, education » GreatScott!
Every Home needs this Upgrade! (Night-Time Stairs)

Every Home needs this Upgrade! (Night-Time Stairs)

FBTwitterReddit

video description

Rating: 4.0; Vote: 1
Experience 6-layer PCBs for free via $30 coupon (not include Surface Finish fee): Get JLCPCB Electronica invitation & win free gift, ticket or free flight to Munich: Parts list for this project: (partly affiliate links) SK6812 LEDs: ATtiny1604: VCNL4200 Distance Sensor: SN74LV1 Level Shifter: LP2985-33 Voltage Regulator: SI230 MOSFET: 0805 Capacitors: 0805 Resistors: You can find the schematic & PCB files here: You can download my created code here: Previous video: Previous Light Up Stair Video: Facebook: Twitter: Instagram: TikTok: Discord: Support me for more videos: In this project, I will create a truly amazing and satisfying Home Upgrade. It involves lighting up stairs in a way that it does not blind you during the night and also make it satisfying to watch/use at the same time. This involved using IR distance sensors, ambient light sensors, microcontrollers and an addressable RGBW LED strip. I truly love the result and hope that you might give a project like this a try; -) Let's get started! Thanks to JLCPCB for sponsoring this video. Visit to get professional PCBs for low prices. 0: 00 Light Up Stairs 1: 32 Intro 2: 25 New LEDs (Addressable) 3: 53 Hardware Changes (uC & Level Shifter & More) 7: 24 Distance Sensor 7: 45 PCB Design & Assembly 8: 50 Testing of the PCB 10: 07 Final Code & Demo 11: 11 Final Mounting & Troubleshooting
Date: 2024-10-21

Comments and reviews: 20


Some things I would do differently are: Put two strips (the rails seems just wide enough to accommodate two side-by-side) and have the top controller handle the top strip and the bottom controller handle the bottom strip. That way if two people want to use the stairs at the same time, the up and down controls remain independent. You'd lose the ability to turn it off sooner when you reach the top or bottom, but unless it's running on batteries, it doesn't really matter, or you could use two distance sensors on each end to find out if someone is entering or exiting the stairs, and handle the logic accordingly.
For cosmetic reasons I'd put a clear window in the diffuser for the distance sensors, so that the diffuser can extend to the edge of the wood, keeping it flush and looking neater.
As mentionned by Raphtaliyah, there's no need to store/track the state of the individual LEDs in memory, the function used to sequentially light them up can send the signal directly to each one so the 252 LEDs strip could be used just fine.

reply

I just did my staircase a few weeks ago.
I've used a 12V 320 led/m cob ledstrip that i bought for 3, - and glued it under the railing that's on the wall.
I use an ESP8266 and a bc337 transistor to drive it. I cannibalised a car's USB charger to get a clean 5V for the microcontroller.
On the underside of the top and bottom step, I've glued a SW-420 vibration sensor.
The ESP runs ESPhome and Home Assistant controls 4 virtual switches for lighting conditions and for when there's nobody home.
I run a very basic code that dims the led's according to the virtual switches. If one of the sensors give a signal, this gets registered in the ESP and it brightens the ledstrip. No fancy animation, just uniform brightness control.
The ledstrip will illuminate during dusk or dark conditions and the brightness levels will variate accordingly.
At night, it lights up at minimal brightness to not disturb anyone but it's great for nighttime orientation!
It isn't flawless, but it's a pretty decent result.

reply

Awesome project! Now try that with a u-shaped staircase (like mine.
Here's what I did: below each stair I have mounted a 50cm wide (or long ) diffusor with an equally wide SK6812 LED strip inside. I soldered the same kind of connectors that the strip originally comes with to each of the 15 segments to be able to replace one segment at a later point in time if needed. My driver board is an Esp32 (yes, it's probably overpowered, but my IC programming skills are weak) to which I'v flashed WLED. Instead of a distance sensor I'm using two simple PIR sensors. One is aimed at the bottom of the stairs, one at the top (the whole assembly sits at the top) but due to the u-shape of my staircase this works just the same I'd say.
I also inject power at both the top and the bottom of the strip, but data only goes in one-way.

reply

Great project, but I miss a follow-up idea. If it's already clear on the staircase landing that someone is walking, then it seems obvious that lights should also be switched on before and after the stairs, or for example, the bathroom lighting could be activated at night, etc. :-)
I built something similar using ESPs and pass the triggers to the home automation system. Since this is quite a central point in the house, it allows for some exciting possibilities.
After a certain time of night, our hallway is also dimly lit because the home automation was already set up, so it was an obvious solution. BTW: To control the stripe I simply use the OpenSource WLED Implementation. No additional conding needed.

reply

Great result, not sure about the problems you had, seems a bit silly for someone so smart
1. Why bother with these silly old microcontrollers, get a nice usb programmable micro like an stm32, rp2040 or esp32c3/S3 all would have plenty of ram to run hundreds of neopixels with a full buffer based driver
2. If jlcpcb is sponsoring the video why not just get them to assemble the PCB, I've had a lot of good experiences with them, seems like a win win.
3. You could have different circuits at either end (one PCB, 2 designs with v-score, the top PCB could be a simple sensor to rs485 or other bus converter to avoid needing to share the neopixel bus and just have a simple master controller.

reply

i did a comission for someone recently for a cosplay, and I had a string of 300 RGBW leds, I used a arduino nano for the controller and used the FastLED and an addon for RGBW, the LED drivers were not nativly supported by fast led, but I got it to work. I had a similar progressive chain but over 10 lengths of 30 leds that all started at the same time, it in the end takes 4238 bytes, after I finished the project I realized I could have done the wiring a different way to cut down the programing and the storage. but hey it worked. The way I programmed it is nested for loops to get what I needed. in the end being happy with the result is all that matters, and the client was quite happy with it.
reply

You could also try an IR distance sensor at the top or bottom of the stairs. You can get cheap ones, but they'll only do up to 4 metres, with the likes of the TF mini lidar doing 12 metres, and the lidar lite doing up to 40 metres. Obviously, range goes up with price (in most cases, but with an IR sensor you could just flick it on when someone is in view, and then depending on where they are, light up the strip. Your idea of using an animation is quite smart too, especially with how you've set it to go off when you reach the end of the stairs, the only concern is if a pet or other person triggers the sensor on the other end before you get to it. :P
reply

I like 12V addressable LED strips more - voltage drop over distance affects the LEDs less.
And yes, for controller i then use a cheap buck converter and level shifter.
Or just pick a ESP8266/ESP32 with WLED firmware and just add your specific functionality to it. As bonus, you get fully controllable IoT lighting over WIFI. :)
(I plan to do similar project for the underside of my bed)
NB! If you already have some connection between two controllers, why not just to have one controller with 2 sensors on either side of the stairs

reply

With the individually addressable LEDs, I've generally found that data at 3. 3V has been fine. That's not proper design, obviously but good enough for some work.
One way I've seen to handle it is that the data needs to be a specific fraction of the supply voltage so by powering a single LED a bit below 5V, the 3. 3V actually gets within spec and then the LEDs downstream of the first will receive appropriate voltage. This does mean you have to have a 'sacrificial' LED though. (I think I'm remembering that correctly.

reply

I think the problem with why it did not work with the first diode was not that it was too slow. The reason is, that after switching from high to low, the charge is blocked by the diode and only flows through the leakage current of the diode and maybe some high impedance path of the LED IC. To make it more reliable and independent of the diode, you could put something like a 10-20k resistor between pin 1 and 2 of U6. (This will speed up the discharge.
Edit: Maybe I should have watched the video to the end first: D

reply

You did an outstanding job. Absolutely well done and thank you for describing the steps you had to go through to debug. There’s always room for improvement in a software. The good news now is that your hardware looks pretty solid and you can always update it.
Another interesting application for this is driveway lights. Imagine turning on the lights to a driveway as you enter it and shutting off as you leave. I’m gonna look into that now that you have blazed a path.

reply

I'm sad you got rid of the Each step only turns on it's light when it detects a human passing by. project goal. I think you could still do it. I was thinking with the last video having the boards communicate with each other was overkill. And in that same vein if you put a controller board (or 2, one to end a strip and one to start a new strip) every 3 steps or so you could use this design to have few steps do the presence detection. Maybe next video
reply

Looks amazing!
Just one tip. Putting in connectors instead of soldering everything together on the staircase, is usually a huge quality of life improvement. This means you can temporarily setup and debug the system from a comfy chair, instead of an uncomfortable staircase. It's usually a massive time-saver as well!
Was also planning of doing something similar to my staircase, but still busy completing some other projects around the house: -)

reply

It's really nice what you did there and it's extremely satisfying to watch something self-made like that work. I'm really impressed!
For a practical use case, I would rather use an LED strip (maybe in combination with something like ESPHome, depending on whether I want the effect you've implemented or not) and two motion sensors connected to Home Assistant. This would also make it very easy to modify the setup and requires no soldering (usually.

reply

I'm glad you got it working. Addressible LEDs is probably the right choice considering price and simplicity. I suspect the memory problem is simply a result of how it is done. The code should be able to generate the data on the fly, requiring almost no memory. I would have liked to have sensors all the way up the stairs so it can track your movement speed and follow you. But it's pretty good as it is now. Nice job.
reply

I built the similar project almost 3 years ago, arduino nano, radar motion detectors top and bottom, and an ambient light sensor using 10kOhm LDR. During the day it is purely decorative, morning and evening twilight shows a cycling rainbow travelling up or down stairs, and nighttime has the chasing leds moving away from the detecting motion sensor. Works wonderfully, my lights are under the bannister railing
reply

Combining two signals into one line with diodes requires a pull down resistor. The 1N4148 were fast enough. The reason why the schottky diodes then worked, was not because of their speed, but rather, because they pass more current, when reverse biased, and thus they acted as a weak pull down when pulled to ground. However, too weak, so you still got some problems, until adding a proper pull down resistor.
reply

Love this! The only shame compared to your previous design idea, is that you couldn't animate each step as you pass it - so in other words, only the step you're on (and perhaps one in front and one behind) get's lit as there's no way to know your position other than either bottom or top. But still a great design and project that I'll be having a go at once I've downloaded and ordered your PCBs: )
reply

Works nicely for a single person, but if one person walks up and a second person follows behind will the first person reaching the top turn the lights off for the second person I would probably just use the timer rather than turning lights off when the second sensor is passed. Whenever either sensor is passed the timer resets so a constant flow of people will have continuous light.
reply

Would something like a mmWave sensor work better than IR That could potentially nullify the issue of the diffuser strip causing you problems (or at least give you an option to slice out a portion of the diffuser for a 'window', if you will. You could potentially still use your IR then to sense whether it is daytime/nighttime. Just a back of the napkin thought.
reply
Add a review, comment






Other channel videos