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
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.
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: