Reef-pi - relays switch on, but not off.

  • Thread starter Thread starter Modell
  • Start date Start date
  • Tagged users None

Modell

New Member
View Badges
Joined
Feb 15, 2014
Messages
21
Reaction score
9
Location
Chesapeake Beach, MD
Rating - 0%
0   0   0
Hi, I have the RPi4 setup and running using the Sainsmart 8-relay 5v model. Reef-pi turns the relays on/off. I see the light come on (I rigged up a test outlet). however when I turn off the relay the outlet stays powered. If I tap on the relay lightly with my finger, the light goes out. Light a stuck relay. This happens on all the relay modules.
Could this be a power issue? I’m using a 5v 2.0a power supply. what I don’t know, does the high voltage side of the relay get it’s power from the relay board or from the connected high voltage? Or did I just get a bad board of relays? Everything else seems to work fine.
thanks.
@Ranjib
image.jpg
 
Hi, I have the RPi4 setup and running using the Sainsmart 8-relay 5v model. Reef-pi turns the relays on/off. I see the light come on (I rigged up a test outlet). however when I turn off the relay the outlet stays powered. If I tap on the relay lightly with my finger, the light goes out. Light a stuck relay. This happens on all the relay modules.
Could this be a power issue? I’m using a 5v 2.0a power supply. what I don’t know, does the high voltage side of the relay get it’s power from the relay board or from the connected high voltage? Or did I just get a bad board of relays? Everything else seems to work fine.
thanks.
@Ranjib
image.jpg
From the symptoms it feels like you have a short circuit. If you have a multi meter then start by testing the voltage at relay pins when turning off. If it’s not zero there, it will confirm a short. Then you track back with multimeter where this is happening... from pi gpio.
 
Also a more closeup picture of the stainsmart pinout will be useful
 
From the symptoms it feels like you have a short circuit. If you have a multi meter then start by testing the voltage at relay pins when turning off. If it’s not zero there, it will confirm a short. Then you track back with multimeter where this is happening... from pi gpio.
Check your ground connection as well. If this is happening for all relays , it could be loose connection
 
Here’s a better pic of the connections. Thanks again.
image.jpg
pin outs
RPi4 to Relay bd. Connections:
pin 1 to VCC
Pin 17 to relay 1
pin 27 to relay 2
pin 22 to relay 3
pin 10 to relay 4
pin 9 to relay 5
pin 11 to relay 6
pin 5 to relay 7
pin 6 to relay 8

grd on relay to black on 5v power supply
JD-VCC on relay to red on power supply image.jpg
 
Ok, I’ll just keep writing and letting you know what I find...
I retired using the 5v from the RPi. Put the jumper back on the relay across VCC and JD-VCC. Every thing is work correctly now.
I metered the external 5v power supply I was originally using, and it show 5.08v.
so, not sure why it wasn’t working correctly.
Is it ok to power (2) 8-relay modules directly from the 5v feed on the RPi4?
thanks again...
yes, I am impatient. Sorry about that. But, this is very exciting... Lol!
 
Ok, any idea why I get this error when I try to toggle GPIO 4?

/2021, 3:52:11 PMUIERROR{"error":"Failed to update. Error: can't set output on channel 4: open /sys/class/gpio/gpio4/direction: no such file or directory"} | HTTP 500
thanks.

@Ranjib
 
Should there be a ground from the rpi4 to the relay board?
everything should be grounded back to the same place. I can’t really tell what you wired up. Use a multimeter and check the voltage at various places to ground to see what might be missing.
 
Ok, I’ll just keep writing and letting you know what I find...
I retired using the 5v from the RPi. Put the jumper back on the relay across VCC and JD-VCC. Every thing is work correctly now.
I metered the external 5v power supply I was originally using, and it show 5.08v.
so, not sure why it wasn’t working correctly.
Is it ok to power (2) 8-relay modules directly from the 5v feed on the RPi4?
thanks again...
yes, I am impatient. Sorry about that. But, this is very exciting... Lol!
You can use the external power source but you need tie the ground back to the Pi also. Your GPIOs are left floating otherwise which is causing your problem.

Unfortunately I can’t help you with your GPIO 4 issue.

~Charlie
 
Ok, any idea why I get this error when I try to toggle GPIO 4?

/2021, 3:52:11 PMUIERROR{"error":"Failed to update. Error: can't set output on channel 4: open /sys/class/gpio/gpio4/direction: no such file or directory"} | HTTP 500
thanks.

@Ranjib

GPIO 4 is used for DS18B20 temp sensors so you'll need to use a different pin.
 
Thanks everyone. I hate to ask some newbie, ”you should know that, dummy” questions. But, I do appreciate the feedback.

here is a pic of the install so far:
image.jpg
 
Thanks everyone. I hate to ask some newbie, ”you should know that, dummy” questions. But, I do appreciate the feedback.

here is a pic of the install so far:
image.jpg
How are you supposed to know if you haven’t seen the answer before. Questions are fine. Fire away.
Install looks good!
 

IF YOU HAD TO TAKE A REEFING EXAM, WOULD YOU PASS?

  • Yes!

    Votes: 32 45.7%
  • Not yet, but I have one that I want to buy in mind!

    Votes: 9 12.9%
  • No.

    Votes: 26 37.1%
  • Other (please explain).

    Votes: 3 4.3%
Back
Top