# What is the purpose of this transistor in this schematic?

First thing first, I am not native speaker and I am new here.

This schematic is reverse engineered from searchlight PCB traces (which is broken) by me.

D+ and D- terminals connect to the rechargeable battery. I couldn't read the voltage rating of the battery.

"LED"s are white and all of them parallel and voltage drop is about 2.6V.

There is a switch and a button in the middle of the schematic, nothing special.

I have a guess that these two diodes, one transistor and 520Ohm resistor makes up constant current circuit. But simple constant current circuits generally have zener (or at least 2 diodes at base) to implement.

If my guess is not correct, please tell me how this circuits drives the white LEDs.

When the mains is connected and the cathodes of the 1N4007s go negative, the base of the BJT is pulled to approximately 0V so the LED turns off, and most of the current flows into the battery, except for the current through the 520$$\\Omega\$$ resistor (kind of an odd value, are you sure?).