I am working on an adjustable current source. In a thread awhile back, various circuits were discussed:
... but as I have settled on one option, and it's not working correctly, I'm starting a new thread to focus on my conundrum.
Here is the circuit:
The resistor divider (30K resistor and potentiometer) provide a reference voltage on 'set' (the DC sweep of v1 just rotates the pot shaft). The opamp should servo 'gate' so that 'sense' equals 'set', and thus the current (in milliamps) pulled through the load 'Rload' equals the voltage of 'set' (in millivolts). Simple as that.
The 12v supply which powers the 'set' circuit and the opamp is a 7812 powered off the 24v supply. And the mosfet is actually a FQP10N20C (a fairly vanilla power nfet).
I've simulated with LTspice and it behaves as I'd expect. But on the breadboard, as 'set' is increased from 0 to about 400mV, 'sense' tracks 'set' less and less well. At one point I'm seeing 257mV on 'set' but only 226mV on 'sense'; so only 226mA is flowing through Rload and R1. 'Gate' is at 3.53V and 'down' is at 11.7V. If one just examines the opamp in isolation, it seems that 'gate' should be driven higher (until, presumably, at some point enough current flows that 'sense' equals 257mV).
The opamp is meant to be used with a single-ended supply, and should easily be able to drive its output above 3.53V (with a 12V supply voltage). The gate of the FET should not be sinking any current (verified with meter).