1

Sorry if this is a silly 'beginner' question, but I'm still only just getting into working with the Pi.

I have a Pi Zero that I want to use to drive a module of a few WS2812 LEDs. Because the GPIO pins output is 3.3V, and the module input is 5V, I'm using a Sparkfun bi-directional logic level shifter to step the voltage up. My question is this: If I wire from the GPIO pin to the level shifter on the LV side, then the HV side of the level shifter to the LED module's data line, does the ground for the data line need to run back the level shifter (HV to LV) then to the Pi? Or can I simply wire the module's DIN ground directly back to a GND pin on the Pi? Or is something about my intended wiring plan completely off, and I need to rethink the whole thing?

I'm pretty vague on how all this will look in the end so either solution works for me, I just want to make sure I don't accidentally fry any of the components.

1

I think you will find that the grounds are already connected in the level shifter so it will not matter.

You DO NEED to connect the grounds to the converter AND the Pi AND the LED strip.

This is a prototype I made earlier. As there are only 5 LED the 5V is derived from the Pi, but a more realistic use would have an external 5V supply.

This is a prototype I made earlier

  • Not sure I follow. Does this mean that I can ignore the data GND on the module? And if not, where should it be connected to? – Xono Oct 26 '18 at 4:13
0

GND - the ground - is to be connect to all components here: the Pi and its power supply as well as the LED strip and its respective power supply. It is the common reference point in your electrical circuit. Without it there is no meaning to the voltage levels with respect to each other. Expect the GND of the "data line" of the LED module to be connected to the GND of the power connector of the LED module.

With this level shifter you are expected to connect the Pi's GND and the Pi's 3V3 (from the "GPIO" header) to GND and LV of the level shifter; and the LED's GND and supply voltage (5V) to GND and HV of the level shifter. See level shifter's schematics; taken from there:

enter image description here

Note that GND of the level shifter (on the LV side and the HV side of the board) are connected. Which you can tell from the bottom side of the printed circuit board (source), both GND pins are connected to the ground plane:

enter image description here

Note that in electrical circuits and their respective schematics it is common sense that a thing with the same name (e.g. GND) is expected to be the same thing everywhere in the circuit - it is on the same net and thus connected. This is true for nodes and component terminals. A nice read on that matter.

See also: Sparkfun's hookup guide on how to connect and use the level shifter - quite a hands-on guide and worth a read.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.