Page 2 of 2
Re: Help! GPio, 8 relays...
Posted: Tuesday 26 July 2016 8:48
by sallytech0103
I had a same problem in my project. I resolved it from this discussion thanks.
Some information about
relays.

Re: Help! GPio, 8 relays...
Posted: Friday 30 December 2016 18:33
by guantolento
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 ?
Re: Help! GPio, 8 relays...
Posted: Friday 30 December 2016 18:43
by guantolento
sallytech0103 wrote:I had a same problem in my project. I resolved it from this discussion thanks.
Some information about
relays.

how you resolve the problem ? with hardware or software ????
Re: Help! GPio, 8 relays...
Posted: Monday 27 February 2017 23:42
by hill2button
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!
Re: Help! GPio, 8 relays...
Posted: Tuesday 28 February 2017 21:50
by hill2button
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...
Re: Help! GPio, 8 relays...
Posted: Tuesday 28 February 2017 22:02
by RayAmsterdam
I posted the solution earlier in this topic:
viewtopic.php?f=32&t=6050&p=39401#p39401
Re: Help! GPio, 8 relays...
Posted: Tuesday 28 February 2017 22:04
by hill2button
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...
Re: Help! GPio, 8 relays...
Posted: Saturday 01 April 2017 14:57
by Lebo2d9
Hi,
Did someone ever tested the relay interfacing with a 74HC240 in between? 8 port invering buffer.
Kind regards
Re: Help! GPio, 8 relays...
Posted: Sunday 21 May 2017 0:49
by gohan
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.
Re: Help! GPio, 8 relays...
Posted: Monday 22 May 2017 19:50
by trackerj
hill2button wrote:
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.
Re: Help! GPio, 8 relays...
Posted: Tuesday 23 May 2017 10:50
by mjdb
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 (44.83 KiB) Viewed 5673 times
You can change the program very easy from 4 to 8 relays.

- Box2WithDecentWires.jpg (38.97 KiB) Viewed 5672 times
Re: Help! GPio, 8 relays...
Posted: Thursday 25 May 2017 20:34
by toni1234567
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.
Re: Help! GPio, 8 relays...
Posted: Thursday 23 August 2018 20:31
by BarryT
macieiks wrote: ↑Friday 10 July 2015 11:35
BarryT, Any update with that? I run these relays too and I would like to invert values. Could you give us an example how to manage to do that?
Sorry for the late reply... Didnt see the replies at all

I'm using gpio (sysfs) on all my raspberrys, and using the rc.local file to import the values >
Code: Select all
sudo sh -c 'echo 16 > /sys/class/gpio/export'
sudo sh -c 'echo high > /sys/class/gpio/gpio16/direction'
sudo sh -c 'echo 1 > /sys/class/gpio/gpio16/active_low'
sudo sh -c 'echo 20 > /sys/class/gpio/export'
sudo sh -c 'echo high > /sys/class/gpio/gpio20/direction'
sudo sh -c 'echo 1 > /sys/class/gpio/gpio20/active_low'
sudo sh -c 'echo 21 > /sys/class/gpio/export'
sudo sh -c 'echo high > /sys/class/gpio/gpio21/direction'
sudo sh -c 'echo 1 > /sys/class/gpio/gpio21/active_low'
sudo sh -c 'echo 12 > /sys/class/gpio/export'
sudo sh -c 'echo high > /sys/class/gpio/gpio12/direction'
sudo sh -c 'echo 1 > /sys/class/gpio/gpio12/active_low'
sudo sh -c 'echo 26 > /sys/class/gpio/export'
sudo sh -c 'echo high > /sys/class/gpio/gpio26/direction'
sudo sh -c 'echo 1 > /sys/class/gpio/gpio26/active_low'
hope this will helped you out!