# How to check voltage on garage door opener switch

#### Eddie Blattner

Joined Jul 7, 2018
3
Please be patient, I understand this is probably an extremely simple question to someone who know what they're doing. My background is in automotive electronics and software development. What I'm attempting here is completely new to me (but very fun). I am trying to use a Raspberry Pi to check the 'open door' switch, and operate the wall switch for each of my 2 garage doors. This is part of a home automation project I'm working on.

I am using an old 18v laptop power supply, a buck converter to pull that down to 12v (For the 2 LED under cabinet lights I'm also running with the Pi), and an LM7805 regulator for the Raspberry Pi power source. The laptop power supply is plugged in to the same circuit as the garage door openers. I understand that my Raspberry Pi is isolated from the garage door opener circuits, and because of this I have no idea how measure voltage at the 'door open' switch or operate a transistor to short the wall switch to ground so I can operate the door.

The voltage at the 'door open' switch is 8 VDC open, 0 VDC closed to case ground. I want to use a transistor to operate the wall switch (20 mA max measured current to ground when operated) controlled by the Pi. The garage door openers (2) each have a 24 volt AC - DC converter for the logic circuits. I had thought about using this as a power supply, but was afraid is might not be up to the task since I'm also running 2 LED strips with the same device I want to use to operate the garage doors.

I hope this gives someone enough information without running on with too much. Thanks in advance for your help.

#### Hymie

Joined Mar 30, 2018
1,080
As the Raspberry Pi is isolated from the garage door circuit, you could configure a circuit made up from a transistor & relay to operate, depending on the voltage across the door switch – then monitor the relay volt-free contacts via the Raspberry Pi.

You could then similarly use a relay to operate the garage door switch, powered/controlled by the Raspberry Pi.

#### Eddie Blattner

Joined Jul 7, 2018
3
Thanks for the reply. Although I was hoping for something a little more integrated, that is definitely an option. I thought some more about this on the lake this morning (best place to think other than the shower). What I thought I might do is add another Raspberry Pi Zero ($5 @ Microcenter) to my Pi network to work just the garage doors. Doing this, I could tap 5 volts from the garage door's 24 VDC, which would give me my common ground and solve that problem. The Pi Zero pulls about 1 amp, so I'm hoping the 24 volt regulator can spare some extra juice. Not sure about the math, but I believe 1 amp @ 5 volts (Pi power req.) would be about 0.2 amps @ 24 volts (source voltage), correct? The only thing I'm concerned about in going this route is using an LM7805 regulator to get the 5 volts. Do you think heat would be an issue for the regulator going from 24 volts to 5 volts? I'm doing this on the device I made to monitor my alarm (door and window status), and on the one I use to control the kitchen lights. Each of these is powering a Raspberry Pi Zero, but the source voltage for both devices is 12 volts, not 24. According to the datasheet, maximum input voltage is 25 volts for the LM7805 so I would think I should be ok. Is the heat generated from reducing the voltage or by current flowing through the regulator? I'm not sure. I read heat was generated by lowering the voltage, but there has to be current flow to do any work, right? If the regulator is not powering the raspberry pi, I still have 5 volts output but no heat. I have a heat sink on both the working LM7805's now, and would include one on the garage Pi as well. Thanks again for the help!! #### Hymie Joined Mar 30, 2018 1,080 Thanks for the reply. Although I was hoping for something a little more integrated, that is definitely an option. I thought some more about this on the lake this morning (best place to think other than the shower). What I thought I might do is add another Raspberry Pi Zero ($5 @ Microcenter) to my Pi network to work just the garage doors. Doing this, I could tap 5 volts from the garage door's 24 VDC, which would give me my common ground and solve that problem. The Pi Zero pulls about 1 amp, so I'm hoping the 24 volt regulator can spare some extra juice. Not sure about the math, but I believe 1 amp @ 5 volts (Pi power req.) would be about 0.2 amps @ 24 volts (source voltage), correct?

The only thing I'm concerned about in going this route is using an LM7805 regulator to get the 5 volts. Do you think heat would be an issue for the regulator going from 24 volts to 5 volts? I'm doing this on the device I made to monitor my alarm (door and window status), and on the one I use to control the kitchen lights. Each of these is powering a Raspberry Pi Zero, but the source voltage for both devices is 12 volts, not 24. According to the datasheet, maximum input voltage is 25 volts for the LM7805 so I would think I should be ok. Is the heat generated from reducing the voltage or by current flowing through the regulator? I'm not sure. I read heat was generated by lowering the voltage, but there has to be current flow to do any work, right? If the regulator is not powering the raspberry pi, I still have 5 volts output but no heat. I have a heat sink on both the working LM7805's now, and would include one on the garage Pi as well.

Thanks again for the help!!
Your power draw calculation for the 7805 regulator is wrong – this is a linear regulator such that the current in equals the current out with the required drop in voltage.

Therefore the 7805 power dissipation with an input of 24V and a current draw of 1A is (24V – 5V) x 1 = 19W. This would require quite a large heatsink, plus the 24W (power loss, plus Pi power) must additionally be supplied from the garage door supply.

A much better solution is to use a buck step down converter, which has a much higher efficiency.

This one from an e-bay seller allows for an adjustable output voltage.

With a 24V input and 1A load output at 5V, I would expect a total additional load on the 24V to be around 8W (vs the 24W using a 7805).

#### Eddie Blattner

Joined Jul 7, 2018
3
Thank you very much. I actually purchased this buck converter from Amazon a couple weeks ago to use with my LED lights..

eBoot 6 Pack LM2596 DC to DC Buck Converter 3.0-40V to 1.5-35V Power Supply Step Down Module

I have one of these pulling 18 volts down to 12 volts for the LED lights. I got 6 of them, and am only using 1 as of now. I'm not sure why I didn't think about that.

Problem solved, Thanks again!!!