Go Down

Topic: Relays not switching to normally open teminal (Read 343 times) previous topic - next topic

lessmann

Jul 10, 2018, 03:06 pm Last Edit: Jul 10, 2018, 03:40 pm by lessmann
I have always connected my relays to the normally closed terminals as when "triggered" they only break the circuit but not actually connect over to the normally open terminal. I now have an instance where I don't want to chance a power failure with the relay which would result in the contacts being "on" all the time but just can't get any of my relays to actually close the normally open terminal.

Initially I thought that the relays aren't getting enough power as they are being powered by the microcontrollers but powering the relays with their own power supply doesn't' solve the problem.

I have spent hours googling this but no luck.


septillion

Can you post a schematic? And link to the relay (module?) used?

Relays can't be powered from an Arduino pin and always need there own power source (/amplification).
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

lessmann

#2
Jul 10, 2018, 03:41 pm Last Edit: Jul 10, 2018, 03:49 pm by lessmann
I have added an attachment to the original post with a basic concection diagram.
In this instance I am using a NODEMCU esp8266 microcontroller and a 5V relay (SRD-05VDC-SL-C)

They are both powered by their own seperate usb 5v power supply

Just to clarify, the relay works and switches on and off but I am forced to connect the 230V to the COM and NC as when I switch it "OFF" the NC is no longer closed but the NO doesn't connect either. It just disconnects all terminals instead of switching between NO and NC


septillion


That isn't a schematic, that is merely a block diagram...

And is it really a SRD-05VDC-SL-C or a breakout board with a SRD-05VDC-SL-C? Like said, a uC can't drive a relay directly.
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

lessmann

#4
Jul 10, 2018, 04:11 pm Last Edit: Jul 10, 2018, 05:10 pm by lessmann
sorry you are right, the relay is on a board. This board from amazon
https://www.amazon.co.uk/gp/product/B07CNRGJL6/ref=oh_aui_detailpage_o08_s00?ie=UTF8&psc=1
It's actually on an 8channel board but I'm only using one relay right now so I can diagnose the issue here

Schematics are like chinese calligraphy to me but if that is the only way to show how it's connected I'll have to try and draw one up, may take me a while....



lessmann

Would a fritzing diagram be helpfull?

FredScuttle

Did you, by chance, try one of the 7 unused relays?
Awww! Who needs an instruction manual to use a simple chain sa......

lessmann

Thanks FredScuttle

Yes I've had them all connected. I've also tried other relay boards in case this one is faulty, single, double etc.

This is a problem I've had many times before with other microcontrollers too so I suspect I am connecting things incorrectly and have done so for a long time.
Maybe I'm supposed to include a resistor somewhere or the relays need more than 5v power?

septillion

I would:

- Measure the voltage over the coil while activated

- Measure the contacts with a DMM. Maybe the printing is wrong and NC and COM are switched.
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

Paul__B

sorry you are right, the relay is on a board. This board from amazon
https://www.amazon.co.uk/gp/product/B07CNRGJL6/ref=oh_aui_detailpage_o08_s00?ie=UTF8&psc=1
It's actually on an 8channel board but I'm only using one relay right now so I can diagnose the issue here

Schematics are like Chinese calligraphy to me but if that is the only way to show how it's connected I'll have to try and draw one up, may take me a while....
Would a Fritzing diagram be helpful?
Referring to Fritzing diagrams on this forum is considered akin to swearing.  I believe Fritzing can however interchange between a layout diagram and a schematic, which would be useful, but I have actually never attempted to use Fritzing myself.

I trust you understand how these relay modules are wired:

The Arduino cannot supply 5 V power for a relay board.  You can supply power to the Arduino via its 5 V terminal (and ground) and you can with great care use the same regulated 5 V supply of sufficient capacity (current), wiring separate 5 V and ground connections from the supply to the Arduino and from the supply to the relay board.

Note that the ground to the relay board comes from the relay power supply and does not connect to the Arduino unless it happens also to be supplying the Arduino by that separate ground from the same power supply.  Similarly, the relay board is fed by the "JD-VCC" terminal (the link must be removed) from the relay power supply while the "Vcc" terminal connects to the Arduino 5 V and travels with the "INx" connections because it is the pair to those connections.  Supply and ground must travel together in every case.

