ESD problem with Arduino UNO

Hi,

I've recently built my Arduino project, everything was working well (both Arduino and LCD shield) but when I've installed it in my machine with metal housing every time when ESD shows up, Arduino stops working and LCD displays random characters (until restart).

I have figured out that this only happens while I have 10k petentiometer connected to board (+5V, A1, GND). Without it, it works fine (I've also tried to disconnect one by one +5V, wiper and GND but whenever one of those is connected I have problems).
I use 10k potentiometer in metal housing, mounted on machine's housing.

If it was simple ON/OFf signal I would separate it from Arduino with relay or something, but how to protect Arduino from ESD when I need that analog signal for regulation?

Any idea?
Thank you in advance!

Marko

The simplest fix is to use a pot with a plastic housing and shaft.

Thank you, but it didn't work... Now this happens only while +5V of pot is connected to board. And Arduino works, but display still starts to show random characters until reset.

EDIT: I use Mean Well LRS-35-12 power supply which is grounded... If that helps.

Have you grounded the box?

Hi,
How long are the leads between the arduino and the pot.
How are you or what is generating the ESD, what is the machine?
What is the arduino controlling?
Are you using any sheilds?

Sorry but the ESD could be causing a current to run from something else connected to the controller, the pot may just happen to be at the other end.
Have you got bypass capacitors on the pot leads?

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks... Tom..... :slight_smile:

Grumpy_Mike, yes, every metal part is grounded through grounding wire and wire that constantly touches the floor.

TomGeorge,
For testing purposes they are about 30cm long.
ESD is generated on the machine by sawdust that is going through metal pipe, it’s propelled by compressed air.
Arduino is controlling VFD and a few relays. I’ve used relays to separate outputs and inputs of Arduino from other parts of the machine that are under influence of ESD. But I can’t do that with potentiometer.
I use Microbot LCD shield MR007-005.1, but I don’t use buttons from the shield, I have disconnected pin for buttons (A0).

Can you tell me what is bypass capacitor and it’s value? I’m not familiar with that…

And here is the schematic, input for wiper of pot is A1, on schematic I’ve used digital potentiometer (IC1) connected to the outside 5V supply but you can ignore that, now I use 10k pot connected to +5V, GND and A1.

Thank you!

Hi,
Thanks for the schematic, it needs a bit more resolution, but I can make out the components.

Are you driving the relays directly from the outputs of the UNO, if so, what type are they as the output current is limited to 40mA and that is only if no more than 4 or 5 relays are used
http://playground.arduino.cc/Main/ArduinoPinCurrentLimitations.

Also the relays do not have protection diodes on the coils, to prevent back EMF from the coil damaging the UNO outputs.
They need to have diodes across the coils, oriented so that they are reverse biased when the relay is powered.

Bypassing, is where any wire has a capacitor of about 0.1uF connected between it and Gnd, this helps to bypass any induced voltage spikes from triggering the UNO input.
Two 0.1uF could help, one from 5V to 0V and one from the pot wiper to Gnd, connect these at the UNO end of your 30cm and the the pot end.

Hope it helps... Tom....... :slight_smile:

Thank you for your reply.

Ive tried with 1uF capacitors as I didn't have any other, it didn't make any difference. Connected one between 5V and Gnd and other between wiper and Gnd. Would smaller capacitance make any difference?

Protection diodes for the relays, are they necessary for circuit because of ESD or is this something unrelated to that? Relays are Panasonic PA1A-5V, 24mA current.

Hi,
1uF would be fine.

What/when causes the ESD? ElectoStatic Discharge,

It could be the switching transients, not ESD, from the motors and loads you are switching, especially if the loads are inductive,
Have you kept the relay switched wiring away from the arduino and its input wiring?

Tom... :slight_smile:

It's caused just by sawdust running through the pipe, but amount of static electricity generated is huge.

I've tried that but everything was the same.

After one more test (with capacitors) it seems that Arduino itself operates flawlessly under ESD, problem is just LCD shield. Somehow it gets disrupted.
Any idea? Maybe detach LCD shield from Arduino and mount it separately, or build my own? Any other way to protect it?

marko5000:
Protection diodes for the relays, are they necessary for circuit because of ESD or is this something unrelated to that? Relays are Panasonic PA1A-5V, 24mA current.

They are not related to ESD; you always need them if you don't want to damage the Arduino. When you switch off an inductive load, the result will be a negative voltage. The protection diode (flyback diode) will short that so it does not reach the electronics.

In your schematic, they will be connected with the cathode to the Arduino pin and the anode to ground.

TomGeorge:
Are you driving the relays directly from the outputs of the UNO, if so, what type are they as the output current is limited to 40mA

I have seen that number of 40mA mentioned before. But from the 328 datasheet

Although each I/O port can source more than the test conditions (20mA at VCC = 5V, 10mA at VCC = 3V) under steady state conditions (non-transient), the
following must be observed:
ATmega48A/PA/88A/PA/168A/PA/328/P:
1] The sum of all IOH, for ports C0 - C5, D0- D4, ADC7, RESET should not exceed 150mA.
2] The sum of all IOH, for ports B0 - B5, D5 - D7, ADC6, XTAL1, XTAL2 should not exceed 150mA.
If IIOH exceeds the test condition, VOH may exceed the related specification. Pins are not guaranteed to source current greater than the listed test condition.

