VehiclesFashionRecipesBlogsHuntTravelsSportFunHandmadeITEducation
Mini-Games
x

x
zakruti.com » Knowledge, science, education » GreatScott!
I tried to Revolutionize LED Lights. And FAILED

I tried to Revolutionize LED Lights. And FAILED

FBTwitterReddit

video description

Rating: 4.0; Vote: 1
Cheaper PCB layout Service at JLCPCB: 6 Layers PCBs for $2(Free ENIG): Get 6 layers PCB coupon: Components list: (partly affiliate links) 3. 3V Regulator: 5V Regulator: ATtiny402: VCNL4200: AL8860: 0805 Resistor Kit: 0805 Capacitor Kit: 3015 47uH Coil: LEDs: SI2301 MOSFET: FDLL1418 Diode: Project files: (Schematic/PCB Design/Code): The ATtiny Programming tutorial I used: Previous video: Facebook: Twitter: Instagram: TikTok: Discord: Support me for more videos: In this big project video, I basically tried to revolutionize LED lights. That means I wanted to create an awesome led light for my staircase that only reacts when a human passes by and when it is dark. At the beginning everything worked just fine the mechanical mounting as well as the electrical design with uC, LED driver and distance sensor. After the programming and final assembly, everything fell apart. Check it out; -) Websites that were used/shown during the video: Thanks to JLCPCB for sponsoring this video. Visit to get professional PCBs for low prices. 0: 00 My Staircase problem 1: 34 Intro 2: 39 Mechanical Enclosure 4: 20 Initial Plan for the Electronics 6: 08 Testing the Distance Sensor 7: 05 Creating the final Schematic & PCB Design 8: 51 First Assembly & Test 9: 48 ATtiny Programming & Finished Prototype 10: 41 Final Assembly 11: 24 PROBLEMS & TROUBLESHOOTING 12: 43 Verdict
Date: 2024-04-07

Comments and reviews: 20


