arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
21.97k stars 4.77k forks source link

Sonoff T1 3CH US Ghost Switching #5449

Closed Bloodyagent closed 5 years ago

Bloodyagent commented 5 years ago
- [x] Provide the output of console when you experience your issue if apply :
_(Please use_ ``weblog 4`` _for more debug information)_

CONSOLE OUTPUT HERE: 18:47:27 MQT: stat/TestBench/RESULT = {"POWER3":"ON"} 18:47:27 MQT: stat/TestBench/POWER3 = ON

Hey Guys

OK, so I bought 3 each of sonoff T1 1CH, 2CH, 3CH touch switches.

I successfully flashed all 9 units and installed. All of the CH3 units are experiencing ghost switching. The 1CH and 2CH units are fine.

I have replaced the 3CH units with 2CH units, I.E using the same wall box and switching the same lights (I was only using 2 lights on the 3CH anyway). The problem is not with the location of the units and not with the load they are switching as the 2CH unit is fine in the same wallbox.

I erased and re-flashed all three 3CH units and put them on my test bench. Joined to wireless, but did not configure any MQTT broker, and they are all still randomly switching (every few hours any channel will switch on, never off)

Just after they Channel switches on, there is a beep, then a pause, then 2 quick beeps.

So my thought is that there is an issue with the 3CH units and tasmota? (they were not randomly switching using original firmware)

Has anyone else experienced this issue with the 3 CH T1 US units?

Thanks in Advance.

ascillato commented 5 years ago

Please use weblog 4 for more debug information. When you use that, it will tell you in the console the source of the command that triggers your relay. It will be shown as SRC:

Bloodyagent commented 5 years ago

ok, will enable weblog 4 and send result when random switching happens again, thanks

beppeserafini commented 5 years ago

Hi, I have same issue. At the first time I thought was some interference on 315MHz receiver. So, seeing data sheet of SYN470R, I lift pin 11, in this way receiver is in shutdown. After that I put pin 10(DO line) at GND to avoid floating pin. After that I tried all my 7 sonoff without glass cover for 2 days and worked fine! no ghost switch. So, I remount glass cover and ghost switching returns! So, if you try to long press one of touch button you hear the first beep and after that quickly 2 beep. In original firmware with this operation you can pair with phone, with tasmota seems do nothing fortunately. So, the problem is touch sensitivity. I try to find a solution but the are no name on IC between touch button and IC. I hope that someone know its name. I do reverse engineering on that and I draw schematic connection and I'm searching on web a datasheet with pin compatibility. If is useful I can share my schematic on this part of circuit. If I have time tomorrow I'll see some signal coming from button with oscilloscope because maybe it's possibile to adjust sensitivity adjusting input RC network.

Bloodyagent commented 5 years ago

Ok, just had random switching again, here is output

20:53:35 APP: Button2 immediate 20:53:35 SRC: Button 20:53:35 MQT: stat/TestBench/RESULT = {"POWER2":"ON"} 20:53:35 MQT: stat/TestBench/POWER2 = ON 20:53:35 CFG: Saved to flash at F4, Count 136, Bytes 3584

Thanks

Bloodyagent commented 5 years ago

Hi, I have same issue. At the first time I thought was some interference on 315MHz receiver. So, seeing data sheet of SYN470R, I lift pin 11, in this way receiver is in shutdown. After that I put pin 10(DO line) at GND to avoid floating pin. After that I tried all my 7 sonoff without glass cover for 2 days and worked fine! no ghost switch. So, I remount glass cover and ghost switching returns! So, if you try to long press one of touch button you hear the first beep and after that quickly 2 beep. In original firmware with this operation you can pair with phone, with tasmota seems do nothing fortunately. So, the problem is touch sensitivity. I try to find a solution but the are no name on IC between touch button and IC. I hope that someone know its name. I do reverse engineering on that and I draw schematic connection and I'm searching on web a datasheet with pin compatibility. If is useful I can share my schematic on this part of circuit. If I have time tomorrow I'll see some signal coming from button with oscilloscope because maybe it's possible to adjust sensitivity adjusting input RC network.

Thanks for this, I suspected this and did remove the cover at some point, but didn't really take note, think you may be right in that it didn't switch while cover was off. I didn't pursue this because its only happening with the 3CH versions and wasn't an issue with original firmware. I may just disable the middle button and turn the 3CH into a 2CH to see if this fixes it.

Bloodyagent commented 5 years ago

Just not sure why, if its a sensitivity problem, is it a non issue with original firmware and with the 2ch and 1ch versions?

beppeserafini commented 5 years ago

I have also another sonoff t1 and I use it for 1 month without any ghost switch using last Tasmota firmware with the last core version. When I received others sonoff I saw some disconnection and looking on the web I installed last Tasmota with 2.30 core and disconnections disappears. Some minutes ago sonoff that worked for a month had a ghost switch. So, now I flash last core version again and I want to see if ghost switch disapper. I’ll inform you

Bloodyagent commented 5 years ago

Yes I moved to core 2.3.0 because of disconnects and haven't tested on 2.4.0

