DIY WiFi Enabled Hot Tub Chlorine Injection System for $100 - $120 USD

DangerBoy

Well-known member
Oct 4, 2018
153
Calgary/Alberta
I've just finished installing a low budget DIY WiFi controlled Chlorine injection system I put together so I can pump a known quantity of liquid chlorine bleach into my hot tub water and cycle my jet pumps with my cell phone from anywhere I have a cell phone data connection or a WiFi connection to the internet. This is a "dumb system" however. I just have the ability to inject a known amount of bleach into the tub using a dose pump and to circulate it by controlling the jet pumps from my phone. It does not have the ability to measure or tell me the FC level in the tub and it's not an automated self-regulating system that monitors FC levels and injects chlorine to keep FC levels within a certain range. That kind of automation could be done but would add numerous layers of complexity to the project. It's something I may look at doing in the future but for now this is just a simple system that does basic things. The beauty of it is that this system can be built upon so that in later stages it could be transformed into a fully automated self-regulated chlorine management system if I wanted to put in a serious amount of time learning how to do that. What would be better and take a lot less time is that people who already have the knowledge and abilities needed to take it to that level, build on what I've done and report back to let us all know how to take what I'll be documenting here to that next level.

With this system, I can only run the dose pump and jet pumps for set amounts of time and I have to do those things manually. For example, I tap a button on my cell phone and that will make the dose pump run for X amount of seconds and then shut off automatically. Similarly, I can control each of my two jet pumps individually with other buttons and when I tap those buttons the pumps will turn on and run for Y and Z amounts of time and then shut off automatically. I have the ability to control the duration of X, Yand Z in the settings of the app that I use to control the Sonoff 4 CH Pro R2 WiFi switch that I'm using to control those devices. BTW, the app I'm using to control everything (eWeLink) is free and is available for download at the Google Play Store and Apple App Store.

Plan Overview

The Sonoff 4 Ch Pro is a pretty simple and inexpensive WiFi controlled gang switch that contains 4 separate electric relay switches that you can control over the internet from a mobile device. It can be powered by AC or a wide range of DC voltages. The switches themselves can relay either AC or DC power and can handle a wide range of voltages. Each relay can be used to handle a different voltage but since the perstaltic dosing pump runs on 12V DC and the relays that control the 230V AC jet pumps on my hot tub also use a 12V DC control signal, I chose to run the Sonoff on 12V DC as well. Having everything all running on DC and at the same voltage makes the wiring a whole lot simpler and easier to understand.

For this project, I was lucky enough to have an unused 120V AC power source in the hot tub pump compartment that was available to use. The power source was at one time used to power the ozonator but since the ozonator that came in my tub when I bought it used was dead and since ozone interferes with chlorine sanitizer systems, I had no plan to replace or fix the dead ozonator and decided just to get rid of it. The ozonator was powered by a power cable plugged into a 120V AC J&J plug outlet on the main control box. I removed the ozonator from inside the pump compartment to free up some valuable wall space and scavenged the power cord from it so I could use the unused ozonator 120V J&J plug terminal on the control box to get power.

My plan was to run that 120V AC through a 12V DC transformer and then use that 12 volts to power the Sonoff directly and also power the dose pump and send control signals to the jet pump relays through the WiFi controlled relay switches on the Sonoff.

Here's a link to the Sonoff 4 CH Pro R2 Operation Guide. It more or less explains how the Sonoff works but is somewhat out-of-date. According to the guide, you have to choose which switches will be run in Self-locking or Inching mode by setting the dip-switches in switch bank K5 on the Sonoff's motherboard. It also says you're limited to setting inching mode durations between 1 -16 seconds and have to do that by means of setting the dip-switches in switch bank K6 on the Sonoff motherboard. (FYI, Inching mode is where you turn the switch on and it turns itself off after a set time interval which you used to have to set with the K6 dip-switch bank on the Sonoff's motherboard). That's all out-of-date now. Due to some recent improvments made to the software program that iTead gives you to control the Sonoff (eWeLink), you now have the ability to switch each of the four devices between self-locking (i.e. when you turn on a switch it stays on until you turn it off) or inching (once turned on by you, the switch is automatically turned off after a period of time set by you) modes AND you can set the inching mode durations by 0.5 second intervals from anywhere between 0.5 seconds to 1 hour. You can also have different inching mode durations on each switch. This makes the Sonoff extremely handy for controlling a system such as this.

