I'm working on creating a relatively simple project where I'm using an Arduino as a remote garage door opener. Part of this project has a reed switch near the bottom of the door to detect when its closed.

My issue is this requires a pretty long wire run for the switch (probably about 10-15 feet). My dad does a lot of ham radio communications and as such the house has a ton of HF radio being emitted. I'm wondering how I can protect the Arduino from any damaging interference and still reliably detect when the reed switch closes. I found this article but I'm not sure if it'll help me or not. I'm sure I would need a ferrite bead and probably a twisted pair for the wiring but not sure what else I will need to protect the Arduino. Thanks!

  • \$\begingroup\$ That page describes how to protect your circuit from damage associated with long wire runs, not how to keep out noise. Still an important topic. Have you tried shielded wire? Ground one end of the shield, and leave the other end floating. Then you have a grounded metal braid surrounding your signal wire, and that should help reduce external noise coupling into your signal wire. If you ground both ends of the shield, current can flow in the shield, which can couple noise into your signal wire. \$\endgroup\$
    – vofa
    Commented Dec 13, 2016 at 15:18
  • \$\begingroup\$ Shielding was something I was looking at. I haven't started the project quite yet because I haven't gotten the components in the mail yet. I figured some advice on how to do it properly would be good before I get too far into the project. \$\endgroup\$
    – Aubury
    Commented Dec 13, 2016 at 15:25
  • 1
    \$\begingroup\$ You worry too much about this. Unless your wire is within a couple of feet next to an HF transmitter antenna, it will not be a problem. The trick is to keep the line at a low impedance level. This means: use a low value resistor to detect the reed switch closing, I'm thinking 1 kohm. That way any HF energy coupling to the wire will not have the chance to generate a high voltage in the wire. Also add capacitors in parallel with the reed switch and also one at the Arduino input. Start with 10 nF at both sides. \$\endgroup\$ Commented Dec 13, 2016 at 15:28
  • \$\begingroup\$ Ok. I'm going off of what my dad told me since he knows much more about interference than I do since he does EMI testing at his job. \$\endgroup\$
    – Aubury
    Commented Dec 13, 2016 at 15:34
  • 2
    \$\begingroup\$ Aha that's what he tells you but with that amount of radio gear at home he might be a spy and possibly know very little about EMI. Is that a consideration? I'm also interested in why you would ask a question on this site when your Dad "appears" to be a great source on tap all day? \$\endgroup\$
    – Andy aka
    Commented Dec 13, 2016 at 15:41

1 Answer 1

  1. IMPEDANCE - Use a very low input impedance so that it responds well to a "dead short" like a switch, but is "de-sensitized" to random EMI floating around in the air. As FakeMoustache suggested perhaps using a pull-up resistor around 1K would make it nice and "stiff". And even some significant capacitance on the order on 1nF wouldn't hurt because you are dealing with a very low-speed circuit here and it might even benefit from some "debounce" help.
  2. FILTERING - You can use parallel capacitance and series inductance to block high frequencies (like RFI) while still allowing DC (like from your switch) to work normally. For example look up a "pi-filter" (nothing to do with the Raspberry Pi).
  3. ISOLATION - In extreme conditions (unlikely in this case) sometmes techniques such as optical isolation are used to further decouple the control electronics from long distance signal connections through "hostile territories".

Ref: https://en.wikipedia.org/wiki/Capacitor-input_filter

  • \$\begingroup\$ Thanks :) Appreciate the help, I remotely remember pi-filters from my circuits classes but I didn't have a very good professor and didn't learn a whole lot about them. Looks like these suggestions are a good way to go! \$\endgroup\$
    – Aubury
    Commented Dec 13, 2016 at 16:13

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.