Issue #245: Allow control of more than one on-board pixel via `led` commands

Found the power budget but it is pretty old and not at all accurate.

I looked up the AP2127 datasheet, which is the part we landed on during the supply chain crisis. Its intended max output is 300mA. The extra headroom on the fuse is so that momentary inrush current from the caps doesn’t blow the fuse. The VREG should not actually use much more than 300mA continuously (though I know I can get mine to ~400mA with a good VUSB, so maybe that is not to be believed).

3.3volt supply mA Vusb supply
Rp2040 Cores 35 153LEDs 315
RP2040 Misc 2 LCD LEDs 60
RP2040 IO 40 74hc4067 0.1
Comparator 0.1 74hc4066 0.1
Opamp 0.1 74hct245 0.1
74hc595 0.1 I sense Opamp 0.1
DAC 0.1 Pull up/downs 20
LCD 6
Buffer * 8 20 120
SD card 20
Pull-up and down 20 3.3V supply 143.4
143.4 MAX: 220ma 538.8
Typ max ~145ma
Typical: ~100mA

This is the power budget I found, it is not the final one, but it is what I could find. It is part of a larger spreadsheet of calculations for the current sense, VOUT margining, packpower calculations, etc. I have no idea when it was updated, the file says REV10 but it could be any sheet updated for REV10. At this point it appears we have 15 SK6812s, an SPI DAC and an SD card.

This is worse case scenario:

  • All RP2040 buffer IOs fully loaded in bus contention
  • IO buffers fully loaded in contention (20 vs 120mA)
  • 40mA budgeted for pull-up and downs, which is way way high given most are 100K or 1M resistors.
  • It appears I decided to limit the LEDs to 30% brightness via firmware, for 20mA each max, which is consistent with the current firmware options. Again, worse case, as few animations run all three dies at once.
  • Looks like I gave no consideration to the VOUT power supply at this point.
  • Assuming the typical max on the 3.3v vreg (145mA) and Vusb pull with all LED dies at 30%, we eek out just above the 500mA limit.

As Tayken found with real world current tests, the consumption is nowhere near this. With all LEDs at 100% the current draw is basically equal to the LED total (if I understand your findings correctly).

Does anyone know what is involved in requesting eg 1A from USB? I don’t have my hardware hat on at the moment, but I feel the resistors used on the USBC connector currently request 500mA.