Some information about relays.

Moderator: leecollings
how you resolve the problem ? with hardware or software ????sallytech0103 wrote:I had a same problem in my project. I resolved it from this discussion thanks.
Some information about relays.
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...RayAmsterdam wrote:I posted the solution earlier in this topic: viewtopic.php?f=32&t=6050&p=39401#p39401
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: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...RayAmsterdam wrote:I posted the solution earlier in this topic: http://www.domoticz.com/forum/viewtopic ... 401#p39401
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
Sorry for the late reply... Didnt see the replies at all
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'
Users browsing this forum: No registered users and 0 guests