I have a 24VDC LED light strip and 5v/500mA microcontroller board that I would like to connect to power with a single USB-C cable. At the moment they connect to their own power sources and the light strip is dimmable with a MOSFET/PWM circuit between them.
You could use a boost converter to raise the 5V to 24V for the LED strip.
But even a better solution would be to use the MCU's PWM signal as a boost driver.
Three conditions need to be met for this:
- the LED strip power consumption can't exceed the available USB power
- MCU PWM frequency needs to be sufficiently high, going into the kHz or tens of kHz range, or you would need a large value inductor
- The PWM duty cycle shouldn't exceed 90%
Here is an example schematic: