Monday, May 28, 2012

It Involves A System Of Pulleys

Engineering is not well understood by most mortals.  As a matter of fact, I gave a presentation at work last week to give others in our company a better idea of what we Engineers do in our department and how we see our role in the grand scheme of things.  This was Page 2.
Engineering, As Seen By Engineers
(Note that "Engineer", "Engineers", and the profession of "Engineering" should always be capitalized, just for reasons of general awesomeness.)

I must confess that this public misunderstanding comes as close to home as my own Dear Sister.  When talking to her about something technical, I generally get asked: "Does it involve a system of pulleys?"  A fine inside joke indeed.  It also speaks to the fact that simple things can become deceptively complicated.  Case in point, and something I've wanted to blog about for some time now, is my rainwater collection system.

Water is a precious resource out here on the Ponderosa.  All we had when we moved in to the place was a well to supply our water, and not a very good well at that.  It wasn't very deep and recharged slowly.  It was enough for drinking, washing, etc. but didn't have a lot of margin for watering gardens and newly planted trees.  I figured one thing I could do was build a rainwater collection system.  As usual, no half-assedness would be tolerated.

I based the system around the idea of a dry stream bed.  Building this was a big job.  A very big job.
Had I Known How Big A Job This Would Be, I Likely Wouldn't Have Started.
The previous owner had tried something on a smaller scale but it sucked.  It was just a rectangular-shaped pile of rocks down the slope to the back of our house.  Half the rocks were missing and it was a weed infested mess.  I cleared out all of the old stones and came up with a shape with a more natural flow to it.  I then laid down some heavy duty landscape fabric to keep the weeds down.  On top of that I laid down some 1" chicken wire to discourage any gophers that might want to dig a hole in the middle of it

It doesn't show well in these pictures, but there is a dry stream shape about a foot deep that winds its way through all of these rocks.  This dry stream is lined with a thick EPDM rubber normally used to line garden ponds.  The water I collect from my eaves-troughs drains into the top of the stream and winds its way down to the bottom.  The stream bed is actually functional when it rains.

Laying all of the rocks was a huge job.  There must be thousands of rocks here of various shapes and sizes.  And many of these rocks are heavy, big-assed rocks.  It took me a couple of years to get this part done.  Every rock was put in place by hand, both to give the right mix of large and small, and also to make sure the entire surface was well covered so you couldn't see the landscape fabric or the liner below.  The fact that it is on quite a slope added to the challenge.  Want to get strong???  Move out into the country.

All the water I collect up top gets to the bottom.  Right about here.
There Must Be More To It Than This???
This is where the "system of pulleys" come in.  Let's take away the gravel in the center of the picture above.
A System Of Pulleys
Here is where things get interesting.  Taking off the gravel shows a heavy grill meant to cover a fire pit.  It sits on top of a hard plastic sump basin that I got at Home Depot for $20.  It is just like the one shown in the left of the picture, only the one in the ground right now has a big crack in the bottom.  It didn't always have that crack, but it seems that water expands when it freezes.  The first one I used was left in place all winter to prevent the dirt around it from caving in.  It got some water in it which subsequently froze and blew the bottom out.  So the cracked one is used in winter to keep the shape of the dirt around the pit and the other one is used in summer to hold the water.

The above picture gives a closer look. You can see the heavy rubber liner used to carry the water down the stream peeled back.  The sump pump I use to pump the collected water back up to my holding tank is shown in the bottom left.  You can just barely see the check valve behind the float switch that prevents the water pumped up and out of the sump pit from flowing back down again.  You can also see a couple hoses poking into the sump pit.  The one at about 2 o'clock runs under the rubber liner and connects the sump pump to the holding tank above.  The other one around 5 o'clock brings in water from another downspout at the other end of the house.

Springtime means pulling the old sump pit, putting the new one in its place, connecting everything up, and making it all pretty again.  The dance goes a little something like this.

Step 1: Pull out the old sump basin.  The chicken wire and weed fabric are clearly visible.
There Were Only Two Dead Mice In The Hole This Year
Step 2: Put the good sump basin in place and connect the hose up.  I use some flat rocks to prevent the pump from moving around within the basin.  Otherwise, the float switch could get hung up and prevent the pump from turning on when the pit gets full of water (ask me how I know).  Tie-wraps are also used to keep the hose and the cords out of the way.

Step 3: Put the grill grate back over top of the sump basin, making sure the wires from the pump and float switch are brought out.  Lay the heavy rubber liner back down so the water carried down the stream will drain into the middle.  The picture below shows the setup back together, just needing the gravel to be put back on top of the grate.

Step 4: Plug the float switch plug into the AC power cord and the pump into that.  I run the cord through Liquatite flexible conduit because a critter will gnaw through an exposed power cord if they get half a chance.  They'll generally just do it once, though...

The top part of the design is a lot less complicated than the bottom.  Here is a picture of the front of the house in early spring where the downspouts are not connected in to the system of pulleys.  No point dumping a bunch of water in during spring thaw that could later freeze and bust things up.

Taking a closer look, you can see a black tube that comes up from below ground near our front step.  This is just a section of non-perforated weeping tile that is teed below every downspout.  The middle part of the tee connects to a flexible piece of downspout extender.

This picture gives a better look of the downspout extender connected in to the downspout above.  Rainwater from the eaves-troughs flows into the downspout, into the downspout extender, and then into the weeping tile buried below.  Silicone and hot glue keeps water in and leaks out.

The weeping tile carries the water from all the downspouts to the top of the "dry" stream bed.  Gravity takes over and the water flows down into the sump basin.  The sump pump cuts in when enough water has been collected and pumps it back up the slope via a hose hidden under the stream bed's rubber liner to a holding tank.

It's simple, really.

Now up top, I mentioned how water is a precious resource out here.  But since I got this baby together, we've gotten our house connected up to "city water" and so we no longer depend on the well.  I also since finished another mega-project to bring water up from the river 85' feet below to water our trees and garden (a topic for a future blog post, perhaps).  Finally, it  seems that every cloud that passes over the house lately brings with it an inch of rain. 

Water is still precious, just maybe not quite so precious as it used to be.

Thursday, May 10, 2012

It's Not The Heat...

Last time around, I wrote up how rain information is sent from the Davis Weather Station Integrated Sensor Suite (ISS) to the console sitting on my kitchen counter.  That left me with one more piece of weather data to figure out: humidity.  Evil humidity.

I had been puzzling over humidity for weeks before I decided to switch to rain.  The data seemed to make sense for a while and then I would get a datapoint that made no sense at all.  I was pretty certain that humidity was sent in message 0xa0 from the station, and I was also pretty certain that the data would be contained in just one byte.  Sounded reasonable because humidity is displayed on the console to the nearest percent.

Humidity was stumping me until I got serious last weekend and wrote a Python script to collect STRMON data continuously while my DIY datalogger dutifully captured the console's interpretation of the data.  Then I could make some plots and figure out what was going on.  Like this:
Click To Embiggen
It was quickly apparent in looking at this data that two bytes were involved in encoding humidity.  You can see as the humidity drops, Byte 3 cycles through a couple times while there are some discrete steps in Byte 4.  The weird thing was that Byte 4 isn't flat as in a high byte, low byte kind of thing.  There is jitter on it that I didn't expect.

Puzzled, I thought some fresh eyes on the subject might help.  So I posted this plot and a link to the data I collected on this wxforum post.  It was user Kurgan for figured it out for me within eight hours of my post.  He da man!  As he wrote in his post:
If you take byte 4 and convert it to binary, you will see that the values is has assumed in the test, which are 24,25,26,27 then 40,41,42,43 and then 56,57,58, 59 are made of two parts: the first four bits are fixed (the big steps), and the last four are variable (the jitter).

So:

 24 25 26 and 27 have the first four bits set at 0001
 40 41 42 and 43 have the first four bits set at 0010
 56 57 58 and 59 have the first four bits set at 0011

So, you have to add the first four bits of bit 4 to byte 3 to get a 12-bit number. Try to plot this 12-bit number and compare it to the hum graph.

The last four bits of byte 4 are something else, or are random noise. I don't know.
I thought he had it wrong the first time I wrote up this post but forgot that the values in Byte 4 as written above had been converted to decimal.  Convert them back to hex for his explanation to make sense.  Next step: make a pretty plot.
Now That's Pretty
That is bang on.  The calculated value works out to the humidity displayed on the console * 10, so a calculation of 750 = 75% RH.  The lines don't sync perfectly because the timing is a bit off and the logger logs in intervals of 1 minute vs irregular intervals on STRMON.

