Yet another DIY pool controller thread

Yep, it works great. I only use the spa setting on the heater and have it set to 101. I then use the controller to set a temp and cycle the heater on and off.

Here is the NodeRed flow for the heater control.

[{"id":"8750a286.a2bf","type":"tab","label":"Heater Control","disabled":false,"info":""},{"id":"671d47f0.16b868","type":"exec","z":"8750a286.a2bf","command":"megaio 1 rwrite 7 on","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Heater On Spa","x":891.3999557495117,"y":254.7999782562256,"wires":[[],[],["996225f.2b42bd8"]]},{"id":"10d4570.7ee66a9","type":"exec","z":"8750a286.a2bf","command":"megaio 8 rwrite off","addpay":false,"append":"","useSpawn":"true","timer":"","oldrc":false,"name":"Pool heat mode off","x":649.3999557495117,"y":248.29998016357422,"wires":[[],[],["671d47f0.16b868"]]},{"id":"7fef6834.7ec408","type":"exec","z":"8750a286.a2bf","command":"megaio 1 rwrite 7 off","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Heater Off Spa","x":878.3999557495117,"y":362.7999782562256,"wires":[[],[],["996225f.2b42bd8"]]},{"id":"9a6c93c9.82976","type":"exec","z":"8750a286.a2bf","command":"megaio 8 rwrite off","addpay":false,"append":"","useSpawn":"true","timer":"","oldrc":false,"name":"Pool heat mode off","x":650.3999481201172,"y":350.2999782562256,"wires":[[],[],["7fef6834.7ec408"]]},{"id":"c02bc44b.906ed8","type":"switch","z":"8750a286.a2bf","name":"Cycle Fireman switch","property":"pooltemp","propertyType":"global","rules":[{"t":"lt","v":"tempcontrol","vt":"flow"},{"t":"gte","v":"tempcontrol","vt":"flow"}],"checkall":"true","repair":false,"outputs":2,"x":431.9999542236328,"y":295.4000778198242,"wires":[["10d4570.7ee66a9"],["9a6c93c9.82976"]]},{"id":"3f8a6acc.5a9646","type":"ui_numeric","z":"8750a286.a2bf","name":"Temp Setting","label":"Set Temperature","tooltip":"","group":"1f2187ba.db6938","order":1,"width":0,"height":0,"passthru":false,"topic":"","format":"{{value}}","min":"85","max":"100","step":1,"x":139.9999542236328,"y":177.6000509262085,"wires":[["82af96fa.99dfa8"]]},{"id":"82af96fa.99dfa8","type":"change","z":"8750a286.a2bf","name":"Temperature Control Variable","rules":[{"t":"set","p":"tempcontrol","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":366.9999542236328,"y":180.00000190734863,"wires":[[]]},{"id":"9f81861c.777d68","type":"ui_switch","z":"8750a286.a2bf","name":"","label":"Heater Control","tooltip":"","group":"1f2187ba.db6938","order":2,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"on","onvalueType":"str","onicon":"","oncolor":"","offvalue":"off","offvalueType":"str","officon":"","offcolor":"","x":151.9999542236328,"y":325.99997901916504,"wires":[["b99f7c07.4c5cc"]]},{"id":"9507a033.b1866","type":"exec","z":"8750a286.a2bf","command":"megaio 1 rwrite 7 off","addpay":false,"append":"","useSpawn":"true","timer":"","oldrc":false,"name":"Heater Off Spa","x":669.3999633789062,"y":499.4000072479248,"wires":[[],[],[]]},{"id":"b38bfd72.68307","type":"exec","z":"8750a286.a2bf","command":"megaio 8 rwrite off","addpay":false,"append":"","useSpawn":"true","timer":"","oldrc":false,"name":"Pool heat mode off","x":431.3999557495117,"y":484.9000072479248,"wires":[[],[],["9507a033.b1866"]]},{"id":"996225f.2b42bd8","type":"delay","z":"8750a286.a2bf","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":906.9999160766602,"y":462.9999580383301,"wires":[["1a3ae755.4d8759"]]},{"id":"b99f7c07.4c5cc","type":"change","z":"8750a286.a2bf","name":"Heater mode Variable","rules":[{"t":"set","p":"heater","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":266.9999542236328,"y":244.0000057220459,"wires":[["1a3ae755.4d8759"]]},{"id":"1a3ae755.4d8759","type":"switch","z":"8750a286.a2bf","name":"Check heater mode","property":"heater","propertyType":"flow","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":380.9999542236328,"y":391.3999996185303,"wires":[["c02bc44b.906ed8"],["b38bfd72.68307"]]},{"id":"f441e8af.d40268","type":"link in","z":"8750a286.a2bf","name":"Turn on Heater","links":["32c81b08.da3814"],"x":125.99995422363281,"y":457.000036239624,"wires":[["9f81861c.777d68"]]},{"id":"1f2187ba.db6938","type":"ui_group","z":"","name":"Individual Controls","tab":"18b1fe25.b8f1c2","disp":true,"width":"6","collapse":false},{"id":"18b1fe25.b8f1c2","type":"ui_tab","z":"","name":"Pool Actuator","icon":"dashboard","disabled":false,"hidden":false}]
 
Last edited:
Been reviewing/learning... What do they say about drinking from a fire hose?
I did learn a valuable lesson this morning... I was trying to read this flow on an iPad. Much of the node info is buried in what looks like data structures/records... not friendly, and not easy to read when you are trying to figure out how flows and nodes work! Back on a PC browser now and wow- much easier!

I do have a few questions:
1) I've found a few docs on how to hookup the 2-wire thermostat control to the heater, and some are more clear than others. It seems like I can leave the heater powered on 24/7 (currently wired this way), manually place the unit in Bypass Operation (bo), and manually select Mode=Pool -or- Mode=SPA, and manually set the max temp. Then I would use a single 24V relay to open and close the heater 24V wire (white) with the Pool wire (Orange). I think this is represented by your [Cycle Fireman Switch] -> [HEATER ON SPA -or- HEATER OFF SPA] Is my thinking correct?
2) In your Heater Control flow, it looks like you are comparing the set temp to the measured pool temp every 2 seconds- Where is that measurement coming from (another flow)?
3) It looks like you are using 2 relays- Are you also fully switching ON/OFF the power (240VAC?) [Pool Heat Mode Off]. I was also confused by the "Heater mode variable and check heater mode."
4) I believe you mentioned at some point checking WATER flow, i.e. is water flowing through the heater? Are you doing this also?

