Piezo buzzer tone distorted?

The buzzer I'm using is a 3-20V range buzzer. Rated voltage 12V, max current 20ma. I have wired the buzzer to arduino output pin directly. Without any resistor.

My problem is that, after about 10-12 mins of beeping (short and long beeps followed by pauses), the tones become somewhat distorted, some random noises are generated by the buzzer, that sounds like jamming sounds. But if I power down the project and try again a bit later, I can get a clear sound again for 10-12 more minutes.

What could be the reason? Any ideas? Too much current is being drawn? The output pis are getting damaged or can it not keep up with current demand or what?

arduinoware:
The buzzer I'm using is a 3-20V range buzzer. Rated voltage 12V, max current 20ma. I have wired the buzzer to arduino output pin directly. Without any resistor.

My problem is that, after about 10-12 mins of beeping (short and long beeps followed by pauses), the tones become somewhat distorted, some random noises are generated by the buzzer, that sounds like jamming sounds. But if I power down the project and try again a bit later, I can get a clear sound again for 10-12 more minutes.

What could be the reason? Any ideas? Too much current is being drawn? The output pis are getting damaged or can it not keep up with current demand or what?

I am guessing you are using an Arduino on 5 volts. If so, try the buzzer directly on the 5 volt power supply for you time span.

Paul

arduinoware:
What could be the reason?

Software or hardware.

A piezo is a capacitive load to the Arduino outputs. That's why the current must be limited by a resistor. With an amplitude of 5V and a maximum current of 40mA a 150 Ohm resistor to the piezo will protect the Arduino from overheating and consequential damage.

OP didn't say "piezo".

"Buzzer" could be anything. Piezo or speaker. Active or passive.
OP should now how ask questions after 290 posts.
A link to the part at least.
Leo..

40 mA is the absolute maximum rating of an Arduino pin. I wouldn’t be surprised if running at this current you will get problems after a few minutes.

I’d use at least 250 Ohm, limiting the current to no more than 20 mA, the regular rating for the pin.

The current through a capacitive load decreases rapidly, down to zero until the next level change. The data sheet allows for a 40mA peak current, the rest depends on the buzzer capacity and sound frequency.

Of course a maximum current of 20mA is a conservative choice, and if the problems persist even with this current, the chip has been damaged already.

Think I’d power it from a 12v supply and switch it through a transistor to do “sound “ job of it …