Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Maximum Number of Zones
#41
It is a good practice to power the relays from another source. At first I would test the setup without connecting the power to the relays and only watch the behavior of the led's on the board.
So if you only connect GND next to IN1 to GN on the Pi and VCC next to IN8 to +5V on the Pi then you should be able to see led activity.
Be aware that the led will turn on when IN1..IN8 is pulled low. In SIP there is a setting called "active low" which should be set.

When everything works you can connect the extra power source to the relay part of the board (GND and JD_VCC with jumper removed)

Hope this helps,
--Gerard
Reply
#42
(2021 Jun 22, 06:30 PM)astrogerard Wrote: It is a good practice to power the relays from another source. At first I would test the setup without connecting the power to the relays and only watch the behavior of the led's on the board.
So if you only connect GND next to IN1 to GN on the Pi and VCC next to IN8 to +5V on the Pi then you should be able to see led activity.
Be aware that the led will turn on when IN1..IN8 is pulled low. In SIP there is a setting called "active low" which should be set.

When everything works you can connect the extra power source to the relay part of the board (GND and JD_VCC with jumper removed)

Hope this helps,
--Gerard

**edit**  Just to be clear (and safe), do not connect both GND on the relay board together. Both VCC and GND are completely isolated from each other. The Pi is not powering the relay coils, the external psu does this.

Let me update my own message.  There is no need to connect GND next to IN1 to the Pi. Only VCC is enough. It is better to not connect GND to the Pi 
I just checked some boards I have and these have both GNDs hard connected on the board so to totally isolate the Pi and de shift registers from the relays do not connect GND to the Pi.
Reply
#43
(2021 Jun 22, 07:49 PM)astrogerard Wrote:
(2021 Jun 22, 06:30 PM)astrogerard Wrote: It is a good practice to power the relays from another source. At first I would test the setup without connecting the power to the relays and only watch the behavior of the led's on the board.
So if you only connect GND next to IN1 to GN on the Pi and VCC next to IN8 to +5V on the Pi then you should be able to see led activity.
Be aware that the led will turn on when IN1..IN8 is pulled low. In SIP there is a setting called "active low" which should be set.

When everything works you can connect the extra power source to the relay part of the board (GND and JD_VCC with jumper removed)

Hope this helps,
--Gerard

**edit**  Just to be clear (and safe), do not connect both GND on the relay board together. Both VCC and GND are completely isolated from each other. The Pi is not powering the relay coils, the external psu does this.

Let me update my own message.  There is no need to connect GND next to IN1 to the Pi. Only VCC is enough. It is better to not connect GND to the Pi 
I just checked some boards I have and these have both GNDs hard connected on the board so to totally isolate the Pi and de shift registers from the relays do not connect GND to the Pi.

Had a second to do what you suggested prior to your update and edit.  

The LED came on for each zone I selected via RUN ONCE.  I tested RELAYS on each of the RELAY BOARDS.  HOORAY !!!!!

So are you saying I need to disconnect the GND now next to each of the n1.  How will that complete the circuit?

The video in the link that you sent show both the GND and the JCC connected as well as the GRD and JD-VCC.

I have not reconnected the secondary power supply to the GND and JDC-VCC pins.

Should I disconnect the GND next to n1 and test again?

Taking baby step trying not to fry anything.

Thanks again for your help.
Reply
#44
Congrats with this important step!

No, there is no need to connect GND next to N1. The circuit "starts" on the +5V, then via a resistor, the optocoupler led and the red external led it connects to pin N1..8. Then the shift register IC pulls the pin (N1..8) low which essentially is GND. So the led will turn on.

The secondary power supply can now be connected to GND and JDC-VCC. Don't forget to remove the jumper!
Once connected the relays should make the sound you are waiting for a long time :-)

--Gerard
Reply
#45
(2021 Jun 22, 08:45 PM)astrogerard Wrote: Congrats with this important step!

No, there is no need to connect GND next to N1.  The circuit "starts" on the +5V, then via a resistor, the optocoupler led and the red external led it connects to pin N1..8. Then the shift register IC pulls the pin (N1..8) low which essentially is GND. So the led will turn on.

The secondary power supply can now be connected to GND and JDC-VCC. Don't forget to remove the jumper!
Once connected the relays should make the sound you are waiting for a long time :-)

--Gerard

Removed the GND(s) from the RELAY MODULES connected to Pi POWER RAIL ground ( - )

Connected the GND and JDC-VCC to the secondary power supply POWER RAIL.

Did a RUN ONCE test LED(s) energized and the RELAY(s) made the nice "plock" sound.  HIP HIP HOORAY!!!!

Any idea how many mA the optocoupler (VCC) will draw for each of the active RELAYS?  I am trying to figure how many irrigation zones I can run at the same time without damaging the Pi.

I found the following on the website where I purchased the RELAYS: "5V 8-Channel Relay interface board, each one needs 15-20mA Driver Current; Equiped with high-current relay, AC250V 10A ; DC30V 10A"

