Static is pressing my buttons - Page 1
Forum section: electronics / projects

author: K6EEP
author_rank: Contributor
timestamp: March 09, 2017, 05:26:32 am
content: I have a fancy mute button for my TV. It uses an Arduino controller running a NR24L01 built in a plastic case (so the RF can get out). Runs on 2, AA batteries. Works great. When you press the button on the case it mutes the audio. Here is the strange bit.The remote is sitting all by itself on the arm of the cloth covered sofa. My wife is sitting on the sofa next to it. When she stands up the remote activates just like someone has pressed the button. However nobody has touched the unit at all! I have ruled out ghosts.So I figure it is static electricity. I am trying to figure out how to shield it and still get the RF out of the case.Any ideas?

author: BrianHG
author_rank: Super Contributor
timestamp: March 09, 2017, 06:19:59 am
content: Is the remote using a capacitive touch button?Is there sufficient pull-up resistor in the input for the button to prevent stray triggering from any weak static charge?

author: capt bullshot
author_rank: Super Contributor
timestamp: March 09, 2017, 06:30:46 am
content: In case it's a mechanical push-button, add a small R in series to the contact, then a cap to circuit ground (first guess 10n) to filter the signal and to keep the EMI away from the arduino. Static discharges create quite a electromagnetic field with high frequency contents that is easily picked up by high impedance nodes in a circuit. Simply add some filtering at the right place to deal with that.

author: RogerRowland
author_rank: Regular Contributor
timestamp: March 09, 2017, 07:02:11 am
content: I would try a process of elimination to identify the source of the problem. So ...First, swap out your wife for a new one and see if the problem persists ....

author: K6EEP
author_rank: Contributor
timestamp: March 09, 2017, 05:17:26 pm
content: It is a mechanical pushbutton. One lead is ground. The other goes to the input pin on the Arduino. I use a 100nf (0.1uF) cap across the pushbutton contacts to help eliminate switch bounce. You got me thinking. I may need to pull that pin up harder toward the supply voltage. The internal pull up resistor may not be enough. Let me see what the Arduino docs say about that pull up resistor. I bet that's it. Argh I have to do math.

author: timb
author_rank: Super Contributor
timestamp: March 09, 2017, 09:15:17 pm
content: I'll just leave this here:http://www.ganssle.com/debouncing-pt2.htm

author: suicidaleggroll
author_rank: Super Contributor
timestamp: March 09, 2017, 09:24:33 pm
content: Quote from: K6EEP on March 09, 2017, 05:17:26 pmThat's not enough to prevent bounce, neither is a stronger pull up resistor...you are debouncing in your firmware, yes?

author: BrianHG
author_rank: Super Contributor
timestamp: March 10, 2017, 05:12:41 am
content: He called it bounce, but, it is really interference from a static charge since no one has touched the remote. Just add a 100kohm pullup and you will be fine. The 0.1uf may be a little overkill, but ok. I would use 0.01, or 0.001.

author: Siwastaja
author_rank: Super Contributor
timestamp: March 10, 2017, 10:17:16 am
content: Quote from: BrianHG on March 10, 2017, 05:12:41 amIf the internal pullup (approx. 50k) is not doing it, adding a 100k won't do much.Considerably lower value, such as 1k is needed.Capacitor (100n is OK because often times you have it in the BOM already, although 1n to 10n is surely enough) next to the pin is, naturally, very good because it offers very small impedance, lower than you can get with a resistor, because the resistor value is limited by maximum available current through the switch - and usually you need to design so that no horrible things (overheating resistor, or draining the battery too quickly) happen if the switch is left depressed for a long time by accident. For this reason, it's often not desirable to go much below 1K, which is still quite high for the input impedance if the switch is located behind a wire - so, I almost always recommend the capacitor.In addition to the pullup resistor and the capacitor, some sort of series resistor is desirable to limit ESD currents, if the switch is located far away behind unshielded cable.(In some cases, "far away" can be as little as 5 cm of spaghetti wire inside a plastic case!)

author: DaJMasta
author_rank: Super Contributor
timestamp: March 10, 2017, 11:01:30 pm
content: Dave actually has a video on this effect, picking up static related EMI when getting out of an office chair on the input of a scope.I also think filtering is a good bet to clean up the signal, but you may also be able to do a little software filtering by just leaving a second input running without the button - if the pulse shows up on that, you know it's not a button press and can ignore the one with the button. Since it's EMI related, you can probably also solve this with shielding, but that could potentially be fairly unwieldy, so it may not be a great choice. If you've got a scope, you should be able to measure the pulse and your filtering's performance in cleaning it up well enough to choose appropriate values. Since even a minimum press of the button is going to be quite long (tens of milliseconds), you can go with surprisingly high values for your cap, especially if your pullup is a smaller value resistor. You also may be able to get better rejection for very short noise pulses if you're using an RLC filter instead of an RC filter... but I suspect it's not needed. You can always bust out a spice program and check.