My new automation system.

cmc0619

Gold Supporter
May 2, 2018
170
Cherry Hill, NJ
Pool Size
20000
Surface
Plaster
Chlorine
Salt Water Generator
SWG Type
CircuPool Edge-40
EDIT 8/18/2019:
Node-RED flows now stored on github.
Youtube videos here: Hardware / Node-RED programming
---
Hi all. I wanted to share my new automation system with someone. My wife and kids don't really care but I think it's pretty neat. :laughblue:

Today all it does is the web interface, pump, lights, blower and scheduling of them. But the rest of the parts (actuators, ADCs for temp, pressure, and current readings) are on order.

It's powered by a raspberry pi and Node-Red which is really cool software that makes it easy to do stuff like this.

It replaced my load center so it's kind of big (16"x16"x8") but I was able to mount it on my existing post without too much trouble.

The picture is pre wiring. The wiring is ugly right now and I still have to re-run it to be prettier. Waiting on non-stranded copper so my bends will stay bent.

It uses an industrial style DIN rail to mount all the parts.

Features:
Scheduling and overrides (SPA/Pool mode and individual devices) from Web Interface
RS-485 adapter for integration with Intelli-series of pumps/chlorinators/etc. Node-red has a library for Pentair so this is fairly trivial to implement.

Power control:
16 relay board to drive mains power relays and actuators.
3 240v relays (Pump/Blower/TBD)
4 120v relays (SPA LED/Pool LED/Acid Pump/Chlorine Pump)
(All with supplementary circuit breakers)
1 Always on outside of box power outlet (120v) with weatherproof cover.
3 valve actuators (Pool/Spa intake/out valves and 1 to bypass filter when in spa mode, couldn't find a way to put an actuator on an MPV)
Raypak Heater control (basic dry contact relay)

Reporting/recording/alarming of:
Water/Air Temperature
Current Sensor for pump amp draw
Pressure of filter

To do:
pH testing (easy)
Chlorine testing (hard and/or expensive)

Image-2.jpgImage-1.jpgIMG_5681.jpgIMG_5674.jpg
 
Last edited:

jonpcar

Bronze Supporter
Jun 1, 2016
595
Gilbert, AZ
Hi all. I wanted to share my new automation system with someone. My wife and kids don't really care but I think it's pretty neat

hahaha...that’s hilarious and I know that scenario very well!

YES, I agree this is really NEAT! I have been “working” part time on my pool controller system for the last 6 months or so and have looked at just about every system that is documented on the web. Yours is among the more comprehensive and expandable systems I have come across...

You talk about "trivial" implementation; unfortunately nothing is trivial for me on my similar project: hardware, software, data collection. But, it's a lot of fun. I started down a different path (Particle Photon) and will stick to it rather than a Raspberry Pi. I am just starting to prototype some of my hardware and have spent a lot of time on deciding what I want and designing the user interface to control it.

A few questions: what is that blue device left of your power supplies? Where do you buy your electronics from? The din implementation looks nice and clean (though as you have said you still have to add many interconnecting wires). What device/software does current sensing for your pump, is that the Node-Red library for pump control (reading from the pump itself with the RS485 bus)?

Finally, are you documenting your system anywhere on the web (github, hackster, etc)?

I'm going to ping a few other people who are either working on systems or have expressed interest in doing something similar to your project:

@billmi @sevans01 @Salsiccia @setsailsoon @bscuderi @santacruzpool @physicsrob @lovemyazpool @deepdive @ElDuderino

A couple things you might want to consider (and maybe are) for your project: acid/chlorine tank monitoring (levels), fail-safes for acid/chlorine injection if/when you add those features.
 
Last edited:

kefjens

Well-known member
Jul 25, 2011
73
Michigan
Looks great!

Yeah, I got the same reaction from my family....until I said "hey google, turn on the waterfalls."

I used Lutron Caseta switches and relays/contactors. Saved me from having to learn the Pi at the time. Eventually I'd like to move toward a solution more like yours.
 
  • Like
Reactions: cmc0619

cmc0619

Gold Supporter
May 2, 2018
170
Cherry Hill, NJ
Pool Size
20000
Surface
Plaster
Chlorine
Salt Water Generator
SWG Type
CircuPool Edge-40
Yeah, trivial is probably the wrong word. But it's a LOT easier with node-red. 25 years ago I was a hotshot programming kid who knew 6 computer languages but these days all that seems a whole life away. I wasn't looking forward to python programming or any of that. Node-red even creates the webUI for you. I kept hearing about this node-red thing and decided to check it out. So glad I did. poolBot is where I got that idea from. You basically just drag and drop the flow of what you want it to do.

The blue device is a 24v AC transformer. I feed 24v through the contact sides of my 5v relays and either send it to larger relays or actuators.

My vendors are:
Terminal blocks: Dinkle. EBay or Amazon. You can get these from Automation Direct as well but I like the dinkle brand.

Mains relays and circuit breakers (3rd row): Automation direct.

Power supplies/transformer: Amazon.

Pi Relay/DACs (for instrumentation readings): Sequent Microsystems relay/IO HAT This is in the mail. Will replace the big 16 relay block in the upper right when it gets here. Will make for much more room!

Case: Altelix. They have a sale going on right now. 99$ for this case. I had to buy 2 extra DIN rails. I got the one with the glass door because I thought it'd look sexier in there than it does with all the wiring. That WILL be fixed soon though. If I had to do it over, I might have gone with one of their power vented enclosures.

What device/software does current sensing for your pump, is that the Node-Red library for pump control (reading from the pump itself with the RS485 bus)?

All readings come into the Sequent Microsystems I/O hat. It's not pictured in the picture. But it plugs right into the raspberry pi. I attach a current sensor transformer around the wire and then connect it to the DAC1/2 ports on the I/O hat. This is also what I use for the filter pressure gauge and temperature readings. It's a little device that turns it's reading into a varying voltage level and the DAC can read and interpret that and Node-red has logic that can interpret it and make a cool little gauge.

The node-red library for pump control started as Pentair specific library for the Intelli- line but can now control many other vendors. As long as they use the RS485. They have a active dev community as well along with a Discord server if you need help. I don't actually own one yet... But I plan on getting the VSF pump at some point. This season or next. So I planned for it in my design. This device hangs off my pi and is waiting for me to hook up one of those awesome pumps.

I'm not documenting it anywhere but here. I was going to make a youtube at some point but I have four kids, a wife, a puppy, an ex-wife, a job and not a lot of time. I will eventually get to it. Someday... Maybe. :D

A couple things you might want to consider (and maybe are) for your project: acid/chlorine tank monitoring (levels), fail-safes for acid/chlorine injection if/when you add those features.

Hadn't thought of the levels. I LOVE this. Throwing that on the list! I'm thinking I can use two pH probes and make sure their values jibe before dosing acid.

For the chlorine testing. I'm thinking of making a box with a motor that dumps some DPD into a clear tube with a magnetic spinner at the bottom (ala Speedstir). And then illuminating the chamber with a clear LED and using a color sensor chip to watch the color while I automatically drip R-871 into it. It'll keep track of how many drops it does, detect when the pink goes clear and, Bob's your uncle, you got a reading. But that's down the road.

Thanks for your comments! I'm glad someone else got a kick out of my little project.
 

cmc0619

Gold Supporter
May 2, 2018
170
Cherry Hill, NJ
Pool Size
20000
Surface
Plaster
Chlorine
Salt Water Generator
SWG Type
CircuPool Edge-40
Looks great!

Yeah, I got the same reaction from my family....until I said "hey google, turn on the waterfalls."

I used Lutron Caseta switches and relays/contactors. Saved me from having to learn the Pi at the time. Eventually I'd like to move toward a solution more like yours.

Great idea! I didn't even think of that! Node-red supports Alexa (we're an amazon family). That might be the thing that gets me to the wife acceptance factor level!
 

