I'm making my first attempt at building a buck converter, as a constant-current supply for a 700ma LED, from a 5V or 12V supply. I have it working with the parts I had on hand, at about 88% efficiency, but even at 100% duty cycle, the output current is only around 70ma for a 5V input. For a 12V input, it'll go up to about 185ma, but my diode starts to heat up then. The switch is being driven at 62.5KHz directly from the PWM pin of an Arduino. There is no feedback currently, since it's designed to power a specific load at a specific input voltage.

I simulated the converter in LTSpice before building it, though the parts aren't the exact same part numbers as in LTSpice, so I'm sure many of the important values are somewhat different.

On the breadboard, I used:

  • a DMG3420U (logic-level N-channel MOSFET)
  • polarized caps
  • 1N4001 diode
  • a 47uh inductor I had around (I know nothing else about it's specifications, is there some way to measure the important ones?)

There are a few things puzzling me:

  1. My understanding was that when the duty cycle is 100%, the diode would be reverse biased, so there shouldn't be any power dissipation there. Why would mine be heating up?
  2. Why is the converter only supplying 70ma? What can I do to find out what is limiting it?

LTSpice simulation

The LTSpice simulation shows it supplying around 850ma with a 99% duty cycle, but with different parts.

oscilloscope traces, 30% duty cycle

My circuit, with a 30% duty cycle. Channel 1 is the gate pin of the MOSFET, channel 2 is the output to the LED. The ripple is fairly low, so I think that means it's running in continuous mode.

oscilloscope traces, 100% duty cycle

My circuit again, with a 100% duty cycle. At this point my bench supply says it's supplying 70ma, at 5.0V. If I turn up the voltage to 12V, I get around 185ma out of it.

breadboarded circuit

The FET is an N-channel FET I happened to have around. Both capacitors are 10uf. The diode is a 1N4001 (not ideal, I know.) The inductor is a 47uh inductor I happened to have around. I don't know anything else about it.

  • \$\begingroup\$ 62khz is way faster than a 1N400x-series diode can handle switching. You need a shottky diode there. \$\endgroup\$ Feb 8, 2013 at 17:26
  • \$\begingroup\$ Fair enough. I'm off to the shop on Saturday to get parts, that's on my list. At 100% duty cycle, with +5V always applied to the gate pin on the MOSFET, would the switching speed of the diode even come into play? \$\endgroup\$ Feb 8, 2013 at 17:36
  • \$\begingroup\$ What is the DC resistance of the inductor? Not that it matters at 100% duty cycle but what is its saturation current? \$\endgroup\$
    – user16324
    Feb 8, 2013 at 17:47
  • \$\begingroup\$ Show the circuit as you actually built it, not the one you entered into the simulation program. For example, what exactly is driving the gate? \$\endgroup\$ Feb 8, 2013 at 17:58
  • 1
    \$\begingroup\$ Two quick things. You might find circuitlab.com a nice place to simulate circuits, I really like it and find it very very useful. Second, Nice project. You have quite a few others, but learning how to make a nice SMPS is definitely a fun one. \$\endgroup\$
    – Kortuk
    Feb 8, 2013 at 23:34

4 Answers 4


At 100% duty cycle, you are correct in that the diode will not conduct. Also, your buck inductor will saturate out and you'll have the input voltage (minus resistive losses) applied directly to your LED with no other means of current limiting.

You're not driving the MOSFET correctly. Your pulse voltage should be from gate to source, not gate to output return. Buck converters with N-channel series MOSFETs need a high-side supply. The MOSFET will never be able to fully turn on with gate and drain close to the same potential with respect to source, since the minimum gate threshold for this part (with respect to source) is around 1.1V.

Tangent: you said you want a constant-current supply, yet in your powertrain you're not measuring the current that you wish to keep constant. I don't quite follow how this is supposed to work. I would expect that you have some sort of current sensing element (like a resistor) in series with your LED, which would be used to generate a voltage to control the duty cycle of the buck to make the current constant.

  • \$\begingroup\$ I've edited the question to mention which MOSFET I'm actually using, sorry. It's a logic-level gate, so as far as I understand, it should be fully on. \$\endgroup\$ Feb 8, 2013 at 23:11
  • \$\begingroup\$ Response to Tangent: if my input voltage is a constant, and the load is always the same, do I actually need any sort of current sensing, or will the current always be the same for a given duty cycle? My plan was to empirically find the duty cycle needed for the 700ma draw I need. \$\endgroup\$ Feb 8, 2013 at 23:12
  • 2
    \$\begingroup\$ You're likely going to find that trying to control an LED's current without current sensing is like balancing on the tip of a needle. The load is not fixed as very small voltage fluctuations (and thermal variations) will cause huge changes in the LED current. You really should use some feedback for this. \$\endgroup\$ Feb 9, 2013 at 1:53

Where to start?

You don't show how you are driving the FET, but I am going to guess that it is being driven referenced to the source (I see Madmanguruman also mentioned this ... and more completely). The LED (which appears to be obsolete ... if this is it Digikey, says it was discontinued in 2011) has a forward drop of about 3.2V @ 0.7A, and with a PWM frequency of 63kHz means that you will want about 330uH for L1 (about 10 times what you've got now). Here is a post that addresses choosing an inductor for a buck regulator. Since this is not a voltage output, but you would still want continuous conduction, you can probably get by with higher ripple current (in this case +/- 20%), so the equation would be:

  • \$L\$ ~ \$\frac{5 V_{\text{LED}}}{I_{\text{LED}} F_{\text{PWM}}}\$ = \$\frac{5 \text{(3.2 V)}}{\text{(0.7 V)} \text{(63000 kHz)}}\$ ~ \$330 \text{$\mu $H}\$

