Unorthodox pool chemical automation

king4aday

New member
Jun 21, 2015
4
Austin, TX
Hello fine folks,

I'm going away on a trip for a relatively long time, and started thinking about pool chemical automation. Unfortunately I won't be able to do this prior to my trip, but ideation for the future.
I have a 21k gallon inground pool with no special features (no heat/spa). The timer is already automated via a Raspberry Pi to control the pool cleaner and between high/low/off for the 2-speed pump I have. I am relatively good with electronics and programming so no issues there.
I started reading into the various ORP / pH sensors and how finicky they are, also how unattainable the FC sensors are, so due to that started to think outside the box.
Make no mistake, I want to build a hands-off closed-loop control system for the liquid chlorine and hydrochloric acid addition. The addition part is already pretty well figured out by folks on this forum, so I won't go into details there, but the sensing of levels is where most people have their problems.

So, what if instead of using the expensive ORP / pH sensors, one would buy a "color sensor" (if you ever played with a Lego Mindstorms robot, it's a very cheap sensor [$15] that can detect the color of "things" fairly accurately).
In connection with the color sensor, one would need to figure out the proper and accurate dosing of the pool reagents that you use to measure FC / pH in your pool manually anyway. Once that's done, it's ezpz and well-documented on the addition side of things.

What I was thinking of is to plumb a relatively cheap peristaltic pump into the intake side of the pool pump, and it would dose the correct amount of pool water into the measurement vessel, another pump would add the reagent, stir then do the color measurement. Rinse and repeat for pH.
I'm not sure if it's safe to dump the reagents back into the pool water, but I'd think it's such a miniscule amount it wouldn't matter much anyway. (alternatively it isn't hard to figure out a "waste" container for the reagents).

Am I onto something here, or is this completely crazy?

Of course, even when I'm away I'd have to ask people to check the pool every week / every other week depending on season, but it would eliminate having to check levels / add chemicals manually every other day during the summer.
 
  • Like
Reactions: cmc0619

cowboycasey

Gold Supporter
LifeTime Supporter
TFP Guide
Jul 3, 2013
8,648
Southern OK
Pool Size
15000
Surface
Vinyl
Chlorine
Salt Water Generator
SWG Type
CircuPool SJ-40
I am not sure about that but I would 100% recommend a Salt Water Generator instead... Once you have your water good and there are no issues I can go weeks without checking and I know it will be fine... I know my wife will not check it so I keep my levels on the high side of recommended levels... I travel and can be gone a month sometimes... EZPZ :cool:
 

rumcglot

Silver Supporter
Feb 13, 2019
100
Texas
I think the color matching portion is the least of the issues. You can add a camera to the RPi you already have installed. I'll bet the algorithm for comparing color values for two parts of the image is straightforward.

In my mind, the dosing is the much harder part. Maybe a small peristaltic pump can deliver the tiny dose needed, or you have to scale the dosing up. There's an accuracy issue involved with that, too.

For what its worth, here's a RPi automation system in development: segalion/raspipool .
 

jonpcar

Bronze Supporter
Jun 1, 2016
595
Gilbert, AZ
I’m All IN.....to watch, haha. I think it’s possible...the mechanical stuff is where I would be totally clueless except for the pump.
@cmc0619 has mentioned this project but I am sure he has not gotten around to it, yet. See this post:

 

cowboycasey

Gold Supporter
LifeTime Supporter
TFP Guide
Jul 3, 2013
8,648
Southern OK
Pool Size
15000
Surface
Vinyl
Chlorine
Salt Water Generator
SWG Type
CircuPool SJ-40
Right. Except SWGs cost $1000+

You are correct for upfront cost, over 3 years they cost the same as liquid chlorine and if your SWG last 7 or 8 years it is way cheaper then LC.. I am on year 5 with mine so free chlorine for 2 years now :)

I really like what your trying to do though, I also think outside the box on many things so please do not stop because of me, just wanted to let you know what worked for me and my travels...
 

cmc0619

Gold Supporter
May 2, 2018
170
Cherry Hill, NJ
Pool Size
20000
Surface
Plaster
Chlorine
Salt Water Generator
SWG Type
CircuPool Edge-40
I'm in the *very* early stages of doing this myself. I bought every single chip (yes, that's three different links!) for monitoring RGB levels but I settled on a EZO-RGB when I realized I didn't want to solder. I picked up a DPD doser thinking I could use a solenoid to push the button and drop some DPD power into the test vial. Electronic water solenoid valves to fill and wash the container. Some plexi to form a chamber to do all the magic with...

But it's all sitting on a shelf waiting for some CPU cycles to do anything with it. I'm looking forward to seeing what you come up with!
 

sean.a.hyde

Gold Supporter
Jun 5, 2018
143
Pittsburgh, PA
Right. Except SWGs cost $1000+
I think SWG vs liquid CL is besides the point for this discussion. They both simply provide CL at a certain rate. Some are easier to change by computer control than others.
Really what you need is a sensing system. The "color" detection system is interesting. You wouldn't need to dump the reagents back in the pool. you could just "flush" the "reacted" parts to a waste bucket.
 

