Become a TFP Supporter Pool Math Forum Rules Pool School
Results 1 to 16 of 16

Thread: Foobert's bleach pump automation

  1. Back To Top    #1
    foobert's Avatar
    Join Date
    Jul 2013
    Location
    Bay Area, CA
    Posts
    143

    Foobert's bleach pump automation

    After a year of dumping various sorts of chlorine into the pool, I finally got all the bits and pieces together to automate the chlorine addition process. The key element that pushed me over the hump was learning I could open a COD account at Hill Brothers Chemical to buy commercial sized quantities of 12.5% bleach at a reasonable price. The 15 gallon, reusable carboy is a perfect size -- enough to last me about ~3 months without any packaging waste to deal with.


    [center:jj7pc718]Industrial Bleach

    Nikon D600, ISO 5000, ƒ/3.5, 1/50sec, 42mm focal L.[/center:jj7pc718]

    The next part was the positive displacement pump to move the bleach with. I found a Watson-Marlow OEM peristaltic pump on eBay. It runs with simple 12V DC and pumps a quart in a little over 9 minutes.


    [center:jj7pc718]Watson-Marlow Pump -- Model 102FD/R for OEM applications

    Nikon D600, ISO 2000, ƒ/2.8, 1/50sec, 38mm focal L.[/center:jj7pc718]


    For the design, I wanted to have a web-enabled interface to allow me to control it from any browser on my network. And, I wasn't going to drag a network cable out to the pump equipment, thus, it needed to be WIFI enabled. The Raspberry Pi is the perfect solution: runs on linux; has USB port(s) to plug a cheep wifi dongle into; runs on 5V power from almost any USB phone charger; $30 including WIFI dongle.


    [center:jj7pc718]Raspberry Pi -- with a 5V regulator, and a few relays to control stuff

    Nikon D600, ISO 800, ƒ/4.5, 1/50sec, 27mm focal L.[/center:jj7pc718]



    The rPi has quite few GPIO that can used as 3.3V LVTTL output signals. I put together a few relay circuits: 1 to turn on the peristaltic pump, and 1 to kick on the main pool circulation pump.


    [center:jj7pc718]GPIO to relay
    [/center:jj7pc718]


    It's all mounted into an outdoor rated box that keeps the weather out. The output of the chemical pump is plumbed into the intake side of the main pool circulation plumbing.



    [center:jj7pc718]The final install

    Nikon D600, ISO 180, ƒ/4.5, 1/50sec, 26mm focal L.[/center:jj7pc718]


    On the software side, a simple PHP web interface front-ends a MYSQL database to keep a history of all measurements made. Knowing the size of the pool, the past chlorine inputs, and the subsequent measurements taken, it's a straightforward calculation to figure how much bleach to inject to maintain the appropriate concentration. Everyday after the sun goes down, the Pi kicks on the main circulation pump, meters out the bleach, and then circulates the water long enough to circulate it thought out the pool. Although the software can all run stand-alone on the rPi, the database and web-interface lives on my main web server.



    As an added bonus, the system reminds me when it's time to take the various measurements -- as the old measurements go stale, the colored box fades to gray showing that it's about time to retest that portion of chemistry.


    Also, the Raspberry Pi also trivially interfaces to Dallas/Maxim 1-wire sensors to measure temperatures.

    If you want to attempt do duplicate this effort, I'm willing to share many more details, but, I will forewarn that the SW is a real hack that was hastily written without any mind to be easily transported to another situation.
    ~john
    24.5K G, pebble, SuperFlo VS 1.5, 48sq DE filter, Hayward H250FDN, Autopilot RC-52, Poolvergnuegen & 3 daily swimmers in season.

  2. Back To Top    #2

    Re: Foobert's bleach pump automation

    I am impressed,

  3. Back To Top    #3
    topher's Avatar
    Join Date
    Jun 2012
    Location
    toronto, Ontario, Canada
    Posts
    136

    Re: Foobert's bleach pump automation

    I would love to do that. A good use for pi...

    13500 gallon AG, build late 90's, Hayward S220T sand filter,1Hp aqua coastal
    Gasser BBQ broilmate 155154 LP, Smoker CGK (akorn)

    ,

  4. Back To Top    #4
    foobert's Avatar
    Join Date
    Jul 2013
    Location
    Bay Area, CA
    Posts
    143

    Re: Foobert's bleach pump automation

    Topher -- ping me if you have any questions. I found it to be a fun project. Don't skimp on the pump -- the little cheepy units found ubiquitously at DIY electronics places are utter junk:


    The copy I had with failed to move the rollers after a mere 45 minutes of total usage.
    ~john
    24.5K G, pebble, SuperFlo VS 1.5, 48sq DE filter, Hayward H250FDN, Autopilot RC-52, Poolvergnuegen & 3 daily swimmers in season.

  5. Back To Top    #5

    Re: Foobert's bleach pump automation

    Foobert,

    Very impressive... makes my pool light app look like child's-play. Question: does the RB measure the chlorine levels in the pool and add the appropriate amount, or is it just programmed to put a pre-determined quantity into the pool on a recurring basis?

    Kevin
    ---
    30,000 gallon vinyl pool
    Hayward DE Filter
    Hayward Super Pump
    AO Smith 1 1/2 HP Pump (27GPM)
    Polaris 380 Pool Cleaner

    Check out the app I created to control my pool equipment from my smartphone:
    i-created-an-app-to-control-pool-equipment-with-smartphone-t61606-20.html

  6. Back To Top    #6

    Re: Foobert's bleach pump automation

    Also,

    Where does the chlorine enter the pool? Do you have a line draped over the side of the pool or is it plumbed in somewhere?

    Kevin
    ---
    30,000 gallon vinyl pool
    Hayward DE Filter
    Hayward Super Pump
    AO Smith 1 1/2 HP Pump (27GPM)
    Polaris 380 Pool Cleaner

    Check out the app I created to control my pool equipment from my smartphone:
    i-created-an-app-to-control-pool-equipment-with-smartphone-t61606-20.html

  7. Back To Top    #7
    foobert's Avatar
    Join Date
    Jul 2013
    Location
    Bay Area, CA
    Posts
    143

    Re: Foobert's bleach pump automation

    Quote Originally Posted by kodiak1120
    Question: does the RB measure the chlorine levels in the pool and add the appropriate amount, or is it just programmed to put a pre-determined quantity into the pool on a recurring basis?
    Kevin
    Thanks for the kind words.

    It's a closed-loop feedback control system. I periodically take manual measurements and enter the results through the web interface to update the history database. Then, the automation takes over from there to compute the necessary dosing and apply it as needed. Once the system is stabilized, I'm pretty sure I'll be able to walk away from it for a week's time without worries of coming back to a green pool.

    I've thought about using an ORP/PH sensor to close the loop automatically. However, I'm not convinced that the hassle of calibrating and maintaning the ORP sensor is any less work than just taking a manual FC measurement every few days. From my understanding, there are also some vagaries of the ORP reading that requires "learning" before the result can be trusted. Considering it takes 2 minutes to do the FAS/DPD test and PH and there is always something else to do with the pool (check the skimmers, check for critters, skim the leaf crop off, etc), one can never truly just be completely hands off.

    I plumbed the output of the bleach pump into the suction side of the pool circulation pump (for better or worse). It has the advantage of putting less stress on the bleach pump but the disadvantage of running the higher-strength oxidizer through the pump/filter and some additional valving. I'm not terribly worried about the later. At full speed, the bleach pump injects about 3.5 oz/minute. If my pool circulation pump moves 60 gallons/minute, that's an equivalent FC concentration of ~30ppm flowing through the plumbing. I could easily slow down the injection rate if I really wanted to.
    ~john
    24.5K G, pebble, SuperFlo VS 1.5, 48sq DE filter, Hayward H250FDN, Autopilot RC-52, Poolvergnuegen & 3 daily swimmers in season.

  8. Back To Top    #8
    RIRSZ's Avatar
    Join Date
    Jul 2012
    Location
    Central New Jersey
    Posts
    54

    Re: Foobert's bleach pump automation

    Man, that is very cool! I've eyeing the pi for a few months now, but my wife will kill me if I bring home a new hobby!
    George
    32k gal IG free form / Vinyl Liner (cement wall) / Jandy 2 HP FloPro
    LRZ400EN Heater / Jandy CV460 Cart. Filter
    Paramount Vantage in-floor pool cleaner / built April 2013

    Pool Equipment Picture (on Flickr)

  9. Back To Top    #9

    Re: Foobert's bleach pump automation

    Quote Originally Posted by foobert
    Quote Originally Posted by kodiak1120
    Question: does the RB measure the chlorine levels in the pool and add the appropriate amount, or is it just programmed to put a pre-determined quantity into the pool on a recurring basis?
    Kevin
    Thanks for the kind words.

    It's a closed-loop feedback control system. I periodically take manual measurements and enter the results through the web interface to update the history database. Then, the automation takes over from there to compute the necessary dosing and apply it as needed. Once the system is stabilized, I'm pretty sure I'll be able to walk away from it for a week's time without worries of coming back to a green pool.

    I've thought about using an ORP/PH sensor to close the loop automatically. However, I'm not convinced that the hassle of calibrating and maintaning the ORP sensor is any less work than just taking a manual FC measurement every few days. From my understanding, there are also some vagaries of the ORP reading that requires "learning" before the result can be trusted. Considering it takes 2 minutes to do the FAS/DPD test and PH and there is always something else to do with the pool (check the skimmers, check for critters, skim the leaf crop off, etc), one can never truly just be completely hands off.

    I plumbed the output of the bleach pump into the suction side of the pool circulation pump (for better or worse). It has the advantage of putting less stress on the bleach pump but the disadvantage of running the higher-strength oxidizer through the pump/filter and some additional valving. I'm not terribly worried about the later. At full speed, the bleach pump injects about 3.5 oz/minute. If my pool circulation pump moves 60 gallons/minute, that's an equivalent FC concentration of ~30ppm flowing through the plumbing. I could easily slow down the injection rate if I really wanted to.
    Nicely done... Once you manually put in your results, I'm assuming you have some sort of algorithm that tells the system how much to put in, how much will be lost overtime due to sunlight, and therefore how much it needs to add each day to keep up the recommended amount? Is that basically how it works?

    I'd love to do something like this too, but it's probably a little over my head and I really don't have the time right now. Maybe when I retire... in 40 years.

    Kevin
    ---
    30,000 gallon vinyl pool
    Hayward DE Filter
    Hayward Super Pump
    AO Smith 1 1/2 HP Pump (27GPM)
    Polaris 380 Pool Cleaner

    Check out the app I created to control my pool equipment from my smartphone:
    i-created-an-app-to-control-pool-equipment-with-smartphone-t61606-20.html

  10. Back To Top    #10

    Re: Foobert's bleach pump automation

    Quote Originally Posted by RIRSZ
    Man, that is very cool! I've eyeing the pi for a few months now, but my wife will kill me if I bring home a new hobby!
    The Raspberry Pi is actually a great hobby device because it's cheap to buy and cheap to play with... most components that you need for a project only cost a few dollars and since you're using Linux, everything is open-source.
    ---
    30,000 gallon vinyl pool
    Hayward DE Filter
    Hayward Super Pump
    AO Smith 1 1/2 HP Pump (27GPM)
    Polaris 380 Pool Cleaner

    Check out the app I created to control my pool equipment from my smartphone:
    i-created-an-app-to-control-pool-equipment-with-smartphone-t61606-20.html

  11. Back To Top    #11

    Join Date
    May 2013
    Location
    Massachusetts
    Posts
    146

    Re: Foobert's bleach pump automation

    Hmmm... what about something like this?

    http://www2.emersonprocess.com/en-US/br ... index.aspx

    To fine tune it even more?
    25,000 Gallons Inground, Gunite
    DE, Hayward Filter
    Loud pump
    Hayward navigator cleaner, leaf hose suction

  12. Back To Top    #12

    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    188

    Re: Foobert's bleach pump automation

    Nice setup and props for being DIY.

    Can you provide any other info on getting/setting to buy from Hill Brothers? Is the carboy delivered to you by truck or do you pick up? Cost for 15 gallons?

    Thanks,

  13. Back To Top    #13

    Join Date
    May 2013
    Location
    Massachusetts
    Posts
    146

    Re: Foobert's bleach pump automation

    Another (simpler) approach: take a pool cover pump, hook it up to a wifi enabled powerstrip, put one end of the pool cover filter intake into the chlorine carboy, the other into the pool.

    Or...

    Get an automatic timer that merely runs said pump a few minutes a day, whatever is needed.

    Although pool grade chlorine might wear out the pump fast, lol.

    Still, it's an awesome idea, Foobert.
    25,000 Gallons Inground, Gunite
    DE, Hayward Filter
    Loud pump
    Hayward navigator cleaner, leaf hose suction

  14. Back To Top    #14

    Join Date
    May 2011
    Location
    Orange County, CA
    Posts
    696

    Re: Foobert's bleach pump automation

    This looks really interesting, Foobert. I can only dream that I'd have enough time to do one of these myself. I'd like to try this out to regulate the pH and ORP of our pool, though being able to directly measure free and total chlorine would be nice (but expensive with existing probes). How does this interface with the pool main pump?
    38K in ground pool with attached spa. Current equipment: Easytouch 8 (521150) with IC-60 SWCG with web control by Autelis, 1x Pentair IntelliFlo 011018 pump (for filter), 1x Pentair 2HP WhisperFlo pump (for waterfall), 2X Pentair IntelliBrite 5G 12V lights, Pentair MiniMax400 NG Heater, Pentair SMBW2060 DE filter. Zodiac Barracuda MX8 cleaner on dedicated cleaner line. Lighting/home automation controlled by Insteon/ISY-99i.

  15. Back To Top    #15

    Join Date
    May 2013
    Location
    Massachusetts
    Posts
    146

    Re: Foobert's bleach pump automation

    Quote Originally Posted by kodiak1120
    Quote Originally Posted by RIRSZ
    Man, that is very cool! I've eyeing the pi for a few months now, but my wife will kill me if I bring home a new hobby!
    The Raspberry Pi is actually a great hobby device because it's cheap to buy and cheap to play with... most components that you need for a project only cost a few dollars and since you're using Linux, everything is open-source.
    Yeah it's cheaper than most of the PLC's and smart relays I see online, plus because it's a modern OS, the software is much more powerful.
    25,000 Gallons Inground, Gunite
    DE, Hayward Filter
    Loud pump
    Hayward navigator cleaner, leaf hose suction

  16. Back To Top    #16
    foobert's Avatar
    Join Date
    Jul 2013
    Location
    Bay Area, CA
    Posts
    143

    Re: Foobert's bleach pump automation

    Wow, a sudden burst of activity -- thanks for the comments.

    I'll try to answer some questions. Hope I got them all:

    Quote Originally Posted by kodiak1120
    Once you manually put in your results, I'm assuming you have some sort of algorithm that tells the system how much to put in, how much will be lost overtime due to sunlight, and therefore how much it needs to add each day to keep up the recommended amount? Is that basically how it works?
    Yup, that's perty much the algorithm!

    Quote Originally Posted by weird_tolkienish_f
    Hmmm... what about something like this? http://www2.emersonprocess.com/en-US/br ... index.aspx To fine tune it even more?
    That'd be the ideal feedback solution, but, I see lots of dollar signs there when it's designed for water treatment plant applications

    In all seriousness, if a reliable FC sensor can purchased for <$100, that doesn't suffer the vagaries of ORP, and can go several months between calibrations -- I'm all ears!

    Quote Originally Posted by Hawk
    Can you provide any other info on getting/setting to buy from Hill Brothers? Is the carboy delivered to you by truck or do you pick up? Cost for 15 gallons?
    Call the order desk and ask to setup a "COD account" (cash on delivery). They'll ask what company you are with; just say you are an individual. They DO handle end-user sales (i.e. collect sales tax), so, you don't need a business tax-id or any such stuff. But keep in mind, it's not a retail store. They are setup to handle commercial accounts, so, the process may seem a little awkward.

    I do my own pickup at the local warehouse, which happens to be very conveniently located in my case. Once you have an account, you'll need to call ahead to the order desk to place your order and have it ready for pickup at will call. They will deliver, but the "fuel surcharge" is about as much as the bleach. I'm paying $3.95/gal, which works out to be $0.247/oz NaOCl -- a middle-of-the-road price. You can certainly find cheaper sources if you are willing to hunt around for sales on consumer grade bleach. The carboy is a $25, refundable deposit.

    They also sell 31% HCl (muriatic acid) in 4x1gallon cartons. It's $8/gal, same as my local Home Despot.

    Quote Originally Posted by CraigMW
    How does this interface with the pool main pump?
    The simplest way would be to purchase a double-pole, double-throw relay with contacts sufficiently (over) rated to handle the current of the main pump motor. Use the 12V output from the circuit I showed to energize the relay input of the high-current DPDT relay. With the Pi, you no longer need to have a timer to control your pump, since the Pi has far more capabilities for programming schedules than any commercially available timer solution.

    That said, since I already had a digital timer box (the tan box to the right of the right of the Pi box), I reverse engineered the circuit in that. Thus, I used the 12V relay to close that circuit and energize my existing timer's relay circuit.
    ~john
    24.5K G, pebble, SuperFlo VS 1.5, 48sq DE filter, Hayward H250FDN, Autopilot RC-52, Poolvergnuegen & 3 daily swimmers in season.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •