Can 12vdc and 5vdc have same ground

This is probably a very stupid question but I'm new to all this so please bare with me...

I have a breadboard where I have one power rail with 12vdc and the other power rail with 5vdc. I have a motion detector (PIR) that requires 5vdc and the lights it will kick on require 12vdc.

In an effort to save space i am wondering if I can use the ground on the 12v power rail as the ground for my motion detector. So i will have the motion detector hook up to +5v from the 5v power rail and to ground of the 12v power rail. Is this possible...??? Can componets that require 5v use either the ground from the 12v rail or the 5v rail?

I hope this makes sense and thanks for any info you can provide...

Not only can they, they must....

However it is good practice to tie them together at one place, namely the Arduino ground. That way the heavier currents in the lighting wiring won't generate voltages across the ground of the sensitive sensor.... And it goes without saying that the heavier currents of the lighting are not routed through the Arduino board, but only to the transistors (or whatever) that control the lights.


MarkT is right. It call commun ground. The +5 V and +12 V share the same GND. BUT NOT the same voltage. The only time you do not connect ground is when you need isolation to protect the Arduino. Example : electrical noises and dangerous circuits ← Yes The MAIN

Make sure 12v gnd and 5v gnd are tied at the same point. All your power to the circuit should have a common ground.

Chetan Bhargava

For more on why they must be connected see this:-