1
\$\begingroup\$

My house is equipped with a wired alarm system that's missing the hardware controller board. Whats left is a number of sensors (NC) and the wiring to a central location. Cable lengths are anywhere from 3 to 20 meters. I would like to build a simple controller board using Arduino to read the sensor states. What would be the best approach, how would you wire the sensors to the controller board? I have tried to find the best approach online but I have seen many different solutions. I'm thinking of using a resistor in series with the sensor together with an optocoupler, feeding the sensor with 12 volt. Any ideas?

\$\endgroup\$
  • 1
    \$\begingroup\$ How would you wire a simple pushbutton switch to your arduino? Do you know how to do that? What extra precautions would you take if the wiring was several metres between switch and arduino? \$\endgroup\$ – Andy aka Dec 27 '18 at 15:53
  • \$\begingroup\$ Yes I do, I was thinking of issues with long wires, like false positives and other interference in the wires. \$\endgroup\$ – Chrille Dec 27 '18 at 16:01
  • 3
    \$\begingroup\$ Your almost there. Maybe add a zener diode to protect against RFI and other interference and put 10 kohm in series with the arduino pin as an extra precaution. \$\endgroup\$ – Andy aka Dec 27 '18 at 16:09
  • \$\begingroup\$ If the sensors produce a binary output, that is, exactly 1 or 0 when triggered and 0 or 1 when not (as would be a push button) then you can wire this to the arduino between a GPIO (digital will suffice) pin and ground - then put in a loop to check each pin using digitalRead. If it trips, then the loop will break and you can sound an alarm (maybe using digitalWrite...) If the sensors are analog, you need to create boundaries that trip whether a analog reading is under or over your boundary - a really good example for this is light levels from an LDR, you will see a lot of examples online \$\endgroup\$ – QuickishFM Dec 27 '18 at 17:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.