For the next iteration, you could add a footprint next to the MCU onto which you can push a spring-loaded pogo pin connector. AliExpress can give you cheap 2. 54mm pogo pin connectors that you can push directly onto 2. 54mm pin header holes (without soldering anything onto the PCB. When doing this, do make sure to be clear about which side goes where and whether you can choose the pin order such that pushing on the pins in the wrong orientation does not burn anything. As alternative I would recommend using SMD JST ZH headers if you wish to leave a programmer attached for testing purposes. You can of course do both, as the PCB does offer plenty space for it. When adding 2. 54mm pitch holes, you can not plate them and not have copper on the bottom side to avoid shorts with the aluminum.
Regarding the voltage regulation: Is there a particular reason why you make both 5V and 3. 3V from the 12V input When you use the 5V rail to create the 3. 3V rail from, you will likely end up with less noise entering the 3. 3V regulator, and the output caps on the 5V regulator can function as the input cap on the 3. 3V regulator.
Did you check what the distance sensors are reporting when the LEDs turn on unexpectedly Even when data loss would occur and sensors sometimes report something that's not there, a filter in firmware can help you get around this hardware problem (e. g. rolling median over X samples.
Your PCBs are pretty well shielded by the aluminum profile and a ground plane, so I don't think that EMC with other devices is an issue here. You could still try to ground the aluminum profile and see whether that makes any difference. It's a quick experiment.

reply

Hi! I looked at the project files to see if I could help with something and I think there are some issues with the daisy chain. Since in1 and in2 are basically the same wire and so are out1 and out2, connecting out2-in1 and out1-in2 causes issues if you have four boards or more. Let's say we have Board A firing up, it will send a signal to Board B through out2_A - in1_B, which will be seen by Board C through in2_B-out1_C and then fed to Board D through out2_C-in1_D leading to it firing up as well. That is what we see at 11: 42 where every two boards light up when only one is triggered.
It looks like there is another issue with the boards on the top of the staircase causing them to always be lit up, I don't know why, could be EMI, could be something else but if two boards in a row are constantly lit up, because of the in-out issue all the boards will end up being ON.
I hope you can end up making the project work because the idea looks nice!

reply

I also prefer dim lighting when heading for bed. The hallway and landing sensor activate the relevant light at minimal brightness and lowest colour temp between 11 p. m. and 6 a. m. On the stairs themselves I have a WS2812 strip with a VL53LOX distance sensor on the first step and on the banister post on the landing. When you put your foot on the first step the strip lights from ground floor to landing over a couple of seconds and turns off when you trip the landing sensor and similarly when you step past the banister post on the landing it lights in sequence from top to bottom and turns off when you get to the last step. Lighting the steps in the direction of travel has proved enough to satisfy my inner nerd, when I first set it up I worked through a variety of running colour waves in the direction of travel a la aircraft emergency lights but once the novelty wore off I found it annoying so set it to just light in sequence.
reply

You could use pressure pads or membranes on the actual stairs, rather than ir detectors, and to make the stair before and after light up could you not use resistors coupled with sensors that detect the drop in voltage (2 step) to turn off so the step you are on will be at 5v (brightest) the next step would be 3v (dull) and the step after 0v or probably 1v then as you step on the next that becomes 5v etc etc
Failing that buy some of the cheap poundland pir garden stake lights, adjust the timers on them break the steaks off, tape them to the wall and add some wire to the battery terminals to join them all together with a 5v plug so they trickle charge, at least then if your power goes out you can still go up and down the stairs safely as they have battery backup.
You can tell me to shut up if you like im probably talking out my backside, im a pc tech rather than an electrician but i like to tinker

reply

As a Brit I love that Germany has the term the big light, although I dread to think what the German is for it.
I saw a lot of comments about the IR distance sensors interfering with each other, I'm not a 100% sure about that as they seem quite far apart and at different elevations; any idea of the beam spread However security lights with movement detectors generally use a Fresnel lens with dual detectors to track a moving heat source, rather than use a photo emitter and detector. But whether there is enough heat emitted from your ankles to trigger it might be a problem, as well as the orientation.
What is your code for propagating to the up stream and down stream units that a sensor has turned on Could there be a problem with the propagation running a head of the movement and then interacting with the detection, or could there be a problem with deciding which direction the person is moving

reply

That's a pretty neat idea indeed, dude!
While I was watching I kept thinking about a way to make it work. And, well, I have a suggestion for you.
First, it's how you mentioned: filters and everything. Second. Would it be possible to have only one brain for all of them
Because all you really need at each step is a sensor to detect someone and the LEDs themselves. The controller doesn't need to be there and if only one controls them all you'd be capable, for example, to turn on the LEDs from the step where you are, the one before and the one after, both of the last ones with 50% of the light, let's say. You know And it would be easier to control in case there's more than one person at the time (like one going up and the other down.
Anyway, looking forward to see what you create!
Stay safe there with your family!

reply

Make another video where you troubleshoot and find the problem before designing a new! Link up half of the boards on the floor, find a misbehaving one and start checking what is work. Light off and should be on -What is led driver doing What is uc doing What is distance sensor doing What is software doing Any irregularities on voltages Put a trigger on the 12v line when multiple boards start up. My theory is when the leds start drawing current, voltage drops across the solderpoints between boards start to rack up causing instability on the 12v lines, affecting all components (not a lot of capacitance on 12V line either. Could also be resonance since you're dumping the noise of 15 identical drivers (100 khz-ish) into the 12v/ground of the following boards.
reply

I have done something similar. Use a radar sensor (the cheap microwave I think frequency ones) and you can route a hole in the wood and mount it from the backside so you don't see it, they work through wood. Have one at the top of the stairs, one at the bottom. Build one control board to manage those sensors, and to turn the LEDs on and off. Run wires to the LED locations, and this can all be done on the backside of the wood so all you'll have on the front of your nice wood strip is the hole with the LEDs and you can add disfussion covers easily. Code it to turn the LEDs on in ascending or descending order (depending which sensor triggers) over 1-2 seconds, using PWM, and auto-shutting off in the reverse order after 20 seconds or so.
reply

Maybe its a lame suggestion, but. Is there a possibility, that sensors can influence each other On table it could be, that IR sensor can accidentally catch near IR from an other sensor or LED, since they are really sensitive. I bellive, that this might be an issue. On the table you have tested (you may not, but i assume) it against your hands that are very translusive on 940nm IR. But your straicase seems like very shiny, almost like mirror due to the varnish on them. The diverging angles on your led is -10 DEG. if you will assume perfect angle of bounce, and l = 90cm then 1. 8xtan(10DEG) = radius of 31. 7cm. That 1. 8m is due to the perfect reflection. And now I have noticed the shiny endings that are opticaly a round mirror.
reply

Maybe use just two sensors for all, one is up one is down. Microwave sensors (not distance sensors, only movement or presence sensor, distance sensors can be noisy, and they need software protections against wrong signals) work under some plastic so you can also use that diffuse cover. This setup looks awesome but dangerous, lighting up one portion of staircase could be more dangerous than totally dark condition. Sensors can trigger and all the lights could be turning on slowly with pwm, it would look also cool. You could use can-bus data line, or some dmx controller for further fantasy but it would be expensive and more work work. :) (leds light up all but only the detected place lights up in a different color: ) )
reply

Hi
I think i might know the problem here. But here is a simpler solution that i did while i got whopped by my parents for destroying the staircase (i am bad at wood works)
I understood your frustrations when the project dint work
Been there.
Any way the theory is that i kept the ir sensor TOF based near the edge of each step pointjng little down.
Then i used a simple mosfet to control the leds
no microcontroller
But to trigger the next led i made a track from MOSFET output to next mosfet input
This goes for only 3 steps at a time
Then after 3 steps another sensor
Again single MOSFET for 3 steps and so on
Anyway cheers waiting for update

reply

I think you should try to dismount half of the pcb’s (the top 2m) and check if it works. You are draining quite a lot of current and the reason why they don’t work could be caused by the supply voltage at the top part has dropped or is disturbed. Check all supply voltages with an oscilloscope (not at the power supply in the bottom but) at the top of the staircase. Especially for the Tiny AVR, it can reset and if the supply is not stable causing the lights to be all on. Great project, I hope you will make a part two when you get it to work if cutting the PCB’s at the middle works, you could source it from 2 supplies in the middle as a work around.
reply

Is there cross talk between the IR sensors Maybe have to optically isolate them by sticking them in a hole to narrow the beam. In this situation a retro reflective sensor hitting a reflector on the other side and set the logic to detect when is goes dark. BTW. I work in industrial automation. Variables are the enemy. If I would use a distance senor in that situation I would have went with just one shooting down or up the steps and then timed the lights off it. A microwave sensor would be a good choice.
Your skills with circuits is amazing. The way you can explain the function in a normal way without the gibberish is what keeps me coming back.

reply

Not sure how well this could work but instead of having individual distance sensors for each step almost, you could use one or two radar sensors at the top or bottom of the stairs. The LED strip can be an addressable strip like the SK6812 with warm or cool white and needs no modification. You measure the distance and then light up a couple of LEDs before and after that distance. Needs a ton of calibration and tuning maybe but it could work and end up being cheaper. I don't know how false positives and multiple users could be handled though.
reply

Hi. I may have missed something but why did you need the data lines of the PCBs connected in the first place Each PCB has its own sensor, controller and lights right So I understand only connecting power lines but didn't get what the data lines are for.
And in the video once you disconnected the data lines, most of the segments seems to work fine (I'm assuming) and the corner ones are problem. So check from which side the power is being given and if the voltage is getting bit too weird on other end maybe

reply

I would have set it up to light the LEDs. AHEAD. of the person traveling up or down the stairs. It might have made sense to give each board a data line to communicate sensor to a central processor, and give control of the LED to that same controller, and have one controller decide what to light and dim, based on sensor data. Then, you can eliminate the issues with noise, as well as provide more flexible options for lighting the stairs (and even provide for more entertaining lighting for parties and gatherings)
reply

Thank you for sharing this and your frustrations. I recently pushed myself really hard on a very large project and kept running into roadblocks over and over again that were very difficult like these and it was incredibly difficult to keep pushing myself forward but I finally did and I finally worked through them all and finally figured it all out. Hang in there you got this you will eventually figure it out it's probably just a silly piece of code that you didn't realize because you were going so fast
reply

I know the feeling, I put over 200 neopixels around my tv for ambilight that all worked fine until I hung up the tv on the wall. nothing worse than everything working in small scale and on the carpet and then you hook it all up exactly the same and it fails. Turns out I just forgot to ground the end of the string to the start, even though it went back to ground and I thought ground is ground, soon as I touched a tiny jumper from one end to the other it all started working, noise is a pain in the ass.
reply

My first thought is that I2C is a lousy choice for a 4 meter long bus. Inter-Intergrated Circuit is a bus that should never leave the PCB that it's on. While it can be robust enough to actually work in some situations, it was not designed to be a long distance bus. A LIN bus might be a little harder to implement, but for long noisy communication its pretty good. And you don't need to be worried as much about pullup resistors and bus capacitance. Even UART comms would be better for your situation.
reply

maybe one ir distance sensor does interac with an second one, so the ir source gets from one sensor is piced up by the next one also i would use only one controler and also leds like ws2812b or something like this. but i would maybe use an other type of sensor. the i2c bus can hande all sensors on une bus if the sensor adress can be changed.
also maybe the leds light up the staircase so brightly that the brightness thats detected by the sensors is ower the threshold and keeps the light off.

reply
Add a review, comment






Other channel videos