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:
- Runs from 3-4 cells, so input voltage can be anywhere from 9.0 – 16.8V (3.0*3 to 4.2*4)
- Runs a 6V MTG-2 or a 3V single-die LED
- 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:
- MAX16820 controller
- Input capacitor
- Vcc capacitor
- Sense resistor
- Inductor
- Freewheel diode
- 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: - Microcontroller
- Decoupling capacitor
- 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.