New user - How to connect all grounds?

Hi there!

Just found out about Arduino and have ordered my first board (Arduino Mega 2560). Can’t wait! :slight_smile:

Now for my question -

If I have two different external power-supplies (48 VDC and 24 VDC) and want to use a wall-wart powered Arduino to switch both current paths on/off, how would I connect the grounds? For the powertoggling I will be using MOSFET transistors and I know the theory - but I’m unsure if I’m supposed to tie them together.

Should I connect it like this A)

48 VDC negative ----\

24 VDC negative ------> Wall socket ground pin (i.e connect every ground/negative pin to a common ground?)

Arduino ground -----/

Or should it be like this B)

48 VDC in it’s own loop → it’s own wall socket ground pin

24 VDC in it’s own loop → it’s own wall socket ground pin

Arduino ground --------> it’s own wall socket ground pin

I guess they should connect like A, but would like a second opinion on this before connecting everything. :slight_smile:

All of the powersupplies will be connected to one big extension cord anyway, so I figure it’s ok…?

Second question -

How do I connect the Arduino board to another ground, like the wall socket ground pin? Do I simply connect GND on the Arduino-board and the wall socket ground pin (via a cabel)?

Best regards,

Robert

rasmadrak:
Hi there!

Just found out about Arduino and have ordered my first board (Arduino Mega 2560). Can’t wait! :slight_smile:

Now for my question -

If I have two different external power-supplies (48 VDC and 24 VDC) and want to use a wall-wart powered Arduino to switch both current paths on/off, how would I connect the grounds? For the powertoggling I will be using MOSFET transistors and I know the theory - but I’m unsure if I’m supposed to tie them together.

Should I connect it like this A)

48 VDC negative ----\

24 VDC negative ------> Wall socket ground pin (i.e connect every ground/negative pin to a common ground?)

Arduino ground -----/

Or should it be like this B)

48 VDC in it’s own loop → it’s own wall socket ground pin

24 VDC in it’s own loop → it’s own wall socket ground pin

Arduino ground --------> it’s own wall socket ground pin

I guess they should connect like A, but would like a second opinion on this before connecting everything. :slight_smile:

All of the powersupplies will be connected to one big extension cord anyway, so I figure it’s ok…?

Second question -

How do I connect the Arduino board to another ground, like the wall socket ground pin? Do I simply connect GND on the Arduino-board and the wall socket ground pin (via a cabel)?

Best regards,

Robert

  1. Best thing to do to ensure you are isolating the higher (and lethal to the arduino) voltage, I would either use two mosfet transistors for switching the grounds on and off, or just one. The way the mosfet works is it’s switched with only a positive pin from the arduino, and then one pin is the - in and one is technically the - out. (REMEMBER! center pin on mosfet goes to arduino!)

Technically, the arduino is already connected to the ground when using a wall socket pin.

Sorry for being vague, here comes the full explanation:

Arduino out1 → MOSFET1 gate (protected by resistor+diode).

MOSFET1 drain connects to +48VDC. MOSFET1 source connects to 48VDC ground.

Arduino out2 → MOSFET2 gate (protected by resistor+diode).

MOSFET2 drain connects to +24VDC. MOSFET2 source connects to 24VDC ground.

Arduino vcc → Connects to wall-wart

Arduino gnd → Connect to wall-wart ground

All three units are connected to the same wall-socket via a 3-way extension cord.

(Here I guess, they’re already connected to the same ground?)

Does the MOSFETx ground close the circuit from out1 and allow current to flow, or do I need to connect Arduino ground to the power-supplies grounds as well?

Isn’t it bad connecting different grounds together? :S

I’m basically copying this design: http://arduino.cc/playground/uploads/Le … driver.pdf

But I’m not sure how the grounds are supposed to be connected. Should the ‘ground leg’ from the MOSFET be connected to BOTH Arduino’s ground and PSU ground?

Hello again,

I think I found my answer in this diagram. It simply says, “connect all grounds to Arduino”.

http://wiki.bildr.org/index.php/Control … 0_Arduino)

