SLA-05VDC-SL-C Relay not working with arduino

Hi everyone!

I'm having some troubles to make my relay work, i bought a SLA-05VDC-SL-C Module (like this one)

The circuit is connected this way:

And the code is:

const int relaisPin = 8;
 
void setup() {
  pinMode(relaisPin, OUTPUT);
}
 
void loop() {
  digitalWrite(relaisPin, HIGH);
  delay(500);
  digitalWrite(relaisPin, LOW);
  delay(1000);
}

Problem: When arduino sends signal to relay, it doesn't "switch", only a small led into relay turned on.

Things i've tried:

  • Connected relay to 9V battery, and it worked, led turned on and relay "switched"
  • Tried the same configuration with an identical relay module and arduino powering relay, doesn't worked
  • Measured current when arduino was powering relay, and signal on ~ 100 mA, the same using battery ~165mA

If im missing some information, please tell me, i will really appreciate your help!

Hi,
Sounds like power problem...

What is powering your arduino? USB?? May not have enough current, especially if you are using a tablet or small laptop...

Try 9V to Arduino external power jack. Work then?

More info about this type relay is HERE

That relay needs 185mA coil current, Arduino regulator may not be able to supply that along with it's existing load? You need an external 5V supply, at least 300mA.
http://www.songle.com/pdf/20085271539341001.pdf

I see an optocoupler and some jumpers.
When you properly power the relay with a direct connection to a power source, make sue your settings are correct and that your grounds are connected.

Wonder if @dlloyd has made a connection graphic for this type relay board?

terryking228:
Hi,
Sounds like power problem...

What is powering your arduino? USB?? May not have enough current, especially if you are using a tablet or small laptop...

Try 9V to Arduino external power jack. Work then?

More info about this type relay is HERE

Thank you for answering!!

I did connect 9V battery to power jack and totally worked!!! Now i have two questions.

  1. A Wall Adapter Power Supply - 9V DC would do the job the same way battery did?
  2. What's the reason a 5V relay did'nt work with USB 5V

edgemoron:
That relay needs 185mA coil current, Arduino regulator may not be able to supply that along with it's existing load? You need an external 5V supply, at least 300mA.
http://www.songle.com/pdf/20085271539341001.pdf

Thank you for answering!!

That was my first attempt, arduino only sending signals, and a 9v battery powering the relay, but i need only one source of power (A wall adapter) so i'm wondering if this could be possible,

Max load of my components (without arduino) ~315 mA.

INTP:
I see an optocoupler and some jumpers.
When you properly power the relay with a direct connection to a power source, make sue your settings are correct and that your grounds are connected.

Thank you for answering!!

And yes, when tried with 9v battery i double checked that grounds were correctly connected and relay worked perfectly!!

The relay board needs a separate 5V supply, you should not pull another 185ma from the Arduino regulator if it's already supplying 315ma, if the voltage at the barrel jack were 9V it would have to dissipate 315 + 185 = 500 mA, * 9 - 5 = 4V = 2 Watts, too much.

Hi,

OK you proved the problem was power by using external 9V.

But I agree the best solution is an external 5V power supply (Like "wall wart").

AND that allows you to use the relay board in real "Optically isolated" mode which may be important of you are switching high current or inductive loads with that relay.

See This Page

It shows the same type relay (There are boards made with 1,2,4 or 8 relays but the same circuit) and how to connect it with a separate 5V supply so there is no electrical connection to the Arduino and only a tiny amount of current from the arduino for the signal.

Again thank you for helping me!!

I read the page you mention and try to connect relay in isolated mode:

That's how its connected, but relay doesn't switch, i changed the wall wart for a 9v battery and it didn't switch.

Could somebody point what i'm doing wrong?