Swimming Pool Chemical Dispenser

Nice. Happy to hear that the freeform cmds provide a good backdoor for you :slight_smile:. I’d also be curious if it works and how long a setup like that lasts. It’ll also depend on how much pressure is in your system naturally.

“I will write up a quick and dirty guide if you or anyone else is still interested.”

I would be very interested in a guide. Atlas scientific had supply problems and I just received mine a couple of days ago.

This section is lacking the “name” part. Noticed that because HA did only show two of the three sensors ;-).

home-assistant/esphome/pool.yaml at 8d7c4251b62b1e1b06b7d65726e10180a80911c2 · swa72/home-assistant · GitHub shows my config which exposes all three sensors along with some other stuff to HA.

If only I can get the calibration part from within ESPHome. Anyone any idea?

Hi @swa72.

Maybe, you can use an input boolean from HA to ESPHome in order to trigger an action based on this boolean state. Then, the trigger can send a packet to a Custom I2C device with the information for calibration. So, it would be a bit similar than with Tasmota except without MQTT. 3 inputs boolean for the 3 pH calibrations.

In YAML, you then should include the custom i2C device with those statements:

# Example configuration entry
esphome:
  includes:
    - my_custom_component.h

custom_component:
- lambda: |-
    auto my_custom = new MyCustomComponent();
    return {my_custom};

You can find some another examples with custom i2C here

Just finished installing my Atlas Scientific sensors and the EZO-PMP. This setup is awesome. I have no issues whatsoever using the EZO PMP to dose chlorine with a filter pressure of 20 psi (although with my variable speed pump, it’s usually around 7 psi).

I chose to keep it with Tasmota since I can calibrate and dose down to the mL all within HA.

Couldn’t be happier.

4 Likes

Would you mind posting or linking the commands used within tasmota?

I have atlasscientific ezo-usb adapters and ph and ec probes connected to a rpi0w with a small multi-usb hub.

When I have a moment to reread this thread, I will post how I use shell commands to calibrate sensor, again its via serial/usb, but it does work.

Calibrate (repeat for high and low):


sensor78 -2 Cal,mid,7.00

Replace the -2 with whatever number Tasmota assigned to your probe

Dispense:

sensor78 -4 D 999

Replace the -4 with whatever number Tasomta assigned to your pump and the “999” with the amount of mL you want dispensed.

Then pass these commands through MQTT to use within HA

Hi @JM123. Nice job !

Would you mind to share the software for contolling the pump and the relays (activation according to pH and ORP reading) ? Also, could you share some pictures of the tubing for the EZO probes and for the Chlorine feeding pipe connection ?
Any references for the boxes, the power supply, the relays board, tubing fittings for probes and feeding ?

Thank you.

And then come round and install it for me!!

I bought the Atlas Scientific Pool Kit which I eventually took apart and repurposed into my own box. You could save some money here buy purchasing these components individually, but I chose to purchase the kit instead since it was all nicely put together on a custom PCB. I am using the NodeMCU that came with the kit to control everything, which I reflashed with Tasmota. Since I had a union at my heater, I could easily remove this pipe and glue in some threaded tees. These are just 2" slip tees with a 2" x 3/4" NPT fitting on top. The black part that the probes sit in comes from Atlas Scientific. Overpriced, but didnt want it to leak.

The relays I have are just generic 24v relays from Amazon. → 24v Relays. One supplies the positive leg to the two pumps and is connected to my filter pump relay for the trigger so that the pumps are only powered when the pool filter pump is on (if you do this, you do need another relay in your pool panel since it does not share a common ground with the relays controlling the chemical pumps). The other relay controls the negative leg of my two pumps. Because my Acid pump is a “dumb” pump and dispenses when 24v is present, I have it on the NO leg of the relay, and I have the chlorine EZO pump on the NC leg, since it dispenses with data commands. The end result is that neither pump can run at the same time. I activate that relay with one of the pins from the NodeMCU. I also use the Pulsetime command in tasmota to set the amount of acid so that the pump isnt relying on an MQTT command to shut off.

I used a 24v power supply since both pumps require 24v. I also found this small 24v to 5v converter with microusb to power the NodeMCU

Instead of purchasing a standalone tank for the acid, I bought the Pentair Acid tank system intended for use with the Pentair IntelliPh/Chem system. For the $330 it is almost the same price as a custom setup and is purpose built–it includes the tank, pump, injection check valve, saddle clamp, and tubing. As I mentioned above, it is just a pump that dispenses with 24v and incorporates the very popular Stenner pump (which alone is >$200). I liked the purpose built setup Pentair had for its acid since the tank is sealed, can be vented away from your equipment, has a spike inside to puncture your acid bottle, (and at the time I bought this I didnt think the EZO pump would work).

The chlorine I get comes in a 2.5g tank which is easy to swap every week or so, and since the liquid chlorine doesn’t handle heat well, I can keep a couple of the 2.5g tanks in the house rather than have a large 15 gallon tank outside. I also added this weight to the end of the tubing to keep it at the bottom of the tank.

