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,665
  • 3
  • 10
  • 24
Larry Bowman
  • 11
  • 1
  • 2
  • Hi @Larry Bowman, Welcome and nice to meet you. Ah, let me see. (1) The Smakn DC/DC 12V to 3V/3A is to step down power supply output voltage, NOT to convert 12V logic signal to 3V3 logic signal. So it inappropriate if not ALL WRONG to use the Smakn power supply voltage converter. Reference: (1) SMAKN DC/DC [Power Supply Output Voltage] Converter 12v Step Down to 3V/3A Power Supply Module https://www.amazon.com/SMAKN%C2%AE-Converter-Power-Supply-Module/dp/B00ODL140M. – tlfong01 Jan 07 '20 at 12:08
  • (2) Using two resistors in series as a voltage divider to step down 12V signal to 3V3 and input to Rpi GPIO is DANGEROUS and NOT recommended, because of the "Latch Up" problem. The GPIO circuit and/or whole Rpi might fry sooner or later, if not immediately. You might like to read the sotry of the DHT11 guy who unluckily fried his Rpi. "DHT11 sensor and the wrong voltage may have fried my RPi3": https://raspberrypi.stackexchange.com/questions/96560/dht11-sensor-and-the-wrong-voltage-may-have-fried-my-rpi3/96563#96563 (Note - Explanation of latching up is at the end of my answer.) – tlfong01 Jan 07 '20 at 12:18
  • (3) The EE guys usually use CD4049/50 which is designed to to step down 5/12/15/18V logic signal to 3v3 (3) CD4049UBC/CD4050BC Hex Inverting Buffer/Hex Non-Inverting Buffer (Vdd = 3V3, Vin = 18V max) - FairChild 1999 https://www.futurlec.com/4000Series/CD4050.shtml. – tlfong01 Jan 07 '20 at 12:21
  • (4) CD4049/50 is expensive and wasteful if you don't need 6 channels. So lazy hackers needing to step down only one or two signal use 2N2222 to do the 12V to 3V3 logical level conversion. The config is something like this: (a) Vcc = 3V3, (b) pull down resistor one end to Vcc, the other end to 2N2222 colector, also to RpiGPIO, (c) 12V signal through biasing resistor to Base of 2N2222. Reference: 2N2222/MMBT2222 - Fairchild 2004: https://www.jameco.com/Jameco/Products/ProdDS/787536.pdf。 – tlfong01 Jan 07 '20 at 12:30
  • For solutions (3) and (4) above, there is NO GUARANTEE no nothing won't melt down or blow up. Actually this forum is not for discussing electronics circuit design. So I would suggest to move this question to EE StackExchange and see what those engineers out there think about it. – tlfong01 Jan 07 '20 at 12:36

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,024
  • 5
  • 73
  • 106
  • inept is not far from the mark....I appreciate the quick response. Not sure which pin on my raspberry but I should be able to figure it out. thanks again. – Larry Bowman Jan 07 '20 at 11:44
  • You can use any GPIO connected to the expansion header. See https://pinout.xyz/ – joan Jan 07 '20 at 11:46
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
  • 59,890
  • 31
  • 101
  • 209