1

I would like to control both 120VAC and 24VDC from my RPi 3B+. To make this easy, I'm looking at one of the various 3ch or 4ch relay modules for an RPi 3B+, like this or this. I'm familiar with using both AC and DC relays on past projects. The product pictures sure look like they are three independent relay modules, but I just want to confirm that the relays on these boards are completely independent and shouldn't have any trouble switching both 12VAC and 24VDC

kbyrd
  • 145
  • 6

2 Answers2

3

WARNING! NEVER put any kind of switch in the Neutral line (unless using a double pole relay). This would violate electrical wiring regulations.

Putting a switch in the Neutral just makes the other side of the relay (and the rest of the circuitry) live when off.

Go with https://www.amazon.com/dp/B07CZL2SKN/. They've been kind enough to provide the schematics and a picture of the underside of the PCB. My usual concern about these boards is that the common pins on the switch side of the relays may share a ground, but the pictures clearly show that all output pins are isolated and only connect to the screw terminals.

I assume you know this already, but just in case others are reading: when switching AC loads that connect to mains with these sorts of boards, always switch the neutral wire. This way, if you accidentally touch it, or if there is a leak, the results won't be too unpleasant!

Obligatory nitpicking: this is not a HAT (which stands for "Hardware Attached on Top"); nor, of course, is it presented as one. A HAT is a specific kind of RPi add-on board that follows the HAT specification.

JayEye
  • 1,908
  • 12
  • 19
0

At least one of the devices linked uses opto-couplers. This is a (common) delusion that this provides additional isolation.

One thing, for sure, opto-couplers require high drive currents (which the Pi is poor at) and many designs (which work on Arduino) don't work on a Pi because they require 5V. Without meaningful specifications this is uncertain.

The device which is mounted on the Pi would NOT comply with electrical isolation requirements for mains powered devices.

Such devices are only safe if mounted in a suitable enclosure with isolation between the mains and control circuitry. This needs to meet double insulation standards OR the enclosure needs correct earthing.

In addition they would only comply with additional mechanical anchoring for mains wiring.

Milliways
  • 62,573
  • 32
  • 113
  • 225