Garage door opening doesn't work with with octocoupler / SSR

I want to control my garage door via ESPHome. The garage door controller is a Hörmann Prolift 700 model. If I short its terminals with a wire, it opens/closes the door as expected.

I configured ESPHome as follows, and I can trigger pin 15 via Home Assistant as expected:

switch:
  - platform: gpio
    pin: 15
    id: relay
    name: "Hormann Remote"
    icon: "mdi:gate"
    on_turn_on:
    - delay: 500ms
    - switch.turn_off: relay

I tried shorting the terminals with an optocoupler and a solid-state relay, but neither worked, so I tested them with a breadboard LED circuit.

With the optocoupler, the status LED of the optocoupler momentarily lights up, as expected, but the breadboard LED doesn’t ever light up.

With the solid-state relay, the LED of the solid-state relay board momentarily lights up, as expected, and when it’s enabled, the breadboard LED also lights up, and strangely, it stays enabled, even when the GPIO pin is disabled.

What am I doing wrong? Thanks in advance for your help!

Schematic, please. (PLEASE, no Fritzing pictures). Schematic drawings convey much more information than photos or pretty Fritzing pictures. Hand-drawn on paper is fine, just label the connections. What is the black cable at the top of the breadboard connected to?

The black cable comes from a 5V USB power supply.

I think the schematic should be straightforward, even based on the photos.

A schematic would be straightforward. A photo is not a schematic.

I am an engineer. I speak schematic. Photos simply do not convey information as completely as a schematic. Photos and pretty pictures require guesswork. Pictures do not say what the connection labels are, and you haven’t said anything about the SSR specs or which SSR module you are using. Some are latching, some aren’t. SSRs also have a minimum operating load current which an LED is unlikely to present. Are you using an SSD because you already have one? A simple relay board would work.

I’m using this optocoupler board and this solid-state relay board.

The SSR specs don’t say what SSR is actually on the module, but one of the images show that it is probably a G3MB-202P, which is designed for an AC load

ssr

Because there is no DC specification than I can surmise that the output of this SSR is a triac. A triac is two silicon controlled rectifiers (SCR) back-to back to allow AC to pass.

You turn the SCR on by applying a signal to its gate, but as you have observed, you cannot turn it off by controlling the gate. The SCR can only be turned off by reducing the current flowing into the device below a threshold level so that the device stops conducting. In an AC circuit this is known as a zero-crossing. When you remove the signal at the gate, the SCR stops conducting the next time that the AC voltage goes through zero. If you remove one of the wires going to the breadboard momentarily, the SSR will stop conducting until the gate signal is reapplied.

An optocoupler is basically an open-collector transistor that only works with a DC load. But an LED may not present enough of a load to get a current flow through the transistor.

What you really need is- a relay.

Thank you for elaborating! Your explanation makes sense.

When you say I need a relay, do you mean an electromechanical one? I’d rather use a solid-state relay if possible due to its longer lifespan and silent operation.

I think the relay has a good chance of outliving your garage door opener and I don’t think you’re going notice the slight noise of a relay relative to the sound of the opener either. :slight_smile:

This really is the perfect use-case for a simple relay.

In this specific use case, you’re right. I’m still interested in whether there’s a solid-state relay that’d work.

To spec the correct SSR, you need to know what you are controlling. Is it AC or DC? What voltage? If you don’t know then a mechanical relay is your safest device.

1 Like

Thanks for the insight! I’ve always believed that people use mechanical relays because they cheap out, but now I can see that solid-state relays are much less general.

I lack the knowledge to pick the right solid-state relay, and I don’t want to delve deep into the rabbit hole, so I’ll stick to mechanical relays for my smart home projects.

1 Like

I notice that none of my commercial IOT devices use an SSR and I don’t think I’ve ever heard a relay click except at night when there is no other sound.

FYI- I bought some SSR modules and haven’t found a use for them yet.