andymac37
Posts: 5
Joined: Fri Apr 24, 2015 4:21 pm

Raspberry Pi Dry Contact for Curtain Control

Fri Apr 24, 2015 4:28 pm

Hello,

I'm hoping to automate my home theatre curtain using a Pi instead of an expensive ($50) Insteon home automation controller.

Just wondering if the Raspberry Pi GPIO pins meet the requirements as specified to me by the manfucaturer:

"This motorized kit can be easily integrated into any automation control systems or controllers. It takes three relay (dry type) inputs and share common and no external power needed. Four wires: OPEN, CLOSE, STOP, and COM. The wire can be wired into telephone plug 6P4C RJ14 or RJ25 6P6C. The plug can be directly plugged into our motor manual port. Any controller with dry outputs can directly control the motors, or convert these outputs into relay type interfaces, and then control our motors.
Its remote also can be learned by most universal learning remote. Motor also accept 38KHz coded IR signal."

Can I cut a phone cord and hook up the wires to the wires sitting on the GPIO pins or would I need another part?

Thanks in advance.

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2030
Joined: Thu Jul 11, 2013 2:37 pm

Re: Raspberry Pi Dry Contact for Curtain Control

Fri Apr 24, 2015 7:07 pm

"Dry" contacts have a specific meaning in Old English* but in modern parlance they typically mean an isolated set of contacts with an external drive mechanism.

GPIO pins do not meet this requirement. You either need to drive an electromechanical relay from the GPIO (which requires interface electronics) which can then serve dry contacts to the device or you can probably get away with an optocoupler-based "contact". Search around for relay driving from a Pi GPIO.


*not wetted with mercury - mercury being used to prevent contact pitting due to arcs as the mercury would flow around and fill the gap between contact surfaces.
Rockets are loud.
https://astro-pi.org

andymac37
Posts: 5
Joined: Fri Apr 24, 2015 4:21 pm

Re: Raspberry Pi Dry Contact for Curtain Control

Fri Apr 24, 2015 10:52 pm

I do apologize. I'm a programmer and consider myself advanced on computers, but I guess I'm pretty amateur at this.

I understand the concept of the octocoupler, where it changes the electricity into a pulse using an LED and a photosensitive piece. I'm looking for a really easy way of doing this, so I'm wondering if a couple of these might do the trick, considering I need "It takes three relay (dry type) inputs and share common and no external power needed. Four wires: OPEN, CLOSE, STOP, and COM."

http://www.seeedstudio.com/wiki/Grove_-_Dry-Reed_Relay
http://www.seeedstudio.com/depot/Grove- ... -1412.html

If I understand this right... I could hook these up to the Pi's GPIO and I could cut a telephone cable and hook up the wires to these to drive them as a dry relay?

andymac37
Posts: 5
Joined: Fri Apr 24, 2015 4:21 pm

Re: Raspberry Pi Dry Contact for Curtain Control

Fri Apr 24, 2015 11:33 pm

Here is a diagram from the company to help:

Image

drgeoff
Posts: 9595
Joined: Wed Jan 25, 2012 6:39 pm

Re: Raspberry Pi Dry Contact for Curtain Control

Sat Apr 25, 2015 12:00 am

The $50 Insteon may be expensive for what it contains but surely a RPi plus PSU plus case plus interface gubbins isn't going to be much, if at all, cheaper.

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: Korea

Re: Raspberry Pi Dry Contact for Curtain Control

Sat Apr 25, 2015 12:32 am

drgeoff wrote:The $50 Insteon may be expensive for what it contains but surely a RPi plus PSU plus case plus interface gubbins isn't going to be much, if at all, cheaper.
Maybe he already has the Pi (to drive the home cinema).

Maybe he doesn't want to spend $50 on a closed-source single-purpose box.

User avatar
davidcoton
Posts: 3934
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: Raspberry Pi Dry Contact for Curtain Control

Sat Apr 25, 2015 9:05 am

andymac37 wrote:I do apologize. I'm a programmer and consider myself advanced on computers, but I guess I'm pretty amateur at this.

I understand the concept of the octocoupler, where it changes the electricity into a pulse using an LED and a photosensitive piece. I'm looking for a really easy way of doing this, so I'm wondering if a couple of these might do the trick, considering I need "It takes three relay (dry type) inputs and share common and no external power needed. Four wires: OPEN, CLOSE, STOP, and COM."

http://www.seeedstudio.com/wiki/Grove_-_Dry-Reed_Relay
http://www.seeedstudio.com/depot/Grove- ... -1412.html

If I understand this right... I could hook these up to the Pi's GPIO and I could cut a telephone cable and hook up the wires to these to drive them as a dry relay?
The relays you have found are not designed for a Pi, although they may work. The specifications do not give enough detail to be certain, nor do they give the wiring details required. On the motor side, I suspect you are in the USA, so even mains voltage is okay (but I wouldn't want mains on telephone cable!) Again, the curtain controller specs do not quote voltage or current requirements so the design cannot be checked.

If it were my project, I would:
1) find the voltage and current requirements of the controller
2) Find a Pi-specific relay board (probably a four-relay board) with matching or better ratings

