tdenson
Posts: 153
Joined: Tue May 13, 2014 1:51 pm

Mains relays that can be driven from the Pi

Wed May 17, 2017 2:17 pm

I currently make use of low voltage relays (the Songle ones that come mounted 2/4/8 to a board) that can be triggered from GPIO pins. However, I want to use mains relays and the only ones I can find that can be driven from the Pi are what I believe are known as non-latching i.e. when you remove power the circuit is opened - I want a power fail on the Pi to have no affect on the equipment connected to the relay. Can anyone help me with a source here please ?

pcmanbob
Posts: 7119
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Mains relays that can be driven from the Pi

Wed May 17, 2017 6:29 pm

Hi.

What you are looking for is a latching relay, I very much doubt you will find a ready built board with a latching relay on for the Pi.

You will need to source the latching relay that is suitable for the load you intend to put on it, you will then have to design and build your own driver circuit to interface it to the Pi. There are 2 ways to control latching relays, some have a single coil which you pulse to cause the relay to switch and some have 2 coils 1 to set and 1 to rest the relay, you need to be aware of this when choosing your relay and designing the driver circuit.

examples of latching relays http://uk.rs-online.com/web/c/relays/ge ... ng-relays/
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

tdenson
Posts: 153
Joined: Tue May 13, 2014 1:51 pm

Re: Mains relays that can be driven from the Pi

Wed May 17, 2017 6:33 pm

pcmanbob wrote:Hi.

What you are looking for is a latching relay
I think that's what I said in my OP.
I have decided for the time being to drive a non-latching relay from a low voltage latching relay. Bit clunky but will do the job.

pcmanbob
Posts: 7119
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Mains relays that can be driven from the Pi

Wed May 17, 2017 6:40 pm

tdenson wrote:
pcmanbob wrote:Hi.

What you are looking for is a latching relay
I think that's what I said in my OP.
I have decided for the time being to drive a non-latching relay from a low voltage latching relay. Bit clunky but will do the job.

You asked for a source, and I explained you would not find a ready made card and posted a link to latching relays on RS.
there are mains capable latching relays listed on there, with 12v and 24v coils which you could drive from a Pi.
so what more did you want ?
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

Moe
Posts: 230
Joined: Sun Jan 25, 2015 2:44 pm

Re: Mains relays that can be driven from the Pi

Wed May 17, 2017 9:32 pm

The 'normal' 2/4/8 relay modules I get from Ebay are rated to 250V AC and 10A, i..e mains. Am speculating here, and dont know your application, but couldn't you just use the N/C contacts and stick a resistor between the GPIO and ground to ensure the pin is pulled low when the Pi is off?
Submarine communication systems engineer and amateur robot enthusiast.

tdenson
Posts: 153
Joined: Tue May 13, 2014 1:51 pm

Re: Mains relays that can be driven from the Pi

Wed May 17, 2017 11:06 pm

pcmanbob wrote:
tdenson wrote:
pcmanbob wrote:Hi.

What you are looking for is a latching relay
I think that's what I said in my OP.
I have decided for the time being to drive a non-latching relay from a low voltage latching relay. Bit clunky but will do the job.

You asked for a source, and I explained you would not find a ready made card and posted a link to latching relays on RS.
there are mains capable latching relays listed on there, with 12v and 24v coils which you could drive from a Pi.
so what more did you want ?
But I do have a ready made card - albeit by ganging two ready made cards together. This seems much more preferable to me than your suggestion of "you will then have to design and build your own driver circuit to interface it to the P". But thanks anyway.

pcmanbob
Posts: 7119
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Mains relays that can be driven from the Pi

Thu May 18, 2017 9:21 am

I would be interested in seeing the link you were you purchased these ready made pcbs with latching relays.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

tdenson
Posts: 153
Joined: Tue May 13, 2014 1:51 pm

Re: Mains relays that can be driven from the Pi

Thu May 18, 2017 10:48 pm

pcmanbob wrote:I would be interested in seeing the link you were you purchased these ready made pcbs with latching relays.
The two below -

https://www.amazon.co.uk/gp/product/B01 ... UTF8&psc=1
https://www.amazon.co.uk/gp/product/B01 ... UTF8&psc=1

stderr
Posts: 2178
Joined: Sat Dec 01, 2012 11:29 pm

Re: Mains relays that can be driven from the Pi

Thu May 18, 2017 11:56 pm

tdenson wrote:
pcmanbob wrote:I would be interested in seeing the link you were you purchased these ready made pcbs with latching relays.
The two below -

https://www.amazon.co.uk/gp/product/B01 ... UTF8&psc=1
https://www.amazon.co.uk/gp/product/B01 ... UTF8&psc=1
While there are latching relay boards available online, I didn't see in either link where it said that those were latching. Random unbought example: https://www.aliexpress.com/item/IO25A01 ... 85820.html

If you are trying to deal with high currents, I believe what you are looking for is a contactor. That's the sort of thing you might buy locally so you can look the seller in the face and ascertain whether or not he thinks his source is getting him reliable parts. You still haven't said what you are planning to do so it is hard to guess at what you need.

