Friday, August 10, 2012

Garage Controller - New Device at My House

I have a nice big garage that I use a lot, but I constantly leave the doors open. Seems about half the time I get part way down the dirt road away from home and have to try and remember if I closed the doors. This means coming back and checking so OCD doesn't set in and drive me nuts wondering if the doors are open. Be nice if I could look on my smart phone and see if the doors are open from anywhere and close them if necessary. Looks like a job for another little computer. I had an Arduino handy, a couple of Xbees and a little relay board set aside for this so the project shouldn't be too much trouble, All I need is an enclosure of some kind. I found my very most favorite enclosure for this kind of thing on Amazon:
I already had one of these installed by the phone company on the side of the house and just happened to stumble across it on Amazon.  They're 9x6x3 and weather resistant.  The one I have has been there for years and nothing inside has been damaged, so this should be fine.  
Here it is with the Arduino, one of the newer XBee shields and a four relay board mounted inside.  There's lots of room left for other devices and various wires from things around the garage.  For example, the beige box next to it is the differential temperature controller for my solar water heater.  Here in the desert, I only pay to heat water in the middle of winter on heavily overcast days.  I don't even allow power to get to the heating element for 8 months of the year.  In the future, control of that power and monitoring the temperature of the water will be handled by this new device.  The little XBee shield is a relatively new device and works really well.
I chose this particular board because it would allow me to put the XBee tx and rx pin on something other than 0 and 1 and it was relatively inexpensive; around $7 with shipping.  It also has a protoype area for mounting some screws to get inputs into the system.  I've found using the arduino serial port for an XBee leads to massive problems when I try to debug various things.  Without a serial port, you just can't find problems. So, I mounted some screw terminals on the XBee board to take inputs and hooked up some magnetic sensors on the garage doors.
Sorry, it's a little out of focus, I must have moved a bit, but you can see the terminals for the magnetic switch inputs and the relay outputs for the door switches.  I just ran wires to the regular garage door switches to control them, they were relatively close.  I use a two second pulse to open and close the doors and monitor closure for the door sensors.    

There was an unexpected side benefit of this, I can now tell the door to close.  That may not sound like much, but remember, garage doors are a toggle.  If they're closed and you push the button, they open.  You always have to go check to see if they are already closed before pushing the button because you may be opening them instead.  The idiocy of toggle buttons drives me nuts.

Currently, the Xbee simply transmits the status of the doors every few seconds and my House Controller displays the status on its LCD display.  It also provides the status on the Controller web page along with buttons to take care of closing or opening the doors.  Now, I can pull out my phone, look at the web page and close the darn doors if I left them open.  I've been wanting that for years.

One nice thing about my home automation, it gets easier over time.  I already have the XBee network set up, adding a new device is easy.  I have the code already written and available in several devices for copying to a new one.  I have code for watchdog timers, parsing inputs for commands and formatting status updates ready in several versions.  Adding a few lines to the House Controller to put it up on the web is pretty painless and the Controller has lots of memory left for this kind of thing.

Plus, the discovery of the enclosure I mentioned above.  This thing keeps the weather out, is easy to get into to debug or make changes, holds a lot of stuff, can be locked (keep kids out), and can survive the weather, especially if you paint it.  This will become the default enclosure for all my outside projects from now on since I can get it pretty easily and it works so well.  I may even get a few of them and retrofit some of the devices I already have.  I get really tired of unscrewing a lid to check an led when I could just open a door.  It's annoying that I didn't think of it before.  It would have saved me hours when I was working on the Pool Controller.  I was constantly opening that thing up and changing something as I decoded the protocol and worked out control strings.

Thursday, August 2, 2012

Power Washer - Frustration in Action

I've talked to my various neighbors and some other folks around my parts about power washers and they all agree, unless you get an expensive commercial or prosumer version, they fall apart too easily.  All but one of my neighbors have trouble with the basic consumer models for a number of reasons.  1. the stupid bayonet fittings wear out and start to leak.  2. hose connection to the washer leaks.  3. leave them out in the desert sun and the plastic lances get brittle and break.  4. the plastic nozzles wear out in a few months.  5. Hoses are stiff and hard to use.  We all like the electric models because of the small engine problems.  If you don't use a gasoline engine often, they develop problems and won't work when you need them.  Electric washers just work and give little trouble with the motor and pump.

Even with all the disadvantages, the $100 price tag (on sale) makes them too attractive to turn down if you need one, and in the desert with limited water, you need one.  For the past years I've bought one every two years because of the various problems.  Then I decided to just replace the various parts as they broke to see if it would save money.  It didn't.

