Buck driver design - component selection example

Hi Guys,

Cereal_Killer asked me for some guidance on selecting components for a new buck driver project, and I thought it would be good to turn it into a post so other members can learn from it. I backed up to the very beginning of the design process so that the post will be complete from concept to parts list, going into detail on what decisions go in to choosing components. I hope this example of the component selection steps will help some people learn to design their own drivers and improve their electrical knowledge.

Project requirements are:

  1. Runs from 3-4 cells, so input voltage can be anywhere from 9.0 – 16.8V (3.0*3 to 4.2*4)
  2. Runs a 6V MTG-2 or a 3V single-die LED
  3. Output current 5 to 8 amps, constant current

The first decision is what type of converter. We could do linear, buck, SEPIC, or buck-boost. Because input voltage is always higher than output, there’s no advantage to using the more complex SEPIC or buck-boost topologies. Because the difference between input and output is high (3.0V to 13.8V) we can throw out linear because it would waste far too much power. That leaves us with buck. I recommended a buck converter I’ve used in the past, the MAX16820, which is a good fit here because:
it has an input voltage range of 4.5-28V which encompasses our input range
it runs at 2MHz which means our inductor can be small
it uses an external MOSFET so it doesn’t impose any inherent limitation on output current

From here, we will base the rest of the design on the MAX16820 datasheet (http://datasheets.maximintegrated.com/en/ds/MAX16819-MAX16820.pdf). Since we don’t have any requirements that would make us use the part in a non-standard way, we can stick almost exactly to the example circuit shown on the first page. This gives us our basic parts list:

  1. MAX16820 controller
  2. Input capacitor
  3. Vcc capacitor
  4. Sense resistor
  5. Inductor
  6. Freewheel diode
  7. MOSFET
    That’s all we would need to make a basic buck regulator if we wanted the flashlight to only have one mode. CK will be adding some more functions, so he will have some additional parts:
  8. Microcontroller
  9. Decoupling capacitor
  10. Series resistor
    The MAX16820 has a 5V output that can supply 10mA, which makes the design much easier since we can use that to power the microcontroller. The downside to this is that the light must use a power-cycle switch and not an electronic switch, since the 5V regulator draws too much current to do a low-power sleep.

Let’s pick components. Getting the easy ones out of the way first:
Integrated circuits: Number 1 we already know. Number 8 is the choice of the designer, I think Cereal_Killer is using a PIC12F617 running my momentary switch code.

Capacitors: number 3, the Vcc cap, is easy because the datasheet tells us to use 1uF. The other spec we need for a capacitor is voltage capability. We know the output of the Vcc pin will always be 5V, so let’s double it and spec our capacitor at 10V and 1uF. These specs will be widely available in 0603 or 0805 packages. Number 9 is not strictly necessary if the microcontroller is very physically close to the Vcc capacitor (which must itself be physically close to the Maxim chip), but since we don’t know what the layout looks like yet, we should include it. Value isn’t critical, so let’s use the same capacitor we used on Vcc, but we’ll strategically choose the 0805 package in case we find that we need to increase the value later on.

Resistors: Number 10 is just to protect the microcontroller in case the Maxim chip malfunctions and pulls more current into the dim pin than we expect. Value isn’t critical, just make it something fairly low, but high enough to limit the I/O pin’s output to 25mA in the case of a dead short. The lowest value we could choose is: V=IR so R=V/I =5.0V/0.025mA = 200 ohms. Let’s pick a standard resistor value of 470 in an 0603 package.

Now we get to the important stuff:
Number 4 sets the output current. When current to the LED flows through this resistor, it creates a voltage across it. The MAX16820 compares this voltage to an internal setpoint so that it can regulate the current. From page 2 of the datasheet we see the sense voltage is 200mV. Once again, R=V/I so our values are R=0.2/5 = 0.04 ohms or 40 milliohms for a 5A output, or R=0.2/8 = 0.025 ohms or 25 milliohms for an 8A output.
Since this component is in the high-current path, we can’t just choose any package size we want—we need to do a power dissipation calculation. Power (Watts) is V*I, and we know both of these values already so it’s easy to find. For 5A, the power in the resistor is P=0.2*5 = 1 Watt, and for 8A it’s P=0.2*8 = 1.6 Watts. If we didn’t happen to know the voltage across the resistor already, we could also have used the equation P=I²*R, which would give the same result.
Since we want our board layout to be able to handle either current, we can just work with the higher value of 1.6W. This is the amount of energy that the resistor will dissipate in the form of heat, so it needs to be physically large enough to get rid of it. Resistors always have a power rating included in their specifications, so our requirements for the resistor are simply R=0.025 or R=0.040 and P>=1.6W. From looking around at Mouser, it appears that 1206 size is generally not rated high enough, so we should choose a 2512 package for this.
Another alternative is to split the power between two resistors, which makes it easier to find packages that meet our requirements. Resistors in parallel have equivalent resistances of R=1/(1/R1 + 1/R2), which simplifies to R/2 if both are the same value. So for 5A we need 0.08ohm and for 8A we need 0.05ohm, but now our power rating is cut in half to 0.8W because the two resistors will share the load equally. 1206 packages tend to have a 1W rating, so we’ll replace item 4 with two separate 1206 resistors of 50 or 80milliohms.

MOSFET: The specs for FETs can be intimidating, but this one isn’t too hard to choose. We know our current is 8A, so we’ll inflate that a bit to maybe 10A and use that as our minimum current rating. We also know that our voltage will be less than 16.8V, so we can safely use 20V as the minimum Vds rating. From those two values, there are thousands we could choose from. Normally we’d pay a lot of attention to gate charge, but the Maxim chip has a pretty strong gate driver inside so we don’t need to worry about it much. To make our decision we’ll look at RdsOn, which is the equivalent resistance when the FET is in the on state. This resistance will determine how much power is wasted in the FET, so the lower the value, the better your efficiency. The tradeoff is that better FETs cost more.
A quick look at Mouser yields tons of options—here you may have a package size preference. I found a nice one that’s only 88 cents: the Fairchild FDMS7680. It has a ridiculously awesome 7mOhm RdsOn, rated for 30V and 14A which gives us margin on everything.

Inductor: This one tends to be the intimidating part to specify, because there are a lot of complicated high-speed effects happening. Luckily the Maxim chip we chose is pretty smart and will automatically adapt its switching speed to handle our inductor, so we can choose an inductor without too much analysis. From the datasheet examples, you can see that they use both 47uH and 33uH in their testing, so we’ll just look at values in that range. In choosing one we need to make sure the physical size is ok, and we want to minimize impedance to keep our efficiency up. I found the Bourns SRP1265A-330M which looks pretty good, it’s in a fairly small SMD package and only contributes 58mOhm of impedance.
We can do a quick check to ensure it won’t saturate by looking at the time constant. The equation is t=L/R, so we get t = 33e-6/(.058.025.007) = 3.66e-4 or 366 microseconds. This is how long the inductor will take to reach 63% of saturation current, which is a good limit to put on things. Our Maxim chip can run at 2MHz and (presumably) 100% duty, so it will theoretically switch fast enough to handle a time constant as low as 0.5 microseconds, so we have tons of margin.

Diode: Lastly we have the diode. This one’s pretty easy—we need to minimize forward voltage so we’ll choose a Schottky diode, and after that we just need to make sure it can deal with ~8A of current and ~20V of reverse voltage. There are so many options you’ll probably choose based on package size, how about the Vishay SL43-E3/57T.

Subscribed, thanks for posting this for everyone.

Thanks for this man, now to get to work…

Google translation into English please -

I checked on that for you:

Tterev3, thanks a lot for sharing. With all your shared knowledge you even helped ck to start his own business...!! You should have some shares in it :)

