You shouldn't need more memory with more leds! The library you used is not appropriate for this, it works by keeping a sort of "frame buffer" in memory (byte pixels[NUMLEDS * 4]) and sending it out all at once to the leds. This is useful if you are making a display with the leds and let's say wanna play a game on it so you draw your game board, characters, etc, maybe even on top of each other (and not sequentially) and when it's done it updates the display. You don't need this, you just turn leds on, sequentially one after another so you don't need to "draw" it first, you can just "draw" it while sending it, requiring no memory. This way you can use any number of leds with the same amount of memory!
Came here to look for this. There is no need to keep the state of each LED in memory. Just loop through the index and turn it on or off with a short delay.
But the total cost difference is like $2 and it would probably take at least half an hour to use a different library. So unless he’s making a million of these or values his time at less than $4/hour (or would have fun doing unnecessary optimizations) then I think he made the right choice.
no, you need to build house with a second level first and then get a staircase after that to light it up. So buy a property and some concrete first and get dirty hands.
I know you (and all of us as well,) love the complex electronics projects, but I was curious why not take the approach of using a proximity sensor and a WLED-controlled RGBW strip. An Everything Presence One, or Aqara FP2 would make quick work on this. The response time is surprisingly good, plus you can adjust the position and range of the presence sensor to make it have instantaneous response. I use an FP2 (not connected to Internet,) in every room. Hallways etc I make the light follow the person. No reason this couldn't work with staircases.
Personally, I'd suggest adding a more gentle shutdown of the lights. I.e. slowly dimming all of them together, or slowly dimming them from the starting point toward the end. It's a lot more comfortable to slowly loose light (if for some reason the lights turn off while you're still on the staircase) then to suddenly be in darkness. A slower and more gentle startup would probably also be nicer on the eyes.
i use few of that kind of modules in my house - (Probably can't paste direct link, "SMD DC 12V Waterproof LED Modules" search, you get the idea.. :) I use 2x2 modules .. interestingly also mostly near stairs .. or in basement. Good to have at night when bright light is not needed, some have been on for 24/7 for 5+ years. Most soft-white, some amber, one red, depending on need of illumination and how much brightness would disturb at night.
One more thing I appreciate is that you actually did it. A lot of people complain about what the right way of the wrong way is but you actually went out and did it , great work
Nice result, but in my opinion it's a bit complicated to have both sides control the LED strip. I would just let the top board send a signal to the bottom board whenever a person is detected, and have the bottom board handle all the logic.
Wow, this is the first time I started feeling what you were going through when designing, troubleshooting and finally makeing it works, Because my first Microcontroller project with ESP32 was finished last day. I spend days for finding the codes that match my intended circamstances, And last day I succeeded and finished the project. Now it is working perfectly.
With a plain addressable RGBW LED library, you could have kept the original LED strip by programmatically generating values to bit-bang out to the LEDs instead of using a bunch of memory. That would have produced more even lighting. Another option would have been to modify the RGBW library to repeat pixel inputs or interpolate between them, then you'd need 1/Nth as much memory to hold input patterns and 1/Nth the control resolution.
NO! Your previous project was not a failure since you (and we) all learned from it. Congratulations on achieve the goal you were aiming for, but every misstep that teaches you something helps you move forward
I used a different approach. I have a break-beam sensor on each stair using an IR LED and receiver pair. All the LEDs are on the same parallel circuit so they can be modulated from a single pin. each receiver has it's own ATTiny85 which also acts as an I2C slave. I can illuminate stairs either side of the one you are standing on. This can handle more than one person on the stairs and also illuminate stairs with lurking cats on them (that feature times out after a minute of no activity). I have since figured out a way for each ATTiny85 to have a dynamically allocated I2C address so that I don't have to program the address differently for each one, but I'll probably save that idea for another project.
@@fraggdieb92 I'm afraid I can't do that for a while as I'm travelling. Basically though, down one side of the stairs there's two wires driving 14 IR LEDs in parallel from a single pin of an ESP32 which handles the modulation. You can't just leave the LEDs on constantly as the receiver only detects 38 kHz to filter out ambient signals. On the other side of the stairs I run an I2C bus. Each stair has a receiver controlled by an ATTiny85 to detect a broken beam and notify the ESP32. Each ATTiny has a unique I2C address programmed in. It occurred to me that I have one spare IO on each ATTiny. If I used that with a transistor to turn on power to the next module in the chain, I could power up each module in sequence and dynamically assign I2C addresses by polling existing devices.
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.
Even without 2 signals the problem is the same. Another way which might be more common is instead to have a pull up and reverse the diodes. Then it's like an open collector circuit.
I did a similar install but pointed the led strip down instead of forward to eliminate glare. I cut a groove on lthe underside of the trim board. I also installed the strips on both sides of the staircase. I just added the strip control to Home Assistant to turn on the strips at sunset and off at sunrise.
What you need is EL wire. I have put it all around the house. It emits very little light, but in the middle of the night it's all you need. Consumes very little power as well. LEDS work too, but EL wire is simple.
Just a thought, but rather than trying to map the whole strip, could you not proceedurally generate the data stream? For example you create two packets. One that turns on the white led for one pixel and one that turns off the white led for one pixel. To turn on the leds, send the on packet once (turning on the first led), then after a delay, send it twice keeping the first led lit and turning on the second led), then three times etc. to turn on all the leds then do the opposite, send an off command, then two, three, etc. That way, instead of keeping a map of every pixel, you just need a counter to keep track of how many pixels you have left to turn on/off and just keep adding on/off commands to the string until the counter hits zero.
I was thinking the same thing, not too sure how these leds work, are they basically like a shift register? Should be possible to write code that works with any amount without needing to allocate them all to memory.
Yeah, it should be possible, but he'd have to write a lot of code that currently the library is handling for him. It is an electronics rather than software channel after all 😉
@redsquirrelftw that's pretty much exactly how they work. You create a packet of sequential of 4-byte frames (one byte each for RGBW) and you feed the packet to the first LED. It reads the first 4-byte frame and strips it from the packet before sending it on, so the second frame now becomes the first. The second LED does the same, reads the first frame it receives, strips it and passes it on. @@Twosies20 I appreciate that this channel is mostly geared towards electronics, but when using Arduino and other micros, the software becomes a lot more integral to the project. If anything, this isn't really an electronics project given the hardware is pretty much plug and play and all the heavy lifting is in the code.
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 :-)
The diode on the output does not allow the push pull output stage of the level shifter to lower the signal, the level shifter "tries", but diode block the current to bring the LED side down.
you should get quadrature encoding to this, basically add two sensors at each side to get the direction of movement. If someone is going up and another person goes up, it refreshes the timer. If one goes up and the other goes down, the timer stays as is. You'd be able to get both boards to talk to sense if someone wend down while another was going up and differenciate it from one person going up and not finishing the set of stairs!
That's awesome. I built a similar system but decided on making the lights red as it doesn't disable your eyes' night vision. Mine was only for 5 stairs. (split level loungeroom).
That's a super slick solution, a bit outside my "how much effort do I want to put into it" range mind you, plus I have a light at the top of the stairs with a two way switch so... yeah.
I hv been working with ws leds for a long time My suggestion are 1) use esp8266/32 it have more memory and wifi option 2) such long led strips need to b given power from both ends if possible in middle too. To avoid voltage drop and colour change. 3) needs to use relay to switch off whole led strips as each led has ws ic and consumes a lot of power even when the leds are off 4) we can use wled firmware ( it have option and mods for sensors)
You could alter the current limiting option in WLED and do away with the power injection. Lets be honest, its only needed at night so it wouldn't need much illumination anyway.
Not a bad suggestion but the attiny is ( i have not checked the data sheet) less power hungry than the esp solution unless you go into deep sleep maybe?
Don't know if it was already mentioned in other comments. I had a lot of noise on the IN port when turning on the LEDs, so the board was switched off immediatly after turning on. Maybe it is related to an old WS2812B I am using, but an additional 100n capacitior between IN and GND helps. Thanks for the great project.
So happy that you film everything, even when things go wrong. This makes the entire maker scene happy... My projects NEVER work in one go. There's always something. Love the endresult!!
I'm really glad you stuck with it. Ive been working on a personal project and have had quite a few fails, this gave me the motivation I needed to keep going, thank you.
You started with the idea of how to make things as complicated as they could be. Thank god that someone put all the complicated logic (and debugged IT) in a small IC/package!
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.
I've thinking about installing some LED strip to my stairs as I have the same problem. i wouldn't need any animation even, just a static light would be enough. But the incorporation of a proximity and light sensor is a good idea! I've actually even thought about some phosphor strips, as most of the use for the stairs happens only for about an hour after the ligths are off, like forgetting to bring something from downstairs when going to sleep etc.
Would be cool if they dimmed when they shut off. You could add twinkling effects or a strobe one for Halloween or parties would be funny. Orange for autumn red for Christmas etc. looks great though
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
Great video. Glad you got everything working! One suggestion: you may want to consider using an open collector configuration on your data line. This will eliminate the need for the diodes and simplifies adding anything else to the communications bus later on. Keep up the good work!
Or add a radar sensor to the ceiling that is capable of detecting multiple persons ;) Might just add a little bit of complexity ^^ I really love this project. I'm happy to see this follow up video and that you found a solution!
Could you program a check for time between the on and off signal that is about the fastest time it would take a person to go up or down? That way, a 2nd person at the other end wont turn it off.
Good job! You made it! And it looks good. Only thing, I would change is the turn off delay. I would add some, so you have enough time to do couple more steps, before it shuts off.
If the distance between the 3v3 logic and the start of the LEDs is short, it will work fine. The data signal is rebroadcast at full voltage from the first led. I've setup wled on esp8266 & esp32 without a level shifter without issue. You can also power the esp with the same power as the strip.
It's amazing, and I wish I could handle such type of electronic. I work in the IT, but I have no deeper understanding on all the electronic and more technical detailed parts. Handling a soldering iron is tough enough. The only way for me seems to buy a pre-configured solution, which just needs to get assembled at the right place. Thanks for the video, it was interesting to see how you made it.
Thanks - I've been looking for a sensor for ages - my implementation sees each individual stair step as its own µC with communication to the neighboring steps (sort of 'here is someone, I am 1) - the neighboring step receives the 'I am 1' and sends to the other neighbor 'I am 2' and so on. Depending on the number - i.e. the distance to the stair climber, the LED does something different - 100% ON, dimming up/down, random flashing or off. I programmed ATtiny45 for this via Arduino IDE (... years ago - PIR sensors are installed on the experimental plug-in boards) Ordered two CVNLs from faraway China ... maybe I'll get my stairs illuminated after all :)
Great job! If I needed this in my house, I would have used Home Assistant and WLED. Though, I do like the fact that yours runs without the need of HA to trigger it.
this is the way. you could potentially even implement the logic entirely in ESPHome. but having the logic in HA makes it a lot easier and more flexible
If you used a ESP32 and a MQTT server to communicate between HA and the Lights you could probably have it operate independently and report its status to the MQTT server alongside being able to order it to turn off/on, if everything is working then both trigger methods works if the server is down or the internet stops working you only loose the remote control, the built in sensors could still work.
Great project, glad you finally worked it out. One recommendation would be to use the data line itself to transmit the remote microcontroller states so you could eliminate the shielded data wire altogether, or the signal from the LED. Doing this would even let you insert more mc boards in between longer runs for chaining these down long hallways which is how I plan to use these in the future.
I once had a similar noise problem at work, with connecting a bunch of modules with WS2811 chips and RGB LEDs. The diodes went erratic and couldn't be controlled anymore. Terminating the inputs with parallel 1K resistors did the job.
Utility, aesthetics, novelty, mood booster- it checks all the boxes. Definitely worth it. If a success is gonna be hard-fought it should at least remind you of the success part every now and then. I can't think of a better reminder than that!
I feel that if you did this with an ESP8266 or ESP32 or similar you would've been able to update the software OTA which would allow you to make adjustments much easier. It also would've solved your memory problem and you could've used the 60 LED/m strip.
@@greatscottlab That's another thing I'd do differently: I would've used the entire length of the aluminium profile and ran a 3-wire cable in/out of it and hid the controller outside of the strip. Maybe in a separate 3D-printed box or something. You could still mount it at the ends of the profile, or put it somewhere else (as long as the sensor would work). Come to think of it, the sensors could still be in the aluminium profile and the rest moved elsewhere; you'd just need a wire or 2 extra from/to the strip. But anyway: Enjoyed your video nonetheless, as always. Keep up the good work!
In this case, I like the idea of having a human presence sensor pointing up the stairs so that if someone stands there or even if multiple people come up and down, the system stays on.
Ive got this planned as a winter project for our hallway, but will be using ToF sensors to make follow-me lighting and will change the colour depending on the available light at the time of activation.
Never forget, CNLohr's efforts with the ESP8266 to work out the timing for the WS2812 LEDS so long ago that have brought light to so many projects. Raise your glass to CNLohr!
I’ve been using JLC for years - love them. I’ve not finished the video just yet, but one might mention the *HTML BOM Plugin* for JLC. It’s not just a neat feature, but a game changer when it comes to hand assembly.
@@greatscottlab I love your videos, but I just checked your original thumbnail after reading this comment and TBH I likely wouldn't have clicked, in fact I probably would not have even realised it was your video (despite your thumbnail style being somewhat consistent). Anyway, I use the DeArrow extension, the thumbnail is the frame from 12:46 i.e just your stairs lit up in the dark, that told me all I needed to know to click on the video! Consider, less is more? Thx :-)
I just stuck a 5W EM spotlight above my staircase, the single green LED charge light does the job and if there is a power outage the 2X 3cell NICD packs are around 9AH in total giving it about 6 hours of runtime during a power outage. It would be interesting if you could intergrade a 7.4V LifePO4 as EM power so you wont be stumbling around in the dark during a power outage.
I really like how the LEDs light in sequence. A little easier on the eyes than having them all come on at once. I cringe at the thought of walking down polished wooden stairs in my socks though. I can almost guarantee I'd slip and fall within a week.
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).
Yeah, you should have looked at the RAM amount not the Flash memory when choosing another MCU - Attiny1614 would've actually done the job with 252 LEDs - it has 2KB RAM, while 1402 has just 1KB.
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.
I'd add a more gradual fade-in and fade-out. Such sudden turning on can be pretty glaring when your eyes are adjusted to the dark. Perhaps something like 2s for each LED to reach full brightness? Also the timeout turn off mode can be even longer, perhaps something like 20s for the whole strip at once. I think that would look quite cool.
That looks Great Scott. Oh, sorry. But it truly does, if I had stairs I would be ordering some of your PCB's. You always come up with something interesting. Thanks for sharing.
Great job, and a nice "quality of life" improvement. However, I feel the greater danger than not having enough light, is walking in socks on slippery wooden treads. Bad enough if you slide off the tread and tumble down (done that a few times!) But with no risers to stop you sliding through the back, the risk is (for me) horror movie level. I grew up in a house with these type of stairs, and developed a phobia of my leg slipping through the open back and snapping a bone. It never happened, but to this day I am so cautious on wooden treads with open risers, I'm slower than a stairlift. Even with sticky shoes on.
You'll be pleased to learn that in the UK no gap on the staircase (treads or sides) is allowed to more than 100mm (~4in). So they have to use partial risers, bars or other elements to make them less open plan. Probably older staircases are grandfathered in, but hard to sell as is.
My mother's house has a flight of stairs just like this on the porch (one of those houses where the 1st floor is the basement/garage and the 2nd floor is the 1st floor). A gap and no grippy surface, just treated lumber. We run up and down those in the winter snow and ice (Upstate NY), we slip and slide down occasionally but never have once worried about getting a leg stuck in there.
@@chaos.corner I mean, you'd have to slip really weirdly to get your leg stuck like that. I don't know about you, but when I walk up stairs, I'm standing up, not drop-kicking the stairs. If I were to slip toward the stairs, my shin would get walloped by the upper stair and stop my foot from going through, I would expect. Usually though when you slip on stairs, your feet go off the front edge, not the back, as we use our heels when going down and our toes when going up.
Impressive work! It’s great to see creators exploring similar ideas. I love how you’ve brought your own twist to the concept. Our team at Rayzeek developed a similar product, the RZ016 Wireless Motion Sensor COntroller Kit, which has been getting great feedback from users. Very happy to see people getting interested in DIY projects - I also come from a product development background, and the sense of pride in creating something with your own hands is truly different. Looking forward to seeing more of your creative work !
@@greatscottlabA little ESP32C3 dev board would fit nicely. Very small and works perfectly. (But I can only recommend the version with the ceramic antenna, not the really bad Red PCB antenna)
@@greatscottlab Believe ... All you have to do is keep sending the same value over and over again ...how does making the loop counter bigger increase the code size?
for sure it is possible, you'd only need such high memory for non programmatic animations where the state of each led must be in memory at all times, otherwise such as in this case, only a small amount of memory and some timing logic would be needed, see this example from 10 years ago doing animations for 1440 addressable LEDs with under 1KB of memory! th-cam.com/video/I-lR19_kigs/w-d-xo.html
Really cool project! Love how you implemented the automated lighting system for the stairs. I have a technical question though - what if two persons go downstairs simultaneously? The first person triggers the lights on, and when they reach the bottom and trigger them off, the second person would still be midway through the stairs. How does your system handle this scenario? 🤔
I like that you shared you mistakes, makes me feel less alone when I make them haha. I would be great when you give a bit more explanation why your fix fixed the problem. Like why did the 10k ohm resistor work? Where did you add it exactly?
I used ws8212b LED strips connected to a WLED install, which can be controlled by my instance of Home Assistant. To trigger the lights, I use two ESPHome devices each connected to a Time of Flight sensors (I could/should have done this with one ESPHome device). Home Assistant does the coordination. When you break the ToF beam on top or bottom, it turns on the LEDs (to my desired effect) for 15 seconds. It won't re-trip if it is currently showing the effect. Yeah, lots of parts but it's easy to control and using WLED gives me TONS of options for effects, etc.
Brilliant explanation! I love the distance/light sensor, that's such a clean way to do it. I did something similar but used pressure pads on each step. I was able to get 'pressure mat alarms' which fit my stair treads. I wish I'd documented it better, but it was a lot of cabling. It's been running for years now on an Arduino, and each step lights up ahead of me, and even triggers a midi interface for musical stairs. The LEDs can use quite a lot of current if you have a lot of stairs. For a long time, I was using a PC PSU and triggering it to turn on/off via the Arduino to save power.
Also sounds great! Are they cloud connected or do they also have an option to run Totally local (thus not cloud bound like other iot leds from govee) Cause i have a HA system at home and wanted to integrate some and i hate cloud bound devices
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.
This is an awesome project. Glad it worked out too. Do you think it'd be possible to make a variant of this set-up so that instead of one long strip along the wall that lights up, each step could have a smaller strip (the length of the step) that lights up from the wall side to the other as you approach each step via the motion sensor or even just one after the other as each step finishes lighting up. Finally doing the reverse behind you after 10-20 seconds?
Great Project. While whaching, I was wondering how you'll make the communication between the devices. I thought of using the data line of the neo pixel protocol. You could create a software to resceive these signals with your board... 🤔 But it would just be half duplex. For the back channel you would need at least one wire. Maybe the alu rail....? Just cracy ideas... 😄
Nice project but one thing got in my mind. What if 2 people are walking up the stairs and after first pass 2nd sensor it will auto turn off and the 2nd person wont have light. I would suggest adding a delay after passing 2nd sensor, it might help it.
What about cutting slight lines in stairs, putting wire in and covering up, you can attach sensitive capacitive toch sensors to light up section. There are some more alternatives too...
The operating voltage of the Attiny is 1.8V to 5.5V, so you could work at 5V for everything, I think. And for a couple of cents of difference, you can choose always the attiny with 32KB, for the same amount of pins (1 or 2 series). By the way, programming these little and simple MCU's directly (without the arduino stuff) is a lot of fun. Nice project!
As someone else mentioned you shouldn’t need more memory for more LEDS. Would love to see you do the 256 LED version as the 126 has gaps of darkness between the lights with all the spacing, still cool but looks old school compared to a seemless light bar moving down
I use 2 very small battery powered motion sensor lights stuck to the side of the stairs. The batteries last months and it's far easier than making your own. I appreciate that's not what the channel is about, but sometimes I look at a home project and think, I could do something fancy myself or I could buy something more cheaply and just as practical.
You should try using the FastLED library as it is more lightweight. There is also this softwared called WLED and it can be installed on an ESP32 to control leds easier. 30/m is pretty ugly.
Great project thanx for sharing!! I was gonna build something like it using 2 PIR and one Wemos D1, but i might order some of these and try first : ) Pro tip to avoid using a Logic Level Shifter: I use the Diode trick all the time and works great, albeit on WS strips but it should work here too. You can use a diode to drop the voltage to an acceptable level for the ATTiny (and arduinos) just for the first LED. These chips can work at 3.3 or 5 v, you can trick it with a middle value so the first LED understands 3.3 yet the output will be high enough to be shifted to 5V by the second LED onward. A small diode will drop about ~0.7v and being powered by only ~4.3V it automagically understands 3.3v signal. You than power the second LED (and the rest) with 5v and it can perfectly understand the 4.3v signal and will output 5V data as its powered by 5v. So you cut the first LED out (or i just cut out the 5V rail between first and second LED), you wire Ground and Data normally from your microC to the first LED but wire its 5V through a diode, and than 5V directly to the second LED. ** So data and ground are normal, but the first LED gets power through a diode (~0.7v drop) and the second gets normal 5V. Note: This makes the first LED be a little bit dimmer as its not powered at 5V but its barely noticeable, specially with dense strips. Diodes are simple to wire, take very little space and are super cheap : ) As i mentioned i just cut out the 5V trace between first and second LED, and hide the diode under the shirk tube at the beginning, drag a short 5V wire to the second LED V+ trace and it basically take no space at all. Hope it helps someone : ) Also for longer strips, i usually get the (b) variants that have double traces and i usually dont need to power the end of the strip as two traces dont drop as much. (ex. WS2812b are my go to) 🤟
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
Wow, thanks again for another great video, Scott! I wanted to discuss something you've mentioned before: you often say that you don't think you're very good at coding. However, I've been thinking about why you don't consider using AI tools like ChatGPT. Embracing AI in coding can not only improve your work but also help you get your ideas and projects done much faster. I understand that you might feel it takes away from your personal contribution, but I encourage you to look at it differently. I use AI every day, primarily to help me write and modify code. When you already have the knowledge to understand how things work, you can guide the AI to achieve your desired outcomes. You'll still need to debug the code, and that process can teach you a lot in itself. Since I started using AI, I've learned significantly more and much faster because we tackle tasks together. It's also incredibly convenient to get detailed answers to quick questions. I genuinely want to hear your thoughts on this or if you've already started using AI in your projects. Thanks for an inspiring show! As both an electrician and an electrical engineer, I believe that having expertise in both areas makes one a more effective engineer.
From a novice perspective, NICE WORK! I've been wanting to do the same with my staircase. I'm saving this to my playlist for later so that I can replicate your work.
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?
Hello Scotty, I would like to ask you a question, your first solution would that work if put under the stairs? Is that possible that you avoid any interference putting them one bar above the other? In this way you can even hide the led and show only the light as for many led lights are considered more classy if only from reflection and not direct light to eyes view? And also I'm more thorn to build anything with more industrial hardware, if I need an photocell, I'd choose an keyence, omron, balluff(and so on) and a plc mini for a simple task like that or even more flexibility. It's just the way more simple to swap damaged parts, standardised approach, all 12V. However your first idea I liked a lot, too bad you let it ko too easily. I think there's potential.
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.
You shouldn't need more memory with more leds! The library you used is not appropriate for this, it works by keeping a sort of "frame buffer" in memory (byte pixels[NUMLEDS * 4]) and sending it out all at once to the leds. This is useful if you are making a display with the leds and let's say wanna play a game on it so you draw your game board, characters, etc, maybe even on top of each other (and not sequentially) and when it's done it updates the display. You don't need this, you just turn leds on, sequentially one after another so you don't need to "draw" it first, you can just "draw" it while sending it, requiring no memory. This way you can use any number of leds with the same amount of memory!
Came here to look for this. There is no need to keep the state of each LED in memory. Just loop through the index and turn it on or off with a short delay.
*Bro reads sauce cod.*
I'll cat that and grep him.
GitHub SK/WS and go to town. Some really cool work.
I was thinking the same...
I'm too simple to understand this
But the total cost difference is like $2 and it would probably take at least half an hour to use a different library. So unless he’s making a million of these or values his time at less than $4/hour (or would have fun doing unnecessary optimizations) then I think he made the right choice.
Well first I will have to install a staircase, but after that, I'm in!
Haha go for it ;-)
You can barrow one for anywhere there are stairs. I don't mind... 😊
Or buy a house with stairs...
To the Bat Poles!
no, you need to build house with a second level first and then get a staircase after that to light it up.
So buy a property and some concrete first and get dirty hands.
Did my stairs around 7 years ago using addressable led tape, arduino nano and 2 pir sensors, it's still going strong today 👌🏻
Awesome :-) Hope the same for my system ;-)
course i just flip the wall switch and like MAGIC the ceiling lite comes on!...brilliant!.. smFh
I know you (and all of us as well,) love the complex electronics projects, but I was curious why not take the approach of using a proximity sensor and a WLED-controlled RGBW strip. An Everything Presence One, or Aqara FP2 would make quick work on this. The response time is surprisingly good, plus you can adjust the position and range of the presence sensor to make it have instantaneous response.
I use an FP2 (not connected to Internet,) in every room. Hallways etc I make the light follow the person. No reason this couldn't work with staircases.
@@Steve_mos8541 Bingo. You'd think bulbs and switches were something alien...
@@Cornz38these projects are fun. Plus, you may not want to turn on all the lights at night, because it messes with your night vision, wake you up etc
Personally, I'd suggest adding a more gentle shutdown of the lights. I.e. slowly dimming all of them together, or slowly dimming them from the starting point toward the end. It's a lot more comfortable to slowly loose light (if for some reason the lights turn off while you're still on the staircase) then to suddenly be in darkness. A slower and more gentle startup would probably also be nicer on the eyes.
Agreed, the animation is not really helpful to the user.
i use few of that kind of modules in my house - (Probably can't paste direct link, "SMD DC 12V Waterproof LED Modules" search, you get the idea.. :)
I use 2x2 modules .. interestingly also mostly near stairs .. or in basement. Good to have at night when bright light is not needed, some have been on for 24/7 for 5+ years. Most soft-white, some amber, one red, depending on need of illumination and how much brightness would disturb at night.
One more thing I appreciate is that you actually did it. A lot of people complain about what the right way of the wrong way is but you actually went out and did it , great work
Nice result, but in my opinion it's a bit complicated to have both sides control the LED strip. I would just let the top board send a signal to the bottom board whenever a person is detected, and have the bottom board handle all the logic.
Don't forget he is German so he needs to over-engineer it ;-)
That’s a great idea
@@jonnyjuk he iss a swiss Guy, don´t mix us up just because we (sometimes) speak the (nearly) same language.
@@joachimh.9000 He's not Swiss bro, check out mymechanics if you wanna see what Swiss guy can do ;-)
What if you're going up the stairs though? 🤦♂️
Wow, this is the first time I started feeling what you were going through when designing, troubleshooting and finally makeing it works, Because my first Microcontroller project with ESP32 was finished last day. I spend days for finding the codes that match my intended circamstances, And last day I succeeded and finished the project. Now it is working perfectly.
I’m moving to my new house this week! I saw this video and it came at a perfect time. (And then I remembered that it doesn’t have stairs.)
Oh boy. Quite a few twists in this story.
There's still hope! Light the path between bedroom and toilet like a plane's emergency exit lighting,
@@dbuezas Great. Now I’m going to have to figure out how to hook up one of those toilets.
You can always add stairs to nowhere like the Winchester Mystery House.
With a plain addressable RGBW LED library, you could have kept the original LED strip by programmatically generating values to bit-bang out to the LEDs instead of using a bunch of memory. That would have produced more even lighting. Another option would have been to modify the RGBW library to repeat pixel inputs or interpolate between them, then you'd need 1/Nth as much memory to hold input patterns and 1/Nth the control resolution.
NO! Your previous project was not a failure since you (and we) all learned from it. Congratulations on achieve the goal you were aiming for, but every misstep that teaches you something helps you move forward
+++ to this!!
The fact that you can learn from a failure doesn't make it a succes.
Fail Early to Succeed Sooner
I used a different approach. I have a break-beam sensor on each stair using an IR LED and receiver pair. All the LEDs are on the same parallel circuit so they can be modulated from a single pin. each receiver has it's own ATTiny85 which also acts as an I2C slave. I can illuminate stairs either side of the one you are standing on. This can handle more than one person on the stairs and also illuminate stairs with lurking cats on them (that feature times out after a minute of no activity). I have since figured out a way for each ATTiny85 to have a dynamically allocated I2C address so that I don't have to program the address differently for each one, but I'll probably save that idea for another project.
Whats with all the wires? Can you Upload a picture or Video?
@@fraggdieb92 I'm afraid I can't do that for a while as I'm travelling. Basically though, down one side of the stairs there's two wires driving 14 IR LEDs in parallel from a single pin of an ESP32 which handles the modulation. You can't just leave the LEDs on constantly as the receiver only detects 38 kHz to filter out ambient signals. On the other side of the stairs I run an I2C bus. Each stair has a receiver controlled by an ATTiny85 to detect a broken beam and notify the ESP32. Each ATTiny has a unique I2C address programmed in. It occurred to me that I have one spare IO on each ATTiny. If I used that with a transistor to turn on power to the next module in the chain, I could power up each module in sequence and dynamically assign I2C addresses by polling existing devices.
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.
Even without 2 signals the problem is the same. Another way which might be more common is instead to have a pull up and reverse the diodes. Then it's like an open collector circuit.
I did a similar install but pointed the led strip down instead of forward to eliminate glare. I cut a groove on lthe underside of the trim board. I also installed the strips on both sides of the staircase. I just added the strip control to Home Assistant to turn on the strips at sunset and off at sunrise.
What you need is EL wire. I have put it all around the house. It emits very little light, but in the middle of the night it's all you need. Consumes very little power as well. LEDS work too, but EL wire is simple.
Just a thought, but rather than trying to map the whole strip, could you not proceedurally generate the data stream?
For example you create two packets. One that turns on the white led for one pixel and one that turns off the white led for one pixel. To turn on the leds, send the on packet once (turning on the first led), then after a delay, send it twice keeping the first led lit and turning on the second led), then three times etc. to turn on all the leds then do the opposite, send an off command, then two, three, etc. That way, instead of keeping a map of every pixel, you just need a counter to keep track of how many pixels you have left to turn on/off and just keep adding on/off commands to the string until the counter hits zero.
I was thinking the same thing, not too sure how these leds work, are they basically like a shift register? Should be possible to write code that works with any amount without needing to allocate them all to memory.
Yeah, it should be possible, but he'd have to write a lot of code that currently the library is handling for him. It is an electronics rather than software channel after all 😉
@redsquirrelftw that's pretty much exactly how they work. You create a packet of sequential of 4-byte frames (one byte each for RGBW) and you feed the packet to the first LED. It reads the first 4-byte frame and strips it from the packet before sending it on, so the second frame now becomes the first. The second LED does the same, reads the first frame it receives, strips it and passes it on.
@@Twosies20 I appreciate that this channel is mostly geared towards electronics, but when using Arduino and other micros, the software becomes a lot more integral to the project. If anything, this isn't really an electronics project given the hardware is pretty much plug and play and all the heavy lifting is in the code.
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 :-)
he loves soldering way too much lol, everytime i see him solder stuff rather than use a simple breadboard kills me
The diode on the output does not allow the push pull output stage of the level shifter to lower the signal, the level shifter "tries", but diode block the current to bring the LED side down.
you should get quadrature encoding to this, basically add two sensors at each side to get the direction of movement. If someone is going up and another person goes up, it refreshes the timer. If one goes up and the other goes down, the timer stays as is. You'd be able to get both boards to talk to sense if someone wend down while another was going up and differenciate it from one person going up and not finishing the set of stairs!
That's awesome. I built a similar system but decided on making the lights red as it doesn't disable your eyes' night vision. Mine was only for 5 stairs. (split level loungeroom).
That's a super slick solution, a bit outside my "how much effort do I want to put into it" range mind you, plus I have a light at the top of the stairs with a two way switch so... yeah.
I hv been working with ws leds for a long time
My suggestion are
1) use esp8266/32 it have more memory and wifi option
2) such long led strips need to b given power from both ends if possible in middle too. To avoid voltage drop and colour change.
3) needs to use relay to switch off whole led strips as each led has ws ic and consumes a lot of power even when the leds are off
4) we can use wled firmware ( it have option and mods for sensors)
You could alter the current limiting option in WLED and do away with the power injection. Lets be honest, its only needed at night so it wouldn't need much illumination anyway.
Use 12v LEDs and you can do 200 over 10m without any colour shift, I'm using pebble strings around my room for general lighting.
Not a bad suggestion but the attiny is ( i have not checked the data sheet) less power hungry than the esp solution unless you go into deep sleep maybe?
Don't know if it was already mentioned in other comments. I had a lot of noise on the IN port when turning on the LEDs, so the board was switched off immediatly after turning on. Maybe it is related to an old WS2812B I am using, but an additional 100n capacitior between IN and GND helps.
Thanks for the great project.
So happy that you film everything, even when things go wrong. This makes the entire maker scene happy... My projects NEVER work in one go. There's always something. Love the endresult!!
I'm really glad you stuck with it. Ive been working on a personal project and have had quite a few fails, this gave me the motivation I needed to keep going, thank you.
You started with the idea of how to make things as complicated as they could be.
Thank god that someone put all the complicated logic (and debugged IT) in a small IC/package!
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.
Great job! And I think many people need this, just not me because I don't have such a large home.
Good excuse for buying a large home!
I've thinking about installing some LED strip to my stairs as I have the same problem. i wouldn't need any animation even, just a static light would be enough. But the incorporation of a proximity and light sensor is a good idea! I've actually even thought about some phosphor strips, as most of the use for the stairs happens only for about an hour after the ligths are off, like forgetting to bring something from downstairs when going to sleep etc.
Would be cool if they dimmed when they shut off. You could add twinkling effects or a strobe one for Halloween or parties would be funny. Orange for autumn red for Christmas etc. looks great though
This is Germany there is no Halloween and strobe lights cause seizures...
WLED on github will do this
@@carddamom188 you must be fun at parties...
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
This looks like a cool project. Thanks for doing the heavy lifting on the research/design.
My pleasure :-)
Great video. Glad you got everything working!
One suggestion: you may want to consider using an open collector configuration on your data line. This will eliminate the need for the diodes and simplifies adding anything else to the communications bus later on. Keep up the good work!
So two persons in different ends will cancel each other out? Nice setup for one person at the time. :)
Haha yes, I guess. You can always change the programming though and only utilize the timer.
Or add a radar sensor to the ceiling that is capable of detecting multiple persons ;)
Might just add a little bit of complexity ^^
I really love this project. I'm happy to see this follow up video and that you found a solution!
Could you program a check for time between the on and off signal that is about the fastest time it would take a person to go up or down? That way, a 2nd person at the other end wont turn it off.
Or use a spare Lidar that you have laying around 😆
So many possibilities. I love it!
Good job! You made it! And it looks good. Only thing, I would change is the turn off delay. I would add some, so you have enough time to do couple more steps, before it shuts off.
If the distance between the 3v3 logic and the start of the LEDs is short, it will work fine. The data signal is rebroadcast at full voltage from the first led. I've setup wled on esp8266 & esp32 without a level shifter without issue. You can also power the esp with the same power as the strip.
Yeah same for i2c lengths.
I have a similar project with no uC on my channel: under cabinet lighting.
It's amazing, and I wish I could handle such type of electronic. I work in the IT, but I have no deeper understanding on all the electronic and more technical detailed parts. Handling a soldering iron is tough enough. The only way for me seems to buy a pre-configured solution, which just needs to get assembled at the right place. Thanks for the video, it was interesting to see how you made it.
might be good to have a single LED stay on at all times at each end of the strip, that way you can see the edge of the stairs before triggering it.
well.... 🤣
Thanks - I've been looking for a sensor for ages - my implementation sees each individual stair step as its own µC with communication to the neighboring steps (sort of 'here is someone, I am 1) - the neighboring step receives the 'I am 1' and sends to the other neighbor 'I am 2' and so on.
Depending on the number - i.e. the distance to the stair climber, the LED does something different - 100% ON, dimming up/down, random flashing or off.
I programmed ATtiny45 for this via Arduino IDE (... years ago - PIR sensors are installed on the experimental plug-in boards)
Ordered two CVNLs from faraway China ... maybe I'll get my stairs illuminated after all :)
Great job!
If I needed this in my house, I would have used Home Assistant and WLED. Though, I do like the fact that yours runs without the need of HA to trigger it.
This is the correct answer I started with wled then added home assistant and I’m in way better shape and have way more things
this is the way. you could potentially even implement the logic entirely in ESPHome. but having the logic in HA makes it a lot easier and more flexible
Esphome would be better option. ha will introduce latency
If you used a ESP32 and a MQTT server to communicate between HA and the Lights you could probably have it operate independently and report its status to the MQTT server alongside being able to order it to turn off/on, if everything is working then both trigger methods works if the server is down or the internet stops working you only loose the remote control, the built in sensors could still work.
Great project, glad you finally worked it out. One recommendation would be to use the data line itself to transmit the remote microcontroller states so you could eliminate the shielded data wire altogether, or the signal from the LED. Doing this would even let you insert more mc boards in between longer runs for chaining these down long hallways which is how I plan to use these in the future.
Way back in the day we used to have something to put in these dim areas of concern for safety. It was called a "night light".
I once had a similar noise problem at work, with connecting a bunch of modules with WS2811 chips and RGB LEDs. The diodes went erratic and couldn't be controlled anymore. Terminating the inputs with parallel 1K resistors did the job.
I highly recommend putting some grip material on your stairs!
Maybe one day :-)
@@greatscottlabThe grip material is going to feature in a future Ali Express buys epsiode right? 😉😆
@@nocillis I think he might need a system that automatically dispenses a grip material on each next step when someone uses the stair 😆
@@greatscottlab The day after you slip and slide down the last six on your ass :)
Utility, aesthetics, novelty, mood booster- it checks all the boxes. Definitely worth it. If a success is gonna be hard-fought it should at least remind you of the success part every now and then. I can't think of a better reminder than that!
I feel that if you did this with an ESP8266 or ESP32 or similar you would've been able to update the software OTA which would allow you to make adjustments much easier. It also would've solved your memory problem and you could've used the 60 LED/m strip.
True. But I am not 100% sure whether an ESP would have fit on the PCB. Keep in mind that the PCB had to find in the aluminium LED holder.
@@greatscottlab That's another thing I'd do differently: I would've used the entire length of the aluminium profile and ran a 3-wire cable in/out of it and hid the controller outside of the strip. Maybe in a separate 3D-printed box or something. You could still mount it at the ends of the profile, or put it somewhere else (as long as the sensor would work). Come to think of it, the sensors could still be in the aluminium profile and the rest moved elsewhere; you'd just need a wire or 2 extra from/to the strip.
But anyway: Enjoyed your video nonetheless, as always. Keep up the good work!
@@greatscottlab with the bare esp chip i bet it would have fitted, although its also not really great having to solder a qfn package
In this case, I like the idea of having a human presence sensor pointing up the stairs so that if someone stands there or even if multiple people come up and down, the system stays on.
Nice video, showing not only the first time right steps. Thanks!
Glad you enjoyed it!
Ive got this planned as a winter project for our hallway, but will be using ToF sensors to make follow-me lighting and will change the colour depending on the available light at the time of activation.
Never forget, CNLohr's efforts with the ESP8266 to work out the timing for the WS2812 LEDS so long ago that have brought light to so many projects. Raise your glass to CNLohr!
I’ve been using JLC for years - love them. I’ve not finished the video just yet, but one might mention the *HTML BOM Plugin* for JLC. It’s not just a neat feature, but a game changer when it comes to hand assembly.
Never give up! 👍
I'm glad this worked out finally! I was wondering if this project was ever going to come back. it's very cool.
Is it necessary to change the led strip due to the memory of Mcu? We can get mcus with more memory for a cheaper price than the new led strip.
Yes. You can also use another MCU. I wanted to stick to this ATtiny series though and there 16K is the max memory.
@@greatscottlab The ATtiny 1- and 2-Serias are also available with 32K memory or "simply" program it more efficient.
This is super cool, and love that you came back to it! They look great and very useful!
Of course I want to see your work with electronics; you don't need a red arrow in the thumbnail to entice me!
I like this style though ;-)
@@greatscottlab I love your videos, but I just checked your original thumbnail after reading this comment and TBH I likely wouldn't have clicked, in fact I probably would not have even realised it was your video (despite your thumbnail style being somewhat consistent). Anyway, I use the DeArrow extension, the thumbnail is the frame from 12:46 i.e just your stairs lit up in the dark, that told me all I needed to know to click on the video! Consider, less is more? Thx :-)
I just stuck a 5W EM spotlight above my staircase, the single green LED charge light does the job and if there is a power outage the 2X 3cell NICD packs are around 9AH in total giving it about 6 hours of runtime during a power outage. It would be interesting if you could intergrade a 7.4V LifePO4 as EM power so you wont be stumbling around in the dark during a power outage.
I really like how the LEDs light in sequence. A little easier on the eyes than having them all come on at once.
I cringe at the thought of walking down polished wooden stairs in my socks though. I can almost guarantee I'd slip and fall within a week.
Great to hear you made it working! Since the beginning of this projects, I have wondered why didn't you choose the Neopixels in first place...
12:47 awesome dude
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).
Yeah, you should have looked at the RAM amount not the Flash memory when choosing another MCU - Attiny1614 would've actually done the job with 252 LEDs - it has 2KB RAM, while 1402 has just 1KB.
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.
Finally, got the subscription notification on time
Awesome! Thanks for watching :-) Hope you like it
I'd add a more gradual fade-in and fade-out. Such sudden turning on can be pretty glaring when your eyes are adjusted to the dark. Perhaps something like 2s for each LED to reach full brightness? Also the timeout turn off mode can be even longer, perhaps something like 20s for the whole strip at once. I think that would look quite cool.
1.99M subscribers, interesting
Soon ;-)
@@greatscottlab What is coming for 2Mn :D
he's deleting subscribers to maintain a steady 1.99M
You reached 2M
That looks Great Scott. Oh, sorry. But it truly does, if I had stairs I would be ordering some of your PCB's. You always come up with something interesting. Thanks for sharing.
Great job, and a nice "quality of life" improvement. However, I feel the greater danger than not having enough light, is walking in socks on slippery wooden treads. Bad enough if you slide off the tread and tumble down (done that a few times!) But with no risers to stop you sliding through the back, the risk is (for me) horror movie level.
I grew up in a house with these type of stairs, and developed a phobia of my leg slipping through the open back and snapping a bone.
It never happened, but to this day I am so cautious on wooden treads with open risers, I'm slower than a stairlift. Even with sticky shoes on.
You'll be pleased to learn that in the UK no gap on the staircase (treads or sides) is allowed to more than 100mm (~4in). So they have to use partial risers, bars or other elements to make them less open plan. Probably older staircases are grandfathered in, but hard to sell as is.
My mother's house has a flight of stairs just like this on the porch (one of those houses where the 1st floor is the basement/garage and the 2nd floor is the 1st floor). A gap and no grippy surface, just treated lumber. We run up and down those in the winter snow and ice (Upstate NY), we slip and slide down occasionally but never have once worried about getting a leg stuck in there.
@@watsgoinonhere1 It hasn't happened so it won't happen, right?
@@chaos.corner I mean, you'd have to slip really weirdly to get your leg stuck like that. I don't know about you, but when I walk up stairs, I'm standing up, not drop-kicking the stairs. If I were to slip toward the stairs, my shin would get walloped by the upper stair and stop my foot from going through, I would expect. Usually though when you slip on stairs, your feet go off the front edge, not the back, as we use our heels when going down and our toes when going up.
@@watsgoinonhere1 Well, sure. It's never happened to me either so maybe.
Impressive work! It’s great to see creators exploring similar ideas. I love how you’ve brought your own twist to the concept. Our team at Rayzeek developed a similar product, the RZ016 Wireless Motion Sensor COntroller Kit, which has been getting great feedback from users. Very happy to see people getting interested in DIY projects - I also come from a product development background, and the sense of pride in creating something with your own hands is truly different. Looking forward to seeing more of your creative work !
Yeah an ESP32 and an RGB strip would have worked out right from the beginning
Not sure if the ESP32 would have fit in the aluminium profile though.....
@@greatscottlabI mean an esp ic would fit, certantly not a dev board.
@@greatscottlabA little ESP32C3 dev board would fit nicely. Very small and works perfectly. (But I can only recommend the version with the ceramic antenna, not the really bad Red PCB antenna)
Sounds like you have a cold 😷 get better soon 🤗👍
Glad the stair lights worked in the end 🎉🥳
Stop using stock libraries for bespoke projects. 4k is plenty to turn on any number of addressable LEDs
Doubt....
@@greatscottlab
Believe ...
All you have to do is keep sending the same value over and over again ...how does making the loop counter bigger increase the code size?
for sure it is possible, you'd only need such high memory for non programmatic animations where the state of each led must be in memory at all times, otherwise such as in this case, only a small amount of memory and some timing logic would be needed, see this example from 10 years ago doing animations for 1440 addressable LEDs with under 1KB of memory! th-cam.com/video/I-lR19_kigs/w-d-xo.html
Really cool project! Love how you implemented the automated lighting system for the stairs. I have a technical question though - what if two persons go downstairs simultaneously? The first person triggers the lights on, and when they reach the bottom and trigger them off, the second person would still be midway through the stairs. How does your system handle this scenario? 🤔
0:32 nice coke stash
_no lies detected_
I like that you shared you mistakes, makes me feel less alone when I make them haha.
I would be great when you give a bit more explanation why your fix fixed the problem. Like why did the 10k ohm resistor work? Where did you add it exactly?
Glad you got this project finished! That has to be satisfying.
I used ws8212b LED strips connected to a WLED install, which can be controlled by my instance of Home Assistant. To trigger the lights, I use two ESPHome devices each connected to a Time of Flight sensors (I could/should have done this with one ESPHome device). Home Assistant does the coordination. When you break the ToF beam on top or bottom, it turns on the LEDs (to my desired effect) for 15 seconds. It won't re-trip if it is currently showing the effect. Yeah, lots of parts but it's easy to control and using WLED gives me TONS of options for effects, etc.
Brilliant explanation! I love the distance/light sensor, that's such a clean way to do it. I did something similar but used pressure pads on each step. I was able to get 'pressure mat alarms' which fit my stair treads. I wish I'd documented it better, but it was a lot of cabling. It's been running for years now on an Arduino, and each step lights up ahead of me, and even triggers a midi interface for musical stairs. The LEDs can use quite a lot of current if you have a lot of stairs. For a long time, I was using a PC PSU and triggering it to turn on/off via the Arduino to save power.
Did my stairs about a year ago with some govee LED strips and two motion sensors, worked great and wouldn't be the same without it.
Thanks for the feedback :-) Also sounds great
Also sounds great! Are they cloud connected or do they also have an option to run Totally local (thus not cloud bound like other iot leds from govee) Cause i have a HA system at home and wanted to integrate some and i hate cloud bound devices
My two cents: you could 3D print a sturdy case for both the PCBs. Simply astonished, great job!
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.
This is an awesome project. Glad it worked out too.
Do you think it'd be possible to make a variant of this set-up so that instead of one long strip along the wall that lights up, each step could have a smaller strip (the length of the step) that lights up from the wall side to the other as you approach each step via the motion sensor or even just one after the other as each step finishes lighting up. Finally doing the reverse behind you after 10-20 seconds?
th-cam.com/video/Y7L0fTit80w/w-d-xo.htmlsi=w5p1wGyk5BWvRcEV
Great Project.
While whaching, I was wondering how you'll make the communication between the devices. I thought of using the data line of the neo pixel protocol. You could create a software to resceive these signals with your board... 🤔
But it would just be half duplex. For the back channel you would need at least one wire. Maybe the alu rail....?
Just cracy ideas... 😄
So glad you got this straightened out! What a PAIN it has been! Congrats on the 2 Million!! You'll get there. 😃
Nice project but one thing got in my mind. What if 2 people are walking up the stairs and after first pass 2nd sensor it will auto turn off and the 2nd person wont have light. I would suggest adding a delay after passing 2nd sensor, it might help it.
Glad u finally got a working solution. Keep on teaching and entertaining us at the same time.
What about cutting slight lines in stairs, putting wire in and covering up, you can attach sensitive capacitive toch sensors to light up section. There are some more alternatives too...
I would use a sound sensor .. so that once he has fallen down the stairs the light comes on and he can make it the second time
The operating voltage of the Attiny is 1.8V to 5.5V, so you could work at 5V for everything, I think. And for a couple of cents of difference, you can choose always the attiny with 32KB, for the same amount of pins (1 or 2 series). By the way, programming these little and simple MCU's directly (without the arduino stuff) is a lot of fun. Nice project!
As someone else mentioned you shouldn’t need more memory for more LEDS. Would love to see you do the 256 LED version as the 126 has gaps of darkness between the lights with all the spacing, still cool but looks old school compared to a seemless light bar moving down
I use 2 very small battery powered motion sensor lights stuck to the side of the stairs. The batteries last months and it's far easier than making your own.
I appreciate that's not what the channel is about, but sometimes I look at a home project and think, I could do something fancy myself or I could buy something more cheaply and just as practical.
Perfect video! I must have this in my holiday house, where it is pitch black during the night.
Nothing ever works the first time! Great skills, Sir.
You should try using the FastLED library as it is more lightweight. There is also this softwared called WLED and it can be installed on an ESP32 to control leds easier. 30/m is pretty ugly.
Great project thanx for sharing!! I was gonna build something like it using 2 PIR and one Wemos D1, but i might order some of these and try first : )
Pro tip to avoid using a Logic Level Shifter: I use the Diode trick all the time and works great, albeit on WS strips but it should work here too.
You can use a diode to drop the voltage to an acceptable level for the ATTiny (and arduinos) just for the first LED.
These chips can work at 3.3 or 5 v, you can trick it with a middle value so the first LED understands 3.3 yet the output will be high enough to be shifted to 5V by the second LED onward.
A small diode will drop about ~0.7v and being powered by only ~4.3V it automagically understands 3.3v signal.
You than power the second LED (and the rest) with 5v and it can perfectly understand the 4.3v signal and will output 5V data as its powered by 5v.
So you cut the first LED out (or i just cut out the 5V rail between first and second LED), you wire Ground and Data normally from your microC to the first LED but wire its 5V through a diode, and than 5V directly to the second LED.
** So data and ground are normal, but the first LED gets power through a diode (~0.7v drop) and the second gets normal 5V.
Note: This makes the first LED be a little bit dimmer as its not powered at 5V but its barely noticeable, specially with dense strips.
Diodes are simple to wire, take very little space and are super cheap : )
As i mentioned i just cut out the 5V trace between first and second LED, and hide the diode under the shirk tube at the beginning, drag a short 5V wire to the second LED V+ trace and it basically take no space at all. Hope it helps someone : )
Also for longer strips, i usually get the (b) variants that have double traces and i usually dont need to power the end of the strip as two traces dont drop as much. (ex. WS2812b are my go to)
🤟
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
Wow, thanks again for another great video, Scott! I wanted to discuss something you've mentioned before: you often say that you don't think you're very good at coding. However, I've been thinking about why you don't consider using AI tools like ChatGPT. Embracing AI in coding can not only improve your work but also help you get your ideas and projects done much faster.
I understand that you might feel it takes away from your personal contribution, but I encourage you to look at it differently. I use AI every day, primarily to help me write and modify code. When you already have the knowledge to understand how things work, you can guide the AI to achieve your desired outcomes. You'll still need to debug the code, and that process can teach you a lot in itself. Since I started using AI, I've learned significantly more and much faster because we tackle tasks together. It's also incredibly convenient to get detailed answers to quick questions.
I genuinely want to hear your thoughts on this or if you've already started using AI in your projects.
Thanks for an inspiring show! As both an electrician and an electrical engineer, I believe that having expertise in both areas makes one a more effective engineer.
From a novice perspective, NICE WORK! I've been wanting to do the same with my staircase.
I'm saving this to my playlist for later so that I can replicate your work.
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?
Did similar way based on ESP32, but I am using 24V addressable leds (step of few led at the time but much lower current at 7m linear lad tape.
Hello Scotty, I would like to ask you a question, your first solution would that work if put under the stairs? Is that possible that you avoid any interference putting them one bar above the other? In this way you can even hide the led and show only the light as for many led lights are considered more classy if only from reflection and not direct light to eyes view? And also I'm more thorn to build anything with more industrial hardware, if I need an photocell, I'd choose an keyence, omron, balluff(and so on) and a plc mini for a simple task like that or even more flexibility. It's just the way more simple to swap damaged parts, standardised approach, all 12V. However your first idea I liked a lot, too bad you let it ko too easily. I think there's potential.
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.