Jump to content

Recommended Posts

Posted

I want to have my first floor lights all automated by a central control box (star wiring arrangement, already laid to allow this). At the heart of this I need a relay control PCB which should be at least 16way. The day job gives me the skills to design such a PCB, but there are some off-the-shelf options and a variety of prices and they would come with CE marking of equally variable legitimacy. I could power the whle thing from a mains plug in which case it would be outside of the scope of the Sparkie's signoff, but I want his blessing and he's keen to see a CE mark on it.

 

I want to control the PCB with either a Raspberry Pi Zero or ESP32 which I am happy configuring and running a local webserver from. The Raspberry Pi would allow a USB connection to the relay PCB (as would some ESP32 boards), but I would prefer to have something less protocol stack sensitive like I2C or UART.

 

Does anyone have a good recommendation of suitable relay PCBs. I have seen things ranging from White Wing £175 to Amazon / Aliexpress <£11. The main thing I want to be able to trust is the relays themselves since that's where the mains is. I think all the PCBs have optical isolators, but I wouldn't handle the RPi / ESP32 when it's got mains anyway.

Posted (edited)

If youve gone to the effort of star wiring I'm surprised you aren't looking at dimmers rather than pure relays.

 

Having said that, if you want to use relays have you looked at how the europeans do it? They just have extra rows in the CU and have DIN mounted relays.

 

Given we are in the UK and our regs I wouldn't want to try and put this in the same CU. But using DIN rail mounted relays would be the safest choice for electrician sign off I would have thought. Plus points that each relay is in a socket so can be individually changed if they suffer early death. Pricer than just a PCB but still a professional type job.

 

You can get raspberry Pis mounted in DIN rail cases too for the extra professional look.

 

Edit: Raspberry Pi would need relay drivers if you do it this way, so either you get the DIN packaged versions that have this already or design your own HAT for it.

Edited by -rick-
  • Thanks 1
Posted (edited)

There's also Controllino as the logic should be trivial. Also Shelly. Agree that din mounted relays / dimmers in a professional cabinet would be good.

 

Also RS485 - there's a bunch of RS485 controlled stuff - I've already installed some RS485 temp / humidity sensors. Bear in mind that I2C or SPI are not really designed for long runs / noisy environments.

 

DMX? Loxone?

 

Keep us posted - I plan to do something similar.

Edited by Alan Ambrose
  • Like 2
Posted

DIN rail would arguably look more professional I agree, but ultimately you could still have dubious DIN rail parts

These look nice, but the CE logo looks more like the old China Export trick.
image.png.f28904472d79376cd01167ea80219357.png  image.png.8fb7f936c2f88a8c4849de33b32168c7.png

 

There are also things like this that claim to use Omron relays:

image.png.14519c5010803a415ea2d71959b6c88c.png

Posted

Not sure exactly what you are trying to achieve ? Why would it need to be a single multichanel relay ?

Surely better and more resilient and flexible to use multiple 1/2/3 channel relays mounted on a single DIN rail

 

Why can't you just use a common protocal for communicating with the relay - wifi, zigbee etc

 

Plenty of DIN mounted relays and dimmers around, notably from Shelly for example...

 

https://www.shelly.com/search?q=din+relay&options[prefix]=last

Posted (edited)
8 minutes ago, Spinny said:

Not sure exactly what you are trying to achieve ? Why would it need to be a single multichanel relay ?

Surely better and more resilient and flexible to use multiple 1/2/3 channel relays mounted on a single DIN rail

 

It's the 'roll your own' desire. Yes I could get 5 or 6 Shelly 3 channel relays for £400, but I like making things and can also be outside any walled gardens. The 16channel PCB for £11 with a £9 Raspberry Pi saves quite a bit too. A bit too much for my liking

Edited by MortarThePoint
Posted

The main issue with the individual DIN rail mounted relays is the need for control buffering since the coil powers are too high for GPIO control. Nice servicability though

 

These are tempting:

image.png.3328615d371a7ddb61d4e4045bfc59a1.png

 

 

They appear to use HF41F relays: https://static.rapidonline.com/pdf/507532_da_en_01.pdf

Those 5V relays have a 147R coil resistance and 170mW coil power. 34mA is too much for unbuffered GPIO use though.

 

These look really nice, but the coil power (0.9W) is unacceptable:

image.png.93dd28ba357c8241634914c154c46e8c.png

 

Posted (edited)
1 hour ago, MortarThePoint said:

DIN rail would arguably look more professional I agree, but ultimately you could still have dubious DIN rail parts

 

Stop looking at aliexpress/ebay. Start looking at CPC/RS/Rapid/TLC-direct/CEF. More expensive but no worries about certification and going to be at least reasonable quality

 

55 minutes ago, MortarThePoint said:

The 16channel PCB for £11 with a £9 Raspberry Pi saves quite a bit too. A bit too much for my liking

 

Exactly. Presume you are installing something you want to last and not require constant fiddling. In which case get something from known sources that your electrican is comfortable with. Even if you do want to constantly fiddle, I'd guess fiddling with the software/end result side of things rather than replacing iffy parts is where you want to spend your time.

 

