Maglite mit Luxeon K2, Schaltregler, Microcontroller