static electricity issue

Hemi345

Senior Member
I have a static electricity issue with my latest project. I used a waterproof stainless steel momentary switch/button, this one, in my latest project (automated garden/coldframe) because it's outdoors. If I don't first touch the metal frame to discharge any static electricity in my body, touching the button will reset the PICAXE. The button is configured to pull the pin it's connected to low when pressed (I'm using the internal PICAXE pullup). The PICAXE PCB is in a plastic enclosure box so it's isolated from the metal frame. The button is in plywood so it's also isolated from the metal frame. The project is run off a 120VAC to 12VDC adapter. What should I do? Thanks.
 

techElder

Well-known member
Really, why do you have such a static charge buildup on your body?

Static charge acts like any other source; it will discharge where there is a path to a lower potential.

Your mounting arrangements actually make your switch a better target for the discharge. The current is finding a path through your circuitry.

You should have the switch mounted to a metal frame that will take the discharge away from your circuit.

Eliminating the static electricity should be the first way to reduce the problem.
 

AllyCat

Senior Member
Hi,

As usual, we probably need a circuit diagram. Which PICaxe/input pin are you using?

If the PICaxe is actually being reset, that suggests that a large current or voltage is appearing somewhere it shouldn't, perhaps through/on one of the internal Electro-Static protection Diodes. Have you put a series resistor between the pushbutton and the PICAxe pin(s) ?

Cheers, Alan.
 

rq3

Senior Member
I have a static electricity issue with my latest project. I used a waterproof stainless steel momentary switch/button, this one, in my latest project (automated garden/coldframe) because it's outdoors. If I don't first touch the metal frame to discharge any static electricity in my body, touching the button will reset the PICAXE. The button is configured to pull the pin it's connected to low when pressed (I'm using the internal PICAXE pullup). The PICAXE PCB is in a plastic enclosure box so it's isolated from the metal frame. The button is in plywood so it's also isolated from the metal frame. The project is run off a 120VAC to 12VDC adapter. What should I do? Thanks.
I would:
1) Make sure the 120 VAC/12 VDC adapter actually connects the 12 VDC "negative" to safe ground, then
2) Run a wire from the mounting body of the switch to the picaxe circuit ground (probably available at the grounded terminal of the switch, which should be connected to picaxe ground now), and
3) Insert a series 4.7K-10K resistor in the line between the switch and the picaxe pin, with a reverse biased snubber schottky diode between the resistor and picaxe, connected to ground. Another reverse biased diode from the same circuit point to the picaxe positive supply wouldn't hurt.
4) Make sure the face of the switch cannot get rained on, and
5) Wipe the face of the switch with an anti-static dryer sheet, or a thin film of liquid dish detergent

Or you could modify the circuit and code to respond when the switch goes high, instead of low.
Or you could use a different switch.
Or you could wear only cotton underwear, no synthetic fabrics, and go barefoot :D.
 
Last edited:

Hemi345

Senior Member
Some folks would say I'm always amp'd up because of my sparkling personality. ;)

Figured I could use the weak internal pullup on the PICAXE to reduce component count but it's not working very well in-situ as it did on the breadboard.

Sometimes if I just barely touch the metal face of the button (not actually push it) the PICAXE will reset so I didn't think a resistor between the switch and pin C.6 on a 20X2. I have the negative pin on one side of the switch and button LED- tied to common ground on the PCB. The other pin goes directly to C.6. The LED+ on the button is not connected but I was planning to hook it up so I guess I could supply one side the switch with the same 3V as for the LED and also and pull the other side that goes to C.6 to ground with a 10K resistor. I'll plan to add an inline resistor of 4-10K between the switch and C.6. The face of the switch is mostly out of the weather, hasn't ever gotten wet since it was installed last Sunday. The AC adapter is a Mean Well LPV-100-12, it doesn't have a ground conductor.

I'm thinking I should swap the power cord I soldered onto the AC adapter (two conductor type-A) with a three conductor (type-B/NEMA5-15) and weld a tab to the metal structure to tie the ground wire to and also mount the switch in.

