# Touching atmega pins can erase program memory

**URL:** <https://forum.arduino.cc/t/touching-atmega-pins-can-erase-program-memory/1115030>\
**Category:** General Electronics\
**Created:** [April 14, 2023, 8:41am UTC](https://forum.arduino.cc/t/touching-atmega-pins-can-erase-program-memory/1115030 "2023-04-14T08:41:08Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![avandalen](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/avandalen/32/213592_2.png) [@avandalen](https://forum.arduino.cc/u/avandalen)\
**Post date:** [April 14, 2023, 8:41am UTC](https://forum.arduino.cc/t/touching-atmega-pins-can-erase-program-memory/1115030/1 "2023-04-14T08:41:08Z")

</div>

I have experienced several times that PCBs with an Arduino chip no longer function properly when in contact with water or when touched with fingers during use. The reason is that this leads to disruption of the clock oscillator and can lead to permanent "damage" as the program memory becomes corrupted. Sometimes the product still works initially, but then errors occur in the microcontroller.

Sometimes it is sufficient to re-upload the sketch, but the bootloader may also be corrupt and need to be re-burned.

The clock generator of a microcontroller is particularly sensitive, and its operation can be disrupted if the pins of the crystal are accidentally touched. The processor can then exhibit unpredictable behavior. The same can happen in the presence of moisture. Upon drying and restarting, the processor should, in principle, function normally again. However, this is not always the case. I have tested what can happen when the clock generator is disturbed: the processor can accidentally write to the program memory, rendering the chip essentially useless, and the product will no longer function well. To address this issue, the chip needs to be reprogrammed by the manufacturer.

The above poses a problem: a product with a microcontroller can be "damaged" by accidental or intentional contact with the oscillator pins or by temporary contact with water. For the manufacturer, this represents a risk as they may be liable for the repairs.

To avoid problems, the crystal area must be kept compact and covered with a conformal coating.  
See my article [Arduino tips and troubleshooting](https://avdweb.nl/arduino/misc/troubleshooting)

---

<div class="post-metadata">

**Author:** ![Whandall](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/whandall/32/222457_2.png) [@Whandall](https://forum.arduino.cc/u/Whandall)\
**Post date:** [April 14, 2023, 8:54am UTC](https://forum.arduino.cc/t/touching-atmega-pins-can-erase-program-memory/1115030/2 "2023-04-14T08:54:42Z")

</div>

Nobody.

---

<div class="post-metadata">

**Author:** ![Idahowalker](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/idahowalker/32/238858_2.png) [@Idahowalker](https://forum.arduino.cc/u/Idahowalker)\
**Post date:** [April 14, 2023, 9:07am UTC](https://forum.arduino.cc/t/touching-atmega-pins-can-erase-program-memory/1115030/3 "2023-04-14T09:07:24Z")

</div>

Typically, I don't touch electronics that are running knowing that my touch can frack something up.

Why do you find it necessary to touch pins of an actively running circuit? Your fingers are conductors that can short things out. Also, extraneous current flowing through you can damage you.

Pure water is not conductive. Typically, water has other items in it that are conductive and even corrosive to electronics. Water is known as a solvent.

May I ask, are you really that naive about water and electronics?

For your edification,

> **[Conductivity (Electrical Conductance) and Water | U.S. Geological Survey](https://www.usgs.gov/special-topics/water-science-school/science/conductivity-electrical-conductance-and-water#:~:text=Water%20and%20electricity%20don%27t%20mix%2C%20right%3F%20Well%20actually%2C%C2%A0pure,in%20nature%2C%20so%20don%27t%20mix%20electricity%20and%20water)**
>
> Water and electricity don't mix, right? Well actually, pure water is an excellent insulator and does not conduct electricity. The thing is, you won't find any pure water in nature, so don't mix electricity and water. Our Water Science School page...

Oh to answer the questions posed by the OP,

> [@avandalen](#):
>
> Who knows about this?

I do.

The US government does.

Oh and I'm sure you know about it as well. Why don't you store your smartphone in an aquarium at night?

Something else you may not be aware of, your body can carry a static charge?

> **[How Static Electricity Hurts Electronics (and How to Stop It) | MSP Plumbing...](https://mspplumbingheatingair.com/blog/how-static-electricity-hurts-electronics-and-how-to-stop-it)**

---

<div class="post-metadata">

**Author:** ![anon95813201](https://avatars.discourse-cdn.com/v4/letter/a/87869e/32.png) [@anon95813201](https://forum.arduino.cc/u/anon95813201)\
**Post date:** [April 14, 2023, 9:43am UTC](https://forum.arduino.cc/t/touching-atmega-pins-can-erase-program-memory/1115030/4 "2023-04-14T09:43:01Z")

</div>

> [@avandalen](#):
>
> can erase the program memory,

Is the atmega still OK after this happens?  
Can you re-uploand the program again and does it run?

---

<div class="post-metadata">

**Author:** ![b707](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/b707/32/854321_2.png) [@b707](https://forum.arduino.cc/u/b707)\
**Post date:** [April 14, 2023, 9:54am UTC](https://forum.arduino.cc/t/touching-atmega-pins-can-erase-program-memory/1115030/5 "2023-04-14T09:54:05Z")

</div>

> [@avandalen](#):
>
> can erase the program memory

erasing is incredible. But a strong discharge of static electricity can damage the chip

---

<div class="post-metadata">

**Author:** ![avandalen](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/avandalen/32/213592_2.png) [@avandalen](https://forum.arduino.cc/u/avandalen)\
**Post date:** [April 15, 2023, 7:06am UTC](https://forum.arduino.cc/t/touching-atmega-pins-can-erase-program-memory/1115030/6 "2023-04-15T07:06:34Z")

</div>

> > > Why do you find it necessary to touch pins of an actively running circuit?  
> > > For example, to feel whether a part is not too hot  
> > > During measuring and experimenting I come into contact with electronics, at low voltage this is never a problem.

---

<div class="post-metadata">

**Author:** ![avandalen](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/avandalen/32/213592_2.png) [@avandalen](https://forum.arduino.cc/u/avandalen)\
**Post date:** [April 15, 2023, 7:07am UTC](https://forum.arduino.cc/t/touching-atmega-pins-can-erase-program-memory/1115030/7 "2023-04-15T07:07:30Z")

</div>

> > > Is the atmega still OK after this happens?  
> > > Can you re-uploand the program again and does it run?  
> > > Yes, you can reprogram the chip.

---

<div class="post-metadata">

**Author:** ![avandalen](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/avandalen/32/213592_2.png) [@avandalen](https://forum.arduino.cc/u/avandalen)\
**Post date:** [April 15, 2023, 7:16am UTC](https://forum.arduino.cc/t/touching-atmega-pins-can-erase-program-memory/1115030/9 "2023-04-15T07:16:58Z")

</div>

I have found out that the oscillator pins are sensitive to touch (and also to moisture). The clock frequency of the chip is then disturbed and this leads to the erasing of the memory. This is an interesting topic and I would like to know more about it.

---

<div class="post-metadata">

**Author:** ![avandalen](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/avandalen/32/213592_2.png) [@avandalen](https://forum.arduino.cc/u/avandalen)\
**Post date:** [April 15, 2023, 7:20am UTC](https://forum.arduino.cc/t/touching-atmega-pins-can-erase-program-memory/1115030/10 "2023-04-15T07:20:02Z")

</div>

**It is an issue for warranty, because a customer can delete the memory of the atmega by accidentally touching it.**  
A customer had a defective PCB where the atmega appeared to be erased, presumably due to moisture. After reprogramming it worked again.

---

<div class="post-metadata">

**Author:** ![Grumpy\_Mike](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/grumpy_mike/32/213521_2.png) [@Grumpy\_Mike](https://forum.arduino.cc/u/Grumpy_Mike)\
**Post date:** [April 15, 2023, 7:23am UTC](https://forum.arduino.cc/t/touching-atmega-pins-can-erase-program-memory/1115030/11 "2023-04-15T07:23:11Z")

</div>

As you seem to have found out touching a running processor is a bad thing. Do not do it.

This topic is not about getting the IDE to work, therefore I have moved it here.

---

<div class="post-metadata">

**Author:** ![avandalen](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/avandalen/32/213592_2.png) [@avandalen](https://forum.arduino.cc/u/avandalen)\
**Post date:** [April 15, 2023, 7:25am UTC](https://forum.arduino.cc/t/touching-atmega-pins-can-erase-program-memory/1115030/12 "2023-04-15T07:25:35Z")

</div>

I noticed that the oscillator pins are extremely sensitive, you can touch the other pins without serious consequences

---

<div class="post-metadata">

**Author:** ![Grumpy\_Mike](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/grumpy_mike/32/213521_2.png) [@Grumpy\_Mike](https://forum.arduino.cc/u/Grumpy_Mike)\
**Post date:** [April 15, 2023, 7:27am UTC](https://forum.arduino.cc/t/touching-atmega-pins-can-erase-program-memory/1115030/13 "2023-04-15T07:27:46Z")

</div>

Yes every one knows this. It is because you are adding capacitance to the circuit by touching it.

I think you are worrying too much.

---

<div class="post-metadata">

**Author:** ![Idahowalker](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/idahowalker/32/238858_2.png) [@Idahowalker](https://forum.arduino.cc/u/Idahowalker)\
**Post date:** [April 15, 2023, 8:57am UTC](https://forum.arduino.cc/t/touching-atmega-pins-can-erase-program-memory/1115030/14 "2023-04-15T08:57:11Z")

</div>

When touching energized electronics or adding moisture to energized electronics, expect the unexpected up to and including the release of the magic smoke. Your electronics is operating normally for being energized and touched or watered whiles energized.

Why would there be an issue of warranty when the electronics messes up when being touched or watered while energized when doing so displays a lack of understanding and intelligence?

---

<div class="post-metadata">

**Author:** ![avandalen](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/avandalen/32/213592_2.png) [@avandalen](https://forum.arduino.cc/u/avandalen)\
**Post date:** [April 21, 2023, 9:02pm UTC](https://forum.arduino.cc/t/touching-atmega-pins-can-erase-program-memory/1115030/17 "2023-04-21T21:02:30Z")

</div>

The clock generator of a microcontroller is particularly sensitive, and its operation can be disrupted if the pins of the crystal are accidentally touched. The processor can then exhibit unpredictable behavior. The same can happen in the presence of moisture. Upon drying and restarting, the processor should, in principle, function normally again.

However, this is not always the case. I have tested what can happen when the clock generator is disturbed: **the processor can accidentally write to the program memory, rendering the chip essentially useless, and the product will no longer function**. To address this issue, the chip needs to be reprogrammed by the manufacturer.

The above poses a problem: a product with a microcontroller can be "damaged" by accidental or intentional contact with the oscillator pins or by temporary contact with water.  
**For the manufacturer, this represents a risk as they may be liable for the repairs.**

---

<div class="post-metadata">

**Author:** ![Coding\_Badly](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@Coding\_Badly](https://forum.arduino.cc/u/Coding_Badly)\
**Post date:** [April 21, 2023, 10:32pm UTC](https://forum.arduino.cc/t/touching-atmega-pins-can-erase-program-memory/1115030/18 "2023-04-21T22:32:22Z")

</div>

@avandalen, please do not cross-post. Threads merged.

---

<div class="post-metadata">

**Author:** ![Grumpy\_Mike](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/grumpy_mike/32/213521_2.png) [@Grumpy\_Mike](https://forum.arduino.cc/u/Grumpy_Mike)\
**Post date:** [April 22, 2023, 5:32am UTC](https://forum.arduino.cc/t/touching-atmega-pins-can-erase-program-memory/1115030/19 "2023-04-22T05:32:48Z")

</div>

> [@avandalen](#):
>
> To address this issue, the chip needs to be reprogrammed by the manufacturer.

Come off it.

If the boot loader is overwritten then it can easily be replaced using an other Arduino ( Uno or Nano classic) programmed with an ISP code in it. Then you can use it to replace the boot loader.

> [@avandalen](#):
>
> a product with a microcontroller can be "damaged" by accidental or intentional contact with the oscillator pins or by temporary contact with water.

Yes and when you buy a brand new car, it looses half its value once you drive it off the dealer's forecourt and temporary into a tree. 😉

Do not forget you are buying a component here and not a product. The two have totally different liability / warranty expectations in law.  
You wouldn't dream of complaining to a flour producer if you made a mess of baking a cake would you? Maybe you would?

---

<div class="post-metadata">

**Author:** ![johnerrington](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/johnerrington/32/340106_2.png) [@johnerrington](https://forum.arduino.cc/u/johnerrington)\
**Post date:** [April 22, 2023, 6:55am UTC](https://forum.arduino.cc/t/touching-atmega-pins-can-erase-program-memory/1115030/20 "2023-04-22T06:55:37Z")

</div>

I dont see how this is a problem.  
When working on sensitive electronics on the test bench we take sensible precautions. So when I'm repaiiring a laptop I use a ground strap to control static, and remove the battery and mains lead.  
In a "product" in normal use the sensitive parts are enclosed and protected as far as possible from outside interference. (until someone drowns their laptop then turns it on to see if it still works.)

> [@avandalen](#):
>
> For the manufacturer, this represents a risk as they may be liable for the repairs.

Not really because the warranty and legislation protect them against such risk when the damage is due to misuse and not faulty parts.

---

<div class="post-metadata">

**Author:** ![Paul\_KD7HB](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paul_kd7hb/32/1127958_2.png) [@Paul\_KD7HB](https://forum.arduino.cc/u/Paul_KD7HB)\
**Post date:** [April 22, 2023, 3:30pm UTC](https://forum.arduino.cc/t/touching-atmega-pins-can-erase-program-memory/1115030/21 "2023-04-22T15:30:19Z")

</div>

Open your PC and try the same thing. Same result will happen.

---

<div class="post-metadata">

**Author:** ![anon94801460](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@anon94801460](https://forum.arduino.cc/u/anon94801460)\
**Post date:** [April 22, 2023, 3:33pm UTC](https://forum.arduino.cc/t/touching-atmega-pins-can-erase-program-memory/1115030/22 "2023-04-22T15:33:58Z")

</div>

> [@avandalen](#):
>
> It is an issue for warranty, because a customer can delete the memory of the atmega by accidentally touching it.

Put the device in a nice-looking box, so that the customer cannot touch the pins.

An attractive box should also improve sales.

---

<div class="post-metadata">

**Author:** ![Grumpy\_Mike](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/grumpy_mike/32/213521_2.png) [@Grumpy\_Mike](https://forum.arduino.cc/u/Grumpy_Mike)\
**Post date:** [April 22, 2023, 5:52pm UTC](https://forum.arduino.cc/t/touching-atmega-pins-can-erase-program-memory/1115030/23 "2023-04-22T17:52:41Z")

</div>

As for moisture you can add a spray on coating, to protect the whole PCB and components against condensing humidity.

But you would normally state in a condition document the temperature range and the humidity range it will work over. Normally this will say something about condensation humidity.

In short for condensation all bets are off, in most consumer equipment.

[Next page](https://forum.arduino.cc/t/touching-atmega-pins-can-erase-program-memory/1115030.md?page=2)
