Electronic – arduino – use a reed relay instead of a reed switch with an Arduino to detect when a magnet is close

arduinoelectromagnetismrelay

I'm using this device:
http://www.radioshack.com/product/index.jsp?productId=2062478

I found this on how to wire it to an Arduino:
http://gncarduino.blogspot.com/2013/04/reed-relays-why-would-i-want-to-use-one.html

Could I somehow utilize this just to test when a magnet was next to the reed relay? Or will an external magnetic field not trigger a reed relay? (is it magnetically shielded perhaps?)

If this is possible, I'm not sure how I'd alter the wiring in place of device I want to control because I just want to use the magnetic field detection with no device to control

enter image description here

Best Answer

Simplest answer. Try it. The relay is an electromagnet. It depends on magnetism to work. It might be shielded, it might not. Use the continuity feature on a multimeter and a magnet and test it.

If it works, you would wire it like you would a regular reed switch, with the L2 pins connected to ground and an Arduino digital pin set to input (with pullup).