Does DRIVER CURRENT refer to the power needed for the RELAY (JD-VCC) or the optocoupler (VCC) or is it the combination?

I really appreciate the time you have spent helping me with this.

T H A N K S  A G A I N ! ! !
Reply
#46
Great to see you are almost there!

The power your Pi can deliver on 5v depends on the power usage of the Pi itself and the psu you have connected to it. Also USB devices, if any, will consume from the 5V power. If the Pi is not doing some heavy stuff there is likely to be enough power to drive all inputs at the same time.
Assuming you have 4 relay boards of 8 channels, that makes 32 * 20mA = 640mA. I think the 20mA is in reality a bit lower.

So I'm fairly sure that if your Pi is running SIP only and you have no USB devices connected you can drive all channels at the same time. There are however fuses on the Pi which eventually can blow when overloaded. If you are really in to pushing the limits I can do some more precise calculations/estimations.

--Gerard
Reply
#47
(2021 Jun 22, 10:10 PM)astrogerard Wrote: Great to see you are almost there!

The power your Pi can deliver on 5v depends on the power usage of the Pi itself and the psu you have connected to it. Also USB devices, if any, will consume from the 5V power.  If the Pi is not doing some heavy stuff there is likely to be enough power to drive all inputs at the same time.
Assuming you have 4 relay boards of 8 channels, that makes 32 * 20mA = 640mA. I think the 20mA is in reality a bit lower.

So I'm fairly sure that if your Pi is running SIP only and you have no USB devices connected you can drive all channels at the same time. There are however fuses on the Pi which eventually can blow when overloaded.  If you are really in to pushing the limits I can do some more precise calculations/estimations.

--Gerard

Using a PWR+ charger, mfg states 5v 2A 2.5A 3A 3.5A but no way to verify. In case I run into problems can you recommend a robust power supply?

USB wifi adaptor uses 340 mA when TX and 160 mA when RX.

Breadboard w/ 4 shift registers attached.

Running the Pi OS Desktop Headless, SIP, APCUPSD (maybe that will tell me what the Pi is drawing), no keyboard or mouse attached.

So I guess I am ready to move on to connecting the irrigation valves to the relays and the third power supply.

Thank you again.
Reply
#48
Looking at your boards and after inspecting one of mine I think your good without an extra psu.

If I'm not mistaken your boards have a 1K resistor in series with the leds. That should be R3,R5,R7,R9.... with a value of 102, which means 10 + 2 zeroes, so 1000 Ohm or 1K.
So the real power consumption per channel is about 2mA. This is also what I just measured on my own boards.
The calculation then would be: 32 * 2mA = 64mA when all channels are on. That is of course no problem at all drawing that from the 5v rail of the Pi.

Good luck with connecting everything.

--Gerard
Reply
#49
(2021 Jun 23, 07:31 AM)astrogerard Wrote: Looking at your boards and after inspecting one of mine I think your good without an extra psu.

If I'm not mistaken your boards have a 1K resistor in series with the leds. That should be R3,R5,R7,R9....  with a value of 102, which means 10 + 2 zeroes, so 1000 Ohm or 1K.
So the real power consumption per channel is about 2mA. This is also what I just measured on my own boards.
The calculation then would be: 32 * 2mA = 64mA when all channels are on. That is of course no problem at all drawing that from the 5v rail of the Pi.

Good luck with connecting everything.

--Gerard

Uh-Oh!

Have not proceeded with attaching the irrigation valve wires and its independent power supply but I think I have a problem.

I have an ACP Back-UPS ES 350 in my irrigation enclosure.

The Pi power supply and the Relay Module(s) power supply is connected to the Battery Backup/Surge Protection side of the UPS.

I have a USB powered exhaust fan connected to the Surge Protection side of the UPS.

If I unplug and plug in the USB exhaust fan one or more of the RELAYS are triggered. Each time I unplug and plugin the exhaust fan more of the RELAYS are triggered.

Located below the irrigation enclosure I have a GFI within its own enclosure.  I brought power from the GFI enclosure, via wire nuts and not from the GFI, to a GFI within the irrigation enclosure.

For a test I plugged a jigsaw into the GFI outlet below the irrigation enclosure when I engaged the jigsaw all of the RELAYS were triggered.

It appears that fluctuations in current causes the RELAYS to trigger.

Any idea what is going on and how to prevent it?
Reply
#50
Yeah, that is expected behaviour when using fairly long wires (as you have on the breadboard) and not using decoupling capacitors on all the 5v connections.
I would start by putting a capacitor (e.g. 0.1uF) on every hc595 between pin 16 (5v) and pin 8 (GND).  
On the breadboard itself between 5v and GND I would use a 47uF (more or less).

For more info see this and this
 

--Gerard
Reply


Forum Jump:


Users browsing this thread: 9 Guest(s)