5vdc Relay + Arduino UNO R3 ?

Hi All.

I had a problem today with an SRD-05VDC SL-C Songle relay unit.

I am trying to switch on/off 240 vac, using the relay, controlled by an LDR on the Arduino Uno.

I am confused as the Data sheet for the Relay states at 5 vdc the coil uses 89 ma, but the Arduino is only 40 ma per pin, have i got this wrong or am i missing something.

I am at a stage where i can switch off an LED using the Arduino + LDR, the relay powers up, but will not switch?

Ray

Many times to many people it has been pointed out that you can not drive equipment directly from the arduino.

You have the basics of your problem there, you can not run a relay that required 89mA with a device that supplies '40mA MAXIMUM PER PIN' and also has a maximum current supply for the whole Arduino.

You require a buffer like this.

[Arduino Relay Tutorial 5v Relay Arduino Interfacing | Maxphi Lab[/url

There are many examples if you google it

Daz.](Arduino Relay Tutorial 5v Relay Arduino Interfacing | Maxphi Lab)

Hi Daz

Thanks for confirming my thoughts

Regards

Ray

Daz1712:
You require a buffer like this.
Arduino Relay Tutorial 5v Relay Arduino Interfacing | Maxphi Lab

Very bad example.
Calculated kickback voltage from the relay coil on the collector of the transistor is >80volt,
which will eventually kill the LED (which zeners in reverse) and/or the transistor.
As a rule, don't ever trust sites where you have to include your details to leave comments.

OP: Is this a bare relay, or relay module (with more parts on the board).
Relay modules only take ~2mA from an Arduino pin, and get coil power from the 5volt pin.

Are you sure your relay module is safe for 240volt AC (most are not).
Leo..

Hi WAWA,

Sorry that the site is not what you feel is adequate, it was a quick google search as a base idea.

As the questioner had not asked for a full circuit but an inkling as to why it would not work i thought it would suffice.

As for not trusting sites that require you to leave details i guess that would include THIS SITE as well.

Legalities require nearly all sites to ask you for details.

As for right and wrong ways to do things at least the poster gave the basic idea for you to build on.

My belief is that anyone that takes things on the internet as gospel deserves what they get.

I do not suscribe to the idea that you should just answer a question but should guide the person to find their own answer. Who knows the poster may come up with a new way of doing things just because no one toldmthem 'it is done like this'.

Daz

Hi WAWA

I am not sure what you are getting at, i have asked for information / guidance from fellow enthusiasts, who are interested in similar stuff to myself. I have to trust the site, and it's members, the world would be a terribly more horrible place if no one trusted anyone, how on earth would we learn, you would never trust a book (written by a person) or a teacher, i hope people who use these types of sites, do not give out advise deliberately designed to injure or worse, we all have to start somewhere.

The relay i am using is as i first stated, a SONGLE, SRD-05VDC SL-C. It is Relay Module.

Regards

Ray

gresleyman:
The relay i am using is as i first stated, a SONGLE, SRD-05VDC SL-C. It is Relay Module.

That's contradictory: that Songle part number is for a bare relay, ie the "blue cube". The phrase "relay module" usually refers to a relay mounted on a board with some other gubbins like a transistor and maybe an indicator led or two, and often opto-isolation.

So still not clear what you have.... But if it's the relay on its own you definitely need a transistor and a flyback diode as a minimum.

(You a fan of A4 Pacifics?)

Hi,
Can you post a picture of your relay or a link to where you purchased it so we can check exactly what you have.

If it is a module PCB with screw terminals on the relay switch end and a group of pins on the other end marked like,
Vcc, IN1, gnd. Then you have a module with the required solid state switching, you just need to connect it to your controller in a specific way.
Like this;

If it is just a relay without a PCB just pins, then your relay needs to be approached in a different way.

Tom... :slight_smile:

Quick answer, is your relay by its self or mountd on a board with other components.

Daz

Hi All.

This is what i am using, jpeg attached.

Ray

songle.JPG

It’s hard to tell from that pic, but while the relay itself may be suitably rated, almost all the modules are NOT suitable for mains switching.
(Clearances, insulation, isolation etc)

Sorry, it’s the internet.

That's a relay MODULE, with all the drive parts included.
Just connect GND to Arduino ground, VCC to a 5volt pin, and IN to a digital output.
It will draw ~75mA from the 5volt pin, and about 2mA from the output pin (both safe).
Up to you to inspect if it's safe for 240AC.
Leo..

Found this one for sale and seems to indicate it is for control of small home appliances.

The photos show a cutout around the common pin to decrease the chance of arcing at high voltage.

your relay module?

Daz

Looks like the PCB switched side isolation is ok, but how do you mount it?

OP seems to have this relay module.

Leo..

Hi All.

I am right confused now after reading the different opinions, is this relay of mine safe to use on 240 vac mains electricity controlled by a Arduino Uno r3?

Regards

Ray

The relay itself is rated for 240volt.

The relay module (the board it's mounted on) is not.
They did not rate that to cover their asses.
It might be safe, it might be not.
YOU are the judge of that.
And safety also includes the wiring/case/etc that YOU make.
Leo..

I think (not having actualy worked with this relay MODULE) that you can use it.

Look at the circuit board and make sure they have not done anything stupid like run low voltage lines next to where the high voltage lines run and when you mount your relay make sure tha you put nothing conductive near those pins.

Be very carefull with your wires as 240v is unforgiving.

Having said that i would try it, i do not think that this relay MODULE would get smiles from your local electrician.

Without actual experience all you can do is google the module and seee what others have to say and what they have used it for.

Daz

Daz1712:
Without actual experience all you can do is google the module and seee what others have to say and what they have used it for.

NO. No, no, no. And no.
Online reviews of safety, mains etc are as reliable as (well… nothing)
e.g. Instructables = 90% waste of time

Where is this most recent wave of controlling high voltage from an arduino coming from? With an increase of voltage, the danger of arc flash follows. There are guidelines for spacing of relay contacts, PCB trace spacing, connections, etc. Without reviewing the spec of the 5vdc relay, I'm 200% certain something will catch fire - or worse, injury/death.