Mega Wiring Issue

Hey guys,

Below is a project I'm resurrecting.

I actually got this to work, until I started to actually wire it up into a production environment and for some reason, the relay boards aren't engaging with external power. I removed the jumpers from my relay boards, and connected the PS to JD-VCC and GND. I connected the ground on the Relay Board to the Arduino as well. I've been racking my brain on it or a few days now and not sure what I'm doing wrong.

Any insight would be greatly appreciated!

[Edit: Based on a closer look at the schematic, and on later replies from people who read the schematic carefully the first time, this post is almost completely baloney.]
Based on the schematic posted earlier, it looks like the relay board activates a relay when th e associated input goes to GND. As a first test, you might try disconnecting the Arduino completely, leaving the external power supply connected to JD-VCC and GND, and then momentarily connect some of the relay input pins to GND. See if the relays operate. If they do, then the problem lies in either the connections - in particular, the connection between the relay board GND and the Arduino GND - or in the code.

eros:
I connected the ground on the Relay Board to the Arduino as well.

Wrong.
With joined grounds, you have NO opto isolation.

For a !!! 1-8-channel !!! relay board, the ONLY connections between Arduino and the relay board are +5volt and relay inputs.

Opto SUPPLY has to come from the Arduino (+5volt link).
And the Arduino output pins SINK the opto current to Arduino ground.

The RELAY power supply goes to relay board VCC and ground.
VCC link/jumper removed. !!!

If you have a different relay board, post the link.
Leo…

Would that all the relay boards behaved in something resembling a consistent manner...

I've seen just about every imaginable way to drive a relay off a 5v signal in modules on eBay and from other suppliers, even the ones that make you cringe when you see the schematic

Hi,

Would that all the relay boards behaved in something resembling a consistent manner...

Here here.
[ on soapbox]
A logical relay board would;

  • Be input logic HIGH to activate relay.
  • Have clearly labeled RELAY 1 INPUT, RELAY 2 INPUT
  • Have clearly labeled RELAY INPUT Gnd
  • Be optically isolated.
  • Have an LED on each Opto input as indicator.
  • Need only 10mA to drive.
  • Have clearly labeled RELAY 1 NC,C,NO etc
  • Have clearly labeled RELAY 12V Supply
  • Have clearly labeled Relay Gnd Supply.
  • NO JUMPERS for confusing modes of operation.
  • Space saving needs to be the LAST thing on/in the designers mind.
  • Have its Part No printeed, CLEARLY in READABLE size Font

off soapbox

Tom..... :slight_smile:

Then again I'm only dreaming! :sleeping:

@TomGeorge.
Most 1-8 relay board schematics I have seen have...

Logic LOW to activate the relay.

Use Arduino's +5volt to supply the optos (so Arduino off = optos off = relays off).

Don't use ground to the Arduino (shared ground would defeat the use of optos).

Have a 2mA opto current limiting resistor (1Kohm).

The 16-relay boards I've seen are different (bad).
Leo..