It's a very simple device; it's used to modify the magnifying glass's fill light to be powered by a lithium battery, and also adds two brightness levels. The principle is to use a microcontroller to control the feedback loop of an M3406 microcontroller. The magnifying glass's switch is essentially a self-locking toggle switch, so the brightness operation logic is similar to an LED headlight: after turning it on and off, the brightness changes the next time it's turned on. The four pads on the left side

of the interface

are the microcontroller's programming interface. I downloaded the program before soldering, so I didn't use them. The pads on the right side, from top to bottom, are connected as follows:
BATT: Lithium battery, requires a built-in protection board;
GND: Ground, or negative terminal;
BUTN: Switch button, must use a self-locking switch or a slide switch; low level lights the LED, high level turns it off;
LED: Connect to the LED's anode; the default
charging

current is set to 100mA. I used a small pouch battery; a lower current is safer, and a longer charging time is acceptable. The top left corner is a micro-B socket; I didn't use a Type-C because I felt Type-C might be too large. The top right corner shows the charging indicator circuit. The red and blue LEDs correspond to the silkscreen markings R and B on the PCB, respectively. The transistors are mainly for switching the LEDs; Q2 could potentially be simplified, but I'm too lazy to change it. The driving voltage
for the

buck white LED is generally no more than 3V, so the lithium battery needs to be stepped down first. Adding a current-limiting resistor in series with the LED could solve the problem, but I think using a buck converter would be more efficient, though I'm not sure. Anyway, that's how it's done. All the pull-up and pull-down resistors are 1MΩ to reduce waste, and they work fine in tests.
Brightness switching involves adjusting the voltage division ratio of the M3406 feedback loop. At low brightness, the feedback resistors are R2 and R1 + R3, with a ratio of 39/11. The output voltage is approximately 2.7V, the light is very weak, but it's just right for supplemental lighting as a magnifying glass. At high brightness, MOSFET Q1 is turned on, shorting R3, and the feedback ratio becomes 39/10, with an output voltage of approximately 2.9V. One thing to note is that the MOSFET here must have a very low gate-source threshold voltage, such as the SI2300, which can conduct with a 2V drive voltage. If a MOSFET with a higher threshold voltage, such as the 2N7002, is selected, the microcontroller may not be able to drive it, or the MOSFET's on-resistance may be too high, resulting in a low output voltage. This
microcontroller

should cost around 30 cents on Taobao, cheaper than some pre-built control chips. Since it doesn't fit on the front of the PCB, it has to be mounted on the back. The program includes software debouncing, so the debouncing capacitor C4 is not strictly necessary, but it's still recommended. The pull-up resistor R8 is necessary because the microcontroller pins don't have internal pull-ups enabled. Because R8 has a relatively large value, C4 can be correspondingly smaller; I think 1nF is about right, but it doesn't really matter. The program is in the attachment; both the bin and hex directories are needed. For specific programming instructions, refer to: https://oshwhub.com/etberzin/ft60-bian-cheng-qi