Does an output pin on the arduino duemilanove act as a ground when set to digitalWrite(LOW)? I need to know for an ROV project I am working on.
Yes, it does.
Yes, but with a caveat of a maximum sink current rating of 40ma, 30ma max recommended.
Lefty
What does "act as a ground" mean in this situation? Impossible to definitively answer your question without pertinent details.
definition of ground: A conducting object, such as a wire, that is connected to such a position of zero potential.
The ground in any circuit is the end of the circuit, and is referred to as having a potential energy of 0V at all times.
So, can a pin on the arduino be used as a ground at the end of a cuircuit and complete it so that its a full loop.
So, can a pin on the arduino be used as a ground at the end of a cuircuit and complete it so that its a full loop.
Yes, within the current limits of the output pin. For instance, say you wanted to power a sensor that requires 5vdc at 20ma. You could wire the + & - power terminals of the sensor to two output pins and set one high and one low. The only advantage of this is that power could then be turned off to the sensor under software control at the expense of using up two digital pins.
Lefty
can a pin on the [A]rduino be used as a ground
Here's my take on it:
You always want the best possible ground you can get. If you use a pin operating as a logic zero output on your Arduino to be the "ground" connection for another system connected to this, you are asking for trouble. This has nothing to do with the maximum current allowed to flow into an output pin operating at logic zero; it's all about noise.
If you haven't been introduced to the effects of noise on the proper operation of circuits, you might question my assertion about wanting the best possible ground. In which case I apologize for wasting bandwidth.
I mean, you "can" do it, but it's really not the Right Thing To Do.
So, PaulS and I have both answered your question: You can do it.
How about answering a question from me: Why would you want to do it? Why would you even consider doing it? (I know, I know, that sounds like two questions, but actually it's the same question.)
Regards,
Dave
Alright, Thank you everyone. To answer your question, I am trying to use a low current motor off the arduino and would like to be able to switch it's direction. apply the voltage though one pin and using the other as a ground, the set the original output pin to LOW and the other to HIGH to switch directions. To be safe I won't bother with this and find another way.
What you're describing is usually done with what's called an "H-Bridge"
And H-bridge consists of 4 switching devices (transistors, etc.) and is often contained within an integrated circuit.
You can search on your favorite electronics supplier for H-Bridge and find a good IC, or you could build your own simple version:
http://www.solarbotics.net/library/circuits/driver_4varHbridge.html
Generally you should not try to do any direct motor connections to the arduino pins due to the low currnt carrying capabilities, and other electrical characteristics of motors in motion. If the arduino pin sinks current when "LOW", then the pin is providing an electrical flow path to the common board ground system in this "LOW" state.