bdavis466

TFP Expert
Platinum Supporter
Aug 4, 2014
5,529
San Clemente, CA
If you're serious about testing chlorine levels then you might want to look into a true hypochlorous acid sensor or something like this:


I would be really curious to know how well that sensor works on a cost to accuracy basis.... not that a fully automated FAS/DPD test wouldn't be cool.

ORP isn't worth considering
 

cmc0619

Gold Supporter
May 2, 2018
170
Cherry Hill, NJ
Pool Size
20000
Surface
Plaster
Chlorine
Salt Water Generator
SWG Type
CircuPool Edge-40
If you're serious about testing chlorine levels then you might want to look into a true hypochlorous acid sensor or something like this:


I would be really curious to know how well that sensor works on a cost to accuracy basis.... not that a fully automated FAS/DPD test wouldn't be cool.

ORP isn't worth considering
I looked at those a few weeks back. They wanted like 3000 I think. Even the knock off alibaba probes want 500-1000. It better work 100% for those prices!
 

bdavis466

TFP Expert
Platinum Supporter
Aug 4, 2014
5,529
San Clemente, CA
I knew they were expensive but that's a little much. At least they're coming down in price. Just a few years back the least expensive one I could find was 12k?
 

cmc0619

Gold Supporter
May 2, 2018
170
Cherry Hill, NJ
Pool Size
20000
Surface
Plaster
Chlorine
Salt Water Generator
SWG Type
CircuPool Edge-40
Looks like some Node MCU's in there? I might try something like this using my Samsung Smartthings.