Great work you are doing!!!

Tterev3 you make it seem so easy, this is great stuff, I almost understand it :slight_smile:

What size board will this be on?

Thank you for explaining this for the masses.

Nice :beer:

Lol thx :8)

Hop the initial driver I’m putting together will be a drop in replacement for a courui (plenty of room to work). The board will also take care of the series cell conversion (will need mods to factory tail board and a power cycle clicky switch is highly recommended).

After it’s running I will start work on hopefully fitting this in a ~20mm driver (maybe 26mm, that fits a lot of the multi-emitter plunger lights), that is unless someone else wants to take my .sch and do a board… Tterev3 may have pointed this out in the OP but it’s recommended this buck chip be used in lights that have a mechanical clicky (which is why on the ones I plan to build I’ll be doing the tail clicky mod, tho it will fully utilize the side e-switch) hints the 26mm version for things like the tr-j18/9xt6, 3xt6 and so on.

I’ll be doing the courui in PIC however it’ll be an SOIC8 PIC so should be almost no work to move a few traces for ATTiny13’s.

All ears!

And hoping for a 17mm board version

Me to buddy, seriously doubt that tho, plus it will be a taller than a typical BLF driver by a good amount too. Especially with that big 2512 sense resistor (the size that comes on SRK’s) I just don’t see it happening in 17mm. Maybe with 2 1206’s stacked like my RGBW drivers but IDK about that even.

Thanks for this. In my reading, I’ve seen a lot of people saying that switch mode power supplies (SMPS), like a buck driver, need a fair amount of empirical testing. Does using a commercial buck controller help much with that, or is it still important to do careful testing?

I hope this gets enough play to get stickied.

Once you have a proven and functional circuit I'll be happy to have a crack at designing a 17mm version.

Thanks for a great plain English explanation, will be following this with great interest.

Cheers David, _who has just seen his big head Courui cowering in the corner_ J)

This is awesome. Thanks for the writeup!

Love your contributions towards the community.

It’s always important to do testing, even on non-SMPS designs, but yes, using a chip like this makes it much easier to get to something that works very quickly. There’s always a lot of opportunities for optimizing the design after the initial attempt if you have the means to do detailed tests.

For example, in this design, I chose a big inductor because of Maxim’s test circuit, but after a crude saturation analysis, it appears that we could use a much smaller one. If space isn’t an issue, you could just stick with 33uH and have very low ripple, but if we’re short on space, I’d order a few smaller inductors and then measure the frequency that the converter decides to run at - if it doesn’t approach the 2MHz limit, it will work just fine.

This is way beyond my realm of expertise and totally fascinating. Subscribed.

tterev - any chance you’re in the Triangle area? I’d like to buy you a beer sometime (and/or check out some of the lights you’ve made).

On the design of the board, you Can use 0603 pads for space, and still be able to use 0805 components, it is a “high density ” pad footprint, but you already knew that :wink:

Awesome thread, let’s get this sukka started :smiley:

Both mattaus and wight had good designs but haven’t heard much about them late

To save board safe would the Atmel ATtiny10 be sufficient, I found a PCB based ZIF socket, might work for programming, just need a good code writer to whip up an awesome UI ; )

For a power cycle only, more simple UI yes it’s probably enough, plus with the attiny10 a 10f322 is a direct swap, same pinout between AVR & PIC. One thing tho is no voltage divider input so no voltage monitoring on the attiny10

With the initial design being for a dual switch light (courui is side switch only but I’ll be installing a tail clicky) it’ll have to be something bigger to run momentary FW.