fssnerd
Posts: 1
Joined: Tue Dec 17, 2013 4:07 am

Using existing 12v door sensors

Tue Dec 17, 2013 4:20 am

Good day all!

I would like to know if someone might be able to help with a solution for our project. We have existing door sensors in place that show an output of 12.5 volts. These currently run some very loud buzzers for a warehouse. We want to rig it up so these existing devices send a signal to the Raspberry Pi, so we can write some code to initiate a page on our VOIP phone system. We know the software side, just a simple bash script to scp a file to our phone server. What we don't know is the electronics side. What can be used to interface the existing units with our Pi? We have a model B Pi and a PiFace board. Any advice is greatly appreciated!

Happy Holidays!

User avatar
FLYFISH TECHNOLOGIES
Posts: 1750
Joined: Thu Oct 03, 2013 7:48 am
Location: Ljubljana, Slovenia
Contact: Website

Re: Using existing 12v door sensors

Tue Dec 17, 2013 12:11 pm

Hi,
fssnerd wrote:What can be used to interface the existing units with our Pi?
You obviously need to decrease the 12.5V.
A simple resistor divider could be used, where ratio between used two resistors defines decreased "output" voltage.

You can connect this signal also directly to RasPi GPIO pin. Values of the resistors pair could be 10k and 3.3k ohm.

There are several pages available describing details, this is one of them, with just few basics info: http://www.mrcorfe.com/DAOS/Year11/Elec ... viders.php


Best wishes, Ivan Zilic.
Running out of GPIO pins and/or need to read analog values?
Solution: http://www.flyfish-tech.com/FF32

btidey
Posts: 1636
Joined: Sun Feb 17, 2013 6:51 pm

Re: Using existing 12v door sensors

Tue Dec 17, 2013 1:05 pm

As the grounding may be ambiguous on the door sensors, I would be tempted to use opto-isolators here. With that you connect the door sensor across a resistor and the diode part of the sensor, and then the output of the sensor is coonected to the pi gnd and the a gpio input pulled up to 3.3V. One could use the internal pull up of the GPIO or a lower value external one.

The IL74 series of coupler is a good starting point. You can get a quad ILQ74 if you have multiple doors to handle. If you used about a 4.7K resistor to feed the diode side that would give about 2mA of diode current. That would allow either the internal pull up or an external 22K pull up to 3.3V to switch OK.

Return to “Beginners”