tdenson
Posts: 153
Joined: Tue May 13, 2014 1:51 pm

Re: Mains relays that can be driven from the Pi

Fri May 19, 2017 7:22 am

stderr wrote:
tdenson wrote:
pcmanbob wrote:I would be interested in seeing the link you were you purchased these ready made pcbs with latching relays.
The two below -

https://www.amazon.co.uk/gp/product/B01 ... UTF8&psc=1
https://www.amazon.co.uk/gp/product/B01 ... UTF8&psc=1
While there are latching relay boards available online, I didn't see in either link where it said that those were latching. Random unbought example: https://www.aliexpress.com/item/IO25A01 ... 85820.html

If you are trying to deal with high currents, I believe what you are looking for is a contactor. That's the sort of thing you might buy locally so you can look the seller in the face and ascertain whether or not he thinks his source is getting him reliable parts. You still haven't said what you are planning to do so it is hard to guess at what you need.
The point is, that whatever the terminology, they do the job I need

bradosia
Posts: 5
Joined: Fri May 19, 2017 8:45 pm

Re: Mains relays that can be driven from the Pi

Fri May 19, 2017 10:08 pm

BTW you may need an RC snubber on the circuit. I had a huge issue with EMI causing my arduino and PI to reset every time the relay with a 1 amp load was flipped off.

tdenson
Posts: 153
Joined: Tue May 13, 2014 1:51 pm

Re: Mains relays that can be driven from the Pi

Sat May 20, 2017 8:31 am

bradosia wrote:BTW you may need an RC snubber on the circuit. I had a huge issue with EMI causing my arduino and PI to reset every time the relay with a 1 amp load was flipped off.
I've used these relays for a few years now and never seen any spurious triggering.It's all fairly low power stuff. What I do with them is use the Pi to remotely power cycle network devices such as routers.

bradosia
Posts: 5
Joined: Fri May 19, 2017 8:45 pm

Re: Mains relays that can be driven from the Pi

Sat May 20, 2017 4:39 pm

tdenson wrote:
bradosia wrote:BTW you may need an RC snubber on the circuit. I had a huge issue with EMI causing my arduino and PI to reset every time the relay with a 1 amp load was flipped off.
I've used these relays for a few years now and never seen any spurious triggering.It's all fairly low power stuff. What I do with them is use the Pi to remotely power cycle network devices such as routers.
I think it was because I mounted the relay board on top of the rasberry PI. Is your relay board a few inches from the Rasberry pi?

Also i found this board:
http://wiki.seeed.cc/Grove-2-Coil_Latching_Relay/
but the coil voltage is 5V. (rasberry pi GPIO pins are 3.3V)

You are going to need to find a dual coil 3V coil latching relay board. Two of the rasberry pi GPIO pins are needed to control it. One to latch and one to unlatch. You can also use the board I linked, but you will need to step up 3.3V to 5V.

You can also create your own board with these relay parts:
https://www.digikey.com/products/en/rel ... ageSize=25

Moe
Posts: 230
Joined: Sun Jan 25, 2015 2:44 pm

Re: Mains relays that can be driven from the Pi

Sun May 21, 2017 10:11 pm

What an odd thread. Mains relays driven by latching relays, that aren't actually latching but will easily handle mains.....

Just use a damned relay. It's not rocket surgery.
Submarine communication systems engineer and amateur robot enthusiast.

Martin Frezman
Posts: 1020
Joined: Mon Oct 31, 2016 10:05 am

Re: Mains relays that can be driven from the Pi

Sun May 21, 2017 10:31 pm

It's not rocket surgery...
Love that phrase. It's not brain science, either.
If this post appears in the wrong forums category, my apologies.

tdenson
Posts: 153
Joined: Tue May 13, 2014 1:51 pm

Re: Mains relays that can be driven from the Pi

Mon May 22, 2017 8:01 am

Moe wrote:What an odd thread. Mains relays driven by latching relays, that aren't actually latching but will easily handle mains.....

Just use a damned relay. It's not rocket surgery.
That's what I thought when I started this thread, it's just a relay :) However, my proposed solution of putting two relays in series actually works very well for me. I am building a box that will be replicated many times. Part of the design involves redundancy and I have 8 pairs of relays driven by a pair of Pis. Given that a mains relay module ready built cost ten times as much as a low voltage one, I am actually saving cost as I only need one per switched circuit. I also have flexibility in the final wiring and can determine which of the 8 relays switches mains.

Moe
Posts: 230
Joined: Sun Jan 25, 2015 2:44 pm

Re: Mains relays that can be driven from the Pi

Mon May 22, 2017 10:47 pm

That's what I don't understand; the 'cheap' one will do 'mains' at up to 10A on its own. I use a cheap one in series with an automotive one because I need to switch a 24V 60A supply, but you don't have that problem ... unless you're switching more than 10A per relay?
Submarine communication systems engineer and amateur robot enthusiast.

