If you look at a chip manufacturer’s site for switching LED drivers, you notice that there are many options for low current applications (<=700mA), but fewer chips are available for high current uses, and the highest current option is sometimes not high enough for flashlight enthusiasts. On the other side, there are many chips for constant voltage available that meet all the requirements, but output a constant voltage, completely unsuitable for LEDs that require constant current.
The usual way voltage mode converters control the voltage is with a voltage divider. The chip tries to meet a specific voltage at the voltage divider, so a constant voltage is on the output, no matter what load is connected to it (when talking about an ideal voltage regulator, a lot of factors play a part in real world). When there is a load transient (jumping current requirement), e.g. the current drops, the converter still is at the old duty cycle for the old load, resulting in rising voltage. The converter recognizes the voltage rise, because the voltage on the voltage divider at the feedback pin rises as well. The converter‘s aim is to get back to the specific voltage the chip wants to have on the voltage divider. So, in our case, we have to make a circuit that outputs a specific voltage when specific current flows through our load, which then is connected to the feedback pin.
How does current sensing work?
There are two ways sensing current:
- When current flows through a resistor, depending on the current (Ohm’s law), it creates a voltage drop. The more current flows through the resistor, the more voltage drop you get over the resistor.
- A conductor creates a magnetic field when current flows through it. The more current flows, the stronger the field is (Ampere's law). This magnetic field can be measured by hall effect sensors.
Ways to use the current sense methods for voltage mode switching
The easiest way to control the current is this one:
The sense resistor is directly connected to the feedback pin of the converter. If the feedback voltage is 1V, the voltage drop over the resistor always is 1V. It’s very inefficient, and there is just one current option possible. To improve the efficiency, we can add an OpAmp with a digital potentiometer controlled by a microcontroller, forming a noninverting amplifier. Now the sensed voltage drop over the resistor can be a lot smaller because it gets amplified by the OpAmp, and many different output levels are available, thanks to the programmable digital potentiometer:
This is not the only possible way to connect a potentiometer. One of the two resistor can be a normal one, and the other resistor can be a potentiometer as a rheostat, or a resistor before the potentiomter can be used to get some amplification even when the potentiometer is programmed to the miniumum.
This is the basic circuit. Now we get into a different topic that sometimes creates a problem: Amplification
An example: You got a converter that always tries to get 1V on the feedback pin, and you want a powerful driver that puts out 10A with 100mV maximum drop over the sense resistor to get good efficiency. The value of the resistor then needs to be: 0,1V/10A=10mOhm. So on the maximum level the OpAmp needs to amplify the signal by 10. If you want to go down with the current, you need to increase the amplification, so for 50mA we need a factor of:
Voltage drop over R: 0,01Ω*0,05A=0,0005V or 0,5mV
Factor: 1V/0,0005V=2000
We need a factor of 2000 to get to 50mA. And if we want to go down more, it gets even worse. With 10mA we need 10000. And to again half that, we need double the amplification, so the needed factor goes up exponentially. That’s why you get so many small current steps (0,1mA steps) on the low current side, if you try to get these low currents. But if you go up with the current the steps get bigger and bigger, so in the end the gap between steps could be 4A or so. But this is not our only problem. The more we go down with the current, the less voltage drop is over the sense resistor. And with 10mA current or 100µV drop over the resistor we already are below the input offset of many OpAmps, creating huge amplification errors (of course there are some OpAmps that have a very low offset voltage, but the bandwidth of them is usually pretty low). We need to get that amplification factor down.
Luckily, some chips have a special pin on them for voltage tracking. It then uses an externally connected voltage as the reference instead of the internal one. Depending on the allowed input voltages, we maybe can input a 0.2V external reference, greatly decreasing the needed factor:
0,2V/0,0005V=400
Now these are factors we can work with. But what if there is no such pin available on the chip?
This is where we add two resistors and a constant voltage source:
It basically is a voltage divider that gets biased by our feedback from before. Now, if the current rises, the voltage on the feedback pin rises, and the converter tries to lower that feedback voltage, giving us the current we want. That way we don’t need to have very high amplification factors. The formula to calculate the needed resistors is:
Now to get the problem with the current steps solved, we can use a MOSFET to change the resistance of R1 (R2 can be changed too) and use a different new feedback voltage. For low currents we can set the new voltage reference pretty low (0,05V or so) to keep that low amplification. To still get many small current steps on high current operation, we can switch off that mosfet to lower the top resistor value, and use a higher new feedback voltage (maybe 0,8V).
If you have a chip with a special pin, you can just change the voltage on that pin, but if you don’t have that, you can use this option.
Now the high new feedback voltage is for the high current part, the low new feedback voltage is for low currents, lowering the needed amplification. This way you don’t need to find a balance between really low and really high amplification factors, and get many small current steps. The problem with the OpAmp (needing really low input offset, and Rail-to-Rail operation on in- and output) still isn’t completely solved though.
And hall effect sensors?
The other option for sensing current is magnetic field sensing. There are ICs out there specifically made for current sensing, but these chips aren't an option for low current drivers. Their analog output noise is problematic (400-70mA sense error because of noise, unamplified). But on high current applications, they could be used.
This text is just about the conversion and amplification. There are other things to keep in mind, e.g. bandwidth and slew rate of the OpAmp to keep the converter stable and prevent oscillation (the higher the amplification factor, the lower the bandwidth). Another thing is compensation of the feedback (how fast and until which frequency the converter reacts to voltage changes on the feedback pin), which is sometimes internal, sometimes external (then you know the requirements of an OpAmp better).
These ideas not only apply for buck converters (as I used them on my pictures) but on any converter that works like this with a feedback pin.
I hope everything is correct. If there are any mistakes or if something is unclear, please tell me.