43 minutes ago, MortarThePoint said:

The main issue with the individual DIN rail mounted relays is the need for control buffering since the coil powers are too high for GPIO control. Nice servicability though

 

But you said you can design PCBs? Even if you buy one off the shelf. Options exist:

 

https://paradar.co.uk/products/owl-driver-board-raspberry-pi-automotive-relay-hat?variant=55334464618879

(not keen on form factor)

 

Things like this is another option:

https://revolutionpi.com/en/

 

43 minutes ago, MortarThePoint said:

These look really nice, but the coil power (0.9W) is unacceptable:

 

Look at latching relays. Requires more IO/drivers but no consumption during use.

 

Still I will go back to my original point. If you are going to the effort of a custom system why not look at using off the shelf dimmer modules that you can control via the Pi? Plenty of options. Yes more costly than buying iffy stuff from AliExpress but a long term solution that offers way more flexibility than simple relays.

Edited by -rick-
Posted

To add, having a fancy custom automated home is a nice idea but it is well worth taking a moment to step back and think:

 

If I get injured in some way that temporarily or permenantly stops me being able to maintain the system is what I'm doing going to continue it's basic function? Can someone else understand enough about it to fix an issue? If you live with others, can they maintain/operate the system if you are temporarily unavailable?

 

If you can't say yes to these then well worth taking a moment and thinking what changes you'd need to make to allow that to happen. In my mind, automation should be an add on for extra functionality and if it breaks the basics like light switches should still work.

Posted
4 minutes ago, -rick- said:

To add, having a fancy custom automated home is a nice idea but it is well worth taking a moment to step back and think:

 

If I get injured in some way that temporarily or permenantly stops me being able to maintain the system is what I'm doing going to continue it's basic function? Can someone else understand enough about it to fix an issue? If you live with others, can they maintain/operate the system if you are temporarily unavailable?

 

If you can't say yes to these then well worth taking a moment and thinking what changes you'd need to make to allow that to happen. In my mind, automation should be an add on for extra functionality and if it breaks the basics like light switches should still work.

 

They'll have something to remember me by when they are sat in the dark 🤣

 

Have have wired the house so that it can be converted to a conventional switch based one by only making changes near the consumer unit. That said, it would be good to have the type of relay that has a switch override so that all could be left switched on and then smart bulbs used instead.

Posted
6 minutes ago, MortarThePoint said:

Have have wired the house so that it can be converted to a conventional switch based one by only making changes near the consumer unit. That said, it would be good to have the type of relay that has a switch override so that all could be left switched on and then smart bulbs used instead.

 

Yeh you clearly have the design right for the 'rip it out and replace with dumb wiring' option. But personally I want a solution to be that plus 'if the central hub fails, the light switches still work'. This is easy with sonoff style smart solutions (the switch modules can be programed to work like normal switches if the central hub is down). Little more difficult to find solutions with centralised dimmers.

 

If installing a relay based solution then the european way of doing it works well (assuming you can get three way retractive switches and use latched relays). Switches on the wall are directly wired into the on/off coils of the relevant relays and in parallel you wire your smart system. Thus a switch on the wall directly triggers the relay but so can your smart system.

Posted

My go-to is the Waveshare 32ch modbus RTU relay - been running a a few for over a year now, very stable. 

However i can't see evidence of CE mark now. Not even the old incorrect kerning "China Export" variant 

Posted
10 minutes ago, joth said:

My go-to is the Waveshare 32ch modbus RTU relay - been running a a few for over a year now, very stable. 

However i can't see evidence of CE mark now. Not even the old incorrect kerning "China Export" variant 

 

Nice:

    https://thepihut.com/products/modbus-rtu-32-channel-relay-module

    https://www.waveshare.com/wiki/Modbus_RTU_Relay_32CH

 

Waveshare are normally pretty good. I can't see any CE mark statement though.

 

Pros:

Cheap: £2 / channel -> £3 / channel with RS485 converter and PSU

OK ON power: 11.7W / 32 = 366mW / channel

Reputable: medium/high though question on CE mark

Well supported

 

Cons:

It does have significant single points of failure though. I'll always be able to get DIN mounted relays.

CE mark?

 

I like Modbus / RS485 and have used it in some fun applications but it's overkill for my setup since they will be co-located. That said, it's a quick solution to the interfacing challenge.

 

Waveshare make some other interesting items:

Posted

Hongfa seem to be reasonable. They are stocked by RS (socket, relay) and Farnell (socket, relay) TEM (socket)

 

https://www.hongfa.com/product/relay-socket/41F-Sockets

https://source.hongfa.com//Api/DownloadPdf/201

 

Aliexpress are just a bit cheaper than most places for them if they aren't knockoffs which is hopefully unlikely. It would be good is LCSC did them

 

A 20way solution with a GPIO buffer would probably run to 2*£30 + £20 = £80  which shows the good value of the Waveshare options not to mention the really cheap ones.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...