I was reading a forum which showed a picture one contributor added. The schematic of a circuit consisted of one opamp of an LM324, its output feeding the base of a transistor and the – input connected to the emitter. The transistor had its emitter connected to ground through a 1 ohm resistor. The collector was connected to the cathode (flat spot) of the LED, and the other LED lead was connected to +5v. The LM324 power pins went to +5v and ground. The + pin of the opamp was labeled “1 mA / mV”.
Assuming that the LED is a regular 5mm and needs 20 mA, the +pin then must be supplied with 20 mV. That’s not so easy to do. For a 5V supply, that means a two resistor V divider must be added, with values of 250k for the upper and 1k for the lower resistor. It would have been better if the 1 ohm resistor was 100 ohms and the input was labeled “10 mA / V”, so 2 volts would then be needed at the input.
But if the LED current does not need to be changed, and is a constant 20 mA, then this circuit is a waste of the opamp. A simple two transistor current regulator would do just as well.
But if the supply voltage is relatively stable, then just a fixed value resistor would be just as good.