2
\$\begingroup\$

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

\$\endgroup\$
1
  • \$\begingroup\$ Not part of your question I know, but that schematic does nothing to protect the Arduino pin 2 from the pulse of energy that comes from the coil when the output is turned off. I fear for the Arduino. \$\endgroup\$ Oct 26, 2013 at 5:19

2 Answers 2

3
\$\begingroup\$

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).

\$\endgroup\$
4
  • \$\begingroup\$ Thank you this is very helpful. I wasn't sure where to wire the extra Line 2 but I guess ground is always an option. \$\endgroup\$
    – stormist
    Oct 25, 2013 at 22:04
  • \$\begingroup\$ @stormist you could wire it to VCC and use an external weak pull down resistor to ground instead. It's just easier to use the internal pull-up instead. Just ignore the L1 pins. \$\endgroup\$
    – Passerby
    Oct 25, 2013 at 22:09
  • \$\begingroup\$ I tried it and it worked! A good 2-3 inches away even! So cool. Thanks again \$\endgroup\$
    – stormist
    Oct 26, 2013 at 4:01
  • \$\begingroup\$ @stormist glad to be of help. \$\endgroup\$
    – Passerby
    Oct 26, 2013 at 4:21
-1
\$\begingroup\$

In addition to "try it", there's an extra optimisation.

Do not connect anything to the relay coil terminals, and insulate them from each other. If they have a connection, the magnetic field experienced by the reed switch is slightly reduced, making it less sensitive. If they are not insulated, a sudden or strong magnetic field may cause high voltage, which may arc to anything nearby. If you can find a way to remove the coil without destroying the reed switch, you might do that.

\$\endgroup\$
3
  • \$\begingroup\$ A static magnetic field will not be affected by the coil if its shorted. The probability of an intense magnetic field causing the coil to arc is beyond feasible in anything other than a lab experiment or nuclear detonation. Maybe rethink your answer dude. \$\endgroup\$
    – Andy aka
    Oct 26, 2013 at 6:47
  • \$\begingroup\$ Yes, good point, please describe the probability further; how intense should the field be, how quickly is it allowed to change, what voltage will be induced, and what is the distance the arc would have to travel? \$\endgroup\$ Oct 26, 2013 at 8:34
  • \$\begingroup\$ im sorry to downvote. It doesn't appear you grasp what I'm saying. Let me be clearer, your further optimization advise is irrelevant and misleading. \$\endgroup\$
    – Andy aka
    Oct 26, 2013 at 9:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.