Problems with piezo when using extenral batery (12 knock lock)

I'm using the piezo as in "12 knock lock" project to read claps instead of knocks.

When I plug Arduino to the computer everything is fine.
If no sound I get values near to 0 form the piezo. I I clap I get higher ones.

However, if I use a "mobile charger" battery to charge Arduino my piezo sends values between 0~30 when no sound exists, and there is no way to detect claps.

Which can be the cause of this different behavoiur?

Thanks

Check your battery.

  • Maybe the voltage is a bit low.
  • Can it supply enough amps to power the arduino (I guess that answer is a yes because it uses hardly any, but still).
  • Is there a considerable drop in voltage when you power the arduino with it?