1

My new Guardline Security Alarm can send a 12-volt output signal to an accessory device.
I would like to send that signal to my Raspberry pi and have it send an email to my iPhone.
I bought a SMAKN Dc/dc converter to step down the 12v to 3.3v. Can I just direct wire them together?

Any help would be appreciated.
Don't want to blow up a $100 alarm.

Thanks.

tlfong01
  • 4,847
  • 3
  • 12
  • 24
Larry Bowman
  • 11
  • 1
  • 2

3 Answers3

2

You need to use an interposing relay. This is simply a mechanical or solid state relay that has a 12Vdc coil and at least one contact (typically a form C contact, aka single pole double throw). Wire 3.3Vdc from your Pi to one side of the contact and the other to a GPIO input. Ensure you use a pull down resistor with the relay contact and a current limiting resistor directly in front of the GPIO point. The 12Vdc will be wired to the relay coil. When the coil is powered on from the security panel, the contacts will change state.

You could use the/a DC to DC converter, but depending on the type can cause issues....but generally these are expensive devices and more complicated than required.

FYI I have implemented this application at home with my ADT panel to send SMS text messages. I used the relay and it works flawlessly.

You can find terminal block style relays that are relatively inexpensive. I like Omron. Take a look at their G2RV-SR series. You can find these at a variety of online dealers or at your local electrical distributor.

mike
  • 111
  • 1
  • 1
  • 7
0

If you know the voltage (is it always 12V or is it sometimes 14V) you could have used a pair of suitable resistors as a voltage divider.

As long a your DC converter or whatever circuit you end up using constrains the voltage at the Pi to 3V3 or less you will be fine.

In any case I don't see how you could damage your alarm by tapping its 12V output (unless you chose to be deliberately inept).

joan
  • 71,852
  • 5
  • 76
  • 108
0

I bought a SMAKN Dc/dc converter to step down the 12v to 3.3v

DO NOT do this!

These devices are for converting power NOT logic levels!

You could use a voltage divider provided the circuits share a common ground.

I would NOT directly connect a foreign voltage source to a Pi (or any other logic circuit) without protection. NOTE you do NOT need 3.3V - indeed an engineer would use a circuit designed to safely exceed the logic threshold. (I normally aim to supply 2.2V to a Pi GPIO input). I wouldn't even connect the Pi 3.3V power to a GPIO without protection.

See https://raspberrypi.stackexchange.com/a/105246/8697 which is an answer to a similar question.

Milliways
  • 62,573
  • 32
  • 113
  • 225