Truble with Ping Sonar voltage, arduino

Hi, we have a Ping Sonar connected to an Arduino that’s again connected to a Raspberry PI after taking over an older project.

When there is no auxiliary power (the Arduino is power through the USB of the Raspberry Pi 3 to the micro USB of the Arduino, everything works great, BUT, when the Arduino as propper external power (12 v), every output voltage is correct, but the Ping Sonar sends a mix of decent and corrupted data…
Is there a reason for this?

The Ping Sonar receives 4.95 v when an external power supply is connected, but only 4.0 v when the supply is disconnected… but both of these should be inside the supply range…

Hi,

Do you have a common ground between all power supplies ?
Do you have a capacitor or anything to help with noise between power supply changes ?