Can I short circuit arduino ground Pins to eachother?

Hi,

Can I short circuit arduino ground Pins to eachother to increase the current?

I want to operate 27 small 5v solenoids with my arduino mega.
Since I am playing music, I do not know which solenoids are going to be on (output=high) concurrently.
Each solenoid takes ~40 milliamps.

I think that each ground pin can handle ~200 milliamps (am I right here?)
I have 4 ground pins on my board.

Can I connect them all to the same "-" line on my breadboard. And then, connect all my solenoid to that line as well?or do I need to connect each 7 solenoids to their own ground pin. (not all 7 will be on at the same time.)

Not good practice as you stand a good chance of burning out the output if both are low and you try to put them both high but there is a slight delay. You could then have a short from 5V to gnd via two pins.

The correct way is to use a drive transistor or relay depending on your needs.

The output should turn on the transistor to drive the solenoid between the 5v supply and gnd.

Weedpharma

Would it be better if I separated them into groups of 5? And short each 5 outputs to a ground?

I was unaware that output pins can drive current into other outputs...

Can I connect 2 solenoids to the and ground at all?

Just to be clear... Only the grounds are shorted. The solenoids sit between the short and the output. So the outputs are not directly connected.

You'll need drivers for the solenoids.

The ground pins are already shorted together.

I think that each ground pin can handle ~200 milliamps (am I right here?)
I have 4 ground pins on my board.

No! :frowning: The entire chip can source or sink 200mA.