As for the injection point, I didnt have any play in my plumbing to add tees, so i decided to tap the pipe, rather than redo a big section just to glue in some tees–I figured if it leaked or failed, I would have to cut the pipe anyway, so I just decided to try and tap the pipe first. One of the injection points is using the saddle clamp that came with the Pentair tank and it includes a o-ring underneath for a nice tight fit. I had also planned on using another saddle clamp, but couldn’t find one for less than $30, which seemed ridiculous, so I just tapped that and screwed the injector straight in. You can’t see it well, but before the threaded section you see in the photo, there is a smaller set of threads. You can see a tiny amount of liquid in the photo, but that was leaking from the threaded connection into the saddle clamp and needed a little more thread tape–easy fix.

Other Parts I used:

Injection Check Valve

Large Enclosure

Small Enclosure
(Wanted to keep the liquids out of the same enclosure as the electronics incase of a leak)

The tubing I am using for the chlorine is just drip line irrigation tubing from Home Depot with split loom on the outside. We will see how well this holds up. The acid tubing came with the acid pump, but it looks identical to the irrigation tubing–no special markings. I also wrapped that in split loom, and my acid is diluted 1:1 to ~16% based on the recommendation by Pentair. Either way, I plan on replacing the tubing seasonally.

As for actually running the system, currently it does not rely on the probes for dosing. The pH probe is very accurate and works well. It could definitely be used to run dosing automations, but I haven’t gotten that far yet. Since the pool only requires Acid in small amounts I just have a script setup that I run as needed (11 seconds/oz). Even though it doesnt get used nearly as much as the chlorine, it is reeeeaaaally nice to be able to add acid to my pool with the touch of a button rather than choking on acid fumes. Worth every penny imo.

As for the chlorine, the ORP probe is still a bit of a mystery to me. Readings fluctuate between 600-800 depending on the FC, pH, time of day, and temperature of the water. Adding enzymes to the pool also causes it to plummet. I knew this may not work as well as I wanted, but I am tracking the readings and hoping to eventually find some useable measurement based on trends in the water. So far, my attempts to convert it to FC have not been accurate at all. My CYA (~50) may also be too high for it to work well, but I dont want to get it too much lower than than or I’ll need way more chlorine. Luckily, my pool consistently consumes about 2ppm of FC daily in August, which equates to about 52 oz of chlorine, so I am dosing half in the middle of the day and the other half after sunset. Ultimately, I think the ORP will help alert for problems if the FC gets too low, but I’m not sure it will ever be an effective measurement of FC like the pH probe.

Let me know if you have any more questions…

5 Likes

Great and detailed post thanks. For those reading there are instructions on atlas scientific’s website about incorporating sensors in the pipes, and some help on the raspipool githib.

You can do it! Honestly, it ended up going together easier than I expected. You (and others) can also check out Trouble Free Pool. Very active forum on pool maintenance, and since they push liquid chlorine on that site, there are alot of people who have setup dosing pumps and documented their process.

Yes TFP is great.

I only have a spa. There is very limited pipework to add sensors and injection points. The atlas 3 in 1 probes would be better from that perspective, but bloody expensive, especially when converted to NZ$/

Wow !!! I wasn’t expecting so much information. Thank you very much. I would need some times to integrate all of that and also to check where I can get the equivalent products from Europe.

Do you confirm it’s worth investing in EZO pumps (for Chlorine and acid) or do you see only a limited advantage versus a ON/OFF peristaltic pump controlled through a relay ?

I understand that you did some electrical relays connections to avoid the pump running at the same time. But what’s the point of doing that ? And wouldn’t it be easier to manage the pumps through software with the I/Os.

Regarding the ORP data, maybe the following information might help you finding out how to interprete them :

with some tabulated data to consider the relationship (credit @smurry) :

and the code to load them :

The EZO pump was actually cheaper than the common alternative. In my research, most people went with the Stenner pumps, which are $200+. Granted, you can purchase some cheaper ones on aliexpress/ebay, but reliability was important for me here. My acid pump is a Stenner on/off pump and ultimately, there is very little difference in operation. I think the EZO pump is probably more accurate, but, that level of accuracy is not really necessary. I also really like using the Pentair Acid tank system.

You definitely do not want to mix muriatic acid and chlorine. That will create dangerous chlorine gas. Yes, you can set times appropriately, but I wanted a physical safety feature rather than relying on the software. And since I had the relay already for the non-smart pump, it was an easy add to wire up the EZO pump on the NO side of the relay I already had in place.

I have seen those posts on the ORP data, and have set up several of their sensors. They are all wildly different, and so far, not close at all. That said, I have not invested much time into it yet…

Great post - thanks for sharing. I’d be keen to here if people see the same ORP fluctuations (or other experiences) with the three in one sensor, as tossing up which one to go for.

I also went the Atlas route and was wondering which EZO pump did you use? Standard or Large? I have the standard size Ezo pump which injects fine especially if the pump is on low. I have not tried it on high yet, still in the setup phase. The pumps will be connected to an Atlas Scientific sensor bridge. I notice that I’ll have to change the pump address, testing tomorrow.

I had the small ones also. I had no problems with them although I’ve since switched to a stenner pump only because the tubing on the ezo pump is so small. The plastic connectors I used ended up failing and I had a hard time finding something with more chemical resistance that would fit in the ezo pump I trusted to hold under a harsh chemical environment.

TLDR; I’d go with the larger one

Thanks for the reply. I’m using brass fittings on the first pump to transition the tubing size differences. I’ll have to find a different option for the chlorine.

How did you end up calibrating the sensors with esphome?

Did you use calibrate_linear or calibrate_polynomial from this page Sensor Component — ESPHome