Serial 16 relay module

1011-Switches__SPIO_Relay_Board.hgx (9.3 KB)

Controller Board - Amazon

Controller Board - Ali Express

Releay Board - Must be 5vdc version

Just a tiny side project from my pool controller, a 16 relay controller over USB via Home Genie. The instructions of this board were severely lacking, so currently, the code only supports On/Off/Toggle. Still working out to get the relay state at initialization

This will allow the control of 16 relays from RPi or PC

Tested with RPi-1B, RPi-4, and Windows 11 laptop

Have fun.

Swimming pool Controller Version 3 - Work in progress.
The relay board and serial controller are under the bracket holding the RPi.

Nice to hear from you again. Very impressive work and an excellent example of what HG is capable of. What board model is deployed here.

Updated the first post with the required relay board.

In the next couple of weeks I will also publish something similar, but now over wired network.

My house came with a hot tub that does everything on it’s own (though I haven’t had it filled in over a year). What does a pool require for control that needs up to 16 channels? I’m assuming things like circulation through the filters, maybe a heater, but I’m drawing a blank when trying to see what makes them so complicated. Do you have yours set up to automatically dispense the chemicals? That sounds awesome if so!

It’s as complicated or fancy as you make it. I like doing this stuff for fun, so fancy.

I have a saltwater pool, except for salt, hardly needs any chemicals.
The saltwater chlorinator is controlled using RS485 via USB adaptor

2 relays reserved for acid, and Clearwater chemical injection
1 relay for pump on/off
4 relays for primary pump variable speed control
1 relays to switch between primary and secondary pump
1 relay for secondary pump hi/low speed
2 relays for water flow pool or spa (actuators)
1 relay for solar heating (actuator)
1 relay for pool vacuum (actuator)
1 relay for spa blower
1 relay for pool & spa lights
1 relay for garden lights

Also got an analog pressure sensor to stop the system on low or high pump pressure events, and an analog day light sensor to automate the pool/garden lights.

Several 1wire temperature sensors for the solar heating logic.

Since the world of pool equipment lacks some serious standardization, I build a system that can deal with equipment of many different vendors. This also meant that I needed to have DC: 3.3, 5, 12, 24 volt and AC: 24 volt power available to select from. I included a 24AC transformer to get the 24 VAC and 24 VDC, and a 12 VDC psu from which I also create 5 and 3.3V DC using bucks.

Very impressive.

I was curious which RPI model you were using. @bkenobi discovered the source of the problem with HG and GPIO on the models 2 and 3 and provided a local fix, submitted an issue to the developers GitHub but as far as I recall this fix was never implemented. I assume you came across this issue but in case you wanted to use a model 2 or 3 with your project here’s a link to the fix in case you haven’t seen it RPi GPIO update for HG

Wow, I wasn’t aware there were so many controls in a pool. Very impressive!

While building, it is connected to a very slow RPi-1B; once finished, it will get the RPi-4 currently in my V2 Pool Controller.

I build this version using a serial relay controller, so I’m not held hostage to GPIO issues as new RPi boards are getting released.