Arduino UNO/MEGA and power adapter

Hi

I have a simple RFID reader, as for now Iam using the Arduino UNO with Ethernet shield (later I will need to change the UNO to MEGA). But I noticed strange issue. There is a buzzer conected to pin D4 and GND and it should play tone(piezoPin, 1200, 150); and it work just fine when Iam using the USB cable from my notebook. But when I use the wall adapter for UNO/MEGA which I purchased (1000mA 5,5/2,1 mm 9V) its making strange things with the buzzer....

It should play that one tone, but it plays only sometimes... most of time it plays some erratic tone, like if there would be 3 or 4 tones that plays very quickly in the length of the original tone (or like if something is interruptind the one tone several times).

Would be better to buy a 5V adapter? I saw they have them somewhere. They have even 12V but Iam not sure it would be better if the problem is occurring with the 9V wall adapter but not with the 5V USB cable...

9V adapter is going through the onboard regulator. Sounds like it is going into thermal shut-down and causing the strange behavior.

Alternatively, the buzzer's ground isn't connected to ground.

It is connected to the GND pin. I tested it just for a minute or two but the problem seems to be only when I use the wall adapter. If I use the USB cable it behaves normally. I tried to add an aluminum passive cooler on top of the Ethernet Shield chip (becase its a bit hot and I want to run it 24/7). I can test it later with the passive cooler if anything will change....