mburns1339
Posts: 15
Joined: Tue Mar 24, 2015 12:29 am

GPIO relay conflict with garage door button

Fri May 08, 2015 2:55 am

hello, any help is greatly appreciated, as I don't have much experience with python and using the GPIO pins. I'm trying to set up my PI to send a signal to a relay to open/close my garage door from a web page. I have my pi wired to my relay and my relay wired directly to the garage door terminal. for my python I have the following:

Code: Select all

#!/usr/bin/python

import RPi.GPIO as GPIO

GPIO_PIN = 23
GPIO.setmode(GPIO.BCM)
GPIO.setup(GPIO_PIN, GPIO.OUT)

# Send a signal to the relay
def OpenGarageDoor():
  try:
    GPIO.output(GPIO_PIN, GPIO.HIGH)
    time.sleep(0.5)
    GPIO.output(GPIO_PIN, GPIO.LOW)
  except:
    print ("Error inside function OpenGarageDoor")
    pass

GPIO.cleanup()
This seems to work once, as it sends a signal to the door and it opens/closes, but then it stops working as the signal is crossed with the garage door opener on the wall apparently, and the light on the garage door button goes out. If I press the garage door button again, the light comes on and the signal is uncrossed, and the Pi/relay works again.

Is there something I can do to keep the pi relay from getting crossed with the garage door button? Any help is greatly appreciated, thanks!

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: GPIO relay conflict with garage door button

Fri May 08, 2015 7:23 am

could you post a photo of your wiring?
Doug.
Building Management Systems Engineer.

mburns1339
Posts: 15
Joined: Tue Mar 24, 2015 12:29 am

Re: GPIO relay conflict with garage door button

Fri May 08, 2015 1:34 pm

thanks, I will post some pics in a bit. Basically, I have a wall button AND another wire both going to the same terminals on my Sears 1/2 hp garage door opener. The wires are joined on the opener. One set of wires goes to the wall button, the other is wired to my relay, then jumper wires to my pi.

Seems like when my relay sends a signal to the garage door, it opens ok, but then the button disables itself, and it's light goes off. Of course the pi also stops working. If I press the wall button again, the button light comes back on and both the button and pi are ready to work again, so it seems the pi relay it causing some sort of problem. Almost like it needs a referee to control the wall button and the pi relay so they can both access the garage door without interfering with each other.

thanks again

Massi
Posts: 1691
Joined: Fri May 02, 2014 1:52 pm
Location: Italy

Re: GPIO relay conflict with garage door button

Fri May 08, 2015 1:59 pm

mburns1339 wrote:thanks, I will post some pics in a bit. Basically, I have a wall button AND another wire both going to the same terminals on my Sears 1/2 hp garage door opener. The wires are joined on the opener. One set of wires goes to the wall button, the other is wired to my relay, then jumper wires to my pi.

Seems like when my relay sends a signal to the garage door, it opens ok, but then the button disables itself, and it's light goes off. Of course the pi also stops working. If I press the wall button again, the button light comes back on and both the button and pi are ready to work again, so it seems the pi relay it causing some sort of problem. Almost like it needs a referee to control the wall button and the pi relay so they can both access the garage door without interfering with each other.

thanks again
Well, first of all have you thinked about what is going to happen if the second button is pressed while the relay is active? take care not to have any short possibility..

Then please post all wirings

Then plase tell us what kind of relay are you using :)

and last but not least.. how far is the PI from the relay?

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: GPIO relay conflict with garage door button

Fri May 08, 2015 2:40 pm

Could you tell us the make of the garage opener and the wall switch?

Edit: oops, Sears 1/2 hp
Doug.
Building Management Systems Engineer.

mburns1339
Posts: 15
Joined: Tue Mar 24, 2015 12:29 am

Re: GPIO relay conflict with garage door button

Fri May 08, 2015 5:35 pm

thanks again. It's a standard Sears 1/2 hp garage door opener. and the relay is this one (although I have others I can use if necessary)

http://www.amazon.com/gp/product/B0079W ... UTF8&psc=1

Just figured I was doing something wrong in the way it's wired, or setting the PINS. The relay only goes on for 0.5 seconds, so the chances of someone (my kids) pushing the button at the exact time are very small.

thanks!

ghp
Posts: 1518
Joined: Wed Jun 12, 2013 12:41 pm
Location: Stuttgart Germany
Contact: Website

Re: GPIO relay conflict with garage door button

Fri May 08, 2015 6:15 pm

Hello,
what I figure out from your description is that you try to operate two buttons in parallel.
The original button has a light build in.

Some assumptions:
- that the light on the orig button switches off when orig button is pressed ?
- the opener needs more than 0.5 sec to open the door.

My first guess is, that the button or relais just trigger some internal logic of the opener which starts operation. Then, when door is open/closed, internal logic stops motor. Possibly the solid state relais are not suitable to reliably switch this circuitry.
Try removing the solid state relais and replace it by a simple push button (be careful, of course: hazardous voltages could be applied on these connections). When the simple button works, then replace the solid state relais by a conventional type (solenoid with mechanical switch). You will need a transistor to drive this relais from pi, of course (plus resistor + diode).

Regards,
Gerhard

User avatar
Burngate
Posts: 6313
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: GPIO relay conflict with garage door button

Sat May 09, 2015 9:47 am

Looking at the Amazon picture of that relay, it uses an Omron G3MC-202P solid-state relay http://www.farnell.com/datasheets/1714700.pdf
That device is for AC only, so it'll be a triac that only switches off when the current reduces to almost zero.

I couldn't see any spec for the motor control - the Craftsman PDF seems not to have the details - but it probably uses a low DC voltage (bell-wire indicates low voltage, and DC is a guess)

What appears to be happening is that when the Pi fires the relay, the triac switches on. Current flows through the triac rather than the bulb in the push-button, so that goes out, and enough current flows to keep the triac latched on.
When you press the button, you short out the triac. Current flows through the button rather than the triac, the triac unlatches, and everything goes back to square one.

Several things you can do, all of which involve not using that relay.

The easiest is to replace it with a mechanical relay.
Although solid-state relays have advantages, in this case mechanical noise isn't a problem compared to the noise of the opening door.
Electrical noise isn't either, since the opener is designed to be used with a poxy cheap little push button.
I've seen (admittedly expensive) mechanical relays operating once every two seconds for a year or so before requiring changing. I doubt you are going to operate your door often enough to reach the relay's MTBF in your lifetime.

Return to “Python”