lessmann

Quote
I trust you understand how these relay modules are wired:
Yes thanks, I am familiar with how the boards are wired up, I've made up my own before but it's powering these pre-made boards that appears to have been problematic for me





Quote
Note that the ground to the relay board comes from the relay power supply and does not connect to the Arduino unless it happens also to be supplying the Arduino by that separate ground from the same power supply.  Similarly, the relay board is fed by the "JD-VCC" terminal (the link must be removed) from the relay power supply while the "Vcc" terminal connects to the Arduino 5 V and travels with the "INx" connections because it is the pair to those connections.  Supply and ground must travel together in every case.
Thank you for this explanation, I have been connecting these babies incorrectly all this time and have since learned from another forum user about the JD-VCC and GND connections. As per your explanation above.
Thanks to the help from the same forum user I have now connected them like this....


I however have not solved my problem of the NO terminal closing, the NC terminal opens when triggered but the NO terminal stays open?

lessmann

This has now been resolved.
Quote
The Arduino cannot supply 5 V power for a relay board.  You can supply power to the Arduino via its 5 V terminal (and ground) and you can with great care use the same regulated 5 V supply of sufficient capacity (current), wiring separate 5 V and ground connections from the supply to the Arduino and from the supply to the relay board.

Note that the ground to the relay board comes from the relay power supply and does not connect to the Arduino unless it happens also to be supplying the Arduino by that separate ground from the same power supply.  Similarly, the relay board is fed by the "JD-VCC" terminal (the link must be removed) from the relay power supply while the "Vcc" terminal connects to the Arduino 5 V and travels with the "INx" connections because it is the pair to those connections.  Supply and ground must travel together in every case.
Once the additional power supply is connected to the JD-VCC and GND, as explained by Paul_B, it switches over correctly.

Thank you for all your help, I love this forum!

CaioLimaViana

I have added an attachment to the original post with a basic concection diagram.
In this instance I am using a NODEMCU esp8266 microcontroller and a 5V relay (SRD-05VDC-SL-C)

They are both powered by their own seperate usb 5v power supply

Just to clarify, the relay works and switches on and off but I am forced to connect the 230V to the COM and NC as when I switch it "OFF" the NC is no longer closed but the NO doesn't connect either. It just disconnects all terminals instead of switching between NO and NC


is using a nodemcu esp8266, correct ?. usually the relay modules are actuated by transistors in conjunction with optoisolators, you can power the module with 5v but you must power the control pins of the module with 5v if the module is designed as such. As far as I know the esp8266 has a logic level of 3.3v this could weakly trigger the optoisolator and consequently the relay

Paul__B

Is using a nodemcu esp8266, correct ?. usually the relay modules are actuated by transistors in conjunction with optoisolators, you can power the module with 5v but you must power the control pins of the module with 5v if the module is designed as such. As far as I know the esp8266 has a logic level of 3.3v this could weakly trigger the optoisolator and consequently the relay
Yes, that is a good point there.  I may have overlooked the fact that it was actually an ESP8266 in use.

In the event, it does not matter though.  The relay board contains a green LED whose threshold voltage is probably about 2.1 V, in series with the IR emitter (1.3 V) in the optocoupler, so the combined threshold voltage is indeed, around 3.3 V and the relay board may well not work if fed 3.3 V.

There is a trick however; since the input common to the relay board is the positive supply, if it is actually connected to the 5 V before the on-board 3.3 V regulator, then a 3.3 V HIGH will put 1.7 V across the LEDs which being well below the combined threshold, will definitely not actuate the optocoupler, but a LOW will apply the full 5 V.

The only concern that may be raised about this arrangement is that if the 5 V was being supplied but not the 3.3 V, the ESP8266 could be "phantom powered" through the LEDs (and cause spurious activation of the relay), but since the 3.3 V is supplied from the 5 V by the regulator, it is most unlikely to fail on its own.

Go Up