Friday, April 19, 2013

Pool Controller 2 for Goldline P4

No, I didn't take a month off; I've been off on other projects that aren't technical or related to power.  Stuff like fixing a chip in my motorcycle paint, equipping toy hauler to tow it, and spring pruning.  But, I started having some trouble with the transmissions from my pool controller.  I have a whole section on my swimming pool page <link> where I describe how I decoded the Goldline protocol and built a controller for my swimming pool.  Yes, there are remote controllers out there that allow you to change settings and such from the house, but mine hooks into the House Controller and allows me to change things from the internet.  Yes, I can turn my pool motor on from anywhere.

However, as I described, there are some problems.  First, it's based on an Arduino Uno which only has one serial port.  I need at least two, one for the XBee to transmit status and the other for the RS485 link to the Goldline pool controller.  It would be nice to have another one for debugging and testing commands as well.   I used SoftwareSerial code to handle the extra port needs, but there's the occasional over run and I'm really running the little Arduino on the edge with two high speed ports cranking away all the time.  Guess what, I have a Mega2560 that isn't doing anything.

So, I pulled the device off the fence and rebuilt it essentially from scratch.  I put the XBee on Serial3, the pool controller on Serial2, and use the regular Serial as my command and debugging port.  This is all possible because the watchdog timer and boot loader problems have been fixed as I detailed in several posts, and I discovered a new enclosure that I have already used on my Garage Controller <link> that gives me plenty of room and easy access.

Since it was going on a Mega2560, there would have to be software changes.  I decided to take the time to incorporate all that I've learned over the last couple of years and update the XBee and timer handling.  The device now uses the Arduino XBee library and is in API mode so the packets are handled well.  It knows what time it is by catching the House Clock <link> transmission, so it's possible to build in specific time of day alarms or do special things on the weekends.  There's room in memory and in the enclosure to incorporate the Acid Pump timer as well, freeing up a device.  I will also be able to hook in the float I installed in my septic tank so it can alarm when the tank filter gets clogged <link>.  Of course, it will be more than a Pool controller then, but what's in a name?  Besides, a septic tank is sort of a pool ... isn't it?

Here's a picture of the device after I mounted the boards into the enclosure:


And here it is on the fence working:

Here's the devices on that side of the house:

No, I didn't mount it crooked, the fence goes down hill at that point.

Naturally, I'll post the code on the Swimming Pool page, but I'll get to that in a day or two because I have to change a lot of stuff to illustrate it the way I want to.

Why aren't more people doing this kind of thing around their house?

Edit:  I had to turn off comments on this page...  Darn bots from all over were flooding this particular page with crap.  Don't ever have a page with a title line that has 'Gold" in it.