Go Down

Topic: Relay doesn't click but turns on. Is it normal? (Read 158 times) previous topic - next topic

dagoston93

Hi,

I am currently working on a circuit that is going to turn a light bulb on when i double clap.
So far everything is working, I manage to recognize claps, and turn an LED on whenever i double clap.
But when i am connecting the relay through an optocoupler and a transistor - of course mi have a flyback diode at the relay -, the relay behaves strange.
It turns on but doesn't make the clicking noise. When I directly connect the relay coil to 5V and GND it makes the clicking noise. And if i upload a code to the arduino and the IO pin goes low, it clicks, but when im using digitalWrite() or the port manipulation it doesn't click.
I measured the current across the coil, if directly connecting it was 62 mA, if through the arduino signal its 60mA. I hope that 2 mA doesn't make so much difference.
I guess this may happen because the arduino might change the voltage slower thus the build up and collapsing of the magnetic field is not so rapid, thus the relay switches on more smoothly.
At this point i only connected an LED and 5V to the switch of the relay.
It works reliable.
But my main question is that is it gonna be safe to connect the mains voltage to the relay if it behaves like that or might it become unreliable?
The relay is an SRD-05VDC-SL-C.
The datasheet says the nominal coil current is 71.4 but even if connect directly to 5V 62 mA flows, i hope that is not an issue.
And as the transistor i am using an irlz44n mosfet at the moment.

Thank you very much in advance for any help and advice.

Best wishes, Agoston.


septillion

Why an opto?

And a schematic might help.

Because you say:
And if i upload a code to the arduino and the IO pin goes low
a) Why would the output go low when you upload?
b) So a low will turn on the relay?
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

allanhurst

A circuit would be helpful.

The rise/fall time of an arduino output is <5nS, so I don't think that's the problem.

Allan

Southpark

#3
Apr 16, 2018, 11:49 pm Last Edit: Apr 17, 2018, 12:47 am by Southpark
That's kind of like the life story of user manuals and users
The relay is an SRD-05VDC-SL-C.
The datasheet says the nominal coil current is 71.4 but even if connect directly to 5V 62 mA flows, i hope that is not an issue.
Measure the coil resistance if possible. If something is well out of spec..... then see what happens if you use another module of identical variety .... to make sure everything at least conforms with specs.

Also..... use a multimeter to measure the input voltage across the coil .... to see if it is 5V DC.

dagoston93

Thank you very much everyone, just please ignore my post...
The relay works perfectly, i just didnt consider that the sound of my clap fades out the clicking of the relay...
But later i put my ear quite close and it clicks indeed.
Just dunno how could i be such a fool.

But again thanks for your intentions to help me.

Go Up