Hello,
I have a existing alarm system which has a magnetic door switch connected to it. Would it be ok to connect the same switch to the PI? i.e. connect a pair of wires from the PI to the same input as the switch on the alarm panel?
Hello,
I have a existing alarm system which has a magnetic door switch connected to it. Would it be ok to connect the same switch to the PI? i.e. connect a pair of wires from the PI to the same input as the switch on the alarm panel?
Clem's right. My ancient alarm system feeds 12volts out to the switches (which are simple reed switches operated by a magnet screwed to the door). My system is a four wire system with two wires to 'make' contacts and the other two looped so that, if the cable is cut, the alarm goes off. It is not really necessary for the door switches, but is necessary for the contact mats.
Never connect anything like this directly to the Raspi. There are relay boards for the PI which would be fine for this application. Use a pin on the GPIO to operate the relay and let the relay contacts operate the alarm circuit. The only other issue is if the reeds are open or closed when the door is shut (they are probably closed as this is both cheaper and much more reliable. If you get a relay board with changeover contacts rather than just make contacts you can be sure you won't have to keep powering the relay to keep the alarm off.
The solid state switch that Clem suggests is overkill for what you want to do and does not isolate the earth connection from the Raspi. I found this for £1.14.
FACILLA 5V 2-Channel Relay Module Shield for: Amazon.co.uk: Electronics
Be warned, though, it is 'make' contacts, only, which probably means you are going to need it powered on to stop the alarm.
Or you could make something up with this 5 volt relay from Farnel.
30.22.7.005.0010 - FINDER - RELAY, POWER, PCB, DPCO, 5V DC | CPC
It needs 40mA at 5 Volts to operate and has two changeover contacts. Magpi magazine has a simple circuit with a single transistor to drive a relay (you mustn't try directly from the GPIO pins). Or, try this circuit.
http://www.susa.net/wordpress/2012/06/raspberry-pi-relay-using-gpio/
Also royleith
Looking at the silkscreen on the relay module you pictures, there are changeover contacts on the relay.
The data sheet for the relay seems to confirm this: http://www.mycomkits.com/reference/Songle_SRD(T73)_Relay.pdf
You could wire it to the NC terminal and leave the relay de-energised.
Also royleith
Looking at the silkscreen on the relay module you pictures, there are changeover contacts on the relay.
The data sheet for the relay seems to confirm this: http://www.mycomkits.com/reference/Songle_SRD(T73)_Relay.pdf
You could wire it to the NC terminal and leave the relay de-energised.