The replacement lances don't fit well and fall apart faster than the factory original.  Even if you change brands, they are pure junk and work until you get about half way through a job then fall apart.  I had one turbo nozzle replacement blow apart the first time I turned the washer on.  Basically, the various manufacturers supply shoddy devices.

Notice how I keep running into this?  I know I'm not alone, but many people just put up with it or give up and hunt for some other solution to whatever device fails them.

I decided to see if I could overcome this problem.  Since most of the problems are with the lances and nozzles, suppose I got a good lance and put it on the washer?  The good lances are metal (brass and stainless), cost about the same as the factory replacement plastic, and are tough as nails.  So, after much research, I discovered that most power washers have a common fitting: an M22 female.  That means I can get a hose, pressure trigger (the gun part), extension and nozzle to replace the junk the manufacturers provide.  Since the lance and hose will last essentially forever, I should be able to move it from one washer to another as I wear the motors and pumps out.  The motors and pumps are too expensive to replace, cheaper to buy a new washer on sale and toss the old one; along with the junk plastic bayonet connected lances.  Here's the lance that blew apart the first time I tried it:
There are screw fittings on each end of the extension that you screw one of the various adapters on to match your existing pressure trigger and the turbo nozzle (big thing in the picture) screws into the other end.  In my experience, each connection leaked.  Yes, all of them.  The threads are plastic and not cast well so they leak a small amount, and the bayonet fittings almost match the device, but the small difference causes leaks.  When I put it together and attached it to my washer, the entire front of the turbo nozzle blew off across the yard.  Clearly, this device is not made to be used, just sold to unsuspecting folk like me.  And, no, it isn't because my power washer is to strong for this tool; I currently have a Powerwasher Weekender (google it) that I picked up for less than $100 at Home Depot on sale and it only gets up to around 1800 pounds on a good day.  Its one of those low pressure machines for consumer use.  Ever notice how they call us consumers?  It's like we don't contribute to society at all; we're just here to buy their somewhat inferior devices.  

A little searching on line and talking to a guy that has a huge commercial power washer, I thought I had a solution.  I'd buy a mid grade setup for everything from the connection on the washer to the nozzle on the end.  Then over time I may change the washer several times, but the hose, lance, and nozzle would work for many years.
This is the hose, pressure trigger, and extension.  Notice that the extension is stainless and has brass fittings on each end; they won't die in the sun or break if you drop them.  The pressure trigger (gun looking thing) is stainless and brass inside with a heavy plastic covering to keep hot water from burning you.  The hose has M22 fittings on both ends that mate to both the pressure trigger and the washer.  The really cool thing is that the extension has a 1/4 inch quick connect fitting on one end so nozzles can be changed easily.  That means I can get something like this:
These have various spray widths, from a stream (the red one) up to a nice wide fan.  No, I didn't have something like this before; isn't it great that now I can?  These have 1/4 quick connect fittings so they can be changed easily depending on what I want to do and can handle exceptionally heavy use.  Now, all I need is a good turbo nozzle for those hard to wash things like wheels and muddy bumpers on Jeeps.
This is the turbo nozzle I chose.  It is brass with a tough plastic covering to protect whatever you bump it into when working with it.  Notice the 1/4 inch quick connect?  Easy to change like the other nozzles.  Now, just because it would be really cool, I wanted some way to inject detergent into the high pressure spray so I could actually clean something.  It would also be good for bleach mixtures to clean off the mold from fences and maybe some other chemicals that might be useful.

This is a soap injector nozzle.  You drop one end in a soap bucket and put the other one on the end of the extension (yes, it has 1/4 inch quick connect fittings).  Using this you can wash away grease from your tractor transmission to find that stupid oil leak that's been bugging you for years.

So, everything except the turbo nozzle and the soap injector came in and I couldn't wait to try it out.  I assembled the hose, pressure trigger, and a fan nozzle and hooked it up to the little Powerwasher Weekender I have and away I went.


Right where the M22 fitting entered the power washer, there was a constant stream of water that caused the washer to cycle.  This was really annoying, so I put the old hose back and it didn't leak.  Fine, what the heck is different?  It seems that the Powerwasher output fitting is .05 bigger than the specs for an M22 fitting.  This means that the thing will leak just enough to drive you nuts over time.  Since the M22 fitting has an o-ring to seal it, maybe if I changed the o-ring?  Nope, that didn't work, it was just too small, it would take a special o-ring that had a larger outside diameter while maintaining the internal size.  I could spend a month trying to find one and probably order a dozen wrong ones first or figure out something else.

