Help! GPio, 8 relays...

sallytech0103
Posts: 2
Joined: Monday 28 December 2015 10:06
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Help! GPio, 8 relays...

Post by sallytech0103 » Tuesday 26 July 2016 8:48

I had a same problem in my project. I resolved it from this discussion thanks.

Some information about relays.

Image

guantolento
Posts: 172
Joined: Saturday 01 October 2016 14:48
Target OS: Raspberry Pi
Domoticz version: LastBeta
Location: Italy BG
Contact:

Re: Help! GPio, 8 relays...

Post by guantolento » Friday 30 December 2016 19:33

good evening,
just a question. i can take the 8 ch reley board and install at about 20 mt to rpi2? i connect with an alarm cable 10x0.22+2x0.50.
what do you think about ?
Master (pi3) - MB sensors + Dummy + Sysfs gpio + 1 NodOn MSP-3 + 1 Aeotec DSB28 Energy Meter + 3 Danfoss RS Room + 7 Danfoss Z Thermostat + 1 Swiid Inter + 9 FGS222
Slave01 (pi2) - MB sensors + Dummy + Weather Underground + 2 FGS223 + 1 FGWPE/F

guantolento
Posts: 172
Joined: Saturday 01 October 2016 14:48
Target OS: Raspberry Pi
Domoticz version: LastBeta
Location: Italy BG
Contact:

Re: Help! GPio, 8 relays...

Post by guantolento » Friday 30 December 2016 19:43

sallytech0103 wrote:I had a same problem in my project. I resolved it from this discussion thanks.

Some information about relays.

Image
how you resolve the problem ? with hardware or software ????
Master (pi3) - MB sensors + Dummy + Sysfs gpio + 1 NodOn MSP-3 + 1 Aeotec DSB28 Energy Meter + 3 Danfoss RS Room + 7 Danfoss Z Thermostat + 1 Swiid Inter + 9 FGS222
Slave01 (pi2) - MB sensors + Dummy + Weather Underground + 2 FGS223 + 1 FGWPE/F

hill2button
Posts: 12
Joined: Friday 17 February 2017 23:34
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: Belgium
Contact:

Re: Help! GPio, 8 relays...

Post by hill2button » Tuesday 28 February 2017 0:42

Hi all,

I'm a bit lost. I have a similar relay to the one described above. I have read all posts but still I can't figure it out.

My domoticz setup file (the end) looks like this:

esac

:
#Run export GPIO Raspberry
/usr/bin/gpio export 17 out
sudo sh -c 'echo 17 > /sys/class/gpio/export'
sudo sh -c 'echo high > /sys/class/gpio/gpio17/direction'
sudo sh -c 'echo 1 > /sys/class/gpio/gpio17/active_low'


I am trying to get gpio 17 to work. Now, doing this works, the direction is correct in Domoticz. However, it clicks the relay on-off at bootup, which is not what I want... I have the feeling it has something to do with the boot sequence. Or, may it first provides 5V to the relay, with a dead gpio pin, and moments later puts the gpio pin in the high state?

Also, I wonder, is

/usr/bin/gpio export 17 out
sudo sh -c 'echo 17 > /sys/class/gpio/export'

the same command? Is this double?

Thanks for the help!

hill2button
Posts: 12
Joined: Friday 17 February 2017 23:34
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: Belgium
Contact:

Re: Help! GPio, 8 relays...

Post by hill2button » Tuesday 28 February 2017 22:50

I needed to return one item of my last order, so I decided to include this relay in the return.

If anyone has a suggestion on a active-high relay: shoot! Now that I know what to look for it seems I can only find active-low relays...

RayAmsterdam
Posts: 189
Joined: Sunday 11 January 2015 17:40
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Help! GPio, 8 relays...

Post by RayAmsterdam » Tuesday 28 February 2017 23:02

I posted the solution earlier in this topic: viewtopic.php?f=32&t=6050&p=39401#p39401

hill2button
Posts: 12
Joined: Friday 17 February 2017 23:34
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: Belgium
Contact:

Re: Help! GPio, 8 relays...

Post by hill2button » Tuesday 28 February 2017 23:04

