joric / nrfmicro

A Pro Micro alternative for wireless keyboards
https://github.com/joric/nrfmicro/wiki
The Unlicense
1.48k stars 128 forks source link

SK6812 LEDs power over USB and charging #71

Closed NickHu closed 10 months ago

NickHu commented 10 months ago

Hi, thanks for making this. I saw in your wiki there are some pictures of you having this working with SK6812 LEDs. I believe they are supposed to be driven off ~5V input (according to https://cdn-shop.adafruit.com/product-files/4960/4960_SK6812MINI-E_REV02_EN.pdf), but the VCC on the nrfmicro is 3.3V. Could I please ask how you did the wiring?

My first thought was that you could attach a 5V boost converter to VCC, but I think you would also need a level shifter for the data line. I'm also a bit unsure as to whether or not an acceptable way to turn off the boost converter would be to just cut VCC, which I think nrfmicro is designed to do in sleep mode.

I guess it's probably a bad idea to try to power all these LEDs off the nrfmicro anyway, so if you were to use an external power bus you would need a boost converter from the B+/- terminals to 5V, but then you probably need a transistor to switch between battery/VBUS power depending on whether or it's plugged in to USB.

But then there's also current to think about. With 30 LEDs, that's a max draw of something like 1500mA which far exceeds what you can draw from USB (5V 500mA). I think I am arriving at the conclusion that this board is not designed to power LEDs in any way, and if I want that I need to power them by battery - but is it safe to have the battery charging via USB and discharging to the LEDs simultaneously? Having load on the battery might prevent the charger from thinking that the battery is charged and negate the overcharge protection.

NickHu commented 10 months ago

Actually the SK6812s only draw 12mA (I guess not running at max brightness, but 'typical current' according to the data sheet, so 30 LEDs would draw 360mA, so it might be feasible to power off USB/VBUS, but then I still believe I need some load sharing solution for the battery charger, unless there is one built into the board?

joric commented 10 months ago

You don't have to do shit, just put the new controller in place of Pro Micro. I assure you all LEDs work fine with 3,3V source. See https://youtu.be/5Eni0qIMtD0