Friday, August 19, 2011

Swimming Pool Fittings (part 3)

 For crying out loud.  In my continuing battle against stupid 2 inch fittings for a solar pool heater, I've had some successes and some failures.  Mostly failures.  As I described previously, these things have to be fitted together with flexible hose so they can move a little and to allow them to be taken apart for servicing the roof.  However, nobody wants to sell the connectors needed to hook a pressurized 2 inch pipe to a 2.375 hose.  I finally got in a set of barb fittings that turned out to be too small, so I ordered another set that were the right size for the hose, but a little loose on the pipe.



The white one is a 2" x 2" barb fitting.  It is the same size as 2" pipe, so you use a coupler, but the barb is too small.  The other one is a 2.5" x 2.5" barb fitting and will fit around the 2" pipe with 1/10" of free play.  Turns out that this tiny bit of play is enough to cause it to fail if you're not totally careful about gluing it in place, but the barb is the right size.  Since this setup will operate unattended for days at a time pumping hundreds of gallons of water around, I'd like to feel a little better about it.  So, I tried the fitting below that is called a "pipe extender".



It is designed to fit INSIDE a 2" pipe and stick out so you can attach something to it.  The fitting was designed for situations where you just don't have enough room or a pipe is broken off in concrete or some other bulkhead.  It's basically a repair fitting.  I sawed off some of the end of it and, if you push the uncut tube into a pipe a ways, leaving a separation, you have a nice place to put a hose clamp.  I can't post a picture of this right now, it's installed on the roof and I didn't take my camera up there.  However, I used up all my fittings and stuff experimenting so I'll have to get more and I'll get some pictures of the combination then.

Interesting items for the do-it-yourselfer:  All of the fittings above are hard to find.  The various chain hardware stores don't carry them, and I couldn't find them at plumbing supply houses either.  The plumbing supply houses didn't even have a clue what I was talking about.  They were in one supplier's catalog, but they cost twice what I paid and I'd have to wait a couple of weeks to get them. Even Grainger, the huge wholesaler didn't have them in their catalogs.  When you start adding fittings to PVC pipe, you have to cut something off; that shortens the pipe and gives you less room to work.  Then you add stuff that lengthens the pipe and you run out of space the other way.  Be darn sure to look at it closely and do the very best you can to figure out what is needed before you order stuff.  Else, you'll be stringing the job out over weeks like I am. But, on the bright side, the "pipe extender" fitting above can be a life saver because it fits INSIDE the two inch pipe and doesn't take a lot of room; it also can be partly inserted to make up for being a little short on something else.  There's also something called an "inside coupler", this fitting connects two pipes by going INSIDE them.  Saves space and allows the reuse of a fitting that you had to cut off.  Nice little fittings to keep around; I'm going to order a few of them just for repair purposes and keep them on hand.

More later on this little plumbing drama (after the next set of parts comes in the mail)...

Tuesday, August 16, 2011

Swimming Pool Fittings (part 2)

I'm still working on the pool solar heater and it is really getting frustrating.  This is not a field frequented by the do-it-yourselfer, except to experiment a little with black water hoses.  To connect two solar panels or to connect a panel to a pipe, a person needs a piece of hose that can handle around 40 pounds of pressure and survive in the outdoors.  Automotive radiator hoses are designed for this kind of thing, but they are generally smaller than the 2 3/8 (2.375) inches diameter needed to join the panel to a 2 inch plumbing pipe.  So, during a search of the web that encountered massive information overload, I found the following possibilities:

Aquatherm/Solar Industries part number 02-0070 @  $6.70 for 4 inch piece.
Dayco 76238 straight radiator hose @ $43.90 for 3 feet.
Gates 24438 straight radiator hose @  $65.00 for 3 feet.

Based on the prices, the Aquatherm hose would be appropriately priced if it wasn't for the shipping.  So, the task is to find something that will hold up under the pressure, take the desert outdoor exposure and last a few years.  Wrapping the hose in metal will eliminate direct sun deterioration, and if I can find thin stainless, it will help reinforce whatever I wind up with.