RayAmsterdam wrote:I posted the solution earlier in this topic: viewtopic.php?f=32&t=6050&p=39401#p39401
I appreciate that, but I cannot solder. I'm looking for an out-of-the-box solution. But it seems active-high 5V relays are hard to find...

Lebo2d9
Posts: 134
Joined: Tuesday 06 September 2016 20:39
Target OS: Raspberry Pi
Domoticz version: L stab
Location: Belgium
Contact:

Re: Help! GPio, 8 relays...

Post by Lebo2d9 » Saturday 01 April 2017 14:57

Hi,

Did someone ever tested the relay interfacing with a 74HC240 in between? 8 port invering buffer.

Kind regards
Domoicz on RPI3 (wifi) directly connected 3x ds18b20 for CV temp, Evohome (9 zone), 1 remote 220V switch based on ESP-12. RFXtrx433E, 16x AMST-606, 5 Somfy RTS motors
Domoticz on RPI3(wifi) as slave for terraruim control
More to come

gohan
Posts: 37
Joined: Tuesday 14 February 2017 0:42
Target OS: Windows
Domoticz version:
Contact:

Re: Help! GPio, 8 relays...

Post by gohan » Sunday 21 May 2017 0:49

How did you guys made the active_low to work? I can't find a way as setting it either way makes no changes. I gave the GPIO esported correctly and they don't turn on at boot, so that part is fine.

trackerj
Posts: 6
Joined: Tuesday 06 December 2016 9:43
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Help! GPio, 8 relays...

Post by trackerj » Monday 22 May 2017 19:50

hill2button wrote:
RayAmsterdam wrote:I posted the solution earlier in this topic: http://www.domoticz.com/forum/viewtopic ... 401#p39401
I appreciate that, but I cannot solder. I'm looking for an out-of-the-box solution. But it seems active-high 5V relays are hard to find...
For a simple out-of-the-box solution, you have also this board, 8xRelays, proper driver, can be drive by RaspberryPi without problems directly (version without ESP8266 module installed using the nEXT bus connector) or thru network using the onboard ESP8266 module:
https://www.tindie.com/products/nEXT_EV ... utomation/

You have also plenty of videos, tutorials and related docs.

mjdb
Posts: 87
Joined: Thursday 12 January 2017 14:38
Target OS: Raspberry Pi
Domoticz version: all beta
Location: NL - Pijnacker
Contact:

Re: Help! GPio, 8 relays...

Post by mjdb » Tuesday 23 May 2017 10:50

For what it is worth...

To use Domoticz with relays you could also use an Arduino with a relay-card.
It can work stand-alone and independent of Domoticz, but you can send On/Off commands and monitor the status from Domoticz.

I made a 4 relay switch viewtopic.php?f=56&t=17656

When you leave out the "hardware" part, you can use the electronics and the program for your relay-project.
Box1DecentWires.jpg
Box1DecentWires.jpg (44.83 KiB) Viewed 974 times
You can change the program very easy from 4 to 8 relays.
Box2WithDecentWires.jpg
Box2WithDecentWires.jpg (38.97 KiB) Viewed 973 times
- - - - - - - - - - -
2 x Domoticz on Raspberry Pi; 2 x RFXtrx433; Aeotec Z-Stick
KlikAanKlikUit ICS-2000 as Relay
Aeotec MultiSensors 6; Danfoss Z Thermostats 014G0013; Kaku Switches, Z-wave Switches

toni1234567
Posts: 1
Joined: Saturday 06 May 2017 10:21
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Help! GPio, 8 relays...

Post by toni1234567 » Thursday 25 May 2017 20:34

RayAmsterdam wrote:This board isn't designed to be used with the pi. It needs ground to switch the relay on. The pi is grounded when off and 3,3v when on. That is why it acts reversed.
Here is what I did:
I removed the led and the lower resistor. I soldered in a bridge and a 100 Ohm resistor as in the first picture. You have to do this for all 8 relays! I put the jumper between ground and vcc (second picture). 5v from the pi is connected to jd-vcc. The vcc pin on the left pinrow is unused (I cut it away).
IMG_20150407_212948~2.jpg
IMG_20150407_212948~3.jpg
IMG_20150407_212948~4.jpg

Thanks for your information it works....!!!

The resistor is not 100 ohms is 1k.
I rescued de original led solderind led+original resistor(1k) like you.
Regards.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests