I'm planning to play around with an addressable LED strip and a Netduino, and having read some tutorials I've learned that I will need an external power supply to provide enough current to the LEDs. According to the tutorials an old PC power supply suffices since one of the 4 pins on the molex connectors provides the 5V required, and the power supply will be able to provide more than enough current. All well and good.

Now, a couple of tutorials (this one and this one, for instance) mention that I should connect the strip's 5V input and GND pins to the 5V and GND pins on one of the power supply's molex connectors, which makes sense. However, the tutorials also mention that I should connect this ground pin to one of the Netduino's GND pins as well, which is the part that worries me.

If I power the Netduino via USB (during development, for instance), wouldn't that mean we have two different grounds (namely, the PC's ground and the external power supply's ground) in the same circuit? I'm no expert when it comes to electronics but it seems to me like this might be a recipe for disaster.

I'm probably missing something though, so I thought I'd check it here. What would happen if I connected the netduino to my laptop via USB but also connected an external power supply's ground to the netduino GND pin? Would it make a difference if I powered the laptop via battery as opposed to plugged into a wall outlet?


If you don't connect the grounds of the two supplies together, you don't have a circuit.

Assume for a moment that you don't connect the two grounds together. You connect the microcontroller's data out pin to the LED strip's data in pin. The LED strip determines if your microcontroller is sending a 1 or a 0 by measuring the voltage on the data pin compared to its own ground voltage - but since its ground isn't the same as the microcontroller's ground, it could get nearly any result. At best, the two devices won't be able to communicate, and at worst the voltages will be so wildly different that one device or the other will see a very high or very low voltage on the data pin.

Connecting the two grounds together means you have a circuit; everything is working from the same ground reference, and power can flow from either supply, through a device or devices, and back into the supply via the shared ground.

You're right that connecting grounds together can in certain cases cause a problem; this happens when both devices are already referenced to different ground voltages. For instance, one might be connected to a local power supply, while the other is connected over a long cable to a power supply a long way away on a different AC circuit; there's nothing preventing the two having different ground potentials, creating what's called a ground loop. There are various ways of isolating two systems but still transmitting data between them in situations where this can happen.

In practice, however, either one of your grounds will be floating - that is, having no external reference - because it's running off batteries or otherwise has no other ground connection, or both your grounds will ultimately be referenced to the same voltage; for instance, when you have two devices both plugged into AC power from the same distribution board. In such situations, connecting the grounds together is both safe and necessary to complete a circuit.


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.