1 Step-up converter with current feedback measurement.
4 Driven by PWM output OC1B (PB4 pin) with MOSFET.
5 Current feedback measured at ADC3 (PB3 pin).
6 Output on the PB4 header (pin 1 is negative, pin 2 is positive side).
13 D50 SS24 Schottky diode (SMB package, 40V, 2A)
14 L50 470uH, 390mA, 200 mil pin distance (probably too big for 20mA LEDs :-)
15 PB4 two-pin header soldered to pins 1 and 2 of PB4
16 Q50 IRLML6344TRPBF N-channel MOSFET, 30V, 5A, SOT-23 package
17 R40 220nF capacitor (not resistor!)
20 R51,R53 0R00 (zero-ohm link)
21 R55 1R0 (can safely measure currents from ~8 mA up, for smaller currents use higher value)
28 The firmware is a dumbed-down version of firmware for my other
29 project: http://www.fi.muni.cz/~kas/bike-lights/, modified