And

Although each I/O port can sink more than the test conditions (20mA at VCC = 5V, 10mA at VCC = 3V) under steady state conditions (non-transient), the
following must be observed:
ATmega48A/PA/88A/PA/168A/PA/328/P:
1] The sum of all IOL, for ports C0 - C5, ADC7, ADC6 should not exceed 100mA.
2] The sum of all IOL, for ports B0 - B5, D5 - D7, XTAL1, XTAL2 should not exceed 100mA.
3] The sum of all IOL, for ports D0 - D4, RESET should not exceed 100mA.
If IOL exceeds the test condition, VOL may exceed the related specification. Pins are not guaranteed to sink current greater than the listed test condition.

Where does that 40mA come from?

sterretje:
When you switch off an inductive load, the result will be a negative voltage.

Almost right!

I think I've seen somewhere that 40mA is current at which damage will start to happen, and recommended is to not to exceed 20mA.

Any ideas how to protect LCD shield from ESD? And where does it gets in touch with it from? On LCD shield I've left only 5V pin, 3 GND pins and pin 2, 3, 4, 5, 6, 7 which this shield uses, all other pins are cut.

LCD shield datasheet:
http://www.tme.eu/hr/Document/106e211f318310826bac25d60d624ed8/MR007-005-1.pdf

40mA is from the top of the same section of the datasheet, under Absolute Maximum:
29.1 Absolute Maximum Ratings*

DC Current per I/O Pin . . . . . . . . . . . . . . . . . . 40.0mA

*NOTICE: Stresses beyond those listed under “Absolute Maximum Ratings” may cause permanent damage
to the device. This is a stress rating only and functional operation of the device at these or
other conditions beyond those indicated in the operational sections of this specification is not
implied. Exposure to absolute maximum rating conditions for extended periods may affect
device reliability.

MarkT:
Almost right!

Please give the correct version.

CrossRoads:
40mA is from the top of the same section of the datasheet, under Absolute Maximum:
29.1 Absolute Maximum Ratings*

DC Current per I/O Pin . . . . . . . . . . . . . . . . . . 40.0mA

Thanks.

Nice and confusing. Not guaranteed to sink/source more than 20 but maximum is 40 :frowning:

Probably 20mA is the max and at 40mA you blow your Arduino out of the board :smiley:

If you use something like this, you'll get full isolation from the relay circuit. Arduino's output will draw 8mA when HIGH and the isolator will provide 48mA minimum switching current (600%CTR).

Nice and confusing. Not guaranteed to sink/source more than 20 but maximum is 40

Probably 20mA is the max and at 40mA you blow your Arduino out of the board

You have to read it all in context. At 20mA, there is a guaranteed Vout-High and Vout-Low that will be met, 4.2V min and 0.9V max.
Above 20mA, Vout-High may be a lower voltage than 4.2V, and Vout-Low may be a higher voltage than 0.9V. Probably not too big of a deal for an LED, but could be a problem if another logic input is also being driver by that same pin.

My context is that if it's not specified you can't use it :wink: I will stick with 20mA (and the sums if I don't forget about them).