Thanks for the help!
 
LOL, I had the same problem. You need to use NodeRed from a PC cant open the detail on the iPad.

Yes you can leave the heater on all the time. I chose not to so I have a separate 120v relay that supplies power to the heater.
There are 3 wires to control the heater (that is why I use 2 relays but that is overkill, I could do it with one). White is common. When you close white with Red the heater goes into SPA mode. When you close white with orange the heater goes into pool mode. So I have a double process. First I make sure that I am not in Pool mode, then I turn on SPA mode. When I want the heater off I turn off Pool and Spa.

I have a DS18b20 where I measure the temp every 2 seconds and store it in a global variable.

1591103404135.png


Here is the code. You will need to add the ds18b20 node to NodeRed. The DS18b20 is a 1 wire temp sensor. Very cheap and pretty accurate. You will also need to go into raspi-config and enable the 1 wire protocol. If you use a sequent hat it will not work with GPIO4 you will need to configure GPIO6 for it.

[{"id":"ec4d8a52.348db8","type":"ui_gauge","z":"724ce64.5a2ea18","name":"","group":"1f2187ba.db6938","order":1,"width":0,"height":0,"gtype":"gage","title":"Temp","label":"Degrees","format":"{{value}}","min":"50","max":"110","colors":["#0036b3","#e6e600","#ca3838"],"seg1":"85","seg2":"86","x":790.0000343322754,"y":2921.8001413345337,"wires":[]},{"id":"c151b3c9.a78d2","type":"function","z":"724ce64.5a2ea18","name":"Celsius to Fahrenheit","func":"msg.payload = Math.round(msg.payload * 9 / 5 + 32);\nreturn msg;","outputs":1,"noerr":0,"x":584.3999786376953,"y":2941.0001430511475,"wires":[["ec4d8a52.348db8","93af610e.c8b0e"]]},{"id":"473152d5.13ca8c","type":"inject","z":"724ce64.5a2ea18","name":"","topic":"","payload":"","payloadType":"date","repeat":"5","crontab":"","once":false,"onceDelay":0.1,"x":124.59994125366211,"y":2930.400146484375,"wires":[["c901aaf.a7c3158"]]},{"id":"c901aaf.a7c3158","type":"rpi-ds18b20","z":"724ce64.5a2ea18","topic":"","array":false,"name":"","x":343.6000442504883,"y":2935.600142478943,"wires":[["c151b3c9.a78d2"]]},{"id":"93af610e.c8b0e","type":"change","z":"724ce64.5a2ea18","name":"Pool/Spa Temp","rules":[{"t":"set","p":"pooltemp","pt":"global","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":774,"y":3020.199951171875,"wires":[[]]},{"id":"1f2187ba.db6938","type":"ui_group","z":"","name":"Individual Controls","tab":"18b1fe25.b8f1c2","disp":true,"width":"6","collapse":false},{"id":"18b1fe25.b8f1c2","type":"ui_tab","z":"","name":"Pool Actuator","icon":"dashboard","disabled":false,"hidden":false}]
 
Last edited:
  • Like
Reactions: el duderino
Ahhh. Thanks for the clarification- So you are wired up using the 3-wire method, which normally uses the heater's INTERNAL thermostat to call for heat based on the internal set points (depending on if the mode is set to POOL or SPA). Your two relays are basically just switching the mode between SPA/POOL/STANDBY. You still have the heater's internal thermostat enabled, i.e. did not do the keypad sequence to put things into bypass operation. But once your automation determines that the spa set temp (set in your UI) has been reached, it switches the mode back to STANDBY. You also have a 3rd relay that you can completely remove power from the heater.

Thanks for the info on the DS18b20. I believe I read in another post you have one threaded into some beer keg temp sensor holder, which is threaded into a PVC T. I am assuming at your SPA return line. Did you have any discrete components you needed to add to the DS18b20 to the Pi? I've seen videos with added resistors/transistors, etc..

Also, I've been looking for one of the sequent mega IO cards- It looks like they are sold out awaiting a new release.
 
I only have one pump for both the spa and the pool so I have it plugged in right after the pump. So I get the temp for the pool when it is in pool mode, and the temp for the spa when it is in spa mode. Works great.

Yes you do need 1 4.7kohm resistor for the ds18b20. You short the power and data line with it. Also remember you cannot use gpio4 with the sequent. I cant tell you how much time I lost until I figured that one out.
 
Well after a bunch of power surges and just time I guess my SD card finally gave out on the controller.

It’s time to look at this as a crisatunity. It is time to upgrade the controller to the latest version of Nodejs-PoolController. I have been operating on v5.3 for too long.
 

Enjoying this content?

Support TFP with a donation.

Give Support
@Katodude, great work! I see from your sig that you have a Hayward Salt System. Can I ask which one it is and are you remotely controlling it? I have an old Hayward SwimPure Plus that has an RS485 control on it but I can't for the life of me find any way to control it, either manually with direct serial hex commands or any of the open-source options out there, including nodeJS-PoolController. I'm beginning to think it's not an option in this model or that part is fried . . .
 
I also have a SwimPure. I tried to control it with the older version of the pool controller and was not able to. I have not tried since I did my upgrade. Not controlling the salt system is really not a big deal for me since I only change the output a few times a year.
 
I also have a SwimPure. I tried to control it with the older version of the pool controller and was not able to. I have not tried since I did my upgrade. Not controlling the salt system is really not a big deal for me since I only change the output a few times a year.
Ah, ok! I would just like to see the salt levels remotely and since it has a built in temperature probe, I thought I would just use that. Guess I'm back to installing my own dsb18b20 sensor . . . Thanks for the quick reply!
 
Apologies if I shouldn't have responded to this inactive thread but Katodude, Thank You for posting a link to this in your signature.

Are you interested in either designing your own VFD for an AC induction motor or a PWM controller for a DC motor - to drive the pool pump?

Also, where are you sourcing your DS18b20 from and what's the price you typically pay?
 
Where I source everything from Amazon or EBay. The temp sensors were super cheap, dont remember the exact price but it was so cheap it came in a package of 5. I get great readings from it, and I have now linked the automation system to Home Assistant so its all wonderful.

I am not sure I would want to build my own pool pump. The Pentair products are rock solid, and fully controllable by RS-485
 
  • Love
Reactions: plnewb
I am not sure I would want to build my own pool pump.

I miscommunicated. I wasn't implying you build your own pump, just your own driver, which, in case you want to reuse your Pentair VSP would be a WiFi controlled VFD. I am told that the replacement driver is typically $600+ and the only thing that dies in there is a proprietary motor driver that doesn't have an adequate heat sink. On an open market such parts range from $50 typically but in extreme cases $100

Pentair could have used the huge motor metal body as a heat sink (something that both the B&D and Hayward VSPs seem to use) but in typical Pentair style, they decided not to go down the logical route.
 
Still not sure I understand the question.

The Pentair pump has a motor and a driver. The driver has a RS-485 connection. The 485 is connected to the Raspberry Pi which is WiFi connected. Thereby I am controlling my pump now with WiFi. I can turn it on or off, or set it to any speed I want.
 
My apologies - I am talking about the driver that has a RS-485 connection.

The Pentair driver in their VSPs aren't heatsinked adequately, hence they die an early death in an otherwise fully solid state design.

The only thing that dies in there, most of the time, is a proprietary motor driver that doesn't have the adequate heat sink. On an open market such parts range from $50 typically but in extreme cases $100, but you can't buy that proprietary motor driver on an open market.

Ever since the Pentair driver was designed in the 2000s, solid state switches have made tremendous improvements and as you would expect, prices have dropped exponentially in the same time.

Redesigning a product that "works" isn't a priority for Pentair, so they still manufacture drivers with 20 years old tech that cost $600+ and is inferior to a $50 board.

The question is whether there's interest in a $50 board that doesn't need a RS-485 connection because it works over WiFi and uses easy to replace and buy, commodity parts instead of proprietary ICs that cannot be replaced by the end user
 
Ah, replacing the driver when it fails. So potentially yes.

Ideally it should work with both WiFi and RS-485 since most of the automation systems will use 485. The Pentair protocols have been fairly well mapped so it should be easy to duplicate.
 
  • Love
Reactions: plnewb
Ideally it should work with both WiFi and RS-485 since most of the automation systems will use 485. The Pentair protocols have been fairly well mapped so it should be easy to duplicate.

Thank You for sharing these details - I will keep collecting valuable input like this and document what people would like in a new product

One priority I have is the new product should use easy to replace and buy, commodity parts instead of proprietary ICs that cannot be replaced by the end user

One thread I would like to pull on is how open would people be to using treadmill motors - that are essentially DC brushed motors, to run their pool pumps. Treadmill motors can often be sourced very reasonably (often for free) and the only wear item are the two brushes that should be ~$1 to replace.

A major benefit of this would be that you can run your pool pump directly off solar (PV) panels without any expensive inverters in the middle

Or should we just focus on the AC induction motors these pumps come with? AC induction motors are pretty sturdy and unlikely to die anyways?
 

Enjoying this content?

Support TFP with a donation.

Give Support
Thread Status
Hello , This thread has been inactive for over 60 days. New postings here are unlikely to be seen or responded to by other members. For better visibility, consider Starting A New Thread.