Sooooo, looking around the web even more I found out that Dayco is one of the companies that deal directly with Amazon.com.  That means that I can order the Dayco hose through Amazon and avoid all the pitfalls of having to drive to several auto parts stores using several gallons of gas, but I still have the problem of not knowing if it will actually work.  As luck would have it (sometimes) I happened on a page at Amazon that listed the Dayco hose for 13.13 with a 4 week delivery time.  However, as sometimes happens, this page wasn't there in a normal search of the Amazon site for a Dayco 76238; this search turned up the 40+ price.  Therefore, being the honest and forthright person that I am, I ordered it quickly before they discovered the mistake.

Monday, August 15, 2011

Swimming Pool Fittings

I've been running for a few months with my solar pool heater hooked up for low pressure operation.  On the swimming pool tab above I describe how I put a valve in to close off the vacuum break to prevent air getting into the system when the pressure was so low it wouldn't close the break.  Well, seems you need to use special fittings when you go to a flexible hose from a two inch pipe.  This configuration worked fine for months, then a storm came a loosened something and the pipes blew apart, dumping a few hundred gallons of water on the roof.

A little research shows that one needs to use a barb fitting for this kind of thing, but no one sells them.  There is a special adapter to adapt 2 inch pvc pipe to a flexible hose, but none of the plumbing supply places carry them.  Solar specialty companies are especially reluctant to talk about them because they want to come out and charge me for a service call.
Notice that it has a barb on one end and the other end is the same as two inch pipe.  I found one source online that had 2 inch barb fittings, but the barb was too small.  I found this out when it arrived.  Sigh.  Without being able to actually hold something like this in my hand it's tough to work out the details.

Meanwhile, my solar heater is back to the original configuration while I rattle around trying to find the right parts.  When I get it working again, I'll post updates on the swimming pool page to show people how to do this kind of thing and NOT lose several hundred gallons from the pool across the roof into the yard.

Monday, July 25, 2011

So, a pack rat got into my swimming pool wiring.  I think it was a pack rat because stuff was missing; usually when a normal rat, mouse or squirrel gets to wiring it's all still there, just torn apart.  This time large pieces were missing.  Took all morning to put it back together and then the pool controller got the famous Goldline burned solder connection problem.  See http://www.nocellpower.com/ for a complete description of the problem and solution.  Goldline, and now Hayward since they bought the company, have known about this problem literally for years and nothing has been done about it.  The darn pool manufacturers sell these things and tell us how good they are.  Sigh....

Anyway, I got it all fixed and then cleaned the salt generator and pool and ran the motor on high speed to test everything out.  Worked fine, but I forgot to turn the motor back off before the peak period.  Timers usually do this for me, but I overrode them to test the pool system.  Well, I now have a 2.4 peak demand number for the 45 minutes that I ran the pool.  That'll cost me a little bit, but since I have family coming this month, I sort of expected to have a higher bill.

I'm going to have to think about this a bit.  There must be a solution to forgetting something like this, it just isn't coming to mind right now.  I don't want to constantly turn stuff off to be sure it stays off.  Maybe an alarm that sounds when the power gets too high or something.  I'm not quite ready to start on the load shedding project I want to do eventually.

Tuesday, June 28, 2011

Bragging about the house controller ... again.

I'm actually pretty impressed with the capabilities of these little computers (as if you couldn't tell).  I added a short video of the House Controller to the tab above.  It isn't real impressive since it only does the mundane stuff like help me save around $100 bucks a month on my power bill, but it is fun and still growing.

Monday, June 20, 2011

House Controller

Finally started documenting the House Controller.  I've mentioned it several times, but the darn thing is a ton of code and has been the focus of most of my efforts for a few weeks now.  It uses XBee to connect into the network I constructed and has an ethernet board so that I can tell it what to do as well as get information from it.  It also uses the ethernet board to control my two web enabled thermostats.  I control the pool and the thermostats as well as sample the data from my various devices.  I can see the inside temperature, outside temperature, power usage and such from my laptop in a chair anywhere in the world.  I use the Arduino TimeAlarm library like a task controller to schedule various events like turning off the A/C at certain times.  I also turn the pool pump off in the evening just in case someone (me most likely) left it on.

It has an LCD display that shows various items I like to watch in sequence and a ton of colored LEDs that show the various conversations going on around the house.  Naturally, it isn't done yet, not by a long shot.  Heck, I've only used about a fifth of the memory on it and I have CPU cycles to spare.  I will be expanding it to control the X10 devices I have, and as I add new devices, I'll put in code to handle them.

It's on the House Controller tab above and I'll have pictures so you can see it soon.  If you want to sample the web output, click here.

Monday, June 6, 2011

Stupid Arduino 2560 Board

The Arduino mega2560 board is cool.  It has several rs232 ports and a ton of digital io ports to play with.  It has enough ram and rom to make a really nice little computer for coordinating other devices around the house and a really small footprint.  The problem is the boot loader is brand new and suffers from a couple of pretty severe bugs.  I left town for a few days and the device died.  No, I couldn't use the watchdog timer; a bug in the boot loader stopped me.  Seems that once you use the watchdog timer, you can't boot back up.  Sad.  I spent last night working up a timer interrupt to do basically the same thing by timing out and then checking a flag I keep resetting in the main loop.

Actually, this is a pretty elegant solution since I can decide within the timer interrupt service routine if I really want to reboot or not and set flags and such to act on when it comes back on line.  However, it is unfortunate that the darn boot loader hasn't been fixed yet.
Sketch to illustrate the Timer3 watch dog trick

#include <TimerThree.h>
// pick this library up at http://www.arduino.cc/playground/Code/Timer1
// scroll down the page to the Timer3 entry.

unsigned long resetTimer = 0;
unsigned long timerRate = 2000000;  // this is the MICRO seconds to wait between interrupts
int resetWait = 10000;                       // this variable is in MILLI seconds for how long to wait
                                                         // before resetting

void(* resetFunc) (void) = 0;             //declare reset function @ address 0

void resetMe(){                                 // There are certain compiler items that this little trick
  resetFunc();                                     // can over come.  Like putting this in a callback.
}

void checkActive(){
  // this routine gets called every timerRate (see above)
  // and here I check resetWait to see if the device has been
  // hung up for resetWait number of milliseconds
  if(millis() - resetTimer > resetWait){
    Serial.println("Fake Watchdog Timer Reset..........");
    resetMe();
  }
//  Serial.print("Timer3 at "); // uncomment these two lines to watch what's
//  Serial.println(millis());   // going on
}

void setup()
{
  int errorCount = 0;
  Serial.begin(57600);
  Serial.println("Initializing..");
}

boolean firsttime = true;

void loop(){
  if(firsttime == true){
    Serial.print("First time through loop, set up timer");
    firsttime = false;
    resetTimer = millis();
    // set timer3 to expire in 2 seconds.  So, every 2 seconds the checkActive routine
    // will get called and it will check the resetTimer variable to see how long in
    // milliseconds it has been since the variable was last updated.
    Timer3.initialize(timerRate);  // This sets timer3 to expire in 2 seconds
    Timer3.attachInterrupt(checkActive);
    // Note that this could have been in the setup() routine above, but
    // I put it here because sometimes I have a LOT of stuff to do during
    // the setup() routine.
  }
  // to test this, comment out the line below and the board should reboot.
  resetTimer = millis(); // This keeps resetting the timer
}


Update 10/29/2011:  I found a way to use the watchdog timer and documented it here.  The solution uses the watchdog interrupt as a timer interrupt and works nicely.  A little bit more code, but it is actually pretty cool.