element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Magnetic Door Switch
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 13 replies
  • Subscribers 666 subscribers
  • Views 1633 views
  • Users 0 members are here
  • raspberry_pi
Related

Magnetic Door Switch

Former Member
Former Member over 10 years ago

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?

  • Sign in to reply
  • Cancel
Parents
  • royleith
    royleith over 10 years ago

    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.

     

    FACILLARegistered 5V 2-Channel Relay Module Shield for: Amazon.co.uk: Electronics

     

    image

    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/

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • royleith
    royleith over 10 years ago

    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.

     

    FACILLARegistered 5V 2-Channel Relay Module Shield for: Amazon.co.uk: Electronics

     

    image

    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/

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • gadget.iom
    gadget.iom over 10 years ago in reply to royleith

    If my thinking is right he is looking monitor the zone circuits, not trigger them.

    His original discussion may shed some light on the subject: http://www.element14.com/community/thread/41234/l/raspberry-pi-and-existing-accenta-gen-4-alarm

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 10 years ago in reply to gadget.iom

    Thanks Paul, yes i'm looking to use the switch as an input.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • gadget.iom
    gadget.iom over 10 years ago in reply to royleith

    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.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube