Can I use my analog/digital pins as a ground?

Hey everyone! I was curious if I can use my digital or analog pins as a grounds? I have an Arduino Due and a lot of pins and one ground. The only devices I'd need to use pins as grounds for would be:

2 HCSR04's,

5 mosfets that 1 has a 12V current and the other 2 are 9V.

Any help is appreciated. Thank you!

I cannot think of any reason to do so - its only looking for trouble if you configure an analog pin as output LOW and use it as a ground (if that's what you mean).

The best thing to do is use a separate wire for each ground connection and have all other ends tied to a common point (GND of the power supply, buss on a breadboard, etc).

Okay. Thanks! :slight_smile:

So my project is going to be concealed in a 3d printed casing. Can I just take photo board and link all my grounds to that with one wire coming back to the board's ground?

Yep.

YAY! Thanks. :slight_smile:

dlloyd:
I cannot think of any reason to do so - its only looking for trouble if you configure an analog pin as output LOW and use it as a ground (if that's what you mean).

Not only is it asking for trouble but you are very likely to fry the Due - the output pins are
limited to very small currents, some pins as low as 3 or 6mA, completely unsuitable.
Due pins cannot drive a standard LED load of 20mA, and a ground connection is likely to have
decoupling caps connected with large inrush currents at switch-on.

I use digital pins for power with no problem for some breakout boards. A real time clock (rtc) uses very little current. The I2C pins (SDA/SCL) are adjacent on the Arduino. You can configure the pins adjacent to the I2C pins as VDD and GND. The rtc can then plug directly onto the Arduino with the four pins SCL, SDA, VCC, and GND. Works fine.

A ground is supposed to be at, and stay at, 0 v. When troubleshooting, I have occasionally probed Arduino pins that are supposed to be low, and they are not always at 0 v. In fact, I have a piezo buzzer hooked up right now to an Arduino pin, which is rigged to beep when the pin goes high. But when it is not beeping, if I put my ear close to it, I hear some sound.

Arduino pins output transistors are about 40 ohms when on, so it doesn't take that much current to
pull them up from 0V.

The sound you hear with the piezo is probably power supply noise - typically quite noticeable if
running off a computer or laptop's USB power.