Nope! Just a good ole single Raspberry Pi 3B. I have a Smarthings too. Didn't even think about using that. It's basically just for my konnected.io alarm system. Good idea.
 

Enjoying this content?

Support TFP with a donation.

Give Support

s_dubb

Well-known member
May 24, 2019
85
South West, Arizona
Nope! Just a good ole single Raspberry Pi 3B. I have a Smarthings too. Didn't even think about using that. It's basically just for my konnected.io alarm system. Good idea.
Awesome! I have the konnected.io also and a 4 relay board for my sprinkler system.
I have to manually turn the value for the water fall feature, I am trying to figure out how to connect a device (relay) to turn it with my phone via Smartthings.
 

jonpcar

Bronze Supporter
Jun 1, 2016
595
Gilbert, AZ
Cmc, thanks for the detailed reply detailing where you bought your components. I will probably end up using some DIN components in my final design, if I ever get there. I love your case and that is a great price for it, but unfortunately I just bought mine (also an Altelix from Amazon warehouse, about the same size but not as deep) about 3 weeks ago.

The Raspberry Pi is nice in that there is so much support (hardware and software). I’ve looked at the nodejs-poolController site a number of times. That system/protocol probably would have been much easier for me to bring up since they are seemingly making it general purpose. That’s a great project by some dedicated people.

I hadn’t seen the Raspberry PI Swimming Pool Controller - poolBot | Drew . Beer site, another impressive project. Thanks for pointing it out. I believe I saw that Particle.io is working on a node-red implementation for their products (I’m using their Photon). I should probably check that out in more detail.

I’ve posted these sites a number of times, but just in case you haven’t seen them, here are a couple (of many) projects that finally inspired me to get going on mine:

Pool Fill Control

Automated Pool Controller

Both of those projects have “low-level alert” circuits for their acid/chlorine chemical tanks. Both use (used in 1 case) a Milone eTape for water level monitoring and pool fill. I am planning on using the Milone eTapes technology to track my chemical levels more precisely, rather than just a “low alert”. I was told by the manufacturer that with their teflon sleeve, you can stick them directly in liquid chlorine/acid.

As far as chemical dosing, I am probably overly worried about a few things. 1) I had a different project where a rather cheap relay “stuck”…I am afraid this might happen with one of my stenner acid/chlorine pumps and so am planning on using two relays in tandem to enable those pumps. 2) hardware implementation to ensure that both acid and chlorine can’t be injected at the same time, just in case my software has a bug 3) software watch dog timer to make sure code doesn’t get locked/looped with one of those pumps on. Maybe overkill but it doesn’t seem like a lot of additional work to add those safeguards.

