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

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
 

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
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
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.
 

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
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
 
OP
OP
M

Modell

New Member
View Badges
Joined
Feb 15, 2014
Messages
21
Reaction score
9
Location
Chesapeake Beach, MD
Rating - 0%
0   0   0
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
 
OP
OP
M

Modell

New Member
View Badges
Joined
Feb 15, 2014
Messages
21
Reaction score
9
Location
Chesapeake Beach, MD
Rating - 0%
0   0   0
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!
 
OP
OP
M

Modell

New Member
View Badges
Joined
Feb 15, 2014
Messages
21
Reaction score
9
Location
Chesapeake Beach, MD
Rating - 0%
0   0   0
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
 

Mikeneedsahobby

Well-Known Member
View Badges
Joined
Sep 16, 2018
Messages
516
Reaction score
922
Rating - 0%
0   0   0
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.
 

Cpiper

New Member
View Badges
Joined
Oct 29, 2017
Messages
1
Reaction score
2
Rating - 0%
0   0   0
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
 

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,281
Location
Edmonton, Canada
Rating - 0%
0   0   0
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.
 
OP
OP
M

Modell

New Member
View Badges
Joined
Feb 15, 2014
Messages
21
Reaction score
9
Location
Chesapeake Beach, MD
Rating - 0%
0   0   0
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
 

Mikeneedsahobby

Well-Known Member
View Badges
Joined
Sep 16, 2018
Messages
516
Reaction score
922
Rating - 0%
0   0   0
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!
 

Rock solid aquascape: Does the weight of the rocks in your aquascape matter?

  • The weight of the rocks is a key factor.

    Votes: 10 8.0%
  • The weight of the rocks is one of many factors.

    Votes: 43 34.4%
  • The weight of the rocks is a minor factor.

    Votes: 40 32.0%
  • The weight of the rocks is not a factor.

    Votes: 31 24.8%
  • Other.

    Votes: 1 0.8%
Back
Top