10 minute read

Why my gate wouldn't close

My driveway gate spent weeks acting up, with every test pointing to faulty sensors, until we found the real culprit tucked away in the walls.

During the last few months of winter, I noticed something weird at home. The sliding driveway gate wouldn’t close as usual—sometimes it took over an hour to shut on its own. Even more confusing, manually pressing the button to close it didn’t work either. I assumed rain droplets were blocking the sensors, a standard safety feature.

But when the gate stopped moving entirely a few months later, my dad and I finally set out to debug it. Truthfully, this was a much better time to troubleshoot without getting soaked by rain.

When it comes to electronics, I still lack the confidence and technical knowledge to make good decisions or even know where to look. Our usual workflow is simple: I ask questions, and my dad filters the ones that don’t make any sense. It works for us.

We had to start somewhere, so we started with the easiest thing to debug.

A physical blockage

This was easy to test because the gate also works manually. Another safety feature for when we have no power, we can just declutch the motor, making it possible to work the gate manually.

We did just that, and it worked as expected. Nothing was blocking it. No hiccups. It just slid normally as if the motor was pulling it. So that was off the table.

What else could we test?

The motor

While testing this one, we found an intermittent behaviour, which is always a pain to debug.

We needed to find a pattern, which isn’t always easy. But eventually we did!
First, we turned off the circuit breaker connected to the motor, completely cutting power to it. Waited a few seconds, and turned it on again. The gate was closed. I pressed the button to open. It did open! But it still wouldn’t close, not when pressing the button nor by itself.

And this circuit breaker trick only worked if the gate was closed. We never managed to close the gate with the motor. Only opening it worked. So the motor works!

Let’s start taking things apart then…

Shelly switch

At some point in the past few years I connected a small Shelly switch to control the driveway gate through Home Assistant. This works marvelously well. Not only can I just pick up my phone and open the gate, but I can also have automations like “when I arrive home, while driving, open the driveway gate”. Those little quality of life improvements that only Home Assistant can provide.

But if we wanted to make sure the Shelly switch wasn’t misbehaving, we had to take it out of the circuit. And so we did. And everything remained the same. Exactly the same.

Well, at least we know one more thing that it’s not causing the issue.
What else could it be?

The sensors

At this point, everything pointed to faulty sensors. My dad said so. ChatGPT said so. I had my doubts, but had to trust who knows better.

The sensors work by emitting an infrared light beam from the emitter to the receiver. If this light beam doesn’t reach the receiver, it means some object is between the two. Which means the gate can’t close, for safety reasons. That’s easy to understand.

My dad measured the signals at the board and everything seemed fine. At some point we even made a jumper between the two connectors at the board, basically telling the board “there’s nothing between the sensors, feel free to close the gate”. Meaning, we took the sensors out of the circuit, so the safety feature was not there anymore.

Guess what? The gate worked as expected. Press the button to open, and it would open. Wait a few seconds and it would close on its own too. Marvelous!

Then we found it! It is indeed the sensors!

So we took them off and my dad said it would most likely be the capacitors. ChatGPT disagreed here. It said it would most likely be the relays. It had 2 very small ones.

Either way, my dad took the sensor to his workshop to test. I ordered some relays for about 20EUR, shipping costs included. My dad replaced the relays and tested the capacitors. The capacitors were fine, so it would likely be the relays.

Turns out, it wasn’t.

We installed the supposedly repaired sensors back in place and the gate would still misbehave.
Consider that at this point it has been weeks without an automatic gate. Getting out of the car to open and close the gate manually with a kid in the car and likely rain pouring wasn’t exactly the time of the day we looked forward to.

But that’s what we had…

Wait! How expensive are these sensors?

I looked online. I would be able to get a pair of new sensors shipped to my door for the same price I bought the relays in the first place. Around 20EUR!

Let’s just buy new sensors and get past this already!—I thought to myself.

A few days later the new sensors arrived. I had some free time during the day and I just so happened to be alone for the day—the girls were out playing—so I thought I would install them myself.

By then I was already so used to the small 4 wires of these sensors (2 for power and 2 for signal), that I had no doubt I would be able to install them myself. And I did! Which was quite impressive by itself, if you ask me.

But what if I tell you the gate would still misbehave?! So even with new sensors, the issue was not solved.

Remember that up until this point, every symptom pointed to faulty sensors. What now?
What else could it actually be?

The board

Well, it could be… but all we could do here was test if the signal was getting there, and it was. And remember that when the jumper was in place, the gate worked as usual. So we assumed the board was doing its job.

By this time we called the “gates guy”.


Is it just me or are these construction guys always way too busy to help small families with a small issue? They are usually running from new home to new home, doing installs from scratch, which naturally takes them a long time to do, but also the majority of their income.

So they basically do the installs, and never care to come back even when asked. Most likely because their hour rate must be far higher when doing installs from scratch… So we waited. And waited…

After a few days we called again and got something like “I said I would call back when I was available”.
We stopped calling. And to this day never heard back from him. Something like 2 months have gone by.

I’ll have to do this myself

Tired of using the gate manually and frustrated because the guy that installed it didn’t seem to care enough to show up, I decided I would have to fix it myself. I know nothing about gates. But I’m tired of working it by hand. That I know!

So me and my dad went back to the gate and started wondering, what else could it be? My dad decided to measure the resistance of the wires bringing the signal from the sensors to the board.
While one of them had a resistance of 1.3 ohm, the other one had 1M ohm. Totally off the charts value.

My dad said this is not normal. I checked with ChatGPT and it said “that’s it! that’s your strongest clue!”.

So we did a quick test. I got a short network cable, stripped it apart, took the RJ45 connectors out and connected the sensors to the board with that new wire, from the outside. We didn’t even bother to feed the cable through the tube where it’s supposed to go.

It worked! It was the cable!!

Actually, not the cable, but a single wire of the cable! So I had to pull out the faulty cable, along with plenty of rain water from within the tube it’s supposed to go into. The water kind of explains why it got faulty in the first place.

We fed the new cable in, a bit more complex than I was anticipating, but doable. We had to unscrew the actual motor because the cables were coming out from a tube that was right below the motor.

All in all, we spent hours on this issue, trying to debug each and every part of the chain, and completely ignored the cable itself.

Now we know—cables fail too!

Takeaways

Debugging chain-linked systems means checking every component, even the ones you assume rarely fail.

We spent weeks replacing sensors and second-guessing our skills, but the real issue was a corroded wire hidden in a conduit. Sometimes the simplest part—a cheap wire—is the one causing all the trouble.

Don’t overlook the basics, even when every other sign points elsewhere. After installing the cable and putting the motor back in place, we tested and everything worked as expected. Finally!

And as I said above, we are still waiting for the “gates guy” to call back. He doesn’t even know the address yet.

He never will, we all know it.

Photo of Pedro