For an event, I needed something special. How about a simulated sunrise. And it would be nice, if I could be able to remote control it and put it anywhere in the room. And of course it should be low cost. So the magic words for this are: NodeMCU, Neopixels, LiPo battery and a MQTT broker.
WiringNothing fancy here. The battery is connected to GND and the 3.3 Volts on the NodeMcu and also on GND and the 5 Volt input of the Neopixel stripe. Yes, we power a 5V Neopixel stripe with a 3.7V battery. When fully charged, it will work for some time. The Neopixel stripe mustn't be too long. I used just five pixels, and it works fine.
VideoAlgorithmSunriseTo simulate the sunrise, I'm setting one color at a time. So I divided the given time in three equal parts (one for each color). Within the first third of the time span, I raise the color value of the red LED from 0 to 255. Then I start with the green color. Blue at last. When all three colors are at max, you'll get a white glowing LED stripe.
ToDoI want to add a sunset algorithm and a full cycle of a sunrise, sunshine and a sunset. Just check the Git repository from time to time.
LinksGit repositoryhttps://bitbucket.org/Remnis/sunrise-simulator/src/master/
AmazonOriginal project page
https://rohling-de.blogspot.com/2018/07/sunrise-simulator.html
Comments
Please log in or sign up to comment.