As I wrote in a post that followed, there are other mysteries are buried in the data.  For example, here is data from message 0x90 (144 decimal). 
39.2    144   16   1   47
90.5    144   16   1   63
141.7   144   16   1   79
193     144   16   0   95
244.2   144   16   1   111
295.5   144   16   0   127
346.7   144   16   2   143
398     144   16   3   159
449.2   144   13   3   18
500.5   144   13   3   34
The columns are elapsed time in seconds, message number, byte3, byte4, and byte 5.  I deleted the wind and crc data.  The numbers in byte 5 jump up and down mostly in step sizes of 16 before resetting and then starting over again at some different value.  Looks like a counter of some kind.  And why is byte 4 in this same message just bouncing between 0 and 3?  Byte 4 in the rain message (0xe0, 224 decimal) does this too.  I'm also told that the ISS sends a reading of its battery voltage to the console  That is also hidden away somewhere in all this data I've collected as well.  And then of course there is data from the sensors I don't have: solar, leaf wetness, and soil moisture.

But I don't care too much.  I'm getting all the weather related data my ISS can send me.  Figuring out other stuff down the road would just be a bonus.  Now it should be a relatively straightforward matter of writing some code for the Alternative Davis Weather Station Receiver and having its values exactly match the values displayed by the console.  Cool.

If only I had more time to actually do this...

Sunday, May 6, 2012

Here Comes The Rain

Today's weather at Mad Scientist Labs: Cloudy and Cold.  Wet and Miserable.  Rain, rain, and more rain.  In a word: perfect.
 This Takes Me Back...
As a (hopefully) interesting aside, The Cult used to go by the name of the Death Cult, and before that the Southern Death Cult.  I guess there is something to be said for brevity.  There's also something to be said for picking a name palatable to all those moms who buy music for their kids.  Music was on "records" or "LPs" back in those days.  And I walked to school uphill both ways.

With weather this lousy, going outside and taking care of various chores out there just isn't going to happen.  This gives me a perfect excuse to take it easy after a very busy week and do some stuff I enjoy doing.  What might this be, you ask?

Well, moments ago I pulled a good looking loaf of Jim Lahey's "Pane all’Olive" out of the oven.  This is a fancy way of saying No Knead Olive Bread.  How'd it turn out?
Damn Good, That's How.  And I Don't Like Olives.
I've been a big fan of his No Knead technique lately, since the taste to effort ratio is astronomically high.  Here is a link for this bread and two others that you might want to try.

I've also spent some time today reverse-engineering the STRMON data spit out from my weather station.  I had all of the weather-related parameters sorted out now with the exception of rain and humidity.  It was raining this morning, so that gave me the chance to figure rain out.  And figure it out I did.
Yay Me
In fact, I wrote up a bit of Python code to help me figure this out.  It grabs the STRMON data, timestamps it as the number of seconds since the script started, converts everything to decimal so the math is easier, and then writes the data as a CSV file.  I don't show the checksum bytes in the last two bytes of every message because that would just pointlessly make the file bigger.
2426.3,224,16,33,40,1,0
2428.9,80,15,31,66,83,0
2431.5,96,14,15,255,194,0
2434.0,128,12,39,29,27,0
2436.6,224,11,36,40,1,0
2439.2,80,14,20,66,81,0
2441.7,64,12,14,255,193,0
2444.3,128,10,19,29,27,0
2446.8,224,9,29,41,2,0
2449.4,80,11,25,245,65,0
2452.0,144,13,11,21,3,48
2454.5,128,12,8,29,27,0
2457.1,224,10,29,41,3,0
2459.6,80,9,32,245,67,0
2462.2,160,10,15,176,59,0
2464.8,128,8,21,29,25,0
2467.3,224,8,29,41,3,0
The rain was coming down pretty good and I watched this stuff scroll across the screen.  When the console added another hundredth of rain, I wanted to see the message that caused it to happen.  Let's cut the irrelevant crap out of the above.
2426.3,224,16,33,40,1,0
2436.6,224,11,36,40,1,0
2446.8,224,9,29,41,2,0
2457.1,224,10,29,41,3,0
2467.3,224,8,29,41,3,0
Message 244 is 0xe0.  I had suspected before that this message held rain, but I expected to see it in the second last field above.  What I thought would happen was the console would send a "1" any time the rain bucket tipped.  But then I saw this field bounce around between 1 and 3 randomly.  It turns out I was off by one byte.  Rain is actually in the byte before (40... 41).  What the ISS does is send a running total of rain between 0 and 255.  In the example above, it would continue to send 41 until the rain bucket tipped again.  Then byte 3 (counting from 0) in message 244 (0xe0) would change to 42.

