False interrupt 1 triggering on pin 3 when playing tones to piezo on pin 4

Interesting discovery on new UNO Shield PCB I designed.

It is quite common to connect a piezo directly to an Arduino UNO pin to play tones. In my case I was playing tones on pin 4 connected directly to a CEM-1203 piezo. And I am using a button to trigger interrupts on pin 3 (interrupt #1) configured as input pull-up. Whenever tones were played, interrupts were constantly falsely triggering.

I researched the piezo and measure DC resistance of about 42 ohms, and an AC impedance of about 140 ohms at 1000hz sine. Assuming my rudimentary impedance measurement is close, this is about 36ma average current delivered by the tone pin of micro. The absolute maximum pin DC current is stated to be 40ma, so it is running close to max specs. I tried moving tone to pin 13 (built-in LED), and the same false triggering occurs. If I put 100 ohm resistor in series with the piezo, false interrupt triggering disappears. The 100 ohm resistor sets the pin current to around 21ma. But I don't think its the average current causing the problem, but rather current spikes of the tone square wave wreaking havoc with the internal digital logic.

Just my thoughts... I welcome yours.

I'm guessing you don't have all the Vcc and AVcc pins connected to 5V.
Or that you don't have a 0.1uF cap on each of those pins to Gnd.
And you are overstressing the pin trying to drive the higher currents - keep that 100 ohm in there.

Pin 13 drive a LM358 with 1uA input current that then drive the onboard LED and current limit resistor.

Post your schematic, we could review it for other potential issues. Maybe the traces are too narrow for power, or you used traces for Gnd instead of a Gnd plane on both sides of the board.

Use a physical pullup if the button is remote to the Arduino, internal pullups are very weak and only usable if everythings in close proximity and away from sources of interference.

A real piezo element is an electrical insulator and has impedance of a few nanofarads - its a ceramic capacitor basically. Not sure what you've measured there.

You can use upto 10k in series with an analog pin to protect it from overload without much effect on performance.

Since piezo's are not (normally) DC coupled, you need to bias your input pin at DC for consistent results.