-->
Page 1 of 2

Sonoff basic with touch switch problem

PostPosted: Sun Mar 26, 2017 1:06 am
by Genesys
I made a touch wall switch using Sonoff basic and TTP223 (red) touch module on GPIO14 .I used ESPeasy and it also is controlled through openhab via Mqtt . Everything works perfect on the breadboard (connected to pc with ftdi) .

My problem . When i intall it with AC power i have a problem with the manual touch switch turning on and off from noise i guess . It flickers the touch switch on and off turning the light on and off randomly . Its not a wifi issue as its getting a good wifi signal and works from openhab,

I took it apart to play with the touch switch while on and if i hold the wire for the touch switch and can get it to stop flickering and not cause it to turn on /off .I thought maybe the touch switch was too close to the sonoff but if im holding the wire i can put it right up to the sonoff and not be a problem so thats not it. I think its getting noise introduces from the AC power .How do i fix this . Video below of the problem .


https://youtu.be/uHS793vKjGk

This is the touch switch im using which works great on the breadboard. In the video the red light is the light on the touchswitch which lights up when pressed.
TTP223-font-b-Touch-b-font-font-b-Key-b-font-Switch-Module-Touching-Button.jpg

Re: Sonoff basic with touch switch problem

PostPosted: Mon Mar 27, 2017 6:56 pm
by daniel_ezsbc
Its hard to diagnose problems like that by remote control but it is most likely due to noise coupling from the mains wiring. What you can do is to put a metal shield between the touch switch and the mains circuits. PLEASE BE CAREFUL and make sure the shield is connected to ground. Tin foil or copper tape should work. Put the foil on the inside of the plastic case and put the touch switch PCB on the outside until you are done testing.

Before you go to the trouble of putting the foil in place, bring the touch sensor close to a mains wire and see if it triggers.

It is also possible to for the noise to get through the power supply in the SONOFF or the noise can be generated in the SONOFF power supply. Bringing the sensor close to the mains wire will help identify the source of the problem.

I hope this helps.

Re: Sonoff basic with touch switch problem

PostPosted: Wed Mar 29, 2017 2:01 am
by Genesys
I have tried so far shielding it with copper tape .Also i have tried adding a 220uf electrolytic off the touch board between power and ground and a 100nf cap between signal and ground. Neither seemed to help much.

If i hold the wires going to the touch board i can get it to pretty much work. I can even put it right up to the mains supply without any effect. Not sure what this means. I have tried different wire to but made no difference

Re: Sonoff basic with touch switch problem

PostPosted: Wed Mar 29, 2017 2:03 am
by Genesys
BTW its also not noise from the wifi as it works perfectly on the bench when connected to the PC even if i put the touch board right over the esp antenna