There are several Pi suppliers who will stock something suitable, maybe if you list your location someone can recommend a local supplier.
Signature retired

andymac37
Posts: 5
Joined: Fri Apr 24, 2015 4:21 pm

Re: Raspberry Pi Dry Contact for Curtain Control

Wed Apr 29, 2015 9:43 pm

Hi,

I'm in Winnipeg, Canada.

I wrote PHP programming to control the home theatre. It glues a web app between the Insteon network, video player, etc. I have a spare Raspberry Pi lying around that I want to put back in service, and $50 for the brand name device seems pricey.

As I'm using a tower machine to run my PHP for the home theatre, I'm trying to come up with a very simple way to add the curtain into the mix and though the Pi would be perfect.

I'm not sure what you mean about mains through the phone line- I'm pretty sure there can't be power going through it to the motor. I'm wondering if something as simple as a phone modem in the tower could send a pulse through the phone line, then.

User avatar
davidcoton
Posts: 3934
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: Raspberry Pi Dry Contact for Curtain Control

Wed Apr 29, 2015 10:43 pm

andymac37 wrote: I'm not sure what you mean about mains through the phone line- I'm pretty sure there can't be power going through it to the motor. I'm wondering if something as simple as a phone modem in the tower could send a pulse through the phone line, then.
If the motor controller requires "dry" contacts, the power is coming from that motor end. Unless you know the voltage (I agree mains is unlikely but you need to be certain) and current specified by the motor control manufacturer you cannot specify a suitable relay.

A phone modem is almost certainly not suitable. The manufacturers may use a phone connector but it is NOT a phone signal! Nor does it want a "pulse" -- it wants dry contacts. Three of them. Three relays, driven (directly or indirectly) from the Pi's GPIO. The easy way is with a 4-relay board designed for a Pi, but nobody can tell from the info given whether any particular model is suitable.
Signature retired

andymac37
Posts: 5
Joined: Fri Apr 24, 2015 4:21 pm

Re: Raspberry Pi Dry Contact for Curtain Control

Fri May 29, 2015 11:16 pm

I'm sorry. I really appreciate the help, but the information I've shared is all the manufacturer has for me.

johndough
Posts: 254
Joined: Sun Jan 13, 2013 2:00 pm

Re: Raspberry Pi Dry Contact for Curtain Control

Sat May 30, 2015 8:11 am

andymac37 wrote:I'm sorry. I really appreciate the help, but the information I've shared is all the manufacturer has for me.
Hi

I would attempt to measure the voltage on the control lines, and expect it to be 12 V DC.

But without more info it is not possible to be certain.

User avatar
davidcoton
Posts: 3934
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: Raspberry Pi Dry Contact for Curtain Control

Sat May 30, 2015 8:51 am

johndough wrote:
andymac37 wrote:I'm sorry. I really appreciate the help, but the information I've shared is all the manufacturer has for me.
Hi

I would attempt to measure the voltage on the control lines, and expect it to be 12 V DC.

But without more info it is not possible to be certain.
Then the second test (assuming that the voltage is DC at a safe (<50V) level) is to measure the current that flows when the circuit is closed. From the voltage measurement, you should know which wire is positive therefore the other is negative. Set your meter to its highest current range, connect it across the two wires with the correct polarity (expect the controller to respond with the appropriate action :o ). Repeat the test with lower current ranges of the meter until you get a reading above zero.

Now you know the voltage and current ratings required for the relays. BTW, if the controller supplier can't do better than that (lack of) information, I would not deal with them again.
Signature retired

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: Korea

Re: Raspberry Pi Dry Contact for Curtain Control

Sat May 30, 2015 10:17 am

Good grief! Of course it's safe! You do not build a product that can have dangerous voltages on exposed connectors! The socket in the controller is not touch-safe, so a person could put their finger in and get a shock- except they won't. Or they might touch the contacts on the free and of the cable. The specified wiring is very small gauge, and would melt or burst into flames if a large current was passed through it- which it won't.

The cheapy 5V relays from Sainsmart (or whoever else is building them) will be just fine.

User avatar
davidcoton
Posts: 3934
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: Raspberry Pi Dry Contact for Curtain Control

Sat May 30, 2015 4:54 pm

ame wrote:Good grief! Of course it's safe! .
NEVER assume that. I'm an electrician. I've seen a (supposedly professionally installed) care home call system that needed mains at a remote part of the building. It was routed down telephone cable, and had a 4 gang outlet on the end. Which the cleaner could use...

Safety of existing electrical wiring, or new unknown products without adequate instructions, must ALWAYS be proved before working on the system. There may be faults, mistakes, or ignorant idiots that render any given wiring dangerous. In this case, I would expect a control voltage of up to 24V, do the measurements (carefully) to see if that is true or not. Do the second test to find out the current switching requirement. THEN specify a relay board, knowing that it IS safe.

