• The LED current is set by changing the resistance of the MOSFET.
  • (The MOSFET is used in the linear region, it is not pulsed on and off, the light does not flicker.)

  • A tiny voltage proportional to the LED current is dropped across the current shunt resistor.
  • The microconroller amplifies and digitises this voltage and compares it to the requested mode current. If the measured current is too low the micro controller reduces the resistance of the MOSFET and vice-versa.
  • Pressing the mode switch cycles through the brightness settings, requesting different LED currents.

The microcontroller is also able to measure the battery voltage and temperature. It is able to reduce the LED current if the battery is low, or if the LED gets too hot. When the battery is almost depleted its voltage falls below that required for full brightness, the LED brightness will slowly degrade, the light will not suddenly cut out.