One other thing I am planning (that I haven’t seen elsewhere) is the use of multiple pressure transducers. This is the part of the project I am bringing up first just to check if I can attain some of the goals I have including: 1) obviously filter monitoring for clogging 2) skimmer basket monitoring 3) pump basket monitoring 4) some checks on my In-Floor–Cleaning-System 5) catastrophic failures including pump/pipe failures. I think I will know pretty quickly which of those goals can actually be attained. Two of those additional transducers will go on the pump itself (suction and return side). One will be for my IFCS manifold and the obvious one will be on my filter.

Anyway, just some ideas since you are so much further along that I am.

Hey, if you successfully make that automatic free chlorine tester and it is relatively cheap, you would probably be able to sell them. But that sounds like possibly a bigger project than your pool project so far. It would be really cool and I’m rooting for you! I am sure I will have further questions for you at a later time.

Anyway, congrats and thanks again for posting your project!
 
Last edited:

DrewBeer

New member
May 24, 2018
4
California
well hello there! looks good. if you have any questions about my project let me know. i haven't rebooted it since the day i put it in. now that i think about it, i haven't touched it for a while haha. i still need to hook up the pressure sensor and i'm thinking about adding ph sensors. first i need to move it to gitlab/docker, we'll see. too many other projects to work on.
 
  • Like
Reactions: outbreak

jonpcar

Bronze Supporter
Jun 1, 2016
595
Gilbert, AZ
Hey Drew, thanks for chiming in...love your site and and your pool controller! I’m hoping mine will get close before a scheduled long trip later this year. I’ve already zoomed into your picture and ordered that 24vdc power supply on the slow boat from China (eBay because they are really cheap). I’m considering the Mean Well din power supplies used by the OP (cmc0619) on his system as well. I need a higher dc voltage for the used industrial pressure sensors I picked up on eBay.

Your uptime is admirable...have you needed to change the scheduling and is that something that is just done on the fly? Here in the desert my pump run times/schedule and chlorine requirements change dramatically with the seasons.

I do have one question...I’m having a hard time finding an external/outdoor WiFi antenna, reasonably priced. Do you remember where you got yours...apparently it has worked well for you. My equipment pad is on the fringe of my coverage.

DO add the ph sensors...I need more examples of successfully implemented systems before I stumble into messing them up :). But before you do that, post a video of your nerf machine gun if the kids haven’t long since dismantled it, haha.
 

DrewBeer

New member
May 24, 2018
4
California
the full photos are here Pool Project - PoolBot

i chose not to junction everything in the pool controller, there is a box that sits below it that is more of the central patch.

as for scheduling no, i haven't really had to adjust it. but since its controlled by node red its pretty simple to do.

as for wifi... well i didn't have very good luck with it. so i ended up getting some unifi gear (like 40 bucks a piece) and setting up a point to point between my house and the corner of the yard. it worked great. then last summer we ripped out the old fence and replaced it with a proper wall. this gave me the chance to run some cat6 to the pool equipment. (i also ran new power to feed the bbq from the pool since new subpanel had plenty of room, it used to be fed off the garage). you're better off extending your network. look at the ubiquity nanostation, or something like this LiteBeam M5, super easy to either use one as a bridge and point it towards the house or get two and build a proper bridge.

the antenna you see on the top of the box is for the SDR. i have a floating thermometer and thats how i pull the data from it, google SDR433.

hopefully in a few weeks i'll have the pressure sensor in, the PH is a little more complicated as i have to change some of the plumbing around, but last night i learned that 50% water 50% white vinegar cleans salt cells :)
 

jonpcar