Chasarms

Silver Supporter
May 8, 2020
355
Dardenne Prairie, MO
The lamotte ColorQ uses such a concept for testing. It first "baselines" the water with a sample with no reagents in it before beginning testing. If there is something in the water that impacts the color shifts, the testing system has to adjust. I would think that the precision of something like this built DYI would be suspect. Anything is possible, but I don't think it is weekend project on a budget. In fact, even that Lamotte system is suspect, and its was developed by a team of engineers and manufactured in a controlled environment.

IMO, you'd be better off to log your chemical additions over time and simply use two pumps on timers to add predetermined amounts of LC and MA based on those logs.

I use a Stenner to deliver LC to my pool, and once I got it dialed in, I haven't changed the dosing volumes in several weeks. When the water is tested after severe conditions, the FC is typcally on the low side of target. When tested after a few dry but cloudy days, it may be on the high side of the target. But it always has been within the 2 ppm target range. It's the same concept as a SWCG. The exact FC levels will ebb and flow, but they stay within range based on a predetermined output.

I don't have a second one to inject acid, but find that my acid additions are very consistent as well. If I wanted to invest the time, money and energy to install a second pump for MA, I am certain that I could dial in a predetermined amount that would keep it within an acceptable range, certainly one that would not get the numbers completely out of sorts in 4-5 weeks.
 
Last edited:

Enjoying this content?

Support TFP with a donation.

Give Support

jonpcar

Bronze Supporter
Jun 1, 2016
595
Gilbert, AZ
I'm in the *very* early stages of doing this myself. I bought every single chip (yes, that's three different links!) for monitoring RGB levels but I settled on a EZO-RGB when I realized I didn't want to solder. I picked up a DPD doser thinking I could use a solenoid to push the button and drop some DPD power into the test vial. Electronic water solenoid valves to fill and wash the container.
Wow, cmc, you were further along with this than I thought. I didn't even know those instruments were readily available. You've got me thinking I should add this to my queue as well, haha...at the rate I am going, sometime in 2023...

I would think that the precision of something like this would be suspect. IMO, you'd be better off to log your chemical additions over time and simply use two pumps on timers to add predetermined amounts of LC and MA based on those logs.
Dialing/recording/using the numbers on my pumps is what I have been doing up to now...it is very similar to figuring out your settings for your SWG over the period of a year. The problem for me (and it seems like for @king4aday), is that in the past I have travelled extensively. Any exception (like a pool party gone wild by my relatives while I am gone, chlorine pump line springs a leak, SWG stops working for any reason), and there is trouble if you don't know for a period of days/weeks.

As far as "precision", ajw22 tuned me into this method a while back when I was having some issues. Big bottles of regent and DPD are pretty cheap, and this gives you quite a bit of leeway to measure the results.

from:

There isn’t normally any reason to do this, but if you need more precision you can do this test with a 25 ml sample of pool water and multiply the number of drops by 0.2. In most situations the added precision is useless and simply wastes reagent.
 

Dirk

Gold Supporter
TFP Guide
Nov 12, 2017
8,627
Central California
Pool Size
12300
Surface
Plaster
Chlorine
Salt Water Generator
SWG Type
Pentair Intellichlor IC-40
Very interesting approach. Anxious to see what you come up with. I may have a need for extended travel in my future. But I plan on solving this another way. I have an SWG and an acid injection system, and once dialed in I can consistently ignore testing for a week. I could comfortably stretch that to two weeks if I thought the weather was going to be stable. But personally I wouldn't trust my pool to its own devices on a regular basis. I think you could maybe build what you're considering, but that doesn't solve for all the other variables of pool care. Air temp fluctuations, filter pressure, leaves in the skimmer, leaves in the pump basket, gophers in the skimmer (or at the bottom of the pool), pump operation, vacuum operation, etc, etc. And that's when everything is running well. What about when something breaks down? I do a pool "walk by" every day. I check my skimmer basket every morning. Check the level of my acid tank. Listen for the pump. Point is, even if you solve for testing and dosing, there are too many other things that can go wrong in your pool to be able to reliably ignore it for weeks at a time. Eventually something will misfire, and you won't know until it does if that's going to be a $15 fix or a $1500 fix.

My likely solution will be to fill the acid tank before I go, then hire a pro (or coerce a neighbor) into checking on my pool regularly while I'm gone. Maybe offer the neighbor use of the pool in exchange for testing the water once a week and checking on the skimmer basket, etc. Something that involves a human doing regular, visual inspections. That covers not only the dosing but also the other daily/weekly maintenance.

And I have a high-res web cam on my pool that helps me "be there" when I can't be.

By the way, there are floating devices that test pool water and report. Maybe wifi? Been a while since I read about 'em, but they have their own set of limitations, too...
 

sean.a.hyde

