When each magnet piece comes within 15-20mm of each other they complete the circuit with the internal reed switches. Each Magnetic Door Switch set can accept a max voltage of up to 100V at 500mA. Additionally each set is housed in durable ABS plastic and, with the included screws, can easily mount to most surfaces.
Tutorial: http://www.instructables.com/id/How-to-Use-a-Magnetic-Door-Switch-Sensor-With-Ardu/