Bronze Supporter
Jun 1, 2016
595
Gilbert, AZ
Drew, I am going to try like heck to get my WiFi to work without adding boosters. Particle.io does quite a bit of monitoring on field deployed devices (like my Photon), so I’ll know pretty quickly if it is going to be stable or not...and if it doesn’t work out I will start looking at your suggestions. Thanks.

I like the idea of a floating thermometer so that the pump doesn’t have to be running to measure the pool water temp...but I also have seen a number of projects that couldn’t completely solve the water/power issues of a floating thermometer without having to go through hoops. I’ll keep thinking about this one.
 

jonpcar

Bronze Supporter
Jun 1, 2016
595
Gilbert, AZ
Solar power and water proof...solved! Thanks Drew, that will have to go on to my “list”, which I hoped by now would be getting smaller :).

CMC, I’ve also added your current sensing/power measurement functionality...I am actually not quite trusting the power usage readings I get from my pump over the rs485 bus. They “floor” at 139watts and to date I have seen no other ecostar owner indicate that happens on their pump. I should probably just measure it manually to see what is happening.
 

cmc0619

Gold Supporter
May 2, 2018
170
Cherry Hill, NJ
Pool Size
20000
Surface
Plaster
Chlorine
Salt Water Generator
SWG Type
CircuPool Edge-40
Update! I took out the unit and refactored the wiring. It's a little more manageable now. As good as it's going to get I think without different parts.

The Sequent Microsystems HAT came in with it's 8 channels of ADC so I'm now reading pressure from my filter (16.1 psi... Time for a backwash!). I installed a pressure transducer to the top of my filter. Just screwed it right in. Pretty easy. Having the HAT in the system made a huge difference in terms of space too. Lots more room.

I also took @kefjens idea and Alexa enabled the unit. So now I can say things like "Alexa, turn on the pool pump" and it springs into action. Amazing, how simple it was to do with node-red. Took about 15 minutes.

Heater relay is also hooked up. So I can now control the heater in an Off/Spa heat/Pool heat fashion from the unit. The heater isn't smart enough to control temp over the control wires. When I add the temp sensors I'll max out the heat/pool temps and control it via the controller.

My wifes main complaint was how do I use the thing when I don't have my phone (As if...) and Alexa isn't in the backyard (we move it in when it rains), my first thought was to install some manual override buttons but then I came across this Flick 3D board. It's a gesture sensor. I'm going to mount it at the bottom of the window inside the enclosure (doesn't need direct contact, can detect up to 6" away) and you'll be able to swipe up for pool on, down for system shutoff, right for spa mode, and left for lights (1 swipe left for pool, 2 for spa, 3 for both). It's shipping from the UK. So a bit of a wait on that.


TODO:
Split SPA/Pool circuits into two power runs/switches.
Add temp sensors so I can max out heater and control on/off from Controller
Add eTapes to my chlorine/acid tanks (Thanks @jonpcar!)
Flick 3D install (in the mail)
Current sensor (in the mail)
pH sensors (in the mail)
Clean up webUI
Always-on GFCI power outlet on side of unit
Maybe add logging...



Cabinet.jpgDisplay.jpgGauge.jpg
 

jonpcar

Bronze Supporter
Jun 1, 2016
595
Gilbert, AZ
CMC...nice relay/analog board. That was quick! About the phone control...can you install it on your wife’s phone as well? My plan is to eventually buy a cheap android tablet and install my user interface on that. That way I can leave it around near the patio. But gesture control? Haha

One other suggestion, when I get around to installing my pressure sensors, I have bought these:


There is something comforting (to me at least) to be able to verify the digital readings with existing pressure gauges. The readings of my pressure transducers seem pretty accurate so far (not installed, just bench testing)...I hope to verify correlation over a wider range by keeping my old gauges on.

Thanks again for documenting...these system examples are a perfect inspiration for me to speed mine up , don’t know if that’s possible.
 

Enjoying this content?

Support TFP with a donation.

Give Support
Thread Status
Hello , There was no answer in this thread for more than 60 days.
It can take a long time to get an up-to-date response or contact with relevant users.