This simple circuit supplies a constant current to an LED from supplies that can vary between 6 and 12 V. For a 56-ohm resistor like R2 the current will be 10 mA.

This simple circuit supplies a constant current to an LED from supplies that can vary between 6 and 12 V. For a 56-ohm resistor like R2 the current will be 10 mA.