Hello, apologies for what is likely to be a simple question, but I've done some reading here and here but I'm still blurry on specifics. I'm currently working on a mobile pseudo telemetry system to put in my car that will track things like acceleration, velocity, all controlled by a Raspberry Pi Pico board. I'd like to have the setup be capable of being powered via a 3.7v lithium ion battery cell and a 5v wall charger (not at the same time).
I've got a toggle switch to change between the two sources, but do not know what I should do with the ground lines. Would it be ok to connect the negative leads of the battery and DC supply together, or would that cause problems? I'm aware that a direct short would lead to bad things happening, but my naive brain doesn't see a path where that would occur with the current setup.
Are you folks able to point me in the direction of how to deal with the ground lines of two independent power inputs? Thank you.
I've got a toggle switch to change between the two sources, but do not know what I should do with the ground lines. Would it be ok to connect the negative leads of the battery and DC supply together, or would that cause problems? I'm aware that a direct short would lead to bad things happening, but my naive brain doesn't see a path where that would occur with the current setup.
Are you folks able to point me in the direction of how to deal with the ground lines of two independent power inputs? Thank you.

