I've thrown away some dead batteries yesterday, and found in the electric waste dumpster bin a defective ambient light lamp with movement sensor, the ones you plug into a wall power outlet, and the lamp automatically turns on a few LEDs when somebody walk through the room, and only when it's dark in the room. Took it home for parts, in the hope that the PIR sensor will still be good to play with in some other project.
The surprise was when I opened the lamp. The design is faulty, and apparently the lamp shouldn't work at all, in the first place. I don't get it.
Inside there is a 78L05 in reverse, fed with voltage at its output pin. It is not an assembly error, the footprint layer drawn on the PCB is also wrong, and the 78L05 was soldered according to the footprint draw.
I desoldered the 78L05 and placed it correctly. It was not dead, just that in reverse it outputs some 3.4V instead of 5V (tested this outside the board, with a power source limited at 10 mA). Now the +5V is OK, but the lamp still didn't work.
While checking the rest of the parts, the schematic (raised from the PCB) looks like nonsense. I'll double check this afternoon, but still, the 78L05 was in reverse for sure, no doubt about the 220Vac to 5Vdc part of the schematic.
My question is, how did this schematic worked, in the first place?
Is this some 78L05 trick I didn't know, or is it just a wrong design? Maybe a fault clone of some other working lamp? Didn't they noticed in production that none of the lamps were working? Even if they didn't test it, how did they manage to sell something that never worked?