So one of my favorite stores harbor freight shows these little work flashlights. They are incredibly bright and use 3 AAA batteries to power them up, they are a bit under designed as far as reliability, but they pull over an amp from these little batteries. So they are real battery hogs. I have tried rechargeable lithium which can provide the current and maintain the voltage but they burn out the light strip.I use a 1Ω resistor to drop the voltage down .
I regularly buy them to harvest the light strips and even the batteries( hey they are selling these things for 99¢ at the moment.a friend of mine is using one as a pantry light. She would like to add a option similar to a refrigerator light where it turns on when the door is open. It so happens I have window sensors for an alarm system. The switch is closed when the magnet is next to the sensor . So somehow I had to reverse the action to closing a switch when the door was open so I came up with this circuit . My soldering job is ugly enough I didn't worry about pictures of the interior in this case.
I auditioned an IRF520 which is a conventional MOSFET, obviously since it would not work at such a low voltage, interestingly it did switch but did not turn fully on. So I used a logic level MOSFET (16N05L) which worked very well.
I soldered the 10MΩ to the gate of the MOSFET and attached the sensor wire from there. Since I only have one working hand I used this tool to assist:

I stuffed the transistor in an empty space in the flashlight, the sonalert was an an afterthought to be sure the light went out when the door was closed.
I regularly buy them to harvest the light strips and even the batteries( hey they are selling these things for 99¢ at the moment.a friend of mine is using one as a pantry light. She would like to add a option similar to a refrigerator light where it turns on when the door is open. It so happens I have window sensors for an alarm system. The switch is closed when the magnet is next to the sensor . So somehow I had to reverse the action to closing a switch when the door was open so I came up with this circuit . My soldering job is ugly enough I didn't worry about pictures of the interior in this case.
I auditioned an IRF520 which is a conventional MOSFET, obviously since it would not work at such a low voltage, interestingly it did switch but did not turn fully on. So I used a logic level MOSFET (16N05L) which worked very well.
I soldered the 10MΩ to the gate of the MOSFET and attached the sensor wire from there. Since I only have one working hand I used this tool to assist:


I stuffed the transistor in an empty space in the flashlight, the sonalert was an an afterthought to be sure the light went out when the door was closed.