The VCC is from your arduino NOT your external power supply. The output pins from the arduino provide a signal that is relatvely LOW against this.JD-VCC is where you put the power in from your external power supply. GND is where you put the ground from your external power supply (not the arduino).I know it looks wrong because the GND pin and JD-VCC are so far apart, but that's the way they're put together.
A quick question, if we wire the the ground in from the external power supply to the GND on the relay board, and we wire the grounds in off the Arduino harness into the same GND - is that going to cause an issue?
Not necessarily but why take the risk? The arduino ground should only be connected if you're using the arduino 5v to power the board.The whole idea of the opto-issolators on the relay board is to ISSOLATE.
Let's try to clear up something:There are 3 "power supplies' involved here:1. Arduino Board power supply. .......Coming from USB from our computer2. Relay board +5 volts power supply..........We will have a separate 5V power supply just for the relay board. And yes, we will remove the Vcc-JD jumper on the board to connect the +, with the - to the GND3. The application track power supply, which the relays will switch off on command. See the schematic diagram of the relay board here:http://yourduino.com/sunshop2/index.php?l=product_detail&p=201I would recommend a separate small 5V power supply in this application, both for the relay current for 4 relays and because optical isolation from the relay board and all those wires run to the track (which is a LONG wire, right?) means a lot of electrical noise is probably. .......Maybe we'll have some wire runs back to our driver stations around say 12-15' - not sure that's long?
What I'd be inclined to do is cut down on the use of the relays by only switching the +ve side of the tracks. That way you only need one relay per track (instead of 2). So then you'll only need 2 relays.This being the case, I'd then power the relay board from the arduino to keep it all simple.
The negative wires from your track shouldn't come anywhere near your relay board. As far as the track is concerned those relays are just switches and have no other connection to them.Think of the relays as just a stand in for someone flicking a switch. You don't need the neutral wire of your bedside lamp connected to the person flicking the switch. The track only needs to be connected to the switch contacts of the relays. And it's just the +ve side that's being switched so the -ve side doesn't belong here.On the subject of VCC. Consider a circuit consisting of 4 Light Emitting Diodes. All of them have their anodes connected to VCC, their cathodes are all connected to their respective input pins. This is exactly what you have on your board, but the Light emiitting diodes are buried within the opto-issolator chips.The only use for the VCC connection is to power those LEDs. On the relay board there is a track that directly connects the VCC on the long header to the other VCC pin (on that jumper). This is purely to allow your VCC to power the relays as well. (not recommended)To power the LEDs all you need to connect from your arduino is the VCC and the digital pins.To power the relays and logic circuitry on the relay board, all you need to provide is GND and JD-VCC from your external power supply.The tracks only need to have their +ve wires connected to the switch contacts on the relays. So there's actually 3 totally issolated areas.UNO connects to LEDS via VCC and digital pins. (nothing else)External power supply connects to JD-VCC and Gnd (nothing else)Tracks connect to switch contacts (nothing else)