No! :( The entire chip can source or sink 200mA.

A 2560 can handle 200mA per each VCC and GND pin - thus 800mA total. I have documented this from Atmel previously.

Each solenoid takes ~40 milliamps.

You should use a part like TPIC6B595 or TPIC6C595, 8-output shift register that can handle 150mA and 100mA continuously on each output. Upload on/off data via SPI.transfer, will take only a few uS to send out 4 bytes of data.
27 x .04A = 1.08, more than the Mega 800mA rated regulator can supply, and more than you can sink thru all Mega pins combined.

Even if you don't consider the current draw, you should consider that a solenoid is an inductor, and you can get damaging back EMF.

Here's what I am thinking.

I am not going to be operating all the solenoids at once. Only around 5. I am going to use them to play music.

So even 200 milliamper might be enough.

I guess the big question is: would 2 solenoids that share a ground fire off when only one pin is high? Both pins are output but only one is "on".

"I guess the big question is: would 2 solenoids that share a ground fire off when only one pin is high? Both pins are output but only one is "on"."

No, only one will fire.

How are you proposing to connect them up? Is the plan for a High output to source current into them to turn on?
Or for a low output to sink current thru them to turn them on?
I for one would spend the $3-4 for some shift registers vs blowing the surface mount Mega chip which most cannot replace by themselves.

And am I risking burning out my chip if I ensure my software only outputs 80 ma , and all pins are configured output? (Only 2 pins are "high").

Here is a rough ASCII sketch.
The solenoids each work at .37 milliamps

pin1out(high)----solenoid--
pin2out(high)----solenoid--|
pin3out(low)-----solenoid--|---GND
pin4out(low)-----solenoid--|
pin5out(low)-----solenoid--/

Am I at risk of burning out anything? I don't mind it so much. The board is not very expensive. I don't mind a small risk, just want to make sure I'm not doing something fundamentally wrong.

I guess the big question is: would 2 solenoids that share a ground fire off when only one pin is high? Both pins are output but only one is "on"."

pin1out(high)----solenoid--
pin2out(high)----solenoid--|
pin3out(low)-----solenoid--|---GND
pin4out(low)-----solenoid--|
pin5out(low)-----solenoid--/

Am I at risk of burning out anything?

Forget about driving the solenoids directly from arduino pins.

Don't do it.

I think the basic issue here is not so much a technical one as it is a communication problem.

I guess the big question is: would 2 solenoids that share a ground fire off when only one pin is high? Both pins are output but only one is "on"."

The obvious problem with above statement is that it indicates your lack of experience with electronics, which raises a red flag because who knows what ELSE you don't know ?

At no time should the solenoid be connected directly to GND, period.

WHY you ask ?

1-Because first of all they draw the maximum of an arduino output pin (40mA) so you can't use digital outputs to drive them.

2- Because they are inductive devices and should be driven using current SINK method and NOT current SOURCE (as you were planning)

3- They should be driven using transistors, mosfets or a mosfet based chip like the one Crossroads recommended.

4- When sinking current , the "-" lead of the solenoids does NOT connect to GND.
It connects to the DRAIN of a MOSFET or the COLLECTOR of a transistor. How the mosfet or transistor are driven from the arduino is another issue but the "+" lead of each solenoid should connect to the solenoid powers supply (which you probably don't even have or have even thought of)

5- The solenoids should NOT be driven by the power supply driving the arduino, only because it may induce inductive spikes on the logic power bus.

6- The GROUND BUS is another issue. The solenoid power supply "-" should connect to the GROUND BUS used by the mosfets or transistors. Your arduino needs to connect to that ground bus in order to turn those devices on but the connection from all the transistor or mosfets to the solenoid power supply ground should be direct and not through the "-" "line" as you are calling it (correct term is BUS. (another red flag))
Bottom line, the current path for the solenoids should be from the "+" BUS of the solenoid power supply to EACH solenoid OR to the solenoid "+" BUS , through the solenoid, then through the transistor to the emitter then to the solenoid GND BUS and back to the "-" lead of the solenoid p.s. , or in the case of mosfets , through the solenoid, through the DRAIN (of the N-CHANNEL MOSFET) , through the mosfet, then out the SOURCE of the mosfet to the solenoid GND BUS and back to the solenoid power supply "-" lead.

7- Each solenoid should have FLYBACK DIODE (AKA BYPASS DIODE)

just want to make sure I'm not doing something fundamentally wrong.

Everything you have suggested or implied so far is fundamentally wrong, starting with the idea of driving them from arduino pins to "sourcing " the current instead of "sinking" it (terms which I would be willing to bet are foreign to you) .

The first question of your post should have been:
"Where can I get a power supply to drive my solenoids ?" (ie: dc-dc converter)
SECOND QUESTION:
"How do I hook them up ?"

Google Search: "How to drive solenoid from Arduino"

"And am I risking burning out my chip if I ensure my software only outputs 80 ma , and all pins are configured output? (Only 2 pins are "high")."

YES. That has been stated over and over here. Also, it has been stated that you need to use a driver ckt.
If you have other questions please ask.

raschemmel:
...........

Thanks for the long post. Effort spent in writing it is much appreciated. You are right, I am a pure s/w developer who is "playing" around with Arduino.

So I am completly green. (I did learn how to solder and use multimeter back in highschool, but that was long ago).

The post mentions alot of useful components which I haven't heard of before, and will read up on. Thanks again for taking the time to write that post.

I previously connected 2 of these guys to my arduino: (http://www.ebay.de/itm/1pcs-DC3-12V-Push-Pull-Type-Solenoid-Electromagnet-DC-Micro-Solenoid-/381262204903?hash=item58c4ff8fe7), and it worked fine, so I assumed: hey lets get 25 more, and it will probably work. To be fair it says on the bottom:
Voltage: DC 3 V - Current: 0.08A
Voltage: DC 6 V - Current: 0.17 A
So I assume that I was even using 150 milliamps. (Arduino is 5V, right?)

As I want to connect 27 of these, is there a circuit that I can use that has connections for large groups of solenoids? (4, 8 or 16 at a time?).

@CrossRoads, you suggested "I for one would spend the $3-4 for some shift registers". Can you elaborate on that? what IC, how it would work? I have not used shift registers since around 1975, so I am all ears also.

Get 2 of these.

Also, reread my long post several times until it sinks in why you should use that board linked above.

Shift Registers/arduino

From Reply#4

You should use a part like TPIC6B595 or TPIC6C595, 8-output shift register that can handle 150mA and 100mA continuously on each output.

From Reply#14

Can you elaborate on that? what IC, how it would work? I have not used shift registers since around 1975, so I am all ears also.

(WTF ?)

Stop skimming and read the posts word for word.

He already told you what chip.

Sorry if I overlooked the "word for word" in reply #4.

I didn't realize that was Reply#14 was your post. I thought it was the OP (Sillycow) because it was related to this topic. FYI, the datasheet for a TTL 74166 shift register
is dated October, 1978, so what kind of shift register were you using in 1975 ?