In my robot, I plan to have a GPIO pin on my Raspberry Pi connected to the insertion detection pin (pin 3) of a barrel jack (schematic here) so that my code can tell when the robot is externally powered. The plan is to have the GPIO internally pulled up when the robot is on battery power and grounded otherwise.
The problem is that for power, the Pi is "grounded" to the negative output of a buck converter (link here) that's connected to the same barrel jack on the input end, meaning that the Pi's power and the GPIO are grounded to different things.
Is there a substantial voltage difference across the input and output terminals of the buck converter? If so, then I think this would mean that the voltage drop from the GPIO to the barrel jack ground could be greater than the 3.3 V the GPIO is rated for. This is because the Pi and its GPIO would be grounded to different reference voltages.
The buck converter will step 19.6 V down to 5 V in order to power the Pi, and the GPIO pin is internally pulled high.