Design of a Constant Current Source
This article will explain the way a simple transistor based current source is designed, this will give an idea on how some components can be used in a practical way to make the circuit do some function, the objective is not design but to become familiar with the basic ideas. Tutorials on Basics and Instrumentation Electronics
We need a fixed current around 20mA for a voltage variation of 10V to 20V to drive a LED flasher circuit.
Component Selection.

Look at the pin details of MPSA92 in the bottom view given in the right of this page in its TO-92 package, it has a beta of 25 . The Power dissipation of MPSA92 can be upto 650mW , our requirement may be a max of 20V*20mA = 400mW which is just within limits.
Now we need a voltage reference a low cost voltage reference is a LED which has a 1.6V forward drop. As the circuit is a not an accurate one CFR 5% resistors are fine.
Circuit design.
The LED at 40mW will last long, some energy emits as heat and some as light. 40mW / 1.6V = 25mA. so let us choose 20mA max LED current as a thumb rule.

In this circuit the LED is used as a reference so to keep it cool a 2.2K is chosen. (20V - 1.6V) / 2.2K = 8.3mA on the high side and when voltage is 10V the current will be 3.8mA min. .
You should know that the LED forward drop can change with ambient light as it is photo sensitive and will vary with temperature.
Look at the circuit in the right, the LED has a forward drop of 1.6V which is applied across the resistor R4 and the base-emitter diode. That means 1V across R4 as a diode drop is around 0.6V. The base-emmiter now gets forward biased and a small base current Ib flows . The Ic or collector current is 1V / 50E = 20mA. The Ib = Ic / beta, That means 20mA / 25 = 0.8mA which flows thru R4 and R5.
The Load Resistor R6 represents the LED flasher circuit that consumes 20mA, even on short circuit of R6 the current is limited to 20mA.
When more current flows in R6 the voltage at emitter falls, the voltage at base is 20V - 1.6V =18.4V, and the voltage at emitter should be 18.4 + 0.6V = 19V for bias and Ibto flow. When Ic increases the Ib reduces to that extent as only to maintain emitter voltage at 19V, this way Ic is kept constant, if Ic reduces the voltage at emitter builds up to rise Ibwhich in turn builds up Ic. so we made a current regulator.
Circuit Improvement.
The circuit can be improved by using a zener in place of the LED or better still a temperature compensated reference like LM336.

The circuit on the right will be more stable, but still the forward drop on base-emmiter junction is temperature sensitive. The base current will also introduce an error, so you can get a 8 bit stability, that means around 255 counts on an A-D converter. If you need a more stable current source you should design with FET and opamps.
LM336-2.5 pdf details, It has a 2.5V drop. A LM336-5.0 pdf version is also available for 5V. these are from National Semiconductor.
Operating Current of LM336 is 400uA to 10mA, 20V The max. voltage 20V / 3.3K = 6mA. so within limits. Then you can compute the rest, wire it up to see if your design works.
"If all parts are working, connected in proper polarities and there are no dry solders and loose connections then any circuit well designed ought to work. "
- Solderman 1702
docc00009.html 21:46 01-Aug-04 delabs