Does Ground Voltage Need Lowered As Well

groundraspberry pivoltage

I am dividing voltage of a 9V battery to 3V for a Rasperry Pi GPIO. I have the ground connected to the end of the resistors, so it is back to 9V when I connect it to the Pi's ground pin. Is it ok to have the ground at 9V?

schematic

simulate this circuit – Schematic created using CircuitLab

Best Answer

If what I understood from your question is correct, this circuit will help you. It is a voltage divider whose input is 9v and output is 3v (which can be given to your rasperry-pi)

schematic

simulate this circuit – Schematic created using CircuitLab