So my basic plan was to pull 120V AC power from the unused ozonator power terminal on my hot tub's control box, transform it down to 12V DC, use the 12V DC to power the Sonoff, run the peristaltic dose pump and send 12V DC control signals to the jet pump relays on my hot tub. The peristaltic dose pump would be used to pump chlorine bleach from a 5 L jug placed inside the pump compartment and inject it into an injector manifold that I will make and insert into my hot tub's plumbing just downstream of the circulation pump and heater. To prevent water from the tub moving up into the injector system due to pressure, a check valve will be placed in between the peristaltic pump and the injection manifold.

Since the peristaltic dose pump's speed can be controled by a variac on the pump control box and the duration of the pumping time can be controlled to half second accuracy in the eWeLink software, the plan was to adjust the pump speed and time on (inching) duration until I had it set up to pump enough chlorine to raise the tub's FC by 2.0 ppm each time I turn the dosing pump on from the eWeLink app. For my tub, that would require injecting 37 ml of 10.3 % bleach into the tub water. The peristaltic dose pump is supposed to be able to pump at rates up to a maximum of 75 ml per minute under optimal conditions so it should be up to the task of injecting 37 ml into the injector manifold per minute but even if it takes the pump more than a minute to inject that much chlorine, it's no big deal. All I need to do is find a pump speed setting and a time on (inching) duration that results in the delivery of 37 ml of bleach into the tub water each time I turn on the dose pump and I'm happy. Whether that's 1 minute at a delivery rate of 37 ml/minute or 2 minutes at 18.5 ml/minute, I don't care.

Once I've injected all the chlorine I want, I will then turn the jet pumps on from the app to circulate and mix in the chlorine for long enough to get it well mixed in and spread throuhout the tub. Since I've set the switches sending the control signals to the jet pump relays for 3 minutes in inching mode, the jet pumps will both turn themselves off after circulating and mixing the chlorine for 3 minutes which I figure should be long enough.

Main Components of the system:

1. A Sonoff 4 CH Pro R2 Wifi Switch - These are available many places on the internet like here on eBay $30.00 USD
2. A speed Adjustable 12Volt wall mount peristaltic dose pump like this one on eBay.com List price $20.00 USD incl. shipping. (I made an offer and got mine for $16.00 USD last year). - See Notes below.
3. 1/8" - 27 NPT to 3/16" hose barb adaptor. Available here on Amazon.com and available here on Amazon.ca. $6.50 USD for 10 pack (only 1 was required so I have some spares)
4. Two Waterways 1" slip x 3/4" hose barb spigots (Part no. 672-4310 on this page) (Scroll down 80% of the way to find it) ~$5.00 USD. You should be able to source these from a hot tub dealer or a hot tub parts website.
5. A 1" Slip x 1" Slip x 3/4" NPT Reducing Tee. like this one available at Home Depot ~ $2.00 USD
6. A 3/4" Schedule 40 3/4" MIPT PVC Plug like this one at Home Depot ~$1.50 USD
7. 3/16" Viton check valve Available here on eBay. $18.50 USD for 10 plus $1.00 shipping (only 1 was required so I have some spares)
8. 3 feet of 3/16" ID clear vinyl (PVC) tubing like this at Home Depot $5.00 USD or less - see Notes below
9. 3 feet of 3/32" ID clear vinyl (PVC) tubing like this on eBay $8.00 USD or less - see Notes below
10. 6 - 8 feet of lamp cord. < $4.00 USD
11. 3 feet of light (e.g. 18 or 20) gauge insulated braided wire < $2.00 USD
12. A DC Power cord with a 2.1 mm barrel plug like this one from a local electronics components store < $3.00 USD
13. A 5 pack of .25" female to 2 x male spade terminals like this from a local electronics components store < $3.00 USD
14. A weatherproof outlet cover like this one from a hardware store ~$10 USD - See Notes below

