I wanted a light for my pantry. Specifically I wanted a light that would turn on and off automatically and wouldn’t use any power when the door was closed. I couldn’t find any products that matched exactly what I was looking for, so I made my own.
The light I built is a 30cm long, battery-powered LED strip. The LED strip and battery pack are attached to a 1x2 that hangs from the moulding on the inside of the pantry. A limit switch mounted just inside the doorframe turns the light on when the door opens.
The switch is a micro limit switch mounted inside a 3D printed enclosure. The switch is connected to the light through a 3.5mm headphone jack, allowing the switch and light bar to be easily disconnected.
3.5mm audio cable soldered to the switch
The switch is wired in the normally closed configuration so that the light will be ON unless the door is pushed against the switch.
Switch seated in its housing
Hot glue keeps the switch in place and alleviates cable strain
Switch mounted inside the door frame
As previously mentioned, the switch and light are wired through a 3.5mm headphone jack. The battery pack is soldered to the right channel of the headphone jack and the light is soldered to the left channel. When the switch closes, it connects the two channels and the light illuminates.
Circuit glued into its housing
Circuit completed and screwed to the 1x2
The finished light. It hangs from the brackets mounted on each end, and the clips in the center hold the battery pack in place.