of course that would be grea but with a variable voltage how can we ensure a constant current draw throughout??
Hi again,
There are a number of ways, KeepIt's post mentioned an LT device that looks good. You have to be careful with the LM317 if you have to discharge down to 3v or lower it may not function properly.
Another simple way is shown in the attachment. This uses one general purpose op amp and a transistor like 2N2222 for currents up to about 300ma. A separate source V1 is shown for the supply voltage, and V2 can be a pot that goes from V1 to ground using the wiper arm terminal for the input to the op amp. R3 is part of the battery, it's internal resistance, and V3 is the battery internal voltage.
R1 is shown as 5 ohms and that is sized to keep some of the power out of the transistor while still allowing some current draw from the battery. With R1 being 5 ohms, the output current is then equal to:
I=V2/R1=V2/5
so when V2 is 1 volt, the output current is:
I=V2/5=1/5=200ma
The power in R1 is:
PR1=I^2*R1=0.2 watts, so a 1/2 watt resistor would be good.
The power in the transistor is:
PQ1=(V3-I*R1)*I
so for I=200ma we have:
PQ1=0.4 watts when the battery voltage is 3 volts, and we have PQ1=0.6 watts when the battery voltage is 4 volts.
If the transistor gets too hot then you can increase R1 up to about 10 ohms for a 200ma current sink, but you'll also have to adjust V2 for 2 volts (or close to that).
If we use a rail to rail op amp and a voltage reference diode for V2 we can use the battery under test to power the circuit too.