5v Relay - Switching Between 240v Supplies

Current wiring setup is attached below

I have been getting burnt/damaged relays from this wiring setup on the HOT/Brown 240v side

To begin with, I wasn't using the JD-VCC relay / isolation feature on a different board (didn't have the option). The relay would work for roughly a day (sometimes I flick the relay a couple of times to see if it was working correctly)

I go to active the relay after 24 hrs and doesn't work. I tried this for the remaining 2 relays on that board and had the same outcome for all.

Acquired a different board with JD-VCC relay. Did some researching around these forums and others, and discovered that it might be something to do with the interference from using Raspberry Pi 5V to power the relay.

Connected a separate 5V to JD-VCC. Get the same issue, Activated the HOT and Neutral relay - all is well, reverted back and the HOT end is stuck/won’t move. Seems it's the same issue as described above. The damaged relay does flick but not as loud as the work one

It states 240VAC 10A on the relays

Are these relay’s not suitable for the application I’m trying to achieve?
I'm assuming it's creating a switching inductive load problem

Please Let me know if there is better way and/or hardware of achieving this

#Enable Relay
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BOARD)
GPIO.setwarnings(False)
GPIO.setup(7, GPIO.OUT)
GPIO.output(7, GPIO.LOW)


#Disable Relay
#Same as above
GPIO.output(7, GPIO.HIGH)

Hello and welcome to for forum.
++Karma; // For managing to figure out on your first post the pain in the arse method of posting images so they can be seen without downloading them.

Please Let me know if there is better way and/or hardware of achieving this

Achieving what? You don't say.
You have 240VAC mains input.
You seem to have 240VAC from an inverter, but I'm not clear if that's the case.
You have a very, very dangerous output arrangement with live exposed pins on the connector to PCs.

Two things to clarify before I can help are:
What is the purpose of the circuit?
How do the relay contacts correspond to the connection on the board? I can just make out a partly obscured diagram on the top edge of the board. If the bit I can't see is as I think it might be then I don't think you have connected to correctly.

You have proven again, how crappy those Chinese relays are. Disassemble one and see!

Now, what is the purpose of what you are trying to do? How often do the relays need to switch and how long do they need to stay transferred? How much AC current do the contacts need to carry? All answers are important to selecting proper relays.

Paul

When I switch mains verse generator power 240 volts I use a contactor which is mechanically linked so there is never a possibility they can both be closed at the same time. I also use aux contacts on them to make sure both coils can never be energized at the same time. I also use contactors (relays) having contacts rated for the expected load and made to switch under those loads with an added margin.

When relay contacts start arc welding together it should be obvious that their rated switching current is being exceeded. Low cost cheap parts seldom meet their posted on the housing shell ratings. That is what it seems you are seeing happen.

Ron

I have been using the same tyoe of relays to control my 3d printer. Thats 240v, 1 amp max.
They lasted about a month! Thats not more than about 100 ops.

And yes your setup has some serious safety issues. Inadequate voltage level isolation is one of them.

On a lot of those relay the spacing on the board between the coil connections and the contact pins is too small to operate at mains voltage too !

PerryBebbington:
Hello and welcome to for forum.
++Karma; // For managing to figure out on your first post the pain in the arse method of posting images so they can be seen without downloading them.

Thank you!

PerryBebbington:
Achieving what? You don't say.
You have 240VAC mains input.
You seem to have 240VAC from an inverter, but I'm not clear if that's the case.
You have a very, very dangerous output arrangement with live exposed pins on the connector to PCs.

My apologies for leaving out the purpose of this:

I have a solar/battery/inverter setup (inverter side of the picture)
Throughout the day, I have the Mains power keeping the PC/appliances running, while the batteries recharge.
In the night I would switch from the mains to the inverters powered source

This diagram is not a representation of how it is physically setup (no live wiring is exposed), these components are in a closed boxed. Whenever I need to work on the wiring, everything is unplugged on both ends