Optional Components:

These make the wiring of the Sonoff a little easier and cleaner but are not essential to the project.
1 A 12 terminal wiring terminal Strip like this one from an electronics components store
2. A 12 terminal jumper strip like this one. Total cost of both items > $8.00 USD

Notes

On Item 2:
The tubing and tubing connectors that come with this unit are NOT compatible with Chlorine so the tubing must be replaced with 3/32" ID 5/32" OD clear vinyl (PVC) tubing (Item 9).
On items 8 & 9: I had a friend who works at a hospital rescue some PVC tubing scraps in both those sizes from the garbage at the hospital. They use this type of tubing for all sorts of things like IV saline drips and throw out miles of it every day. Much of the tubing they throw out at hospitals is perfectly safe to use if it's only had solutions administered into a patient and not a patient's bodily fluids run through it. Use your discretion and best judgment here.
On Item 14: The one I got gave you the option of having the cover open vertically or horizontally and it was a couple bucks cheaper than the one I provided as an example.

Tools Purchased

1. A 1/8" - 27 NPT Taper Pipe Thread Tap Available here on eBay $1.89 USD plus $0.18 shipping

End of Part 1

In the following days I will add more posts providing details and photos on how I put the system together, how I installed it and made it work and problems I ran into along the way. I hope there are at least a few people on this forum who will find this information interesting and useful as that would make all this typing worthwhile.
 
Last edited:

kimkats

Mod Squad
LifeTime Supporter
Jul 10, 2012
48,420
Tallahassee, FL
So not only can take anything apart but you can also put anything together!!!! WOW! AWESOME write up! I can't wait for the pics that go with this! You have some mad skills!
 

DangerBoy

Well-known member
Oct 4, 2018
153
Calgary/Alberta
Okay, well I at least have one person interested so I'll continue...

Part 2 - Making the Injector Manifold

The injector manifold is simply a fitting inserted into the cirulation pump line where the chlorine can be injected. On my tub, the water coming out of the circ pump goes through the heater and then continues on eventually making its way back into the tub. The line coming out of the circ pump and heater is 3/4" i.d. clear PVC flexible tubing. This is where Watkins chose to insert the injector manifold for the ozonator. The line continued on from the ozonator injector manifold and connected to a rather long (I think 8 foot) piece of pipe called the killing chamber where the ozone would be able to stay in high concentration and have enough contact time to kill microbes before bubbling out through the circ pump water outlet in the tub.

Important Design Consideration for the Injector Manifold

Since I had removed the old dead ozonator and wasn't planning on replacing it with a new working one, I thought about using the old ozonator injector manifold for the chlorine injection point. It basically looked like this one for a Sundance tub. After taking a closer look at that manifold, however, I quickly decided that it wouldn't be suitable. The reason for this is because the inside diameter of the manifold was smaller than that of the tubing it was inserted into. That creates a venturi. If you aren't familiar with a venturi or the venturi principle, just know that when you drop the i.d. of a pipe that water is going through and then widen the i.d. back up to the original diameter again, the water has to move faster through the narrow bit than it does the wider bits on either side. That creates a vacuum/negative pressure in the narrow bit. If that's where our injection point is, that means that the vacuum will tend to draw in whatever is being pushed into the injector. At an ozonator injection point, that's what you want; the ozonator bubbles out the ozone continuously so you want the venturi to continuously help draw the ozone into the circ pump line as the water travels by.

