I need to create a constant current source (~40ma) for a load that can be switched on and off. Since this will be for a precision device, rather than just measuring the voltage drop of the load and using a current limiting/setting resistor, I'd like to have a real constant current source that doesn't depend upon the load's voltage drop (nominal load voltage drop is 2.5V, but may vary a few tenths of a volt).
I'm attaching a schematic of my current plan which uses 1 NPN transitor, 1 LM317 regulator, and 2 resistors.
I wonder if someone knows of a simpler (or better) circuit than this.
Thanks for your consideration!