Q:

Highly accurate constant current source

I want a continuous and highly stable light from an LED for around a couple of hours, for which I need a highly constant and highly stable current source. I prefer an opamp-based circuit for the same. What should I use?

A:

I can speak from some small experiences on a part of this. I'll leave the "highly constant and highly stable" current source design to those who know this better than I. But I was involved in creating LED-based light sources intended as "lamp references" for optical work. Your description suggests the same to me.
(1) Even if you have a perfect current source, LED output varies with temperature. So they must be operated at a stable temperature. We chose to heat them to about \$75^\circ\text{C}\$ using a closed loop control. That solved the temperature drift problem.
(2) LEDs themselves aren't consistent. Even those cut from the same wafer aren't consistent. We had to pre-stress thousands of them, holding them at a stable temperature while running them with a current source for days. We monitored the optical output and data logged the results. A few, a SMALL FEW, would actually gradually drift and then settle down to a stable spot (peak wavelength and intensity.) We chose those for the standards. We threw away most of them, by far. At the time, we kept less than 1% of those tested because more than 99% of them simply weren't stable even over periods of hours.
I'm just saying. I believe you are focused on the wrong issue. Buy yourself a really nice 100ppm "stability" current source from a supplier that provides the range and resolution and accuracy you want and guarantees all of it (it won't be cheap.) And then use that with your LEDs and play around with temperature and various LEDs just to sample the modern situation with LEDs before going off and worrying about the current source end of it. You need to know what parameters need to be placed under your control in order to meet your requirements. Dog first, tail later. Just one opinion.

A:

As has already been mentioned, if you feed a perfect and stable current into a LED, the LED will vary its output light level with temperature and quite likely aging as well. Why don't you build a light sensor to monitor the output light level and use this in a feedback loop to control the LED current. A lot of low power lasers do this: -

I'm not saying light sensors are perfect but some are stabler than LEDs (and intended to be so) - the difficulty is how you couple the LED to the sensor and prevent reflections and ambient light affecting things. As I don't know your proposed idea other than what you wrote it's impossible to say if this is feasible.

A:

Stability is pretty easy to achieve at the 0.5% level, even the lowly LM317 should be good enough. 
If you want a current source with, say, 0.25% accuracy and better stability, consider something like an LM4140 as a 1.024V reference. 

simulate this circuit – Schematic created using CircuitLab
The compliance of the current source is about 3.8V, depending on the MOSFET chosen, 
so it should accommodate most types of LED. If you need more compliance, increase the 
supply voltage from 5V or divide down the reference and reduce the sense resistor (but that places more demand on the op-amp Vos and TCVos characteristics. 
With care, and trimming, this should have stability in the 5-10ppm/K range, and initial
error can be trimmed out completely (to the extent you can measure the current accurately). 

