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

Thread: DIY automation build

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

    DIY automation build

    And, so begins the build of my automation system. Intended features:

    • Valve control for intake, returns, sweep, and solar.
    • Pump control of the 4 programmable speed presets.
    • Solar temperature controller
    • Heater control and temperature modulation.
    • Mobile friendly web-enabled control w/manual overrides (ala, kick on spa for 45 minutes at 100˚).
    • Salt-water generator run-time control through FC sample data input.
    • PH control via acid pump controlled through PH sample data input.
    • Water chemistry history record and at-a-glance problem identification.
    • Filter pressure monitoring to identify back-flushing time.
    • Lighting control


    This will be based off a Raspberry PI (happens to be an older Rev 2 version). It has plenty of GPIO handle this. Best of all, it can easily be a web-server, run a database back-end, and can be programmed through just about whatever programming language you want. This will be a mix of PHP for the web-interface, python for the guts of the logical control. Sample history, temperature data, and run states will be stored in mysql database.

    I know I'm not the first to do this. But, I haven't seen a DIY job that ties all this together in an moderately easy to use open source package (am I missing it?). I will share full code and want to streamline the setup for any others that want to duplicate this.

    Let's get started. A quick floor plan layout of the hardware in the enclosure.


    The major parts list:


    Excluding the valve actuators, the hardware for this is quite simple and cheep.

    I'm choosing not to automate the sensing (ala, ORP + PH). It's certainly technically feasible, but, seems more trouble than it's worth from a cost/benefit/maintenance standpoint.

    This will be a phased approach. First part is basic pump control, chlorination, valves, and heater. Second phase will be the web-UI. Pressure monitoring will happen later. Solar control once I have solar panels installed to bother with. Acid injection when I get tired of pouring acid in
    ~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
    Isaac-1's Avatar
    Join Date
    May 2010
    Location
    SW Louisiana
    Posts
    6,704

    Re: DIY automation build

    Sounds interesting, do keep us posted on how this develops, I am wondering if you have a plan for sealing the Dallas Semi 1-wire serial temperature sensors against moisture, as I recall they can be effected by physical strain on the packaging, so mounting them in a blob of epoxy is out.
    Indoor 20x40 35,000 gallon vinyl pool with 1.5 HP 2 speed Jandy FloPro pump, Hayward EC75 Perflex DE filter, 11 4x12 Techno-Solis solar panels w/ Aquasolar controller, Aquabot Turbo T Robot Cleaner. Also LMI metering chlorine dispenser pump and HotSpring Jetsetter
    I use and endorse TFtestKits TF-100 from http://tftestkits.net
    ~Remember TFP counts on your donations to keep this site ad free~

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

    Re: DIY automation build

    I have 3 that I epoxy blobbed several years ago and they have since been in service outdoors. Still work great and appear to have held accuracy just fine (although I haven't checked calibration since they were deployed).

    For measuring the pool temps, they'll be inside a thermowell, so, I don't need them to be submersible.
    ~john
    24.5K G, pebble, SuperFlo VS 1.5, 48sq DE filter, Hayward H250FDN, Autopilot RC-52, Poolvergnuegen & 3 daily swimmers in season.

  4. Back To Top    #4
    Isaac-1's Avatar
    Join Date
    May 2010
    Location
    SW Louisiana
    Posts
    6,704

    Re: DIY automation build

    After posting that I went and did some digging, it appears that the earlier designs of the Dallas Semi temperature sensor (up until about 2001) suffered from a design flaw that caused mechanical pressure on the housing to translate to a change in temperature, the later ones used a self compensating design which greatly lowered this effect.
    Indoor 20x40 35,000 gallon vinyl pool with 1.5 HP 2 speed Jandy FloPro pump, Hayward EC75 Perflex DE filter, 11 4x12 Techno-Solis solar panels w/ Aquasolar controller, Aquabot Turbo T Robot Cleaner. Also LMI metering chlorine dispenser pump and HotSpring Jetsetter
    I use and endorse TFtestKits TF-100 from http://tftestkits.net
    ~Remember TFP counts on your donations to keep this site ad free~

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

    Re: DIY automation build

    I'm a bit annoyed at the relay board. At a glance, it has all the right features: opto-isolation, buffered drivers for the relays, and indicating LED's for on/off status. With all that, I figured they must have wired it together intelligently w/ solid principles and flexible input voltages.

    Sadly, they force 5V down your throat by hard-wiring the opto-isolators to an on board 5V supply (LDO driven from 12V input). The Pi is a 3.3 volt device. It's bad form to force the clamping diodes on the Pi's IO buffer to absorb the over-voltage from directly wiring the GPIO to this relay input.

    But, the real kicker is that the input to the relay board is inverse logic -- hold the pin to ground to energize the relay. Since the Pi's GPIO defaults to hi-impedance input at boot up, this isn't such a big deal. However, the default state of the output is '0'. Since I don't want to glitch the output from low-to-high when transitioning to output mode, I'm going the extra mile an using an inverting buffer circuit to drive the relay board. If the relay board had been designed better, this would be completely unnecessary. Ohh well, I have it now...



    For the electronically less-inclined, the NPN transistor (Q1) passes current when the base (middle connection) is at a "high" voltage. When Q1 passes current, that lights the LED inside the opto-isolator (U1), which then energizes the rest of the relay circuit. Resistor R2 is needed to hold the transistor base at low voltage while the Pi's GPIO is in high-impedance input mode (ala, when the Pi is off, or booting up). R3 limits the source current from the Pi to <1mA (its rated for 20mA, so, this is very conservative).

    Tonight, I'll do a quick breadboard sanity check, just to be sure.

    Then, I'll make up a connecting board to bridge between the Pi and the relay board. It'll have 16 copies of the above. The board will have the added benefit of giving me a place to mount the I2C analog-to-digial converter for the pressure transducer, as well as some 1-wire interface headers.
    ~john
    24.5K G, pebble, SuperFlo VS 1.5, 48sq DE filter, Hayward H250FDN, Autopilot RC-52, Poolvergnuegen & 3 daily swimmers in season.

  6. Back To Top    #6

    Join Date
    Jul 2011
    Location
    Las Vegas, NV
    Posts
    45

    Re: DIY automation build

    I thought about doing something similar, so definitely keeping an eye on this. Are you worried about operating temperature at all on the Pi? I know you have much milder weather than I do in the desert, but in an enclosed box it's always a concern

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

    Re: DIY automation build

    I've had this Pi in a much small sealed box, outside in partial sun for the last 2 years -- hasn't been a problem. I will admit, now that I have all new pump pad equipment, I plan to put a roof over it all to keep the sun and weather off.
    ~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

    Join Date
    May 2016
    Location
    Troy IL
    Posts
    396

    Re: DIY automation build

    I too have had something like this on my to do list since we bought our house a year ago. I'll be watching this thread for motivation now doubt.

    20,000 gallon IG Vinyl
    Pentair Tagelus TA60D Sand filter
    Pentair Challenger 1.5HP pump CFII N1 1.5A
    Taylor K-2006-A, Stenner 45MPHP10 auto chlorine feed

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

    Re: DIY automation build

    Bread-boarding was completely successful. Now just need my parts order to arrive to build out the bridge board.

    ~john
    24.5K G, pebble, SuperFlo VS 1.5, 48sq DE filter, Hayward H250FDN, Autopilot RC-52, Poolvergnuegen & 3 daily swimmers in season.

  10. Back To Top    #10

    Join Date
    Oct 2016
    Location
    Perth/Australia
    Posts
    1

    Re: DIY automation build

    This looks like a great project, can't wait till you get to the python and php code. I've just installed something similar on my pool and started blogging about it. Looking forward to seeing this all come together.

Posting Permissions

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