Sonoff flickering with GPIO14 and GND connected

Hi,

I am new to HA and this is my first post. I have not done any electronic projects before so my knowledge is minimal. I have installed Hassio and connected a 3-way switch to Sonoff as described in this video. It works fine but there is random flickering on the Sonoff. The flickering goes away if I disconnect either GND or GPIO 14 and operate the Sonoff only using WiFi. I’ve read somewhere that this could be due to induction by the AC wires close by and could be avoided by adding a capacitor between GPIO14 and GND. Can anybody give me some details on how to go ahead with that? Or share another workaround that worked for you?
Thanks in advance.

Information about how exactly to solve ghosting with Sonoff Basic is usually very vague, fragmented in all sources and leaving too many options in regards to what parts to use which is not good for beginners that would just want a list of parts that are verified to be working.

I will try to summarise what I did to solve this issue with with some of my own Sonoff Basic`s.
Basically to completely eliminate ghost switching you have to connect/solder:

This is what my setup looks like when everything is soldered onto connector and plugged in

That is how I solved ghost switching I had with some of my Sonoff Basic`s. Have never noticed ghosting since resistor and capacitor is added even with 5 meters long wire from Sonoff to wall switch or with additional sensors connected to other pins.

Found this schematics online for cleaner look if it helps:


Source of schema

2 Likes

Thank you very much. What are the values of those resistor and capacitor?

I will update my post above with more details when I get home.

1 Like

The internal pullups on the ESP8266 chip are pretty lame, on the order of 100K. This is fine for most switches and sensors connected directly to the device. If you have any length of wire, say for a wall switch on the other side of the room, the GPIO will be responding to random noise generated in the wiring. That’s why an additional pull-up is needed. Values from 4K7 to 27K should help.

I use 10K on mine when I see random GPIO14 switching. (Actually, I’ve only needed to do this once). The capacitor can be anything from .01 to .001 uF, but I’ve never needed it. The capacitor is supposed to suppress random noise from the long wires.

1 Like