PerryBebbington:
How do the relay contacts correspond to the connection on the board? I can just make out a partly obscured diagram on the top edge of the board. If the bit I can't see is as I think it might be then I don't think you have connected to correctly.

This should be the link to opening the bigger version of the image

Product itself TZT 5v 12v 1 2 4 6 8 channel relay module with optocoupler Relay Output 1 2 4 6 8 way relay module for arduino In stock|relay module|module relayrelay module 4 channel - AliExpress

Relay configuration: NC - COM - NO

Paul_KD7HB:
You have proven again, how crappy those Chinese relays are. Disassemble one and see!

Now, what is the purpose of what you are trying to do? How often do the relays need to switch and how long do they need to stay transferred? How much AC current do the contacts need to carry? All answers are important to selecting proper relays.

Indeed!

The relay's only need to switch at 8:30am and 6:00PM. 2 operations a day
It loads can vary. Normal use around 0.85A up to about 2.2A @ 240VAC

Watcher:
I have been using the same type of relays to control my 3d printer. That’s 240v, 1 amp max.
They lasted about a month! Thats not more than about 100 ops.

And yes your setup has some serious safety issues. Inadequate voltage level isolation is one of them.

I have one ready for my 3D printer, hearing from your experience what was a better relay for this?
Should the voltage level isolation be more then 5V? A board that supports 12V voltage isolation works better for this purpose?

Unfortunately, any usable industrial type relay will have a coil voltage of 12 volts or more. A solid state relay would be perfect, except there is no positive way to ensure the two AC sources will never be connected together.

Do you have room in your control box for a 12 volt power supply for the relays? Also will need a transistor to operate them from the Arduino.

The little cheap Chinese relays use hemispherical contacts, so alignment can be anything that will allow a contact. And the actual contact point will be a very tiny spot on the hemispheres, so current capacity is very low. My very first Arduino project used two of them switching 12 volt DC. They quickly failed, first open and then the second relay welded closed. Current was 4-5 amps.

Took the cover off with a hack saw. There was something on the contacts that were open. Don't know what it was. The welded were welded. In both cases, the contact alignment was sort of correct.

Proper relays will have either flat or slightly convex contacts with quite a large area of contact. They should be of open construction and may have a transparent case. So you can see the condition of the relay.

Paul

I have one ready for my 3D printer, hearing from your experience what was a better relay for this?
Should the voltage level isolation be more then 5V? A board that supports 12V voltage isolation works better for this purpose?

Regarding the 3d printer application,
For starters I would use a relay driver board with opto-isolation. ie the mains side is galvanically isolated from the low voltage arduino or raspberry Pi side.
There are lots of reliable relays out there that can do the job.

I ve been using TE Power Relay 12V OJ-SS-112LM by TE Connectivity for all my mains switching needs (home automation etc) I ve had relays of this type in operation for years now controlling all my house lights, curtains etc with no failure.

Note that this is a 12V coil relay.

This should be the link to opening the bigger version of the image
https://i.imgur.com/H5xqMdh.png

Product itself TZT 5v 12v 1 2 4 6 8 channel relay module with optocoupler Relay Output 1 2 4 6 8 way relay module for arduino In stock|relay module|module relayrelay module 4 channel - AliExpress

Relay configuration: NC - COM - NO

It's not the size of the image that's the problem, it's that I cannot see the printing on the top edge of the board properly as it is obscured by the angle of the photo. From what I can see I think the contacts are in the order:
COM - NC - NO
If that's correct then that explains your problem, you are connecting the 2 supplies together when the relay operates. Confirm with a meter what the order of the connections actually is.

Oh, have you realised that with a 240VAC supply if it happens that the 2 supplies happen to be in anti-phase then then the peak voltage across the contacts is approaching 700V?

Paul_KD7HB:
Do you have room in your control box for a 12 volt power supply for the relays? Also will need a transistor to operate them from the Arduino.

Not quite, I'll have to 3D print another box and work out how I want to go about this next