I tried wrapping the male M22 fitting with teflon tape, but that was a waste of time because it just leaked around the tape.  I though about dragging out the epoxy and stuffing it full to seal it, but that would defeat the purpose I set out for.  I finally beat it a few minutes ago with a really simple trick.  The M22 fitting looks like this:
Notice the o-ring around the center?  That's the o-ring that I thought about changing to make it work, but I wanted to try something.  I took the o-ring out and wrapped teflon tape around the slot where the o-ring sets making it a little larger.  The idea is to stretch the o-ring out and  make it seal the fitting that is too large on the  Powerwasher Weekender that I have.  When I put the o-ring back on and greased it with a little o-ring lube that I keep around for the pool and acid pump, it was definitely larger.  I wiggled it a bit and made it fit into the fitting and tightened down the plastic covered nut.  It worked.  Full pressure and no leaks at all; I can drag it around the yard and bang it and it does fine.  You folks reading this, try this the next time you need a new o-ring but don't want to go to the store right now to get one; this little trick could hold you for several days until you can get a new one.  Obviously, some engineer decided that he would design a fitting that was almost to spec, but enough off to force us to buy a new washer because we couldn't make it work.  This kind of crap is what industry standards are designed to prevent.  But, we're just 'consumers' we don't count.

So, now I have a hose and lance assembly that I can change tips on easily, inject detergent, and turbo wash to my heart's content.  Even after the Powerwasher company put a non-standard fitting on their product just to mess up people that want to do what I did.

Take THAT Powerwasher.

Swimming Pool Controller

I have an entire page devoted to my swimming pool controller and other devices related to the pool here.  The device works pretty well, but since there are two protocols, (Goldline and my own) and they are real devices, there have been some annoying problems over the period I have been using it.  The problems all stem from the fact that there is no 'on' or 'off' command for the various functions.  They all work like a garage door, you push a button and something changes state.  Push a button, the valve opens, push it again, it closes.  This makes things like turning off the pool light a bit of a problem if you don't know if it is already on.  About a year ago a nice person gave me the command string he was using to turn his pool off, unfortunately it didn't work for my controller, but when I tried it I got an idea I should have come up with a year ago.  Simply look to see if the light is already off, and don't do anything if it is.

Obviously this was too simple an approach for me to come up with when I was developing the controller.  I was getting into loops where I would turn on the light, the delay before the various devices recorded that the light was on was erratic (real devices, remember) and I would issue the command again, thinking it got lost somewhere.  That would make the light turn on, wait a few seconds, turn off, wait a few seconds, turn on, etc.  Annoying at times.  Most of the time everything worked perfectly, but when it got into one of these loops, it might take 10 minutes or so to get out of it.  So simple code like: if (light already on) don't do anything, should fix the problem

Guess what?  It did.

I modified all my pool commands to work this way and the pool controller is very reliable now.  I got the idea when I started working on a controller for my garage doors.  I hate getting a few miles from home and suddenly starting to worry that I left the garage door open.  There is little risk of theft out here in the desert, but I hate having a squirrel move into the garage and a dozen or two cactus wrens deciding it's a nice place to live.  I had a squirrel cause some damage once and I don't want to repeat that.  So, I need to know if the door is open and close it.  I came up with a design where I'll put a magnetic switch on the door and that way I'll know when the door is open and can close it from far, far away.  This made me realize that I have the status of the various controls on the pool already, why not just use them.

There was also the problem of ambition, it worked mostly OK, why fix it?  This lethargy went away when my new, variable speed, permanent magnet, super motor died.  Yes, it died.  It developed some kind of fault and declared, "Emergency Stop in Effect."  Nice informative message.  I called Hayward and they said they'd have to send out a repairman.  The first comment out of my mouth was, "How much is that going to cost?"

"Nothing." was the reply.

Sure enough a nice guy came out, looked the problem over, and REPLACED THE ENTIRE PUMP.  Yes, I got an entirely new pump with zero hours on it as a warranty replacement.  How cool is that?  I hooked my controller up and was annoyed immediately by the toggle action.  That's how I came up with the idea and implementation.  While I was making the changes to the code, a couple of bugs turned up that I didn't encounter before and they got fixed as well; nice side benefit.

I'm waiting for parts to come in for the garage project, but thinking about it, there's a few lessons to learn here.  1. Never give up on an idea, let it percolate a while and a solution might appear.  2.  Don't be afraid to call the manufacturer for advice; you may get a really good response.  3.  some other project may suggest a better way to do something; don't ignore it.  4.  DIY projects are never really done, they just settle down for a while.