Controlling SK6812 RGBW LEDs with an Esp8266 - Page 1
Forum section: electronics / beginners

author: Medium
author_rank: Contributor
timestamp: November 14, 2019, 09:33:04 pm
content: Hey!Crucial info first: I'm a software developer that has a good 2 decades of coding in high level languages and some basic assembly, and generally mostly know how to hold a soldering iron. No experience with µCs whatsoever, but loads of ambition.The goal I'm working towards is a ceilling with a bunch of RGBW LED stips, where I can control every LED package separately to create cool effects. Since there are apparently no ready-made RGBW controllers that take custom instructions from a WLAN connection and send them on to the strips, I intend to make my own. (I have no use for these phone apps you can get with some controllers off Ali Express, and most certainly won't buy a dreaded "smart" home device for this.)My findings so far:SK6812 based strips come in a variety of RGBW variants and are relatively cheap to obtainArduino seems to be a good platform for µC beginners like me, but the hardware is a bit on the expensive side: I'll need to control slightly above 4096 LEDs in total and want to achieve a refresh rate of the whole setup of 30/s or more, so probably more than just one controller needed.Esp8266 seems to be a great and cheap thing with enough IO and WiFi already integratedThe NeoPixelBus library appears to be a great base, and would function with the Esp8266What I'm a bit unclear about is:How do I program the Esp8266? I read that the Arduino IDE could be used, but have no idea what I will need to actually communicate with them.The Esp8266's data pins (and working voltage) are told to be 3.3V, but the SK6812 chip wants 5V on both, supply and data. My knowledge of electronics engineering is really limited. How do I marry these two, preferably using a common PSU that delivers 5V?I want to use under-powered PSUs, since I need them to go into a 100x100mm cable channel and will not need full output on all LEDs at once. I plan to limit brightness in software, by defining groups of strips that share their PSUs and regulating the output accordingly. Since the SK6812 uses PWM, I wonder what happens if I get really unlucky and many of the PWM spikes happen all at once. Will this turn my PSUs into smoke? In that case: How could I avoid this?I'd be super thankful for any help with this. Please bear with me when I ask stupid questions or don't understand common jargon or basic concepts - I'm really new to this, but very willing to learn. Thanks!

author: pmercier
author_rank: Contributor
timestamp: November 14, 2019, 10:08:32 pm
content: Hello,For the ESP8266 i can confirm that you can use the arduino ide with the correct packages.I did it a couple of time to play with the ESP8266 and some neopixel clones but i used an already made devboard like the NodeMCU.A good starting point to get started with the aduino ide configuration for the ESP8266 is :https://github.com/esp8266/ArduinoConcerning the SK6812 @3v3 it worked well from me. The led strip will accept the data signal at 3V3 even if it's powered with 5V.But If you really want to push the signal to a 5V one, you can use a "level shifter". You'll find already made modules with 2 to 8 channels on aliexpress. They're really easy : you put the 3v3 lines and 3v3 power on one side, and you put the 5v's on the other side.Oh and ... i think there's no stupid questions, there's only questions who need an answer.And what i always say to my fellow software engineers : Clever people are those who ask questions. They'll sometime feel stupid but only for a short period of time. Stupid people are those who don't ask when they don't know and stay stupid.So if you need more answer ... feel free to ask

author: pmercier
author_rank: Contributor
timestamp: November 14, 2019, 10:16:31 pm
content: Oh, and if the direct drive of the SK strip don't work, you can try ti use the trick this hacked did :https://todbot.com/blog/2017/01/12/crashspace-bigbutton-w-esp8266/Using the first led as a sort of "level shifter" with the trade of the first led being less bright. If you have a lot of lines, it can be a good trick, but i didn't test it.

author: Medium
author_rank: Contributor
timestamp: November 15, 2019, 11:31:41 am
content: Quote from: pmercier on November 14, 2019, 10:08:32 pmGlad to hear from someone that already had a go with this combo! The NodeMCU looks perfect for me as well. It's fairly cheap, and even comes with its own 5V to 3.3V converter. That makes the PSU situation a whole lot easier for me. And it even has USB already built in and ready to use - cool!QuoteI did not expect that it would work at 3.3V at all. I'll have to try this though, since some of my strips will end up being about 7m long with no chance to run wires anywhere but to the strip's ends. But a level shifter sounds easy enough to wire up, thanks!I will order a strip and a NodeMCU and see how far I might get. Huge thanks!What remains are my concerns about my 3rd point. A strip with 30 RGBW LEDs/m is said to have 9W/m. That gives me 63W for a 7m length. WAY too much, considering that my strips will be just 30cm apart. I want to illuminate my living room, not blast my eyes outMy hope is that I could do with about 1/4 of the max power, and supply 4x 7m of strip with a 60W PSU, and my software making sure that the sum of the brightness in every such block doesn't exceed 1/4 of the sum of the maximum. Which is where the PWM comes in: If too many LEDs peak at the same time, I will potentially exceed the max output of the PSU by 4x (absolute worst case) for a new ns or ms. What are the chances of the PSU surviving this, and/or how could this be "smoothed" without having any direct control over the PWM?

author: pmercier
author_rank: Contributor
timestamp: November 15, 2019, 06:41:21 pm
content: If you are going to use those cheap Chinese psu blocs, get one that's double the power you need. When running at full power they can get REALLY HOT. The provided thermos was shirt after 5 minutes of only 14A with a 20A chineesly rated fanless PSU... Imagine what you can have at full powerAnd they can be really inefficient.I even had one that died with a burnt resistor.

author: Medium
author_rank: Contributor
timestamp: November 28, 2019, 02:00:01 pm
content: Quote from: pmercier on November 15, 2019, 06:41:21 pmOoof. That looks bad. I saw a few affordable things on AliExpress a few months ago from a brand called Meanwell. From the back of my head, I recall them as an "okay" brand. Would these a bit more trustworthy?By the way: My question with the PWM-indroduced rapid variations in consumption is still open. I would have thought that things like that would be a farily common issue and easily solved.

author: pmercier
author_rank: Contributor
timestamp: November 28, 2019, 07:08:55 pm
content: For the pwm "spikes" nothing bad will happen to the PSU. It will only provide a limited max current. Your led strips will just have less current so less brightness.Meanwell if I remember correctly is a good one if it's genuine.Some component in these PSU can get hot but I can't guaranty that am right, as am fairly wet behind the ears for analogs.