I'm good on all the cotton clothing, but I can't go barefoot... I like my wool slippers too much :eek:
 

premelec

Senior Member
Drink beer or other item to chill out and wear a grounding chain... ;-0 Also use small solar panel to get away from high power circuitry paths...
 

AllyCat

Senior Member
Hi,

C.6 on a 20X2 is the "input only" MasterReset/program pin of the base PIC, so it doesn't have a positive static protection diode. It needs an external catching diode to the supply rail and a series resistor from the switch. But not more than 10k because the internal pullup may be significantly below 30k (according to the data sheet) so might create an unfavourable divider ratio to the input threshold voltage.

Cheers, Alan.
 

rq3

Senior Member
Some folks would say I'm always amp'd up because of my sparkling personality. ;)

Figured I could use the weak internal pullup on the PICAXE to reduce component count but it's not working very well in-situ as it did on the breadboard.

Sometimes if I just barely touch the metal face of the button (not actually push it) the PICAXE will reset so I didn't think a resistor between the switch and pin C.6 on a 20X2. I have the negative pin on one side of the switch and button LED- tied to common ground on the PCB. The other pin goes directly to C.6. The LED+ on the button is not connected but I was planning to hook it up so I guess I could supply one side the switch with the same 3V as for the LED and also and pull the other side that goes to C.6 to ground with a 10K resistor. I'll plan to add an inline resistor of 4-10K between the switch and C.6. The face of the switch is mostly out of the weather, hasn't ever gotten wet since it was installed last Sunday. The AC adapter is a Mean Well LPV-100-12, it doesn't have a ground conductor.

I'm thinking I should swap the power cord I soldered onto the AC adapter (two conductor type-A) with a three conductor (type-B/NEMA5-15) and weld a tab to the metal structure to tie the ground wire to and also mount the switch in.

I'm good on all the cotton clothing, but I can't go barefoot... I like my wool slippers too much :eek:
Your ideas are all valid, including the wool slippers. Wool is a pretty good anti-static fabric, since it wicks moisture so well.

My Aha moment came with the power supply. It is designed to drive LEDs from line voltage, and almost certainly does not have a common ground. Your entire circuit is "floating" with respect to "true" ground. Fix that, and your entire problem will likely go away. Using the metal frame of your structure as a common ground bus would be ideal, especially if it is bonded to a ground rod (copper pipe or some such) driven 6 to 8 feet into the actual earth. This of course assumes that the supply is rated for isolated ground. It should be, but you never know these days.

Because of the power supply, remote from the house (?) you're getting into electrical code territory. I'll change from going barefoot to wearing thick rubber boots until you're sure of the situation.

The devil is in the details, and the smallest detail can kill you when dealing with domestic AC!
 

Hemi345

Senior Member
Hi,

C.6 on a 20X2 is the "input only" MasterReset/program pin of the base PIC, so it doesn't have a positive static protection diode. It needs an external catching diode to the supply rail and a series resistor from the switch. But not more than 10k because the internal pullup may be significantly below 30k (according to the data sheet) so might create an unfavourable divider ratio to the input threshold voltage.

Cheers, Alan.
Alan, something like this?

Switch-Schem.PNG

The LED in the schematic is the 3V blue LED in the button.
 

AllyCat

Senior Member
Hi,

Connecting the Anode of D2 at the other end of R1 (i.e. directly on the PICaxe pin) would be better. That's because any excess voltage will then be dropped across R1, however high any current spike might be.

Also, the LED D1 should have a series resistor, unless one is already included within the switch assembly.

Cheers, Alan.
 

Hemi345

Senior Member
That makes sense. The button LED is supposedly 3V tolerate and worked fine on breadboard but a tad bright. Might put a 330ohm resistor on it anyway since I'll have it all back out to add the other resistor and diode. Thanks for the help.
 

Hemi345

Senior Member
It's a linear actuator with 8" stroke. The PICAXE uses it to open and close the cover based on temperature. We get strong wind here so I built the frame out of steel. I was going to use one of those Univent openers that automatically open/close based on temperature, but they're designed for lightweight aluminum and pricey for something that was strong enough to lift the cover on my project.
 
Top