This chlorine injection system is not a continuous system, however. You just want to be able to pump in a measured amount of chlorine and stop until you tell it to inject another shot. You don't want a vacuum/negative pressure at the injection point because it could keep pulling chlorine in all the time and drain the chlorine jug. That would be bad. What you want is for there to be a slight positive pressure in the injector manifold so that pressure will help keep the flap on the injector line check-valve closed at all times except when there;s a counter-pressure pushing bleach in by the dose pump.

So that means using an ozonator injection manifold is not an option; you need to make a manifold that has an i.d. the same size or larger than the i.d. of the line the manifold is being inserted into. On my tub, the circ pump line is 3/4" ID so that's why I chose the 1" Slip x 1" Slip x 3/4" MIPT Tee as the basis for my homemade injector manifold. It was cheap, available at Home Depot or Lowes, made from PVC which has excellent resistance to Chlorine and could be inserted into the 3/4" circ pump discharge line right where the ozonator injector was and wouldn't create a venturi. All that was needed to make it work were two 3/4" PVC hose barb fittings (Item 4 on the Components List in Part 1) that could be glued into the 1" slip fit ends and a threaded cap/plug (Item 6) that a suitable hose barb fitting (Item 3) could be tapped into. Fortunately, those things are all available and could be had at a reasonable price.

Here's a picture of what the manifold looked like when it was completed and installed. The water flow direction is from right to left in the photo.

Injector Manifold (Annotated). jpg.jpg

So basically what you do is glue in the two hose barb spigot fittings (Item 4) at either end of the Tee fitting (Item 5) using PVC plumbing glue. The hose barb fittings are made by Waterways and can be sourced from most hot tub parts suppliers.

At the top end, I have the 3/4" PVC threaded cap where I tapped in a hole with 1/8" - 27 NPT thread so I could screw in the hose barb adaptor (Item 3) which would allow me to slip on a piece of 3/16" I.D. tubing carrying the bleach from the dose pump. If you look closely in the photo, you can see there's a piece of black tubing connecting the 3/16" hose barb adaptor to the 3/16" check valve. I'll talk more about that in Part 3.

I should stop here and say that there is something else to consider when designing and building your injector manifold. The Sonoff switch I'm using has four switches that can be used and I'm only using three. One is used for controlling the dose pump and two are used for controlling the two jet pumps. The other isn't being used but could be used to control another dose pump, say for Muriatic acid/pH control if you wanted. I thought about that briefly but decided I won't need that because I use the TFP method for conditioning my water at startup (i.e. bring TA down to 60 before adding the Borate and sanitizer), the pH in my tub is so stable, I rarely ever need to do a pH adjustment. For that reason, I think it's highly unlikely that I'll ever want to add an acid injector in the future.

But let's just say that I did want to someday add a second dose pump into this setup. I don't know what for but let's say I did. The 3/4" PVC threaded cap (Item 6) that I've tapped the 1/8" - 27 x 3/16" hose barb adaptor (Item 3) into is too small to allow for a second hose barb adaptor to be tapped into it. So if you think you may want to have a second dose pump in this system, try to find a 1" x 1" x 1" version of Item 5 to use instead or come up with a different way to allow you to have room for two injection points in the same manifold.

Drilling and Tapping the Hole for the 1/8" - 27 x 3/16" Hose Barb Adaptor

The threads on the hose barb adaptor (Item 3) are 1/8" - 27 NPT. To tap those threads, you'll need a tap like the one referenced in the Tools Purchased part of Part 1. This page will tell you the proper drill bit to use for tapping a 1/8" - 27 NPT straight thread is 11/32" so drill an 11/32"* hole into the PVC cap and use the tap to carefully tap in some threads so Item 3 can be screwed into item 6. Use Teflon tape on the threads of Item 3 to get a better seal. Be careful not to overtighten the hose barb adaptor; it's only made of HDPE and can be damaged and made leaky if you overtigthen it. (I know because I did this on the first one.) After carefully tightening the second hose barb adaptor into the 3/4" PVC cap I ran a bead of glue from a low temp glue gun around the base of the hose barb adaptor as an extra measure to prevent leakage through the threads (a low temp glue-gun emits glue at a lower temp than the melting temp of HDPE which is what the hose barb adaptor is made out of.). You can just see the glue bead in the photo if you look really closely.

