78khz pwm 1.2A buck converter, choosing the right inductor

Thread Starter

gkeep

Joined Oct 21, 2017
63
Hi guys,

Im wanting to generate 14V from 20V using an esp32 and an ultra-low on-resistance N-channel mosfet. I can output a 78khz pwm signal to get an average 14V, but im just trying to figure out how to smooth the signal using an inductor. I dont mind too much about ripple and the circuit will be driving a 1.2A non-inductive load, switching on a few power LEDs for about 500 microseconds and back off for about 9.5 milliseconds (as a 10 millisecond cycle). I'm not too fussed about over heating them as they'll be off 95% of the time. I can't use a buck converter because most are based on P-channel mosfets and its a cob RGB LED with a common positive (Green and blue are 20V). I've got some lowV flyback diodes I just need some help on the inductor value.

Any help is appreciated!

Kind regards,

G.
 

Delta Prime

Joined Nov 15, 2019
1,149
Hello there. :) Four parameters are needed to calculate the power stage:
Input voltage range: VIN(min) and VIN(max).
Nominal output voltage: VOUT.
Maximum output current: IOUT(max).
Integrated circuit used to build the buck converter. This is necessary because some parameters for the
calculations must be derived from the data sheet.
If these parameters are known, the power stage can be calculated. This includes your inductance value.
A schematic would be great!
Reference:
Understanding Output Voltage Limitations of DC/DC Buck Converters (SLYT293)
 

Thread Starter

gkeep

Joined Oct 21, 2017
63
Hi Good point,

I should have put the schematic in my question post.

This 20V is coming from a buck converter lowering from 24V.



ESP32 Buck.jpg
 

Papabravo

Joined Feb 24, 2006
16,783
I see two problems.
  1. What you have drawn does not look like a buck converter. The switch should connect the +20V to the inductor, which is difficult to do with an N-channel device.
  2. Your duty cycle is above 50%, which can be problematical if you intend to actually regulate the output, which does not even appear on the schematic.
You need something like this:
 

Attachments

Thread Starter

gkeep

Joined Oct 21, 2017
63
Hi, thank you for your comment. I dont understand. I believe I either need an N channel buck converter to solve my problem or even better, a current regulator circuit. In your circuit, I dont know what a psw1 is, or what that second voltage source is for. There is also 12V in your schematic. The forward voltage on the red LEDs is 14V.

I can get 1.2A to pass through the LEDs without the inductor, but I just want to know what value inductor I should use, or if my approach is not great. Like I said, the LEDs are off for 95 % of the time.
 

Papabravo

Joined Feb 24, 2006
16,783
Hi, thank you for your comment. I dont understand. I believe I either need an N channel buck converter to solve my problem or even better, a current regulator circuit. In your circuit, I dont know what a psw1 is, or what that second voltage source is for. There is also 12V in your schematic. The forward voltage on the red LEDs is 14V.

I can get 1.2A to pass through the LEDs without the inductor, but I just want to know what value inductor I should use, or if my approach is not great. Like I said, the LEDs are off for 95 % of the time.
The component labeled PSW is a "power switch" and the second voltage source turns it on and off with a 50% duty cycle. During the "on" time current flows from the 12V source through the inductor to the filter capacitor and the load. During the "off" time current recirculates through the diode. If the the switch was replaced with a p-channel MOSFET you would have the same behavior. The reason you can't use an N-channel switch is that you have to arrange for a gate voltage that is higher than the source voltage. Your circuit has a different topology entirely and it will not work for your stated purpose of being a "buck converter".
 

BobTPH

Joined Jun 5, 2013
3,658
It is indeed a buck converter, it just is done with the opposite of the usual polarity. Here is a simulation with values chosen to provide about 1A at 14V from 20V input.

Bob

1627402010683.png
 

Papabravo

Joined Feb 24, 2006
16,783
Where does the 10V source come from in the original design? The ESP-32 is not capable of that.
The output voltage of 14V (approx.) is on the junction of L1 & C1. did I get that right?
 

ronsimpson

Joined Oct 7, 2019
1,463
I have made LED buck PWMs like this but using a IC built for that job.
I have also done this with a micro like you. It is real easy to over current the LEDs with current feedback done in software or with no feedback.
It looks like you have no plan to actually measure LED current. So the duty cycle is only a guess.
I added a red "X", top left. You could insert a resistor and a current mirror which will give you a 0-1V signal the computer could monitor.
I added a red "X", bottom center. Add a resistor there and measure Q6 current when it is on. The timing may be a problem but the on current is the same as the LED current.
The 14V across the LED is dependent on temperature and changes from LED to LED. You could go back to the unregulated 24V and use it. Measure the 24V and use that to create 14V.
Bottom line is that LEDs are built to use current and the voltage is not so important.
1627409373659.png
 

Thread Starter

gkeep

Joined Oct 21, 2017
63
BobTPH,

Thanks for simulating my circuit! Very cool. The inductor value was just one that I randomly chose so I have no idea if I can decrease that ripple, but i'm guessing it doesn't really matter if the current stays below 1.4A.


Hi ronsimpson,

Thanks for taking the time to help me out. I think a current shunt, is a great idea. Perhaps i could get away with just the one shunt that will act like a current limiting resistor as well. Is that even possible? I know what you mean about using the original 24V. I might as well rather than having an extra buck converter.

I have made LED buck PWMs like this but using a IC built for that job.
I have also done this with a micro like you. It is real easy to over current the LEDs with current feedback done in software or with no feedback.
It looks like you have no plan to actually measure LED current. So the duty cycle is only a guess.
I added a red "X", top left. You could insert a resistor and a current mirror which will give you a 0-1V signal the computer could monitor.
I added a red "X", bottom center. Add a resistor there and measure Q6 current when it is on. The timing may be a problem but the on current is the same as the LED current.
The 14V across the LED is dependent on temperature and changes from LED to LED. You could go back to the unregulated 24V and use it. Measure the 24V and use that to create 14V.
Bottom line is that LEDs are built to use current and the voltage is not so important.
View attachment 244561
I do like the idea of a current shunt and differential op amp to measure the current, but I'm only going to be making one of these, and I can easily under drive the LED by empirically finding a low enough duty cycle that will drive the LEDs a few hundred mA below its current rating. Remember these LEDs are in a project that will see them drive high for 0.5ms then low for 9.5ms. I could probably afford to actually over-drive these LEDs a bit. I was just curious about a "ball park" for the inductor value.

Also the idea of a current mirror is intriguing. I dont really know how difficult they are to set up (I've never used one before) or if there are already IC packages available. I'm kinda new to electronics as a hobby for the past 6 years and I don't have any official training. Just YouTube and this forum basically.


So the 14 volt drop is from +20 Volts to +7 Volts at the junction of L1 & C1.
Yes that's exactly right. I can't have 14V to ground as the 14 V drop because the LED COB chip has a common Positive rail for RGB LEDs. Meaning the all the negatives need to be different potentials for the Red (14V), Green (20V) and Blue(20V).
 
Last edited:
Top