I’m using the powersupply in this link ( http://cgi.ebay.com/ws/eBayISAPI.dll?Vi … 678wt_1141 ).

But the diagram also says this:

“Remember to connect the ground of the 12/24v power supply with the ground of the Arduino. Do not connect positive ends of the 12/24V supply to the arduino, as this could easily destroy the arduino.”

Does the statement above mean that I should connect the PSU GND to Arduino’s GND pin?

I only get voltage between the +V and -V on the PSU, nothing if I pick +V and GND.

So if I got it correct.

  • Connect +V to Solenoid input

  • Connect Solenoid output to MOSFET drain (collector/input)

  • Connect Arduino out1 to MOSFET gate (base/switch)

  • Connect MOSFET source (emitter/output) to -V on PSU

  • Connect Arduino GND to GND on PSU

And the same setup for the next PSU?

Is this correct? :slight_smile:

rasmadrak:

  • Connect +V to Solenoid input

  • Connect Solenoid output to MOSFET drain (collector/input)

  • Connect Arduino out1 to MOSFET gate (base/switch)

  • Connect MOSFET source (emitter/output) to -V on PSU

or maybe the last step would be to connect the MOSFET output/emitter to BOTH -V and Arduino GND?

I figure the GND on my PSU is AC, which would be bad to connect DC ground into, correct?

Gah. I’m confused. :frowning:

First of all, your schematics are showing bipolar transistors (TIP120), not MOSFETs…

The supply that you linked to has a floating output. Neither side by default is connected to ground. The terminal with the ground symbol is the safety ground, connected to the metal case of the supply. Likewise, the wallwart is also likely floating.

You will want to connect the V- of both supplies to the ground of the Arduino. You may want to connect this to safety ground so everything has a common reference. You only need to make that connection at one place.

The V+ of each supply will connect to one side of the appropriate solenoids. The other side of each solenoid will connect to the collector on one of your transistors. Don’t forget the flyback diode connected across each solenoid (yes, it looks like it is connected backwards. That’s correct; it is supposed to shunt the voltage that the coil generates when it is turned off so that it won’t blow up the transistor).

/mike

Hello again,

Ok, I’ve created a little schematics.

Please let me know if this looks ok. :slight_smile:

http://dl.dropbox.com/u/16857922/schematics.png

Hello again…

Can anybody confirm the schematics I posted? I really don’t want to burn my new Arduino board to a molten piece of pcb… :confused:

The blue wire is correct and required. As long as neither output terminal on the wall wart is connected to the neutral pin on it’s AC plug (which is likely the case), the yellow is a good idea but not necessary.

/mike

Thanks!

I’ll skip the yellow wire for now then. :slight_smile:

Yep,

Don’t connect connect the yellow wire! The Earth from the wall can carry dangerous voltage in certain conditions, easily enough to damage the arduino and probably give you a belt too. If a Neutral is loose or damaged in your property (or even in neighbouring properties dependant on countries) then upto full line voltage can be present on the earth.

There should never be any current on the ground (bare) wire in a household circuit. This would be a blatant violation of electrical building code. Aside from that, you’d be creating a ground loop, tripping any GFCI in that particular circuit, and electrifying all of your home’s plumbing or most any other metal-shelled appliance in the house.

Chagrin:
There should never be any current on the ground (bare) wire in a household circuit. Aside from that, you’d be creating a ground loop, tripping any GFCI in that particular circuit, and electrifying all of your home’s plumbing or most any other metal-shelled appliance in the house.

Having a current on the ground wire is not going to trip a properly-wired GFCI. GFCI’s work by detecting a difference in the magnitude of current between the Line and Neutral wires. If there’s a fault to ground in an appliance, the current in the Neutral wire will be less than the current in the Line. However, a GFCI does not detect current in the Ground (aka “Protective Earth” or “PE”) wire.

Also, the presence of current in the Ground wire doesn’t necessarily result in significant voltage on the Ground wire. The voltage on the Ground depends on the current into the wire and impedance of the ground wire’s path to ground.

Eric