Magnetic Proximity Light


This is a very simple circuit that uses an external magnetic proximity switch to activate an LED. It was designed to light up the inside of a mailbox when the door is opened (Mailbox Light). It would be ideal to simply use the switch to turn the LED on and off, but the switch functionality needs to be inverted or the light will turn off when the door is opened (not useful).

The magnetic proximity switch that I designed this for was part of a wireless window/door alarm module from Electronic Goldmine. The switch is normally open and closes when the magnet is nearby. A pulldown resistor is used to define the voltage on the transistor base. When the switch is open, 0V is on the PNP transistor base which activates it. With the switch closed, 9V is applied to the base which turns off the transistor. This arrangement turns the light on when the magnet is removed from the switch (useful).

Since the switch closes when the magnet is nearby, there will be a small current flowing through the 100K pulldown resistor when the light is off. Current was measured at 0.08mA with the light off and 5.3mA when it was on. With these currents a 9V battery should last for weeks to months depending on use.

Eagle Design Files

Cadsoft Eagle pcb schematic [ .PNG | .SCH ]

Cadsoft Eagle pcb layout [ .PNG | .BRD ]


  1. Electronic Goldmine - Window/door 433MHz wireless alarm module with built in magnet and magnetic proximity switch
  2. Mailbox Light project page