Gold Supporter
Jun 5, 2018
143
Pittsburgh, PA
The lamotte ColorQ uses such a concept for testing. It first "baselines" the water with a sample with no reagents in it before beginning testing. If there is something in the water that impacts the color shifts, the testing system has to adjust. I would think that the precision of something like this built DYI would be suspect. Anything is possible, but I don't think it is weekend project on a budget. In fact, even that Lamotte system is suspect, and its was developed by a team of engineers and manufactured in a controlled environment.

IMO, you'd be better off to log your chemical additions over time and simply use two pumps on timers to add predetermined amounts of LC and MA based on those logs.

I use a Stenner to deliver LC to my pool, and once I got it dialed in, I haven't changed the dosing volumes in several weeks. When the water is tested after severe conditions, the FC is typcally on the low side of target. When tested after a few dry but cloudy days, it may be on the high side of the target. But it always has been within the 2 ppm target range. It's the same concept as a SWCG. The exact FC levels will ebb and flow, but they stay within range based on a predetermined output.

I don't have a second one to inject acid, but find that my acid additions are very consistent as well. If I wanted to invest the time, money and energy to install a second pump for MA, I am certain that I could dial in a predetermined amount that would keep it within an acceptable range, certainly one that would not get the numbers completely out of sorts in 4-5 weeks.
I think the big difference between what I have seen before and what OP suggests is that they are proposing to do titration and look for color change rather than looking at color itself. This should make the electronic part of the system much simpler and more accurate (while making the mechanical part much more complicated).
 

Brett S

Well-known member
Mar 15, 2019
724
Orlando
This is absolutely doable, and, in fact has already been done. I have a big saltwater reef aquarium and within the last two or three years there have been a number of products that have come out that do exactly this. Take a sample of water and use electronic eyes to watch the color change and read different parameters.

I’ve had a Neptune Trident for a year on my aquarium and it has been working great. That is a pretty closed system and is designed to work with a specific aquarium automation controller, however, you might also want to take a look at the reefbot:

Buy Now | ReefBot | Reef Kinetics

That one is a bit more open and they are actively working to make their system work with different test kit manufacture’s reagents. I feel like it would be a very small step to adapt it to work with pool water and pool test kits. The hardest part would be trying to keep the actual device out of the weather. It will also run multiple types of tests, so it could easily measure FC, CC, pH, Alkalinity or more.

It might even be worth reaching out to the company and see if they have any interest in adapting their device to work with a pool.
 
  • Like
Reactions: cmc0619

cowboycasey

Gold Supporter
LifeTime Supporter
TFP Guide
Jul 3, 2013
8,648
Southern OK
Pool Size
15000
Surface
Vinyl
Chlorine
Salt Water Generator
SWG Type
CircuPool SJ-40
That reefbot is awesome :)
 

Katodude

Silver Supporter
Aug 22, 2017
1,716
West Palm Beach/Florida
Pool Size
15000
Surface
Plaster
Chlorine
Salt Water Generator
SWG Type
Hayward Aqua Rite (T-15)
Now I am really following this. Love some of the ideas, and I promise you within the next two weeks I will be installing my pH sensor. Those at least are supposed to be fairly accurate and not very expensive compared to building something mechanical out.

There are lots of ways to remote monitor what is going on while away. The real issue is if you discover a fault how do you fix it while away. You can use cameras and pressure sensors to check your pump status, and fill of various tanks.
 

king4aday

New member
Jun 21, 2015
4
Austin, TX
After reading into it a little bit more, I might settle for a system with pH/ORP sensors. My problem was the high cost of such sensors, but the github page that rumcglot linked has a link to Atlas Scientific probes, which are $40 apiece (how I missed these so far is beyond me). Yes there are also additional costs for the ICs but that's the case with self-built ones as well. At that price point, I don't even care if I have to replace the sensors twice a year. (based on the datasheet they should last about a year or so).
Now I just need to figure out how I want to plumb these in, on the suction side my pump is very close to the inlet jandy valve, and I need to tee off of that somehow. (I'd base my design based on the github link mentioned above)
 

jonpcar

Bronze Supporter
Jun 1, 2016
595
Gilbert, AZ
After reading into it a little bit more, I might settle for a system with pH/ORP sensors. My problem was the high cost of such sensors, but the github page that rumcglot linked has a link to Atlas Scientific probes, which are $40 apiece (how I missed these so far is beyond me). Yes there are also additional costs for the ICs but that's the case with self-built ones as well. At that price point, I don't even care if I have to replace the sensors twice a year. (based on the datasheet they should last about a year or so).
Now I just need to figure out how I want to plumb these in, on the suction side my pump is very close to the inlet jandy valve, and I need to tee off of that somehow. (I'd base my design based on the github link mentioned above)

King...you are breaking all our hearts, haha. I think you will find that ORP has its own set of issues, especially with an outdoor pool and the need to have a min level of CYA. Keep us informed if you can. The link to github is the repository of SegaLion who was/is a member of these boards.

As far as tying in the pH/ORP probes, he has a solution that I like in his “blog” on these boards. Here is the link to his posts in the development of his system:

 
Thread Status
Hello , This is an inactive thread. Any new postings here are unlikely to be seen or responded to by other members. You will get much more visibility by Starting A New Thread