OpenSprinkler › Forums › Hardware Questions › OpenSprinkler Pi (OSPi) › Relay not disengaging with 16 relay board
- This topic has 8 replies, 5 voices, and was last updated 6 years ago by baggar11.
-
AuthorPosts
-
June 22, 2017 at 2:21 pm #46874
mjticeParticipantHi, I’ve managed to pick up a Rpi 3 and a Sainsmart 16 channel relay module (here).
OpenSprinkler 2.1.7 was installed, on a fresh raspbian OS, by following
Tthe instructions here.
This board needs to be independently powered via 12v. I’m using a 12v, 1.5A DC wall adapter pulled from my old Nexus player (attached images)
I’ve connected the relays 1-9 to GPIO pins 18,23,24,25,8,7,12,16,20 (these are the BCM numbers, btw).
Using this quick python snippet I’m able to engage/disengage the relays:import RPi.GPIO as GPIO import time #set up GPIO using BCM numbering GPIO.setmode(GPIO.BCM) chan_list = [18,23,24,25,8,7,12,16,20] GPIO.setup(chan_list, GPIO.OUT) GPIO.output(chan_list, GPIO.HIGH) time.sleep(5) GPIO.output(chan_list, GPIO.LOW) GPIO.cleanup()
This tells me that the pi is successfully engaging the relays via the gpio – so hardware seems to checkout okay.
However, when I manually run a zone via OpenSprinkler the relay will engage but it never disengages. I’m not sure what I’m missing.
Attachments:
June 27, 2017 at 2:10 am #46924
gekoParticipantHello,
I’ve got the same problem.
Nobody a solution?Regards
GekoJune 27, 2017 at 3:09 am #46925
gekoParticipantHi,
I just found out, that it works (4 Relay testboard… my 16 Relay is on the way 🙂 ) when I connect it to the 3.3V!Regards
GekoJune 27, 2017 at 4:11 am #46927
mjticeParticipantI think I got it figured out. After reading around it looks like you need to pull down each relay with a 1k resistor. So I ended up taking a jumper from gpio 18 (for example) and connecting a 1k resister to it. Then from the resistor I used another jumper and connected it to one of the pins on the relay board. Also I needed to set the Active State (I think that’s the setting) in OS to ‘low’.
July 18, 2017 at 10:53 am #47160
bluezpParticipantmjtice – can you post an updated picture of what your wiring looks like now? I was about to buy the same relay board to use with OS and want to make sure I set it up correctly!
July 18, 2017 at 1:22 pm #47162
mjticeParticipantNah, sorry. I keep running into design issues so I don’t have anything assembled. If it helps, The additional parts I need to buy/have bought are: adafruit proto hat for rasp pi. Some in-hole screw down terminals, and some different types of jumpers.
I figured I’d solder the hat to the gpio. Then solder on the 1k resistors. Then solder the screw terminals. Then from the terminals I’d attach them to the relay board like in the picture shown.
If I was to do this over again I’d probably buy 2-8 channel relays… Going with the 16 channel has ended up taking up too much time and money.
July 18, 2017 at 2:56 pm #47164
gekoParticipantHi,
My system runs till 2 days very well.😀Attachments:
July 28, 2017 at 2:37 pm #47312
RayKeymasterWhen using a relay board, just be careful what type of relay board you have. Some are active high, some are active low. In fact, a lot of relay boards I’ve seen are active low (which means a ‘low’ signal activates the relay). Also, as suggested in this thread, a pull up/down resistor might be needed.
August 21, 2018 at 10:29 am #52230
baggar11ParticipantI know I’m late to the party on this, but I had the same issue with an RPI3 and the 16 relay sainsmart board. I read that others were having the same issue apart from OpenSprinkler and solved it by connecting the 3.3v gpio pins instead of the 5v pins on the RPI3. I tried it out and it worked. And in my case, the PI3 is being powered from the 3.3v pins, so only the 24vac and 12v dc psu needed.
-
AuthorPosts
- You must be logged in to reply to this topic.
OpenSprinkler › Forums › Hardware Questions › OpenSprinkler Pi (OSPi) › Relay not disengaging with 16 relay board