Sonoff GPIO 14 keeps on switching, longer cable in wall to switch

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Nephylim
New user
Posts: 6
Joined: 26 Oct 2017, 15:29

Sonoff GPIO 14 keeps on switching, longer cable in wall to switch

#1 Post by Nephylim » 03 Nov 2017, 15:23

Hi there, I have a small Problem with the Control of my Sonoff. There are two external pushbutton switches connected to GPIO14.
The one closer to the sonoff is working without a problem. The Second one is about 4m away and uses existing wires through the wall. As sonn as I connect this switch the sonoff keeps switching on and off.
I guess this is due to some interference from power cables running in the same wall. Is there an easy way to fix this?

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Sonoff GPIO 14 keeps on switching, longer cable in wall to switch

#2 Post by Shardan » 03 Nov 2017, 17:08

Hello,

did you use a separate pull-up or pull-down resistor?
If not i'd try a resistor of 1 ... 2.2 KOhm.

If your button is connecting GPIO --> Gnd, place the resistor from 3.3V to GPIO.
If your button is connection GPIO --> 3.3V, place the resistor from GPIO to GND.

If that does not help, add a small capacitor of 100 ... 220 nF from GPIO to GND.

Anyways, 3.3V is very low compared to the voltage of the other wires so influences are likely.

Regards
Shardan
Regards
Shardan

TD-er
Core team member
Posts: 8752
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sonoff GPIO 14 keeps on switching, longer cable in wall to switch

#3 Post by TD-er » 04 Nov 2017, 11:14

First try the suggestions already mentioned by Shardan.
And then try to twist the wires to the sensor.
Just like the cables in an UTP network cable.
The twists prevent the cable from acting like an antenna and picking up all kinds of interference.

Nephylim
New user
Posts: 6
Joined: 26 Oct 2017, 15:29

Re: Sonoff GPIO 14 keeps on switching, longer cable in wall to switch

#4 Post by Nephylim » 09 Nov 2017, 22:03

Thanks for the Help Mates,
the capacitor solved the problem instantly.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 122 guests