6.1 Voltage-Controlled Current Source
A voltage-controlled current source is a type of circuit where the current passing through a load is set by an input voltage. This type of circuit is especially useful for non-linear loads, such as LEDs (which have an exponential current-voltage relationship). An example circuit is shown below:
In this circuit, the LED from the output to the inverting input acts as the constant-current load. The resistor from the inverting input to ground sets the current response of the circuit, according to this formula.
The ideal output response comes with a few caveats. This assumes the voltage at the inverting input is equal to the voltage at the non-inverting input, VIN+, which is only true if the maximum output of the operational amplifier minus the voltage drop across the load is equal to VIN+. If this condition is not met, the output will be current limited to:
Where VOH is the max output voltage of the operational amplifier and VLOAD is the drop across the load at IMAX.
This example is shown in Microchip Application Note AN3632, "Constant-Current Driver Using the Analog Signal Conditioning (OPAMP) Peripheral" (DS00003632A).