MortarThePoint Posted 12 hours ago Posted 12 hours ago 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.
-rick- Posted 12 hours ago Posted 12 hours ago (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 12 hours ago by -rick- 1
Alan Ambrose Posted 11 hours ago Posted 11 hours ago (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 11 hours ago by Alan Ambrose 2
MortarThePoint Posted 11 hours ago Author Posted 11 hours ago 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. There are also things like this that claim to use Omron relays:
Spinny Posted 11 hours ago Posted 11 hours ago 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
MortarThePoint Posted 11 hours ago Author Posted 11 hours ago (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 10 hours ago by MortarThePoint
Spinny Posted 11 hours ago Posted 11 hours ago (edited) I am temporarily using a couple of these at the moment, but not to bear any load, simply as proxy devices to communicate smart device status across different ecosystem constraints between Sonoff and SmartThings... https://www.amazon.co.uk/dp/B0BG54BX9D?ref_=ppx_hzsearch_conn_dt_b_fed_asin_title_1&th=1 Plan to get rid when I move onto Home Assistant. Edited 10 hours ago by Spinny 1
Spinny Posted 10 hours ago Posted 10 hours ago (edited) ? https://www.amazon.co.uk/gp/aw/d/B0BXJM3Y1Z/?_encoding=UTF8&pd_rd_plhdr=t&aaxitk=4bbf97448edaad246ce5f10fb9104ab2&hsa_cr_id=0&qid=1778590372&sr=1-1-1ee1b2e4-01d1-4cd0-b737-4c27ebfc8105&aref=F6sC0M6spk&ref_=sbx__sbtcd2_asin_0_title&pd_rd_w=BgdJE&content-id=amzn1.sym.ea5688b2-3646-4432-bc05-fbb4b7714d51%3Aamzn1.sym.ea5688b2-3646-4432-bc05-fbb4b7714d51&pf_rd_p=ea5688b2-3646-4432-bc05-fbb4b7714d51&pf_rd_r=13CRVWDF4AJDX72SD0PA&pd_rd_wg=UBGNn&pd_rd_r=e9779b4d-e3e8-49aa-bcbc-84d7404a8f6b&th=1 https://www.relays-store.uk/ Edited 10 hours ago by Spinny
MortarThePoint Posted 10 hours ago Author Posted 10 hours ago 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: 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:
-rick- Posted 10 hours ago Posted 10 hours ago (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 10 hours ago by -rick-
-rick- Posted 10 hours ago Posted 10 hours ago 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.
MortarThePoint Posted 9 hours ago Author Posted 9 hours ago 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.
-rick- Posted 9 hours ago Posted 9 hours ago 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.
joth Posted 9 hours ago Posted 9 hours ago 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
MortarThePoint Posted 8 hours ago Author Posted 8 hours ago 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: 8-Channel ESP32-S3 WiFi Relay Module with RS485 (PoE Option) £48 30-Channel Ethernet Relay Module with PoE £67 sold out 16-Channel Modbus Ethernet Relay Module £53
MortarThePoint Posted 8 hours ago Author Posted 8 hours ago 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now