I'm building a keyboard with the proton c controller, from what I can gather it uses a usb2 port. Now the problem is I want to use an ssd1306 OLED panel and almost per-key RGB (around 70 LEDs total). 1 led uses about 12mA (using the SK6812MINI-E), 70*12=840mA, which is over the limit. If I could add another USB connection it could get around this limit (if my logic isn't flawed). The problem is I'm not sure how to wire it. Right now the led matrix has VDD pins connected to +5V of the proton-c, VSS to GND.

What would be the best way to add another port? I'm open to not even powering it from the PC, but from an outlet.

  • \$\begingroup\$ As far as I remember correctly, to get the maximum of 500mA from a USB2 port, is to wire the D+ and D- together and let them floating, else the port might default to 100mA. And then you can use 2 USB2 ports, or one USB port from a wallcharger capable of delivering at leats the needed current for leds+controller. \$\endgroup\$
    – JonathanG
    Nov 30, 2020 at 10:33
  • 2
    \$\begingroup\$ Most wall charger today deliver 2A @ 5V without any special wiring or protocol. So if you are going to use a dedicated wall charger, you don't need to worry about any of this. \$\endgroup\$
    – Codo
    Nov 30, 2020 at 10:39
  • 1
    \$\begingroup\$ @JonathanG, that is on the supply side, to indicate to the device that no negotiation is required. \$\endgroup\$ Nov 30, 2020 at 10:55
  • \$\begingroup\$ @Codo, there is a protocol: the data pins have a specific resistance between them that would not be found on PCs, so the device can detect whether it is connected to a wall charger or a PC. It is a primitive protocol, but still a protocol. \$\endgroup\$ Nov 30, 2020 at 11:00
  • 1
    \$\begingroup\$ Have you considered just not using the LEDs at full power? \$\endgroup\$
    – user253751
    Nov 30, 2020 at 13:52

1 Answer 1


You can only pull more than 100mA after your device has been configured. For a single port device that isn't much of a problem normally, you just declare your power requirements in the configuration descriptor and either the host activates that configuration (and therefore allows you to use the power), or it doesn't (then the device doesn't work) and shows a dialog telling the user to use another port.

For two ports, that means you need to implement two USB devices that each request 500mA, and only activate the full brightness if both were activated. That's a fairly complex setup.

Instead, I'd go with an external 5V supply with a barrel jack connector, and a buffer IC between the keyboard controller and the LEDs, so the data pin of the LEDs is driven from the same power supply as the LEDs themselves (the SK6812 are a lot more resilient than the WS2812, but they still don't like it when the data pin is at a higher voltage than the supply pin).

  • \$\begingroup\$ Im not sure I understand how to wire that up. Im sorry, but Im pretty much a beginner with electronics \$\endgroup\$ Nov 30, 2020 at 16:05
  • \$\begingroup\$ @cztrollolcz, build the keyboard controller as normal, and add a second power supply connector (with a barrel jack) that supplies the LEDs and a small driver IC that takes the data signal and "amplifies" it for the LEDs. If the LEDs are unpowered (i.e. the barrel jack is not plugged in), so is the driver IC, and it will not send data to the LEDs, which would break them. \$\endgroup\$ Nov 30, 2020 at 16:15
  • \$\begingroup\$ thanks a lot, I think I understand now, unfortunately with my lack of experiance I dont know what to look for, what IC would you recommend? \$\endgroup\$ Dec 1, 2020 at 13:56
  • \$\begingroup\$ @cztrollolcz, something like an 74LVC1G17 -- but pretty much any non-inverting push-pull driver IC should do as long as the "absolute maximum ratings" section in the datasheet lists an absolute voltage for the maximum input voltage, not something dependent on Vcc (i.e. it is allowed to put +5V on the input even if Vcc is at 0V). To get an overview, go to the distributor website of your choice, and in the "buffer/driver" category, filter for "non-inverting", "push-pull", a supply voltage range that includes 5V, and the part status "in stock", "active" and "RoHS compliant". \$\endgroup\$ Dec 1, 2020 at 15:20
  • \$\begingroup\$ Thanks a lot, Im gonna use hte 74LVC1G17 since the store Im ordering the rest of the components from has it in stock. I think I have everything in my schematic now in order, so Im looking into getting all the parts, would this power supply be ok? tme.eu/cz/en/details/zsi-50031.lad/plug-in-power-supplies/… \$\endgroup\$ Dec 3, 2020 at 11:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.