I wonder if it is possible to make a fullsize PCB with per-key RGB, using WS2812B 3528 led ?
from what I found online, each led would consume up to 30mA (at maximum brightness), fullsize PCB would have over 100 led that mean 30 * 100 = 3000mA. the USB port can only provide about 500 ~ 900 mA (am I right?) => so there is not enough power.
let say I reduce the brightness of each led to half, meaning I still need 1500mA, still far from what USB port can provide.
is there anyways to make this work?
I’m no electrical engineer so I may have misunderstand something… pardon me
First of all, you don’t want to shine those LEDs at full power, they are designed for room lighting, not for signals, and it really doesn’t make sense. That reduces the power needs.
If it’s a bluetooth keyboard, it will have its own battery, so you don’t have to worry about currents, except it may be a bit annoying if your keyboard charges slower than discharged.
If you go for USB C plug, you can use USB PD to negotiate much more power from the host. There are ready chips that will do that for you.
And by the way, you probably want to use RGB LEDs with a data and clock line, such as APA102, instead of the WS2812B, because then you can drive much more of them even with a slow microcontroller without worrying about timings.
The idea is that you have a separate circuit that is responsible to negotiating the best voltage and current, and then converting that to whatever you use internally. It’s independent from your microcontroller then.
All of what I’m about to say is based on my understanding of things and IANA electrician/hardware designer, but: as best I understand this does not technically require a USB-C connector and is not necessarily true for all USB-C connectors (it depends on if the cable is USB 2, 3, or 3.1, and if it’s 2/3 it has to additionally conform to the USB-PD 1 spec whereas that should be baked into USB 3.1 spec conformity). USB-PD predates the USB-C/USB 3.1 specs, but USB-PD 2 is part of the USB 3.1 spec (and only describes support for the USB-C connector). I mention this specifically due to the number of aftermarket keyboard-hobby custom USB-C cables that are USB 2 cables wired up with a USB-C connector.
With USB-PD 1 support, you could technically request up to 5000mA from a compliant host regardless of connector, buuuuut that’d depend on every single part of the chain conforming to the spec: the ports on the host computer, the cable, and the keyboard itself.