I've removed the white rectangular pads on switches....still getting ghost switching!

Let me know. Thanks

beppeserafini commented 5 years ago

Did you remove all rectangular pads and did you have ghost switch without glass?

Bloodyagent commented 5 years ago

Removed pads. Still ghost switching with cover on. Cover off no switching pads or no pads

Bloodyagent commented 5 years ago

Ok, just had random switching again, here is output

20:53:35 APP: Button2 immediate 20:53:35 SRC: Button 20:53:35 MQT: stat/TestBench/RESULT = {"POWER2":"ON"} 20:53:35 MQT: stat/TestBench/POWER2 = ON 20:53:35 CFG: Saved to flash at F4, Count 136, Bytes 3584

Thanks

Bloodyagent commented 5 years ago

Ok so have compared the boards off the 1 ch and 3 ch switches. They are identical in every way. There are no missing components on the 1ch as opposed to the 3 channel. Only difference I can see is relay count. So why is it the that when I configure the 3ch as a 2ch the bottom touch button is disabled and not the middle similar to the 2ch. Was hoping to make the 3ch exactly as the 2ch to see if removing the middle touch switch would stop the ghost switching.

beppeserafini commented 5 years ago

Can you see if in 1ch and 2ch versione there are some mark on ic touch component? In 3ch there is not mark on this. Thank you! Inked40544554-ff83d8d6-6028-11e8-8cf4-c951b75897d9_LI

Bloodyagent commented 5 years ago

Chips blank ok all boards. I Googled and there are a few 16pin touch chips out there. Looks to be a 4 ch touch chip

beppeserafini commented 5 years ago

Today I had one ghost switch on button 2 with core 2.42. Do you have ghost switch only on middle button or also others? Now I try to put a paper sheet between cover and plastic pad. I'll see... I found some chip but no one that I found is compatible with schematic I drawn by inspection(I think is correct). If you found component with 16 pin that can fit please tell me. Or if you write down a list I can check if they can be fit. 1WqXCpu2TceY3FYOoPuz0A_thumb_95b

ToRvaLDz commented 5 years ago

I'm using about 20 Sonoff T1-2-3 in my home since one year with Tasmota and I found that ghost switching only happen with Mqtt retain and/or RF interference. In my case I solved disabling Mqtt retain, also try wifi config 4 or 5.

Bloodyagent commented 5 years ago

Hi @ToRvaLDz

This is on the test bench without mqtt configured. Only happens on my 3CH units, all of them.

I erased the flash, reflashed with 6.4.1 - 2.3.0, joined to wireless, chose sonoff T1 3CH from the config menu, restarted and left them on the testbench with no load and no mqtt, they all ghost switching.

Bloodyagent commented 5 years ago

haven't tried wifi config 4 or 5. Will try...thanks

ToRvaLDz commented 5 years ago