Relays with contacts rated 5V may not be a good idea if the voltage is more than 5V -- but I suspect you are referring to the coil voltage, which is a different matter.

ame, even more importantly, please do not post replies that could lead others into danger. It is far better to spell out properly safe ways of proceeding which turn out to be over-cautious, than making an assumption that later puts someone else's life at risk.
Signature retired

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: Korea

Re: Raspberry Pi Dry Contact for Curtain Control

Sat May 30, 2015 11:52 pm

davidcoton wrote:
ame wrote:Good grief! Of course it's safe! .
NEVER assume that. I'm an electrician. I've seen a (supposedly professionally installed) care home call system that needed mains at a remote part of the building. It was routed down telephone cable, and had a 4 gang outlet on the end. Which the cleaner could use...
So, it was installed by an electrician? What's your point?
Safety of existing electrical wiring, or new unknown products without adequate instructions, must ALWAYS be proved before working on the system. There may be faults, mistakes, or ignorant idiots that render any given wiring dangerous. In this case, I would expect a control voltage of up to 24V, do the measurements (carefully) to see if that is true or not. Do the second test to find out the current switching requirement. THEN specify a relay board, knowing that it IS safe.

Relays with contacts rated 5V may not be a good idea if the voltage is more than 5V -- but I suspect you are referring to the coil voltage, which is a different matter.

ame, even more importantly, please do not post replies that could lead others into danger. It is far better to spell out properly safe ways of proceeding which turn out to be over-cautious, than making an assumption that later puts someone else's life at risk.
I am not an electrician, but I am also not an idiot. Now that you are done, I'll point out that the CL200T motor is powered by a 12V 12W power supply. The power is provided by a mains plug-pack.

User avatar
davidcoton
Posts: 3934
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: Raspberry Pi Dry Contact for Curtain Control

Sun May 31, 2015 10:45 am

ame wrote: So, it was installed by an electrician? What's your point?
My point is exactly what I said. Never assume that an electrical installation is what you expect, and therefore safe. Always check.
I am not an electrician, but I am also not an idiot. Now that you are done, I'll point out that the CL200T motor is powered by a 12V 12W power supply. The power is provided by a mains plug-pack.
I do not for a moment think you are an idiot, and did not intend anyone to assume that. I think the guy who put mains down a phone cable was an idiot.

If the system is powered by a 12V power pack, good. It is indeed probable that the contacts are required to switch 12V. So contacts rated at 5V are not a good idea, 12V is required, and the switching current should still be established. It would have been helpful if that information had been in the thread earlier. The principles given for approaching an unknown interface are still valid.
Signature retired

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: Korea

Re: Raspberry Pi Dry Contact for Curtain Control

Mon Jun 01, 2015 4:51 am

davidcoton wrote:If the system is powered by a 12V power pack, good. It is indeed probable that the contacts are required to switch 12V. So contacts rated at 5V are not a good idea, 12V is required, and the switching current should still be established. It would have been helpful if that information had been in the thread earlier. The principles given for approaching an unknown interface are still valid.
These are the relays to which I was referring:

http://www.amazon.com/SainSmart-4-CH-4- ... 0KFYWX9CPY

The coil is 5V @ 20mA, the contacts are 250Vac@10A or 30Vdc@10A

The power supply was not mentioned earlier in the thread, but a quick google is all that is necessary to find it.

User avatar
davidcoton
Posts: 3934
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: Raspberry Pi Dry Contact for Curtain Control

Mon Jun 01, 2015 8:17 am

ame wrote:
These are the relays to which I was referring:

http://www.amazon.com/SainSmart-4-CH-4- ... 0KFYWX9CPY

The coil is 5V @ 20mA, the contacts are 250Vac@10A or 30Vdc@10A
OK, with the specs in place, that looks suitable. Just one minor problem -- a 5V input relay board will not work if connected directly to the RPi GPIO. It will need a small driver circuit to convert the 3V3 GPIO to a 5V drive for that board. Better to find something similar that is designed for direct connection to the RPi
Signature retired

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: Korea

Re: Raspberry Pi Dry Contact for Curtain Control

Mon Jun 01, 2015 8:38 am

Well, these boards keep popping up, and some people have had success with them directly connected to GPIOs (active low). They use the 5V supply from the Pi to drive the coil, and GPIO for the opto-isolators.

The manufacturer recommends a buffer transistor:

https://docs.google.com/file/d/0B5-HND9 ... VyODA/edit

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: Korea

Re: Raspberry Pi Dry Contact for Curtain Control

Mon Jun 01, 2015 11:03 am

Actually, the problem with those relay boards is that the LED indicators are in series with the optoisolators and drop too much voltage. They need to be shorted out. No transistor buffers necessary.

Return to “Advanced users”