Automating Pump & Solar using Arduino for under 40 bucks

deepdive

Member
Nov 3, 2016
6
Orlando, FL
Edit: See post #3 for the updated controller.
Edit 2: Now with full SmartThings integration for both Pump Control, Temperature readouts, and Solar control. See post #9 for a screenshot of the interface.

When my single-speed pump failed, I did some research and realized I'd have an issue aligning my solar pool heater's activations with the proper speeds from a new variable-speed pump. You set the times on the pump, but the sun comes out when it feels like it. :cool: You can wire everything up to an expensive centralized controller, but I had a feeling that if you chose your parts correctly, you could DIY and get everything you want for cheap. So, I bought a pump that had very flexible automation options, the Hayward Tristar VS. It supports the typical Hayward-branded automation, but also has a neat relay-controlled option you can use to call 8 distinct speeds (23 for you math guys). I tried looking for existing Arduino timer programs, but nothing quite fit the bill. So, I wrote a fairly easy program that tracks the time and if the solar panel is active, and sets speeds accordingly. It is smart enough to only override your configured speed if it absolutely has to in order to keep a minimum flow for the solar, and can be set remotely for stuff such as an impromptu cleaning cycle. The controller is based on the Particle Photon, a web-based arduino clone, so the controller is connected via wifi and allows me to query it for current speeds, as well as override the speed with a new speed/duration temporarily. This is currently done manually via a command-line interface, but I am working on a SmartThings Home Automation program that would let you set your pool pump to a specified speed for a period of time (such as when you dump salt into the pool or decide to sweep it).

Parts (~$35)

  • Particle Photon (Cloud-based arduino)
  • 5v-controlled Relay with at least 3 ports
  • An optional screen

Features
  • Set up defined 24-hour repeating schedule
  • Minimum speed set any time Solar is activated
  • Speed override available via

All of the code, photos, and more details are available below. I hope this can help kickstart someone else's project. You are free to use any or all of the code to improve your pool!

https://github.com/Here-Be-Dragons/Pool-Controller


pool_controller_1.jpg
 
Last edited:

jkayca

Well-known member
Jul 5, 2014
83
Ottawa Ontario
That looks cool. I'll have to check into it in more detail in the spring when I open my pool. I have a single speed Hayward pump (forget which model) and a Raypack gas heater. I want to automate the timing of the two so I can vary the schedule between week days and weekends.
 

deepdive

Member
Nov 3, 2016
6
Orlando, FL
Wanted to update everyone on version 2 of this project. Improvements:
1. Created a proper printed PCB for the controller.
2. Added solar override on/off to be controllable via Home Automation (SmartThings).
3. Added 3 temperature sensors: Pre-solar, post-solar, and roof temp. Also pulling air temp from darksky.net's API.

Printing the PCBs and getting the thermistors pushed me over the $40 of the original cost by another $30 or so, but it gives significantly more flexibility. When I want to clean my pool I can speed up the pump from my phone, and if I am at work and think I'll want to do a night swim, I can override the solar and keep it pumping heat into the pool until I stop it. (95 degrees here we come :)).

This is what the new controller and dashboards look like:
pool_controller.jpg
grafana.jpg
 

randytsuch

LifeTime Supporter
Mar 29, 2008
256
Los Angeles, Ca
Very cool.
I am looking at doing something similar, but I don't have solar. I do have a Hayward pump with the same remote control interface.

Will take a look at what you did.

EDIT: Haven't seen the photon stuff before, looks very cool. I've done a bit of Arduino coding.
 

billmi

Member
Apr 15, 2013
11
Florida's Spacecoast
Looks great!

I don't have solar heat, but have a gas heater for my spa and am planning to control it, the return and drain valves for the spa and the pump, via an ESP8266 communicating with my home automation server by mqtt. It's really astounding how much less expensive and more flexible this route is than the off the shelf pool controllers.
 

jkayca

Well-known member
Jul 5, 2014
83
Ottawa Ontario
deepdive, did you look ever look at the Arduino 4 Relays Shield? I was thinking of using it to control my pump, salt water chlorinater and NG heater. I can't tell if the relays will be able to handle the load. Thanks.
 

jimmyfloyd

New member
Jun 21, 2013
4
Great project and something i have been considering, since we have few sunny days at the beginning and end of the season that I would like to maximize. Is the new PCB you created available, or do you have a template and instructions on how to get one printed?
 

deepdive

Member
Nov 3, 2016
6
Orlando, FL
Re: Automating Pump & Solar using Arduino for under 40 bucks

Great project and something i have been considering, since we have few sunny days at the beginning and end of the season that I would like to maximize. Is the new PCB you created available, or do you have a template and instructions on how to get one printed?
The PCB is available via my GitHub in the eagle folder (GitHub - Here-Be-Dragons/Pool-Controller: Cloud-based pump speed, solar collector controls, and temperature monitoring for your pool), or can be ordered directly from OSHPark (OSH Park ~ Pool Controller v2.2).

I also just updated the project with new integration into SmartThings.

- - - Updated - - -

New SmartThings interface

smartthings_screenshots.jpg
 
Last edited: