Active low relays

Post Reply
DasK
Posts: 7
Joined: Sunday 27 December 2015 14:52
Target OS: Raspberry Pi
Domoticz version:
Location: Canary islands
Contact:

Active low relays

Post by DasK » Friday 02 June 2017 20:45

Hi,
I'm using a relay board wired to the raspberry gpio to drive some lights in my living room. As many relay boards is active low so I came here to see how to configure it and I found some crazy stuff like soldering things in the board, breaking tracks.... I knew I didn't have to touch the hardware.
I did some research in the wiring pi site, and when you export a pin (in order to use it with domoticz for example) the export creates a folder in /sys/class/gpio/gpio17/ (o the actual BCM pin you are using). Inside this folder you have a file call active_low with a written 0. You only have to change that 0 for an 1.
I updated the wiki. If there is some errors or typos, please feel free to fix it. (or if you find a more elegant way to do it, since I don't really like the "sudo sh -c" but I don't know a better way to do it)

https://domoticz.com/wiki/index.php?tit ... low_relays

dthompson
Posts: 7
Joined: Tuesday 07 June 2016 21:47
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Active low relays

Post by dthompson » Friday 07 September 2018 19:09

I now this is an older post, but i have a question concerning this issue with active low relays. I have the suggested code in my domoticz.sh file, but just the other day after a power outage at my house, all the relays were energized after the Pi rebooted. Is there a way to prevent this from happening? I'm assuming that when the gpio outputs initialized that they came up active high which energized the relays. And, then when the startup file switched the configuration to outputs to active low, that the outputs never switched since no command was issued to them???? Should i toggle the outputs on bootup of the Pi to on then off to ensure that they get set properly after a reboot?

Thanks!!!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest