My NEW Pool Automation Controller

cmc0619

Gold Supporter
May 2, 2018
153
Cherry Hill, NJ
Has anyone tried connecting via a serial connector to a Hayward Pool heater. I would rather just send a signal to the heater on what temperature I would like it rather then power cycling the heater off an on.
I just looked up the manual on your Hayward H400FDP. It operates the same as my RayPak 406A. The Hayward outputs a 24VAC signal and you can use a dry relay to switch between pool, SPA or Off. Because there are three states, you'll need two relays. One to enable the heater mode, and one to select between Heat/Pool temp. The temperature has to be hardset out of band and can't be controlled via remote.
 

jonpcar

Bronze Supporter
Jun 1, 2016
554
Gilbert, AZ
See what happens when a EE retires!.
Haha...true.

I am travelling and haven't been working on this project (actually I am home for just a few days). But I have this update for those considering the Milone eTape, especially for an acid tank. My ACID Milone eTape has failed for a 2nd time. Once again I am sending it back to Milone Industries for their analysis. The owner will be looking at it again to see if the strong acid fumes are something that their current packaging solution "might" have an issue with (or it could be that I received a 2nd bad unit). He will let me know.

My chlorine tank Milone eTape monitor has been flawless. I double-checked it (measuring the resistances) and there has been no degradation in its performance. I am getting readings for the Chlorine tank level that I believe are within a few ounces of actual (I have a 16 gallon tank).

EDIT: Do NOT use Milone ETapes (even the chemical hardened versions) in muriatic acid tanks...the acid starts degrading the resistive properties immediately. The jury is still out on use in a chlorine tank but so far it is holding up. The owner of Milone is considering a change that may fix this for the future but has not made it so far.

As I said in my last post, all 1st stage "sensors" are installed except for my additional pump watts meter (I am currently reading the one that is built into the pump itself, but it is not accurate at very low RPMs). All that sensor data is being recorded in a google spreadsheet. So when I start working on this again, I will have plenty of data to decide what sort of alarms/notices that I want to implement.

For those that haven't seen this...Segalion is making a bunch of progress/updates on his RaspberryPi pool controller solution...very impressive.

 
Last edited:

Rattus Suffocatus

Silver Supporter
Jun 5, 2019
1,260
Corona de Tucson, AZ
Has anyone hacked specifically the Hayward Tristar VS RS-485 protocol? I am so tempted to play with it... But it also has relay inputs for four speeds and I know that would be easier and probably more reliable. I still am not sure if the LED pool light is hackable as well.. But in my simple setup that is all I have so I never will buy a thousand dollar controller...
 
Last edited:

Katodude

Silver Supporter
Aug 22, 2017
1,212
West Palm Beach/Florida
Yes, both the Pentair and the Hayward pump protocols for RS-485 are available. Here is a link for the Hayward pump. But as you said it might be easier if you use 3 relays that can control up to 8 settings. The Hayward pump requires a command being sent every 1 second via RS-485.

 

Rattus Suffocatus

Silver Supporter
Jun 5, 2019
1,260
Corona de Tucson, AZ
Okay, so the EcoStar are the same commands as the Tristar? I suppose I can eventually find out. Sending them every second could be handled easily by an Arduino... Even the ESP8266s I have (in a box somewhere) could be made to work for that but it still might be better to use the relay inputs for that to be robust... Can't leave stuff like this alone...
 
  • Like
Reactions: cmc0619

jonpcar

Bronze Supporter
Jun 1, 2016
554
Gilbert, AZ
Here is an update. I have been travelling for 6+ months (2 long trips) since last Aug, with only about a 7-week hiatus (during the Thanksgiving/Christmast timeframe) in which I had no real time to spend with this project.

My previous/last post talked about a problem with my acid Milone eTape that I was using to measure my acid tank level. It was a real problem: the Milone eTape cannot handle the harsh muriatic acid and its fumes. The owner is looking to make some changes and possibly may figure out a way to make it hermitically sealed and work reliably. I also have had NO readings from my cholorine Milone eTape since last Sep but will work on that in the next few days. Hopefully, it ‘will not/does not’ have a similar problem. I have not had the Milone eTape IN my chlorine tank since December because my hardware was not working with it (see below).

The good news is that my pool survived for months without any intervention with NO thanks to this project, haha. As a reminder, I left in August with a limited monitoring capability. This project has not yet implemented any control features. I relied on my existing Hayward equipment (for pump scheduling) and prior projects (stenner chlorine and acid injection using a sprinkler timer with large buried tanks) to add my chemicals.

The pool was super-chlorinated on my return from both trips, mostly because I don’t have enough history/results to set proper additions (especially during the fall/winter season), but I was particularly wary about too little chlorine. The acid levels were decent once the free chlorine levels went down enough to measure them accurately.

I did have my niece clear my skimmer basket every 10 days or so and the In-Floor-Cleaning-System kept my pool looking nice…but overall, I think I was lucky.

What little pool “monitoring capability” that I had in place last August broke down about midway through my first trip. In particular, the google spreadsheet interface stopped working (I think I was sending it too much data…too quickly) and so I have had NO monitoring since that point. In late December, I tried some quick fixes (for my 2nd trip) and ended up making my board temporarily non-functioning. I discovered the source yesterday…in my haste I had forgotten to remove a jumper that caused a problem with the voltage levels.

So, there is obviously still a lot of work to do and in the last couple days I have spent my time figuring out where I was, and cleaning up some code. I am no longer in a rush as my wife and I have no future travel plans for the first time in a long time…so I’ll start plugging away again.
 

Katodude

Silver Supporter
Aug 22, 2017
1,212
West Palm Beach/Florida
Well I am excited to see what you do next. Its been a while since I tinkered with my automation system, it might be time to take it to the next level. I am toying with the idea of changing out my pump to a variable speed.
 

jonpcar

Bronze Supporter
Jun 1, 2016
554
Gilbert, AZ
Hey Kato...VSPs are nice...if you need one and/or convinced that you will realize the energy savings to make up the difference in cost. Spas, water features, IFCSs could justify the use of a properly integrated VSP...for everyday pools with no extra features, possibly not.

So it didn't take much to get all my monitors back up and running. My chlorine tank ETape seems to be working great still, but given the result that the acid ETape was NOT viable, I will be holding my breath. I am very, very disappointed that I will not be able to accurately monitor the acid tank levels as it seems like I will continue to be able to do with the chlorine.

I am considering a different solution to the tank levels which I may post about if I get around to checking it. Also, I am awaiting a reply from Chris Milone to see if he has made progress on an eTape that can withstand the very corrosive acid environment.

The fumes from the 32.5% muriatic acid are VERY corrosive (hinges, screws, wiring). In the previous post I mentioned that I had traced my board problems to an incorrectly placed jumper...I was wrong about that. When I unplugged my jumper, I also disconnected some other wires including the cable that led to my UNUSED acid Etape. That cable for the acid tank eTape WAS the problem because the opposite end, near the acid tank itself, was corroded and shorted (picture below). This was the cause of my board malfunctioning rather than the jumper. The red and green wires are the power and ground for my board's sensors. So now I know...

In the past couple days, I've continued to "link" my available sensor statuses up to my phone app so that the phone app accurately reflects the status of my pool system. In addition, I have been looking at the A/C current sensors for all the pumps. There are so many monitors and alerts that I want to put in place but coding for those will take time and some planning. So I am going to push those out.

Instead, for the short term, I've decided I will implement the control for my chlorine and acid stenner pumps via the Photon and my phone app. I want to do a lot of characterizing with chlorine/acid injections, especially as the summer season approaches; and I'd like to have that capability in place before swim season. It also will allow me to easily add quick acid/chlorine injections from my phone, rather than having to go back to my pool pad area and manually set the sprinkler controller (which currently controls acid/chlorine injections).

So I am hoping that in the next week or so, I will have that capability in place.

1587822712951.png
 
Last edited:

jonpcar

Bronze Supporter
Jun 1, 2016
554
Gilbert, AZ
I wonder if you could use a CO2 tank for acid instead? It's pretty cheap to have a 20# tank refilled..
Fred...that would be a major, major change for me, haha. Throw out my acid stenner pump and buried tank, redo my software, some of my hardware, and STILL have to worry about dosing/measuring the CO2 precisely.

Instead, I've decided I am a glutton for punishment...after hearing from Chris Milone (Milone eTapes), I am going to give the acid eTape another try and have reordered one for my acid tank. Milone has made some changes to the design that are promising, but I will be holding my breath. Now that I know the failure mechanism, I will be monitoring my existing chlorine eTape closely (looks good so far), and of course the new one when I receive it and install it in my acid tank. I really hope it works out because I love the precision that it enables for the liquid chemical tank measurements, but only when it is working correctly.

I started working on the control outputs software for the chemical dosing and pool lights today. It looks straight forward...but testing intensive. I have decided that the pump/valve commands are the very last controls that I will migrate to the Photon because my Hayward ECommand4 controls those just fine for now, and I want to avoid having to "stop/restart" my pump every time I update the Photon with new firmware. The only thing I will really miss out on is the ability to turn on the waterfall from the phone app...but for now I have my Hayward remote control to do that function easily.
 
Last edited:

jonpcar

Bronze Supporter
Jun 1, 2016
554
Gilbert, AZ
Fred, now that Chris Milone understands the mechanism for failure, a weaker concentration of acid would just delay the inevitable degradation (this applies to the prior Milone eTape design). I have ordered a newly-engineered Milone eTape for the acid and am preparing to install it when I get it. I'll let you know the results of how it performs, hopefully the problem will be solved.

10) STENNER PUMP HARDWARE CONTROL

In the meantime, I am almost done with the software controls for the Pool Light and the Stenner Acid/Chlorine Pumps and am getting ready to integrate it into my deployed pool controller out at my equipment pad. I will have to make some hardware additions/changes to 'flop' the existing control of those items from my Hayward Ecommand4 to my new pool controller.

Moving to my own software/hardware control for the chemical dosing is something that I am doing very carefully. In particular, I don't want my Stenner pumps to turn on simultaneously OR to turn on accidentally. A nightmare scenario would be that one or both of the tanks empty entirely into the pool due to software/hardware issues.

Here is my plan for the hardware...I am hoping to catch any issues with this plan by posting it here and have some eyes scrutinize it. The hardware solution is designed in particular to stop TWO issues:

1) Both Stenner pumps cannot be ON simultaneously, even if the software in Pool Controller requests it.
2) If the Stenner pump final relays are stuck 'ON', there is still a mechanism to detect that, and turn off the Stenner pump

1588523409951.png
 

Attachments

Last edited:

jonpcar

Bronze Supporter
Jun 1, 2016
554
Gilbert, AZ
Cliff, I simplified that first diagram a bit. My Hayward ECommand4 actually has these DPST relays in them, but the diagram would have been too busy.


Here is an example of how each one is hooked up to use that second relay arm. Each relay monitor needs a dedicated input pin (to read it). The VSS can be shared between the DPST relays. I will use this for my Stenner Relays, Stenner Enable Relay, and all my Light Relays (Pool Light, Landscaping Light, Equipment Pad Light, etc).

1588565620919.png

The Photon input pin reads as a '1 when the relay is open, and as a '0 when the relay is closed. This is actually the same method that I used on my Actuator Valve micro-switches to read their position. In that case, I manually put redundant switches in parallel with the actuators' micro switches...these were wired back to the Photon using this same method.

You mentioned AC current detectors...yes I am still going to implement those on the Stenner Pumps and Pool Pump. but I am debating using current meter devices so that I can actually measure them (current/power). Probably overkill once again, but I am having a blast learning these new devices. The current measurement (a project expansion) is probably out a month or two because its a bit redundant to what I have with this mechanism.
 
Last edited:

jonpcar

Bronze Supporter
Jun 1, 2016
554
Gilbert, AZ
Wow! So you're using a dual pole relay to switch a single pole (120V) device and using the 2nd pole to confirm the relay setting. That's a great idea!
Thanks! When I read this, I thought...so THAT's the correct terminology: dual pole / single pole / 2nd pole. When I worked as an EE, I worked at the transistor level and we didn't have these kinds of relays, haha. Cliff, this project is slow going but my goal is to have feedback wherever possible. In this case, when I control a Stenner pump, I want to:

(1) verify that I at least "tried" to turn the Stenner pump "ON" via the output signal to it
(2) verify that the pump "turned on" (detect A/C current flow to Stenner pump, liquid level going down in tank as it is pumped out)
(3) TBD: verify that the chlorine/acid makes it to the pool (not pumping out in a puddle on my pad) by verifying that the chlorine/acid injection does what it is supposed to.

11) STENNER PUMP SOFTWARE

So I am getting very close on the Stenner control software on the Photon. I am NOT a programmer. When I start writing code, I realize I am doing something wrong, or that my requirements change, or that there is a better way. So, I rewrite the code...over and over and over again.

Over the last week or so, I have dug into what functionality I want from the Stenner pumps. I am currently going through a characterization of my pool's chemical needs and documenting it. In addition, I am conducting some experiments over the course of the summer. These experiments involve dosing sizes, dosing timing, and (since I am planning on draining my pool this fall) the impact of raising my CYA levels on my pool's chlorine needs.

To conduct some of these experiments, I realized that I needed the ability to slowly disperse chlorine throughout the sunny part of the day. Thus the "Chemical Dosing Operation" became a required need for me and I have included it in this Stenner Pump software control.

As I said before, I am not a programmer...so this is a diagram that gets the point across, but follows no convention (as I am unaware of the conventions). But just the fact of making this diagram (after I finished coding my latest implementation), has clarified what the requirements were. It also makes me want to rewrite the code again , haha.

1589553759064.png
 

jonpcar

Bronze Supporter
Jun 1, 2016
554
Gilbert, AZ
12) VALVE CONTROL RELAYS

One more relay diagram...

So I ripped out all control in my ECommand4 (sprinkler controller for stenners, relays for valves, light relay) except for Pump Control (which controls the on/off schedule and RPM settings for the main pool pump). Along with the Stenner Pump Control and Lights, I will be moving the valve control under software control by the new controller. I think it will happen tomorrow. I've tested the scheduling software pretty well...but we will see. I have not implemented my "checks" to monitor all of these items, yet.

As @Katodude and others have done, I will be implementing the actuator control to open/close the valves partially rather than requiring them to rotate all the way to one of the two "cam-stop" positions set in the actuator. This requires two relays so that the 24VAC can be turned off when a desired "rotation state" is reached. I do not know what would happen to the motor if both directions of the actuator (right and left) were powered at the same time but it probably would not be good. Therefore, I plan on implementing the 24VAC supply to the actuator as shown below. It only allows one side of the valve to be powered at any time in case the software is incorrect or just screws up.

@cmc0619 you talked to kato about hot side of relays (and such) in kato's build thread. I didn't fully follow the conversation. Does this relay setup violate any of your recommendations? Does it look like it will work? I know there is not a terminology that uses +/- sides to describe AC voltage, I just didn't know how else to label it...

I am planning on using this same setup for both of my valves.

1590294436074.png
 
Last edited:
  • Like
Reactions: MyAZPool

Katodude

Silver Supporter
Aug 22, 2017
1,212
West Palm Beach/Florida
Looks good, but it turns out that you can power both sides at the same time. The Intellivalve actually requires that since it needs power all the time. I dont remember what happens exactly when you do it but I think actually nothing. When I want to move my valves from one position. I apply power to the other side, and shut off power to where the relay was. I happens very quickly but for a split second there is power to both sides.

I believe this is how the IntelliCenter applies power to the valves.
 
  • Like
Reactions: MyAZPool

arib0nd

Active member
Apr 5, 2010
27
Gilbert , AZ
Looks good, but it turns out that you can power both sides at the same time. The Intellivalve actually requires that since it needs power all the time. I dont remember what happens exactly when you do it but I think actually nothing. When I want to move my valves from one position. I apply power to the other side, and shut off power to where the relay was. I happens very quickly but for a split second there is power to both sides.

I believe this is how the IntelliCenter applies power to the valves.
I can confirm that due to a programming error I had power going to both sides of my intermatic actuator for a while and have not noticed any ill effects.