Hello again,
Here is a better explanation of the circuit
and the resistor selection procedure.
Referring to the schematic at:
http://hometown.aol.com/xaxo/page3.html
Solving the resistor network R1, R2, R3 knowing the inductor current I and the
input voltage V leads to the equation:
Vs=V*R13/R135+I*R1/R135*R5
where
Vs is the sense voltage presented to the chip, and
R13=R1+R3, and
R135=R1+R3+R5
For a linear inductor the required peak current increase is proportional to the
decrease in input voltage. To describe this we first define
x=Va/Vb, where
Va is nominal input (or high battery voltage input set point)
Vb is drained voltage input (or low battery input set point)
Now since we have two set points at which we want perfect regulation,
we calculate the sense voltages for each condition:
Vs1=Va*R13/R135+Ia*R1/R135*R5
Vs2=Vb*R13/R135+Ib*R1/R135*R5
where
Ia is peak current at nominal input, and
Ib is peak current at drained input that is required to keep Iout
the same as when full voltage was applied to the input.
Vs1 is sense voltage at high input
Vs2 is sense voltage at low input
Using
Vb=Va/x,
Ib then becomes:
Ib=Ia*x
Now since Vs1 has to equal Vs2 when the input drains down to the second set point,
we set the two equations (for Vs1 and Vs2) equal to each other.
Solving in terms of Va, Ia, and x, we end up with:
Va*R13+Ia*(1-x)/(1-1/x)*R1*R5=0
To simplify things a little, we also define:
xx=(1-x)/(1-1/x)=-x
In terms of xx we now get:
Va*R13+Ia*xx*R1*R5=0
Rearranging the first equation a little we get:
Vs*R135=Va*R13+Ia*R1*R5
Taking these last two equations simultaneously, we have a system of
two equations in two unknowns (R1 and R5, we will set R3=5 ohms later).
[1] Va*R13+Ia*xx*R1*R5=0
[2] Vs*R135=Va*R13+Ia*R1*R5
Solving [1] for R5 and substituting the result into [2] we get a quadratic
equation in the unknown variable R1:
R1*R1*(Va/xx+vt-Va)+R1*(R3*Va/xx+vt*R3-Va*R3-Va*vt/Ia/xx)-R3*Va*vt/Ia/xx=0
Note also that the threshold voltage vt was substituted for the sense voltage, Vs.
This is normally about 0.017 or 0.018, but can be as high as 0.025 volts.
Looking at the quadratic, we see the coefficients:
a=Va/xx+vt-Va
b=R3*Va/xx+vt*R3-Va*R3-Va*vt/Ia/xx
c=-R3*Va*vt/Ia/xx
which represents the coeff's of:
R1*R1*a+R1*b+c=0
Using a decent value of R3 set equal to 5 ohms (to keep network bias current low),
we can then solve for R1.
Solving for R1 we get two solutions. The positive solution will be the correct one.
If by chance you get two positive solutions, try each one in the two equations
[1] and [2] above to see which one is correct.
Now knowing R1 and R3, we can solve for R5:
R5=-Va*(R1+R3)/[Ia*xx*R1]
Thus, we obtain the values of R1 and R5 that will provide for perfect regulation
at the two selected input voltage points. For points in between, they should be
fairly close too, although they wont be perfect. Somewhere in between there
will be a high point, where output current is maximum.
NUMERICAL EXAMPLE
Lets say we want constant current output at the two input voltage points:
2.4v and 1.666667.
(The second point was chosen at 2.4/1.44, and 1.44 is the square of 1.2, which
makes the highest input 20% higher than the midpoint, no big deal really though).
Lets also say that we measure 0.5 amps peak inductor current at 2.4 volts input
in the uncompensated circuit when we have our nominal output current present(usually
350ma for the LS).
Lets also say that our chip has a voltage threshold of 0.018 volts, so
we set vt=0.018 .
First, we calculate x:
x=Va/Vb=2.4/1.6666667=1.44
then xx:
xx=-x=-1.44
Now set R3=5 and calculate a,b, and c for the quadratic:
a=Va*Ia/Ia/xx+vt-Va=-4.04866667
b=R3*Va*Ia/Ia/xx+vt*R3-Va*R3-Va*vt/Ia/xx=-20.18333333
c=-R3*Va*vt/Ia/xx=0.30000000
Now we solve the quadratic
R1*R1*a+R1*b+c=0
using a numerical solver for R1 and get two solutions:
R1=-5, and
R1=0.0148196
Since the first is negative, and R1 wont be negative, we use
the second solution, R1=0.0148196.
Knowing R1 and R3, we solve for R5:
R5=-Va*(R1+R3)/[Ia*xx*R1]=1127.963
So here we have found the three required resistors:
R1=0.0148196
R3=5
R5=1127.963
With a linear inductor, the circuit with these values
would provide the same current at 1.666667 volts input as
with 2.40 volts input, and there will be a slightly higher
point somewhere in between.
To check the midpoint high current, we go back to:
Vs=V*R13/R135+I*R1/R135*R5
and solve for I:
I=(vt-V*R13/R135)/(R1/R135*R5)
Now with vt=0.018
and V=Vm=(Va+Vb)/2 which is the midpoint input voltage, we get
I=0.61 amps.
To see how much higher this is than it would be if it were also perfectly
regulated, we first calculate the
inductor current that should be present at the midpoint voltage Vm:
Ix=Va/Vm*Ia=0.59 amps.
then the ratio of this inductor current Ix to I:
I/Ix=1.034 times higher, or
3.4 percent higher output current at the midpoint.
This is still a safe operating point for the LS, and would result in
a current of about 362ma if the output was originally set at 350ma.
If you want to be perfectly safe, set the nominal output at 340ma instead
of 350ma.
Since the input voltage is present as soon as the switch is closed,
there wont be any current surge when the circuit is first switched on.
CONCLUSION
Using this circuit with a linear inductor makes it possible to select
two points on the input voltage curve in which to provide perfect
current regulation. The regulation is very good in between these two
points also, so the circuit should regulate pretty good.
The inductor only need be linear in that it has to store energy
proportional to it's current squared over the required range, not necessarily
over the full possible range of the inductor. For inductors that dont
meet this criterion some deviation in the regulation will be noticed,
and just how much depends on the actual physical device.
A possible solution to a highly nonlinear device would be to experiment
with R5 to see if other values work better. R1 can then be changed to
set nominal output current.
Whelp, im off to try to do some small chip soldering again, those
0.0256 pitch parts sure are small and the leads are so close
together
Good luck with your LED circuits,
Al