tdenson
Posts: 153
Joined: Tue May 13, 2014 1:51 pm

Re: Mains relays that can be driven from the Pi

Tue May 23, 2017 12:30 pm

Moe wrote:That's what I don't understand; the 'cheap' one will do 'mains' at up to 10A on its own. I use a cheap one in series with an automotive one because I need to switch a 24V 60A supply, but you don't have that problem ... unless you're switching more than 10A per relay?
By "the cheap one" do you mean the link to Aliexpress ? I would still need to build driving circuitry, my current solution is off the shelf

JohnAB
Posts: 5
Joined: Tue May 23, 2017 7:35 pm
Location: Lynnwood, WA, USA
Contact: Website

Re: Mains relays that can be driven from the Pi

Tue May 23, 2017 8:48 pm

Hi.
Do not suffer in searches! Use self-lathing scheme like in picture: https://drive.google.com/open?id=0BxzsX ... URvRm9mTlE

Watch my blog: https://www.camdec.net/blog
Maybe you find some interesting for you!

Moe
Posts: 230
Joined: Sun Jan 25, 2015 2:44 pm

Re: Mains relays that can be driven from the Pi

Sat May 27, 2017 11:08 pm

By "the cheap one" do you mean the link to Aliexpress ?
Any of them. They all use the same 250V 10A relay. It looks to me that you're using a 250V 10A relay to control another 250V 10A relay, which makes no sense. On balance, I think I must be completely misunderstanding this thread :(
Submarine communication systems engineer and amateur robot enthusiast.

pcmanbob
Posts: 7119
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Mains relays that can be driven from the Pi

Sun May 28, 2017 10:05 am

Moe wrote:
By "the cheap one" do you mean the link to Aliexpress ?
Any of them. They all use the same 250V 10A relay. It looks to me that you're using a 250V 10A relay to control another 250V 10A relay, which makes no sense. On balance, I think I must be completely misunderstanding this thread :(
Hi Moe.

I think there is a lot of confusion on this thread.

the first post asked about a latching relay because the poster wanted relay to stay set even if pi or power failed.

I pointed out you cant get ready made latching relay boards for the pi and you would need to build own driver circuit,
but they did not want to do that so they are now using 2 relay broads one driving the other but I cant see how they are achieving a latching relay from that.

that's how I read it any way.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

tdenson
Posts: 153
Joined: Tue May 13, 2014 1:51 pm

Re: Mains relays that can be driven from the Pi

Sun May 28, 2017 4:12 pm

I never asked about a latching relay, all I ever wanted was a relay which switches on/off when you apply a 3V input (from Pi) and switches off/on when you take it back to GND. Seems very simple, that's the basic function of a relay - current through a coil causes the contacts to switch. In fact I'd never even heard of latching relays until this thread.
I have no problem when I want to switch low voltages, there are ready made modules with multiple relays on the board, each with 3 output connections supporting normally open and normally closed. However, my problem came when I tried to find the same functionality but switching mains. The only ones I could find off the shelf are normally open, whereas I want normally closed - so that if power fails on the device feeding the relay it doesn't cause power to fail on the circuit being switched.
However, I can find mains relays supporting normally closed that can be driven by a 5V input. Thus, I am switching 5V from a low voltage relay output. I know this seems a bit OTT, I could use a simple transistor circuit to achieve the same effect, however I happen to have surplus low voltage relays already in the box, and there is also another benefit in that it simplifies the driving software - the way the switched outputs are linked to the logical device numbers can be made transparent by some simple rewiring inside the box.

pcmanbob
Posts: 7119
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Mains relays that can be driven from the Pi

Sun May 28, 2017 5:38 pm

Hi.

I think were the confusion came from is in this line from your original post
I want a power fail on the Pi to have no affect on the equipment connected to the relay
I took that to mean you did not want the relay to switch off in the event of the pi power failing, which is what a latching relay would provide.

it seems that what you really wanted was a relay with a normally closed contact so that when the relay was off the power would be connected to your equipment.. and you switched the relay on to switch the equipment off

sorry for the confusion.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

tdenson
Posts: 153
Joined: Tue May 13, 2014 1:51 pm

Re: Mains relays that can be driven from the Pi

Sun May 28, 2017 6:12 pm

pcmanbob wrote:Hi.


it seems that what you really wanted was a relay with a normally closed contact so that when the relay was off the power would be connected to your equipment.. and you switched the relay on to switch the equipment off
.
Yes

Moe
Posts: 230
Joined: Sun Jan 25, 2015 2:44 pm

Re: Mains relays that can be driven from the Pi

Sun May 28, 2017 10:40 pm

I have no problem when I want to switch low voltages, there are ready made modules with multiple relays on the board, each with 3 output connections supporting normally open and normally closed. However, my problem came when I tried to find the same functionality but switching mains.
Maybe you could specify what you mean by 'mains'?
Submarine communication systems engineer and amateur robot enthusiast.

Return to “Automation, sensing and robotics”