@Bloodyagent without Mqtt configured I had another issue, the touch is not responding every time ( look at thie video https://youtu.be/TUrKbRcctf8 I opened another issue for that #5461), also I noticed that if mqtt is not available it restart itself after some time, this could probably make a relay toggle.

beppeserafini commented 5 years ago

@ToRvaLDz ghost switching you had like us? So, beep and then other two beep quickly?

ToRvaLDz commented 5 years ago

@beppeserafini The beep indicate the long press, the only thing I understood is that the touch is not responding while tasmota is looking for an mqtt connection if not available and that if wifi is not connected tasmota do a reboot causing a relay toggle. For ghost switching, that is a button/relay that activate/deactivate itself, the only cause I found are: mqtt retain or wificonfig != 3 or 4.

Bloodyagent commented 5 years ago

OK, so this is strange. I remove the 1k resistor from the middle touchpad thereby totally disabling the middle sensor touchpad. The ghost switching is now only happening on the middle sensor!!

Bloodyagent commented 5 years ago

So its definitely interference of some type. Maybe a lowpass filter on the input pins of the IC? Not sure how the capacitive touch IC works? I see there is a space right next to the 1k resistor for a capacitor, not sure if this is meant to be an RC filter of some type? tempFileForShare_20190314-190132

Bloodyagent commented 5 years ago

image This looks close? Edit. This is the chip for sure.

http://en.wincomtech.com/prod_view.aspx?TypeId=65&Id=162&FId=t3:65:3

ToRvaLDz commented 5 years ago

Just a stupid question: are you trying it with a serial console connected?

Bloodyagent commented 5 years ago

Nope. Can we get more debug data that way?

ToRvaLDz commented 5 years ago

No, just because I noticed a ghost switching issue while it is not mounted in the wall socket

beppeserafini commented 5 years ago

@Bloodyagent component is compatible with schematic I drawn! I never seen bad data sheet like this! There are only one thing that seems wrong with it. So, since pin1,2 are connected to gnd, the outputs behavior should be like this: image but in this way seems impossible to recognize long press because outputs toggle only the button is pressed again. There are others configurations that permit to detect long press but maybe is inverted in datasheet. I have to check this with oscilloscope. However, looking datasheet, since description of detection is not described(but I think to know that), there is a capacitor that determines touch sensitivity. It's capacitor that I also drawn on pin 7. Datasheet suggests value from 4.7nF to 22nF. Translating from Chinese seems we have to reduce it in order to reduce sensitivity. If I have time tomorrow unmount cap from board and try to measure and substitute it with smaller value.

Bloodyagent commented 5 years ago

All chinese documentation is bad🤣 Either way dude you a genius. I'm very rusty with digital electronics, I dont even own a scope anymore😫

Bloodyagent commented 5 years ago

Pin7 is chip select? Not sure how that's going to affect touch sensitivity?

Bloodyagent commented 5 years ago

Its C6? Ok just measured it. I get 22nf. Which would agree with your theory.

Bloodyagent commented 5 years ago

Ok. I replaced it with a 4.7nf (That's all I have at home at the moment) Its reduced sensitivity to the point now where it only works with cover off. So looks like you are right!! I may just have to increase it to 10nf, so will have to wait for tomorrow. For now I will leave it on testbench overnight. Lets see if it fixes the ghost issue!!

AndyGoldie commented 5 years ago

I have been using 1 & 2 channel Sonoff switches for over a year without any ghost switching problems. I was using various versions of Tasmota so felt I should update all to 6.4.1. Big mistake now all 1 & 2 channel switches have random ghost switching. Therefore I strongly suspect this is some form of bug in 6.4.1.

Bloodyagent commented 5 years ago

Hi Andy I not have any issue with 1 and 2 ch. Just the 3ch. @beppeserafini seems to have nailed it with the touch sensitivity cap. So if you handy with a solder iron you can try change to a lower value. We still trying to figure out the correct value. I will also go back to an older firmware and try that. Thanks!

beppeserafini commented 5 years ago

Yes I am. I design electronic boards daily. 😄 Until now, since I put paper sheet between pad and cover, I didn't get ghost switches from that Sonoff. Doing that mean increase dielectric material and increase distance between "capacitor" armors, that would be decrease button sensitivity. So I think if it's mounted 22nF, a value about 15nF or 18nF could be good for us.

Pin 7 isn't chip select. It is called Csel. It's not explained how it works but generally pin like that work like a constant time (series resistor inside) and it is compared with signals measured on pad pin.

beppeserafini commented 5 years ago

Its C6? Ok just measured it. I get 22nf. Which would agree with your theory.

Yes it is

ascillato commented 5 years ago

@beppeserafini

Until now, since I put paper sheet between pad and cover, I didn't get ghost switches from that Sonoff. Doing that mean increase dielectric material and increase distance between "capacitor" armors, that would be decrease button sensitivity.

Nice finding :+1:

Bloodyagent commented 5 years ago

I walked into my study this morning and saw that the modified sonoff hadn't switched all night! So thought wow, its fixed. But then as I was about to start typing this it switched. I don't know if its because I'm sitting right here next to it and its picking up my body (lol) or if its because I placed my cell phone right next to it. I will get some higher value caps and try them with the units in the wall and see if its resolved. Will also try the paper idea. Anyway thanks for the help and assistance. This has been quite educational! Either way it seems we have 2 options now to resolve, and its clearly a hardware issue so I am going to close this now.

Bloodyagent commented 5 years ago

adios amigos:) for now

simoneluconi commented 5 years ago

Can someone explain properly where to find theese capacitor in the board and possible values to use to lower the sensitivity? We have about 30 Sonoff and about 4 of them suffer from ghost switching, it's really annoing. It is quite strange that those who suffer from this problem are positioned in the bathrooms.

beppeserafini commented 5 years ago

It is C6 capacitor (0603 case). You can replace it with value near to 16nF. I mount 16,4nF with no sensitivity degradation but no ghost switching.

Bloodyagent commented 5 years ago

I can also confirm this has resolved the ghosting issue.

beppeserafini commented 5 years ago

Are you sure that ghost switching you have is not about RF interference? In this case you can follow also my solution in first reply I did

simoneluconi commented 5 years ago

How could it be RF Interference? If no remote is programmed the switch couldn't switch by itself.

beppeserafini commented 5 years ago

If you look on web you can see some video showing this issue on others sonoff products that are using same RF chip.

simoneluconi commented 5 years ago

Should also point out that for that i can ear the sonoff also beeps, so it detect a long press on the button, not some "ghost press" or i believe "RF Interference"

beppeserafini commented 5 years ago

If you ear beeps it's a sensitivity problem that you can resolve changing capacitor. I mount on my sonoff devices two 8.2nF ceramic capacitors in parallels (mount the second on top of the first)

xtremedays commented 5 years ago

any other thoughts? I have ghosting issues on a 3ch T1 US, have put two 8.2nf ceramic caps on there, still having ghosting issues.

beppeserafini commented 5 years ago

You can try with lower cap value, I.e. 15nF. If you think is a RF interference and you aren’t using RF remote controller you can follow pcb modifications that I introduced in my first post https://github.com/arendst/Sonoff-Tasmota/issues/5449#issuecomment-472136413

xtremedays commented 5 years ago

i've removed the RF chip, so doubt its that. Does it have to be a ceramic capacitor?