This is smarter than what I was thinking.  My method could have had the console miss a count of rain every now and then if there were interference.  But by sending a running total, this can't really happen.  It is up to the console to track the changes in this byte.

I haven't figured out what those values bouncing around between 1 and 3 are.  I'm suspecting they are just noise from a sensor that I don't have and isn't connected.  Or something like that.  I plotted this field against the rain plot above and there was zero correlation.  In other words, I don't care.

One thing I discovered along the way and that I do care about.  In the example above where the STRMON 0xe0 message changes from 40 to 41, the change doesn't show up immediately on the display.  In fact, it didn't show up until the next 0xe0 message came along ten seconds later.  Interesting, and good to know as I continue my hunt for humidity.

"I'm an excellent driver."

Thursday, May 3, 2012

Craptastic Episode #1: KitchenAid Crap Can Openers

Faithful readers of this blog (that joke never gets old) will have noticed that I haven't blogged for a while.  Well, I've been busy.  Very busy.  Unspeakably busy.  I am tired.  I am weary.  I am grumpy.  However, I am also strong.  I am beat, but not beaten.  I am bent, but not broken.  I am shaken, but not stirred.
Best Bond Ever
The good thing about a gruelling workload and complete exhaustion is that it makes you want to tell other people how miserable you feel.  What better time then to unleash some hate on a piece of crap that nobody should ever buy?
KitchenAid Can Opener Crap
Yes, I'm talking about a can opener.  A KitchenAid can opener.  A Kitchenaid can opener that is a piece of crap.  I'm an engineer and I don't think it would really be that hard to make a good can opener.  And you know why?  Because I know how diamonds work.  A diamond is (almost) the hardest substance known to man.  And everybody knows that a diamond can put a scratch in just about anything because it is harder than just about anything.  So things don't scratch diamonds.  Diamonds scratch things.

It is that simple.  If you want to cut something like, oh I don't know, a can... you need to make something like, oh I don't know, a can opener... that is made out of stuff that is harder than the can.  This isn't rocket science.  But this seems to be beyond the comprehension of the incompetent designers at KitchenAid.  My lovely wife bought this can opener a couple years ago for $15 bucks.  Big handles, beefy looking construction... what is not to like?  What is not to like is the "unable to open cans" part.  Look at this.
Looks OK?
So what is the problem, you ask?  Take a little closer look.
Look Again.  Craptastic!
See how the gear that is supposed to grip the can is a mashed up mess?  That is the top minds at KitchenAid not understanding how diamonds work.  Because whatever this gear is made out of, it isn't harder than the tin can it is cutting through.  Instead of the can taking the damage, the gear does.  I sent this KitchenAid Crap Can Opener off to where I'm sure a few million other KitchenAid Crap Can Openers can be found.
One Man's Garbage Is Also Another Man's Garbage
You know, it occurs to me now that maybe the folks in KitchenAid's Can Opener division aren't really incompetent.  Maybe they think this is a brilliant planned obsolescence idea.  Maybe they think that people will just roll over and spend $15 bucks on a brand new KitchenAid Crap Can Opener every couple years.  Maybe.  But in this day and age of the Internet and the ability of people to spread the news of what they've learned, that shouldn't happen.  So screw you, KitchenAid Crap Can Opener Division.

We can't be can-openerless in this day and age.  After some research (and I research everything now), My Lovely Wife and I decided on this bad boy.
Meet The New Boss...
Meet the Nogent Super Kim Can Opener from the fine folks at Lee Valley.  The blade is made of tempered carbon steel, and it works (so far) like a damn.  It is great in that it doesn't leave that sharp little sliver just as you finish cutting the can through like every other can opener seems to do. It has a very smooth mechanism, does not leave a sharp edge, and takes up very little space in the drawer.  However, rest assured.  If this thing craps out in a couple years, you'll hear about it.

This wraps up the first Public Service Announcement from Mad Scientist Labs.  There will be more.