It might seems very complex with the Dave’s circuit. But stay with us, and believe us it is not. Basically what Dave’s trying to tell us is a simple voltage controller circuit with current limiter, which as most of the PSU having nowadays.
As you can see from the diagram, we are having only few major blocks to take a look into details. First, bear in mind this PSU will be operating by two 18650 type-batteries and certainly they need a battery charger circuit to revive the voltage level once it drains out. And also, battery voltage with 3.7v+3.7v is insufficient to operate the PSU especially when user switches to higher output voltage like 15V, so we need to boost up voltage for LT3080 according to user setting and thus we require a dc-dc boost up converter. Remember our maximum voltage output is 20V only.
DC-DC Boost Up Converter
Dave uses MIC2253 (previously from Micrel but now Microchip owns it) dc-dc boost up converter to do this task but however, MIC2253 available only MLF package which require a hot air flow station to do the soldering.
So to do things easier we decided to take LT3489 as alternatives but it costs a lot higher, RM20 compare to only RM5 for MIC2253. However it is fine for us, we are not doing this for high volume manufacturing or selling to others.
By adjusting value of R2( see “Modified boost up converter” diagram), converter able to deliver range of output from Vin to 40v. This is the reason why Dave puts U11 or e-potentiometer to change the value of resistance. The output voltage can be calculated as below :
|Vout = 1.235 x ((R1/R2) +1)|
Shunt and Current-to-Voltage Converter
Shunt is a resistor that carrying a very small value of resistance, normally 1 Ohm. Shunt usually takes important role in current measurement. In our famous equation,
|V = I * R|
when R = 1 ohm, voltage across that resistor must equivalent to current value. For example, if voltage across that resistor measured 1.5V, it must be 1.5A across that resistor as well due to resistance is only 1 ohm. Therefore, from here we are capable to develop a circuit that able to control the amount of current flow for our PSU.
That’s right, when we have voltage level that represents current value, we can develop a simple single-ended op-amp system to sense and capture difference between two points of shunt resistor. For this case we will use differential amplifier, as simple as we learn from textbook where Vout determine by:
|Vout = (R5/R4)*(V2-V1)|
Sensing the current is only part of this system. We need another part as reference to limit the current flow and it must be in digital form so that we can control it using microcontroller. Yes, by using PWM from microcontroller and a simple second order low pass filter, we can make a limiter to this system. Whenever the system tries to draw the current more than limiter setting, the limiter will make sure to maintain the current flow and never exceed that level.
|Vdc = Vpwm * Duty Cycle|
ESP8266 SoC itself able to generate maximum 1KHz 10 bits PWM with 3.3v. So, if duty cycle set to be 50%, theoretically we would have 1.65V. However, we need to modify further to fit the range from 0-1v to represent 0-1A. Hence, putting a divider at second filter will do the case.
Lastly, we need a voltage controller that allow user to switch from 0v to 20v. We can use a simple 10x gain op-amp system and a DAC to do this. DAC that operate in I2C can be easily control by microcontroller to vary voltage from 0 to 2.048v and then send to op-amp to amplify 10 times which is 0 to 20.48v. This will later feed to LT3080 as operating voltage. In other hand, voltage booster need to provide Vin to LT3080 as much as 2V ahead of operating voltage. For example, if user switch to 7v, voltage booster must provide 9v and above to LT3080 in order to sufficient outputs 7v to external terminals. Besides, do not forget current limiter to switch off the voltage controller circuit if load intends to draw more current from PSU.
The circuit seems very complex when glance at the first sight but when we split them out piece by piece, they are actually simple circuits exactly from what we’ve learned in text book. The crucial part that combine them together is our programming flow. It determines how well these hardware circuits serve their role and the performance of whole system. But before we go into software part , we will need a prototype to make the first run. Stay tuned for Part III!