Paul_KD7HB:
The little cheap Chinese relays use hemispherical contacts, so alignment can be anything that will allow a contact. And the actual contact point will be a very tiny spot on the hemispheres, so current capacity is very low. My very first Arduino project used two of them switching 12 volt DC. They quickly failed, first open and then the second relay welded closed. Current was 4-5 amps.

Took the cover off with a hack saw. There was something on the contacts that were open. Don't know what it was. The welded were welded. In both cases, the contact alignment was sort of correct.

Proper relays will have either flat or slightly convex contacts with quite a large area of contact. They should be of open construction and may have a transparent case. So you can see the condition of the relay.

Thanks Paul this is good to know

Watcher:
Regarding the 3d printer application,
For starters I would use a relay driver board with opto-isolation. ie the mains side is galvanically isolated from the low voltage arduino or raspberry Pi side.
There are lots of reliable relays out there that can do the job.

I ve been using TE Power Relay 12V OJ-SS-112LM by TE Connectivity for all my mains switching needs (home automation etc) I ve had relays of this type in operation for years now controlling all my house lights, curtains etc with no failure.

Note that this is a 12V coil relay.

Indeed, the one I have standby for this doesn't have opto-isolation so I’ll have to search for another one like you have mentioned. Thank you

PerryBebbington:
It's not the size of the image that's the problem, it's that I cannot see the printing on the top edge of the board properly as it is obscured by the angle of the photo. From what I can see I think the contacts are in the order:
COM - NC - NO
If that's correct then that explains your problem, you are connecting the 2 supplies together when the relay operates. Confirm with a meter what the order of the connections actually is.

Ah, I see what you mean now; I was looking at the diagram at a slightly different way (the pivot in the middle rather than the pivot on the left side). The previous board I was working with had a different orientation
I shall swap the connections around, however the relay might weld itself after some time. I have another board to test this anyway

Updated to correct wiring*

PerryBebbington:
Oh, have you realised that with a 240VAC supply if it happens that the 2 supplies happen to be in anti-phase then then the peak voltage across the contacts is approaching 700V?

That is a good point I didn't think about that, I'm guessing there is no way of minimising this from happening in my configuration?

Arrowtron:
Ah, I see what you mean now; I was looking at the diagram at a slightly different way (the pivot in the middle rather than the pivot on the left side). The previous board I was working with had a different orientation
I shall swap the connections around, however the relay might weld itself after some time. I have another board to test this anyway

If it were mine I wouldn’t trust the printing I’d test to see if it is correct. If you don’t own a multimeter I suggest you get one as soon as possible! Even a cheap one will be very useful.

Hi,
Have you got a DMM to verify the relay output contacts BEFORE you connect anything to them?

"Other Appliances"????
What are they, any inductive or SMPS gear that will have a massive power factor influence on your switching.

In your situation can I suggest you purchase one of these mains monitors that lets you check appliances for current and power, along with power factor?


Tom.... :slight_smile:

In my opinion, you're problem is you are trying to create a DPDT function using two DPDT relays wires as DPST. You need to use a DPDT relay to select direction and use the relays you have in SERIES with both
the N.O. & N.C. outputs of the DPDT relay to control on/off. That way the direction is controlled upstream
by the DPDT relay and whether or not the motor is on is controlled downstream by the relays you have
wired as SPST. This ensures that only one direction input can receive power at a time.
I think you have overlooked the turn on and turn off time of the relays and are treating them as 'ideal'
relays that turn on and off instantaneously (which cannot happen).

Have you tried disconnecting one of the direction inputs of the motor at a time and energizing the connected
relay ? (one at a time ) to see if the relay is able to turn the motor on and off (without changing direction) ?

PerryBebbington:
If it were mine I wouldn't trust the printing I'd test to see if it is correct. If you don't own a multimeter I suggest you get one as soon as possible! Even a cheap one will be very useful.

relay energized
off - on - on

relay disabled
on - on - off

I might fix up the picture so people don't get mislead

TomGeorge:
"Other Appliances"????
What are they, any inductive or SMPS gear that will have a massive power factor influence on your switching.

2 computers, raspberry pi, speakers, monitors

