Really need help with 12V relay and external power supply

I've been trying for hours to use a 12V relay to turn off/on a couple components high power components.

I'm using this relay: http://www.amazon.com/SainSmart-8-CH-8-Channel-Relay-Module/dp/B0057OC5WK

The arduino can't supply enough to turn the relay on, so I have a 12V external supply hooked up to the JD-VCC and GND side pins (not the main set of male pins)

I then have the digital out on the Arduino hooked up to the IN pins on the relay and the 5V from the arduino hooked up to the main VCC.

I've searched for hours trying to find a solution but nothing seems to work. Can someone point me in the right direction?

However, nothing is working. It seems to only be accepting voltage from the arduino which isn't enough to turn on the relays, OR it is always taking the 12V external regardless of the code.

Re-write

  1. The link you provided is for 5V (control) not 12V

  2. Sainsmart sell that product for 2/3 the price on the link you provided.

  3. The correct wiring is shown on sainsmarts web site.

Use Adruino 5v to Vcc , GND to GND and pin 13 to one of the relay control inputs , upload the blink example and the relay should click every 1/2 second.

  1. Never use relays - there is always a transistor (mosfet) that will do the job much, much better.

Mark

Do you have a link to the datasheet or schematic for the relay board?

The arduino can't supply enough to turn the relay on, so I have a 12V external supply hooked up to the JD-VCC and GND side pins (not the main set of male pins)

I don't know what JD-VCC is, but I don't think you're supposed to power the relay board from 12V. (You can switch 12V or more with the relay contacts.)

I then have the digital out on the Arduino hooked up to the IN pins on the relay and the 5V from the arduino hooked up to the main VCC.

Is the Arduino ground connected to the relay board ground.

You say you have a 12volt relay board, but you link to a 5volt relay board.
So what is it.

A 5volt 8-relay module should only be connected to 5volt and the 8 inputs. NO ground. JD-VCC removed.
Then the LEDs should work.
Remember that these board are "active LOW".

JD-VCC is the jumper that breaks the 5volt Arduino supply line to the relay coils.
The relay module should have it's own 5volt/1A supply, since 8 relays is a bit much for Arduino's regulator.

If you want to take the chance of powering the relays from Arduino's 5volt line, then put jumper JD-VCC back.
And connect relay ground to Arduino ground.
You loose opto isolation.

Then Arduino's supply should have enough current capability to drive all the relays. That could exclude USB supply.
Arduino's supply, connected to the DC jack should be 7.5volt (9volt max), 1Amp.
A 12volt supply could overheat Arduino's regulator.

A 12volt relay board is completely different.
Post a link.
Leo..

@Wawa

NO ground.

?

Mark

Common ground!
Connect both boards ground together.

I apologize for the bad post, it's raining outside and I had to catch a shuttle to my car.

Now that I'm home I'll explain a little better.

This is the correct relay that I am currently using.
http://www.ebay.com/itm/8-Channel-12V-Relay-Shield-Module-For-Arduino-UNO-2560-1280-ARM-PIC-AVR-STM32-/321355696979

After I made this post I did get it to work, by connecting the GND of the power supply to the isolated GND and the (+) voltage of the power supply to the isolated VCC-JD-VCC. Arduino GND was connected to the main male GND pin and the digital I/O pins to the IN male pins on the relay.

Essentially, the same setup shown in this video:

However, I had to set the power supply voltage to around 7 V in order for the relay to not be always triggered.

This works perfectly, but is there any way that it could damage the Arduino or components? I ran it for about 20 minutes without any hiccups.

The circuit diagram given on that link is for a 5v relay shield NOT a 12v and it looks like the pkotots are to.

Mark

holmes4:
The circuit diagram given on that link is for a 5v relay shield NOT a 12v and it looks like the pkotots are to.

Mark

I understand that. If I had the exact circuit diagram I wouldn’t be asking for help. I used the video as a reference for the relay I had, as the general properties are similar, only the required voltage differs. I was hoping someone here had used a 12v relay shield with an arduino before.

holmes4:
NO ground ?

Mark

Yes, NO GROUND.

Current flows from Arduino's +5volt, through a 1k resistor, the opto LED, an indicator LED, back to an Arduino output pin.
No ground involved.

ONLY if you plan to power the relay coils from Arduino's supply.
You LOOSE opto isolation.
Leo..

goodoletom:
This is the correct relay that I am currently using.
http://www.ebay.com/itm/8-Channel-12V-Relay-Shield-Module-For-Arduino-UNO-2560-1280-ARM-PIC-AVR-STM32-/321355696979

Look at the circuit diagram in this link.
The primary opto circuits are NOT using ground.

The NOOBS have drawn a ground wire in the wiring dioagram.
WRONG.

Optos are now like tits on a bull.
Leo…

The correct way of using this 12volt board is:

Only connect Arduino's +5volt to VCC next to relay input 8.
Connect the 8 relay lines.
DON'T connect ground.

Connect a 12volt supply to the two OUTSIDE pins if the 3-pin connector. VCC-relay and ground.
DON'T let VCC-relay touch VCC, because that will blow up your Arduino.
I would remove that VCC pin...

This assumes they have labeled the pins correctly.
Better check with a DMM first.
Mixing 12volt and 5volt up could be unhealthy for your Arduino.
Leo..

I recently had this issue and found this thread very helpful .

But yeah Leo has it.

Thank you for supporting me.

This blindly “just connect all grounds you see” is hard to stamp out.
Leo…

Wawa:
The correct way of using this 12volt board is:

Only connect Arduino's +5volt to VCC next to relay input 8.
Connect the 8 relay lines.
DON'T connect ground.

Connect a 12volt supply to the two OUTSIDE pins if the 3-pin connector. VCC-relay and ground.
DON'T let VCC-relay touch VCC, because that will blow up your Arduino.
I would remove that VCC pin...

This assumes they have labeled the pins correctly.
Better check with a DMM first.
Mixing 12volt and 5volt up could be unhealthy for your Arduino.
Leo..

This did not work. I connected exactly as you stated. Arduino +5 to the main male VCC next to IN8, +12V from supply to outside JD-VCC, no connection to middle VCC, and GND to power supply ground.

The relay acted as if the power supply was not even connected and was only using the +5V from the arduino. The power supply is functioning properly (tested with DMM) and all connection were solid.

Forget 12 volt for now...
And no jumpers.

So if you connect Arduino 5volt to the VCC pin next to relay input 8.
And connect a random relay input pin to Arduino ground.
Then the small indicator LED on the relay board does not light up?

This SHOULD work if the schematic diagram is correct.
Leo..

Yes, that does turn on the indicator LED.

Now connect the 12volt supply to relay ground and relay +12volt
Connect/disconnect the ground wire to a random relay input, and listen if the relays click.
Leo…

Done. There was no change when I added the 12V supply to those pins. Relay did not click on.

If the indicator LED lights up, then the input side (opto LED) is ok.

There must be a problem with your 12volt supply.
Did you measure it.
Maybe measure the voltage when one indicator LED is on.
Or could you post a picure of the supply and connection.
Leo..