5V to 3.3V signals

Is it necessary to have a ground involved with a circuit which takes a 5v signal and converts it to 3.3v?

My current project involves a Raspberry Pi and a rover which is working really well, but now I want to hook up a distance sensor and I have to worry about the 5v coming from the sensor and converting it to 3.3v for the Pi…

I would like to make it as simple as possible, which would ideally mean just a circuit I could connect between the single line output of the sensor to the single line input of the Raspberry pi. I could put a resistor in that line to lower the voltage, right? But to get an actual guaranteed 3.3v going into the Pi, would it require another connection to a ground on the Pi GPIO? It would be nice to be able to just install a small circuit board on that single line going between the two and not have to worry about another ground wire in the mix.

Does that make sense?

I’m pretty new to the electronic side of things… Am mostly a software guy… So don’t beat me up if that’s a stupid question! :slight_smile:

Current flows in a circuit, not from one end of a wire to another. So, for the RPi and the rover to communicate electrically, there must be at least two wires, one of which is the common ground and the other is the signal.

Any circuit that shifts voltage levels between the rover and the RPi must also have a connection (somewhere) to common ground, as the voltage levels are measured with respect to that ground. The actual level shifter circuitry will usually depend on the direction of the signal, but you don’t need to add an “extra” ground to the shared ground connection. Here are some examples: newark.com/pdfs/techarticles … sBrchr.pdf

I tried hooking up an HC-SR501 IR Sensor Module to the rPi and was surprised to see that the voltage output from it was 3.3v instead of the 5v I expected, so I don’t have to worry about converting it. I’ve got it working and detecting movement from pretty far away… I’m gonna Google around to see if I can find some other sensors that output 3.3v instead of 5v so it makes things easier for me.

If you inadvertently (or otherwise) connect a 5 V output to a 3.3 V input you can do serious damage to the 3.3 V device. There are “clamping diodes” on the input pins that will limit the input voltage by diverting current into the 3.3V chip power supply lead. If that input current is not limited, the clamp diode or the pin input lead can burn out, leading to destruction of the input circuitry and possibly other damage.

If the 3.3 V chip survives this abuse, a side effect is that the 5 V device will often power the 3.3 V device, so that you can’t turn off the 3.3V device.

So, no surprise, but you are really asking for trouble. Best to use the recommended (2K+3K) resistive voltage divider between the two.