A small UPS sits between above devices and the switching power sources (650VA/390W)

power factor generally without a PC on is ~67 @ 0.2 amp (relay would mostly switch at this time)
power factor with PC on ~85 @ 0.88 amp

raschemmel:
In my opinion, you're problem is you are trying to create a DPDT function using two DPDT relays wires as DPST. You need to use a DPDT relay to select direction and use the relays you have in SERIES with both
the N.O. & N.C. outputs of the DPDT relay to control on/off. That way the direction is controlled upstream
by the DPDT relay and whether or not the motor is on is controlled downstream by the relays you have
wired as SPST. This ensures that only one direction input can receive power at a time.
I think you have overlooked the turn on and turn off time of the relays and are treating them as 'ideal'
relays that turn on and off instantaneously (which cannot happen).

Yes I see what you are saying, yeah I think i have assumed that the turn off and on time for the relay would match perfectly but this isn't the case

I've had a search around for a DPDT setup or board but haven't had much luck, I have seen a couple cheap-ish looking boards but now inclined to buy them

raschemmel:
Have you tried disconnecting one of the direction inputs of the motor at a time and energizing the connected
relay ? (one at a time ) to see if the relay is able to turn the motor on and off (without changing direction) ?

Not quite sure what you mean by this, I'm not using a motor in my setup

Exactly how much current are you switching? There are relays designed to do exactly what you seem to be trying to do. You have two sources and a load and you want to switch between the two sources. I partially addressed that in post #3. You are switching 240 VAC so would that be 240 VAC between a hot and neutral as in used in Europe or would it be 240 VAC split phase as seen in the US and Canada? They even make AC transfer switches designed for use specifically with solar panel inverter systems. You may wish to try a Google of AC Transfer relay or AC transfer switch. They come in manual and automatic flavors. I can't speak for your location but here in the US the neutral is never switched, only the hots. You want a switching relay designed for what you wish to do.

Ron

Ron_Blain:
There are relays designed to do exactly what you seem to be trying to do. You have two sources and a load and you want to switch between the two sources. I partially addressed that in post #3. You are switching 240 VAC so would that be 240 VAC between a hot and neutral as in used in Europe or would it be 240 VAC split phase as seen in the US and Canada? They even make AC transfer switches designed for use specifically with solar panel inverter systems. You may wish to try a Google of AC Transfer relay or AC transfer switch. They come in manual and automatic flavors. I can't speak for your location but here in the US the neutral is never switched, only the hots. You want a switching relay designed for what you wish to do.

Thanks for your reply

Yes I've some searching for AC Transfer relay / AC transfer switch and found heaps of info and devices that people have setup. Just looking for a solution that could could be controlled via arduino

Appreciate everyone's help

There are plenty which can be driven by an Arduino or similar just by using a driver transistor or MOSFET and maybe a 12 VDC power supply. Why are you switching neutral? Depending on your location the neutral is not normally switched.

The nice part about using a transfer relay or switch designed for this application is it becomes impossible to have both sources selected at the same time. While it's not what you need I have a 240 VAC 100 Amp transfer switch laying here which is powered by 12 VDC and can easily be driven by an Arduino and single MOSFER.

Ron

Ron_Blain:
There are plenty which can be driven by an Arduino or similar just by using a driver transistor or MOSFET and maybe a 12 VDC power supply. Why are you switching neutral? Depending on your location the neutral is not normally switched.

Ok excellent

Switching neutral because I assume it's best to keep neutral on the same circuit? Or it doesn't matter?
circuit as in house mains 240v / inverter-generator 240v
Location is AUS

Ron_Blain:
The nice part about using a transfer relay or switch designed for this application is it becomes impossible to have both sources selected at the same time. While it's not what you need I have a 240 VAC 100 Amp transfer switch laying here which is powered by 12 VDC and can easily be driven by an Arduino and single MOSFER.

Yes I defiantly agree

What's your opinion on these ATS Switches? I'm having difficulty finding documentation on what each of the green plugs correspond to. I assume it can be controlled via a micro-controller