# How to connect a 24VDC LED light strip and 5V/500mA microcontroller board to power with a single USB-C cable?

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.

• Will the device receive 24V through the cable? Commented Mar 25, 2023 at 7:59
• @user253751 I’d like the device to be able to negotiate the power requirements using USB-C power delivery if possible. But yes, enough power for the device would be carried by the cable. Commented Mar 25, 2023 at 9:40
• How much current does the 24v strip require? If this is a 24v/6A strip you're going to have trouble using USB-C. Commented Mar 25, 2023 at 13:03
• @JoshWilson The power negotiation part is tricky, requiring more work than anything else in your circuit. The simplest solution for you would be to get a 24V power supply and add a 5V regulator (should be a switching or buck converter, due to high power dissipation in a linear regulator like 7805). Commented Mar 25, 2023 at 17:26

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:

1. the LED strip power consumption can't exceed the available USB power
2. 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
3. The PWM duty cycle shouldn't exceed 90%

Here is an example schematic:

simulate this circuit – Schematic created using CircuitLab

• (mention why useful range of duty cycle differs from [0…1]? (Should work up to 0.72?!)) Commented Mar 25, 2023 at 9:20
• this assumes you want to program your MCU as a boost converter controller plus whatever it's already doing; if only making one of something, it's easier to buy a converter module Commented Mar 25, 2023 at 9:50
• @greybeard You're right, it was a mistake on my part. Corrected. Commented Mar 25, 2023 at 11:16
• @user253751 With only one pin used and many MCUs having dedicated PWM circuits, this would not be much of a burden on the MCU, but it might be too much of a hassle to program like you said. I just thought of giving him an option in case he doesn't have a boost converter and it makes the conversion slightly more efficient because every converter has its on quiescent current requirements, though they are fairly low. Commented Mar 25, 2023 at 13:56
• @user253751 Additionally, he already IS USING PWM in his circuit, so it would be basically repurposing what he already has and uses, and make small change to the existing code. Why boost and then reduce when he can simply do a controlled boost? Commented Mar 25, 2023 at 14:04