* Note: I have this nagging feeling that I drilled a 21/64" hole into the cap not an 11/32". I suggest buying a couple caps and trying a 21/64" hole and tapping that. If it doesn't work you can try reaming it out with an 11/32" bit and tapping that or drilling an 11/32" hole in the second cap and tapping that.

The last step is to screw the 3/4" PVC cap that we just added the hose barb adaptor to into the manifold assembly. Again, use Teflon tape on the cap threads and make sure you get 'er nice and snugged down into the manifold but do not overtighten. Use an open ended wrench or a crescent wrench for cranking it in. A box end wrench or a socket won't work because the fitting is octagonal, not hexagonal.

In the next part, I will talk about all things concerned with the dose pump and associated tubing.

End of Part 2
 
Last edited:
  • Like
Reactions: jasoraso

DangerBoy

Well-known member
Oct 4, 2018
153
Calgary/Alberta
IMPORTANT NEWS

I guess I should've waited longer after I put the system into operation before starting this post. I've had a couple of setbacks. These are noted in red text that I've just edited into the first post in this thread.

First of all, Item No, 3 from the components list (the LDPE 1/8" NPT - 3/16" hose barb adaptor) is not working out. The second one I put in failed on me and started leaking. I originally thought the first one failed because I overtightened and damaged it. I was extra careful when installing the second one and can 100% verify it was not overtightened or damaged when installed. Nonetheless, it split and sprung a leak like the first one did so now I'm thinking the LDPE is not able to stand up to the harsh environment it's subjected to. LDPE is supposed to be compatible with 20% sodium hypochlorite at temps up to 50 C (104F is 40 C) so I thought those adaptors would be perfect for this application but they are not holding up so I'm looking at possibly replacing those fittings with ones made of Kynar. I will be ordering some soon and will test. If anyone can suggest another possible solution for this issue I'd be happy to hear what you've got to say.

Also, I had water back up through the check-valve (Item No.7) and into the bleach jug. Obviously, those check-valves are not rated for the amount of pressure they're subjected to in this application. I'm going to test whether putting two or maybe three of them in series will solve the problem. Failing that, I'll need to find another solution. If anyone has anything to suggest, I'm all ears.

I will pick up this thread when I've got the problems solved and have run the system for at least a couple weeks without incident before I start posting the instructions again.
 

Arobbert

Well-known member
Jul 2, 2016
115
Holland, MI
I built my system using a timer set to run intermittently during the night. I run the hose where the cover folds and into the tub. No problems with the check valve other than It plugs up after about a year. That might have to do with the fact that it's sitting in the water. I use it as a weight to keep the hose in the water.
 

DangerBoy

Well-known member
Oct 4, 2018
153
Calgary/Alberta
Just to let you all know I've found what should be better replacements for items 3 and 7 and have just installed them in my tub. I've got it set up so that if the water backflows through the check valve it'll flow into an empty 5L bleach jug. I'll check it in another 5 days or so to see if there's any water in the jug. If not, I'll replace the jug with one full of bleach and get the injection system working again. I will then use the system and check it daily to make sure I don't have any failures like I did before (taking the cautious approach this time). If all's good after that, I'll pick up this thread again and provide the rest of the information on how I set up my system and let you know what parts I used to replace items 3 and 7 that failed on me when I first set up the system. Here's hoping I come back with good news in 3 weeks!
 
  • Like
Reactions: kimkats

DangerBoy

Well-known member
Oct 4, 2018
153
Calgary/Alberta
The ones I got are Kynar and Viton 50 psi so probably he exact same ones as you got on Amazon. That makes me feel good knowing someone's already tested them and they work well.
 

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.