Looking at the waveforms, the top trace of the first picture doesn't look like the gate voltage. It looks like the source or cathode of D2. Note that when the switch turns off and voltage goes low, it goes below ground like you would expect the diode cathode to do. Then note that about 2uSec later it jumps up to what appears to be the voltage across C1, like you would expect if the L1 ran out of energy and became discontinuous. That's probably about the right amount of time for an L1 of only 47uH. It should also ring at that time, but there is enough loss somewhere in the circuit (L1, D1, or maybe even M1) to dampen it out.

It is not clear how you are controlling the current, but driving a LED with constant current, you should not need C1. Just keep the ripple reasonable in the inductor and get constant current in the LED. It would also be easier to compensate the loop without C1. Also, there are parts that provide PWM control for LEDs, like this one (which is the cheapest example at Digikey).

As you pointed out, the 1N4001 is not a great choice, it will be too lossy. A schottky would be better.

  • \$\begingroup\$ I'm using a different FET, sorry. I've edited the question to clarify. I'm surprised to see your comment about the LED being obsolete. These LEDs are what I'm intending to use for this. They are the brightest RGB LEDs I was able to find. What makes you say they seem obsolete? If there's something bad about them, I can try to look for other options. For the inductor, how did you determine that I need 330uH? I ran it in LTspice to try to find the smallest workable value. \$\endgroup\$ Feb 8, 2013 at 23:15
  • \$\begingroup\$ Digikey shows the LUW-W5AP to be discontinued. I've edited my answer to show that and to add info about choosing the inductor. \$\endgroup\$
    – gsills
    Feb 9, 2013 at 5:46
  • \$\begingroup\$ Is the 0.7V in the calculation meant to be 0.7A? If not then I'm failing to see where the magic value comes from \$\endgroup\$
    – Ferrybig
    Oct 12, 2022 at 10:18

To find out what's limiting the current, turn the duty cycle full on and look for voltage drops across each component. If you have 5V on the input, that 5V has to be dropping across something as current flows from the positive terminal of the source back to its negative terminal. That something is what's limiting your current. The obvious contenders are the FET, the choke, the input supply, and the load itself. None of those components look like they should have those kinds of drops across them, based on the part numbers in your schematic, but obviously something's not adding up.

You should also consider the solderless breadboard; they can be difficult to predict.

  • \$\begingroup\$ I'll try measuring the voltage across all the components. Is it reasonable to do that with a multimeter, which I presume will give a sort of averaged value, or will I need to look at the traces on the oscilloscope for that? (I'm just using the solderless breadboard to try to get something reasonable working before putting the effort into a PCB) \$\endgroup\$ Feb 8, 2013 at 23:22
  • \$\begingroup\$ If you have the duty cycle at 100%, your source is pure DC, and your load is stable and linear, then nothing's changing. That should make a DC meter just fine. \$\endgroup\$ Feb 9, 2013 at 1:48

I think your magnetics is very small. With power inductors, inductance is not everything. Check its series resistance and the maximum current it can support.

  • \$\begingroup\$ Is there a way to measure those values? \$\endgroup\$ Feb 8, 2013 at 23:16
  • 1
    \$\begingroup\$ Series resistance is easy to check with an ohmmeter. Is there a nondestructive way to measure max current? \$\endgroup\$
    – davidcary
    Feb 9, 2013 at 5:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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