The Trials and Tribulations of Metering the Washing Machines

The initial idea was to use threaded fittings to interface the flowmeter with the washing machines. Fittings make sense, they are usually secure and won’t leak, provided the threads (A) fit together properly, and (B) are designed to seal. If that fails, there are ways to make poorly fitting threaded connectors seal, usually PTFE thread tape or anaerobic sealants.


Brass fitting assembly with residue of Loctite 574 on ¼ in. threads

The Koolance FM-17N flowmeter is threaded for ¼” female BSPP (British Straight thread Pipe Parallel, also known as DIN ISO 228-1). Being familiar with NPT (National Pipe Thread) which is a tapered or conical (self-sealing) design, I didn’t know how BSPP would work, until I tried it. I should have looked at the Koolance fittings more closely before committing to a large parts order of expensive ISO conversion (ISO/NPT) fittings from Swagelok, but I had perhaps too high expectations of Loctite thread sealant. The way ISO straight/BSPP fittings work is that they tighten against a gasket, rather than sealing the threads. The Koolance hose barbs and fittings are designed to work this way, but I didn’t quite understand how this worked, and therefore went with a faulty assumption that I needed to use a thread sealant/threadlocker. Alas, the tolerances of the Koolance fitttings are too wide, and the ISO fittings from Swagelok don’t fit—and of course never seal, even with the assistance of PTFE tape or Loctite 565 thread sealant. Note: the Koolance FM-17N has nominally 1/4 in. ISO straight threads.


Bosch Automotive Handbook: (Krickau & Nöcker, p. 318)

The way Loctite anaerobic sealants/threadlockers work is that they cure in the absence of oxygen, under pressure (such as in the tiny space between threads. A glob of it will stay a slightly sticky glob, but won’t really solidify the same way it will under pressure. This is especially important in applications where it is necessary to wash away the excess that gets squeezed out from between mated surfaces, such as in an engine (use Loctite 574 (the famous Loctite Orange) to put your Porsche case halves together—using RTV will cause your engine to destruct when bits of solidified RTV (silicone) clog the bearing oil passages). With rather large gaps between the threads of the fittings and ends of the flowmeter, the Loctite doesn’t quite cure, and therefore any disturbance causes the adhesive to shear from the surfaces and thus it starts to leak. The idea with Loctite thread lockers is that the shear strength keeps the threads mated.

To add to the slow leaks, the overall length of the assembly is rather long, and with an end rigidly attached to the hose bib or back of the washing machine, any torque causes the acrylic case of the flowmeter to crack—a catastrophic failure in my case. Flooding a dorm basement is not an option.

Ultimately the question is what cycle did the user select, or slightly more generally, what wash temperature did the user select. Without splicing into the water system, it may have been possible (and far cheaper) to use a set of thermocouples or thermistors on the intake hoses, but this relies on there being a substantial change in temperature to indicate what’s going on—and it may not be the case that the cold hose/pipe gets appreciably colder when the water flows through it, and the hot hose may stay warm (above threshold) in two immediate consecutive washes. It would take a bit of tuning to set thresholds, and this approach would have required a positive signal of when the machine is running (cycle start and end), which has been a little more of a challenge, using either an electret microphone to detect vibration or a Hall effect sensor on the power cable. Neither of those are fully foolproof, but fortunately the most positive system for measuring the cycles has been made workable and safe.

Installing the flowmeter in a segment of flexible hose solves the problem of putting stress on the acrylic meter body and cracking the meter, and using the Koolance gasketed BSPP fittings solves the problem of fittings not quite threading together and sealing. The flexible hose effectively prevents transmission of torque to the meter, provided the force is not excessive, and by using a hose clamp and slightly undersized inside-diameter hose, the possibility for leaks is minimized. To further reduce the possibility of leaks, the threads can be sealed with Loctite 574 thread sealant, providing a measure of resistance against the fittings unscrewing and sealing the threads ahead of the gasket integrated into the base of the hose barb.


Koolance hose barb with integrated polymer gasket


FM-17N installed in pressure-rated hose with hose clamps

Advertisements

Quantaproject: The Shake Out

It is fitting to describe the increase in the incidence of obesity and diabetes in the US as an epidemic. For most of human history, the problem has been solving the calorie problem—but now we are suffering on a mass scale from the opposite problem: a surfeit of calories, and ’empty calories’ at that.

Right now, the United States has an enormous public health crisis in the form of a large and rising proportion of the population classified as overweight, obese, and extremely obese. And the trend points to an increasing rate of obesity—and attendant health problems including diabetes type 2.

And it gets worse: the rate of obesity among young people is substantially greater than that of the population as a whole, it is forecast that up to 1/3 of today’s teenagers are at risk for developing diabetes type 2, and may lose 1/3 to 1 year of predicted gains in life expectancy, and a greater number of life-quality years (a year where they cut your toes off isn’t so happy).

 

How did we get here?

With regard to the need to increase the value of farm products during the Great Depression, subsidy programs were enacted to increase the income of farmers. In 1973, under the direction of Secretary of Agriculture Earl Butz, the paradigm changed to payment to support greater production. Paying to support production of commodity crops has led to (1) a shift towards larger farms, and (2) a decrease in the real cost of sugars, refined grains, cheese, and meat. While this could be considered beneficial in terms of delivering more calories per dollar, it has decreased the quality of the American diet, and undoubtedly contributed to the increase in obesity and diabetes.

Americans now spend less on food than at any time in history, but this decrease in expenditure on food comes at the loss of diet quality. Vegetables, fruit, and non-industrial foods are still rather expensive, and therefore make up less of our diet. The ultimate result of the decrease in food cost is that we eat more: restaurant and recipe portions have both increased in energy value and size, and it’s disturbingly true that we will eat what’s in front of us, see Brian Wansink’s research on this topic: http://mindlesseating.org/.

The US spends billions on agricultural subsidies, which distort the market for agricultural goods, specifically commodity grains which are storable, convertible into products, and useful for animal feed. In 2009, the US spent 4 billion USD on corn subsidies alone, and nearly all of that corn was converted to corn syrup, ethanol for fuel, or used for animal feed. These subsidies can constitute half a farmer’s income, as the fair market price of corn is deflated by the sheer volume produced. On the international scene, these subsidies depress the cost of American grains, injuring farmers abroad and damaging developing nations’ economies.

To use all of this grain and derivatives, new food products and new formulations of familiar ones have been engineered. The Twinkie™ is the standard bearer of packaged food products. Contrary to urban legend, it’s just an engineered cake with a designed shelf life of 25 days. Twinkies are made of things one would expect, like flour, water, butter–and things which are a little surprising, like petrochemicals and processed phosphate rock.

The changes in the American diet may has a metabolic dimension: fructose is metabolized differently than glucose or sucrose (a glucose bound to a fructose molecule), and this may have metabolic effects. See this presentation by Robert Lustig, MD at UCSD for a theory of the impact of high fructose intake. An April 13 NY Times article discusses Lustig’s take on fructose metabolism being a major cause of the increase in diabetes and weight gain. We’re certainly eating a lot more sugar, and a lot more of it is high fructose corn syrup—an average of 42.8 pounds more sugar per year compared to the 1950s, and 42% of it is now HFCS (mostly 55% fructose/45% glucose).

All this sugar is just one component of the greater amount we’re eating, which leads to there being a greater amount of us—and a greater number of us with diabetes type 2.

What it means

All of this adds up to a public health disaster—a loss of longevity, a reversal of the hard-won gains in life expectancy.

The mean life expectancy of current generations (Baby Boom, Gen-X, Gen-Y, Millenials) may actually decrease, relative to predicted increases, as a result of the prevalence of obesity and attendant health effects. The graphic above shows the predicted longevity of a 65-year-old woman. In 2010, she would have a predicted 19.3 more years, in 2050, 21.7 years—but with the effects of increased prevalence of diabetes, and heart disease related to obesity, she could lose 1/3 to 1 year of that predicted gain. This is a terribly disturbing conclusion: gains in life expectancy may slow or potentially reverse, as a result of lifestyle disease—fuelled by a food system designed around profit and special-interest benefits, not the public good.

What to do?

There are plenty of good ideas about what to do. Taking a systems approach, we need to restructure the agriculture subsidies. It’s poor policy to promote growing mountains of corn so vast that new ‘sinks’ have to be developed to use it, it’s unethical to spend taxpayer money to market full-fat cheese at the same time a different department of the same agency is fighting the increase in calorie density of foods and the size of restaurant portions. Restructuring the Department of Agriculture would be a good idea. Changing our diet is a top-down and bottom-up proposition. Access to reasonably priced, healthy foods (fruits, vegetables, legumes, whole grains) is necessary, and many areas this access is not adequate—and in many cases people who can eat well, don’t as a result of preferences. These preferences can be changed as a result of greater exposure and conscious and non-conscious behavior change.

The measure of the (washing) machine

Measuring the water use of a washing machine isn’t so hard, unless you have to do it unattended, silently, repeatedly, and do more than one machine at a time with one datalogger.

To tell what’s going on I need to know three things:

  1. How much hot water is used in a cycle?
  2. How much cold water is used in a cycle?
  3. When does the cycle start and end?  —so I can disaggregate individual cycles.

For (1) and (2), I’m using two Koolance flowmeters (see previous post). For (3), I’m using an electret microphone to detect the vibrations from the motor inside. Tom Igoe was very prescient in advising me to positively measure the activity of the machine, and Eric Rosenthal, Electronics Genius, was a great help in doing it in an elegant, low cost fashion (accelerometers are expensive, and tilt switches may not be as sensitive as I’d like).

The whole assembly is less than $1.00, (aside from the Arduino microcontroller) and the sensitivity can be tuned based on the resistance of the resistors.

“There would have been no survivors (1)”—the folly of Inverted Quarantine (and a rationale for the use of persuasive technology)

You see the faded yellow and black Fallout Shelter signs in older buildings all the time—harking back to an era where destruction by the Red Menace was only a few hours away. The bad news was that cowering in the basement wasn’t going to help much, building a shelter in your basement or backyard wasn’t going to be much better, and even the hardened redoubts the government constructed were a waste of taxpayer dollars, as there wouldn’t be much of a world left to emerge from your bunker to. Fortunately, heads were cool enough even in the hottest moments, the posturing of Mutual Assured Destruction (which effective civil defense protections would have in theory defeated) kept the balance of fear between NATO and the Warsaw Pact and prevented any major action, and accidents didn’t kill us all (although there were several disturbing close calls, thank you Stanislav Petrov).

Taking this out of the metaphors, the environmental situation we are in is somewhat analogous. You can buy organic food, drink bottled water (which substitutes compounds leached from the plastic bottles for materials from the pipes), and buy an air filter for your bedroom. The improvement in your life quality comes at the expense of the total well-being of humanity (which decreases your life quality)—so it doesn’t really work out. To reverse WOPR’s famous statement from War Games, the only winning move is to play.

So if the historical record of protecting ourselves from threats is rather poor—people who can move to the suburbs and exurbs do, leaving the ‘dangerous classes’ to occupy the cities (a semi-successful example of inverted quarantine), and people freak out about nuclear war and for the most part do nothing but buy a bunch of ominous looking signs, what to do?

For most people, most of the time, environmental concerns are not the primary issue in their minds. People want their clothes clean, their house warm, to get to work on time. They are more concerned about the electric bill due on the 1st of the month and what they’re going to be doing Friday night to worry about the collapse of the Bluefin tuna population. They also want the future to be there (which is generally assumed as there has never been a true existential crisis for humanity). Of course, the amount an individual of family weights environmental issues versus other factors is dependent on their means, their education, and life circumstances.

With the exception of the Millenialists who are actively trying to end the world to the left of the graph and the most strident environmentalists to the far right of the graph, ‘normal people’ are presumably normally distributed in their behavior. So, if most people don’t care enough to substantially reduce impact, beyond buying Method Soap (which I recommend) or organic apples—how are we going to avoid the Collapse Jared Diamond predicts in his book of the same title (which we’re on the way to realizing while everyone is blithely ignoring the fact that the sky is falling)?

From this, either people can be motivated to care, and then be given the tools to do something about it, which is difficult to effect; or behaviors can change without conscious thought—which may be an easier route. A large proportion of the people in America don’t believe that the environmental quality is an issue to worry about, what can be done to change behavior without changing their beliefs first?

Persuasive technology applied to the design of public-facing systems can lower the barrier to action (see BJ Fogg’s Behavior Model)—it doesn’t remove the requirement for motivation, but designing to encourage specific outcomes (e.g. choosing cold water for washing clothes, requiring action to activate the heated dry function on the dishwasher, or promoting fruit and vegetables through the design or packing of the refrigerator) may make changes occur without arousing resistance.

A group of thin slices can be just as big in aggregate as a large chunk, so is it really necessary to make everyone freak out and hope for change, instead of going for the things which can happen one at a time and now? It’s not so hard to make a lot of small changes in your life—cold water laundry wash, dialing back the air conditioning and heat a few degrees, taking a Navy Shower (really easy with the proper showerhead). So, there’s nothing wrong with small changes first – and making small behavior changes may cause subsequent, larger behavior and belief changes as a result. In the psychology literature it is documented that beliefs change as a result of behavior:

Cognitive dissonance describes a broad range of phenomena, where there is a disparity between actions and one’s beliefs related to those actions. People change their beliefs relative to their behavior: during the Korean War, UN POW’s were ‘mildly’ coerced into making pro-communist/pro-DPRK/pro-Chinese statements with offers of extra food, cigarettes, or clothing—and subsequently changed their beliefs to be congruent with the statements they had made. A landmark 1959 study by Festinger and Carlsmith found that subjects who were given only $1 (approximately $8 in 2011 dollars) as compensation for a terribly boring experiment changed their opinions of how unpleasant it was after lying to a fellow subject (actually a confederate), compared to other subjects paid $20 (approximately $150 in 2011 dollars) for lying about how boring it was. This effect can be exploited for environmental benefit, possibly changing the beliefs of recalcitrant populations. While it would be questionably ethical to ‘force’ people to make counter-attitudinal statements, people have no trouble cutting their bills. The Climate and Energy Project has been using patriotic and economic arguments to promote conscious behavior changes which reduce environmental impact, sidestepping the issues of whether climate change is anthropogenic or worth worrying about (it is entirely rational to want a lower electricity bill). Whether this puts a crack in the metaphorical dike remains to be seen—I doubt that changing to CFLs and turning down the thermostat will get people on the road to ecosocialist atheism, but it probably will put people on the path to other changes, as a result of the ‘foot in the door‘ phenomena, where acceding to a small request makes one more likely to acquiesce to a subsequent larger request. Freedman and Fraser’s 1966 study found startling results, as have subsequent experiments, including some related to sustainability: see Commitment and Energy Conservation, by Pallak, Cook, and Sullivan, 1980. Getting people to do something small is likely to reduce defenses to larger requests, so there is hope in the small changes.

see origin of the quote in the title: 5th Gear crash test at 120mi/hr closure

Nonobject: designporn-satire

In my literature review, I came across Nonobject.  It seemed like a good book, by the title it appeared to be like Abstracting Craft, or a discussion of de-materialization of products.  It’s not.  It’s a book of designporn-satire.  The stuff inside is actually valuable from the point of poking a little fun at design, but there are a few really good product ideas lurking inside.

It’s got a foreword by Bill Moggridge, who is a great functional designer and human interface expert, and he reflects on the magic of Naoto Fukasawa’s design, self-described as “tension,” and contrasted with Dieter Rams’ philosophy of “less, but better” (which I think is good design’s essence).

And then it goes into designporn satire.  It’s 90% satire, and 5% good ideas.  The remaining 5% is something indeterminate—good ideas gone wrong, or bad ideas gone good, like Double Time (111) [bad design gone good] or Inner Time (156-157) [good design gone bad].

As for really good ideas worth pulling out, Climatology (70-72) really does depict the future of interfaces.  Interfaces now are for the most part discrete, and digital (in the sense of being this or that, 16C instead of slightly on the cool side).  In their vision of “User interface tomorrow”, it’s ubiquitous, integrated into the environment, and a bit more open to interpretation—good sailing weather instead of 12mi/hr winds.

Most of the design is fanciful—flatware more insane than the comically unusable (yet completely serious) Curveware; Kisha Unbrella (68-69), an inverted umbrella which collects and discharges rainwater through the handle, and bicycles which can’t be ridden.  But there are some cool things here: the enLighten Switch (100-101), which is rather like Ingrid Zwefel’s Stress Press; the Optimum flashlight (122-123), where the form follows the innards (the batteries define the shape of the flashlight); and the Rawphisticated Cell phone, which pays homage to Naoto Fukasawa’s potato inspired cell phone and iconic Infobar cell phone.

If you have the 20 minutes to spare, leaf through this for some inspiration.

Arduino Flowmeter

Thanks to Eric Rosenthal, Teague Labs, and Koolance, I have a handy fluid flow meter, that is cheap, flexible, and hopefully reliable.

Starting with Teague’s DIY Arduino Watermeter, I’ve made some modifications to the code to compensate for the fact that I’m not using a Yellowjacket Arduino with WiFi, and the need to preserve precious digital I/O lines for actual I/O, and not use them as ground lines.

And more importantly, I have found and solved a significant problem in their implementation: if the wheel in the Koolance meter comes to rest with the magnet close to the Hall Effect sensor, the sensor will be stuck ‘on’—and read as though it is continuously spinning.  This requires a double-latching arrangement, to detect the spinning wheel by picking up first a HIGH signal (magnet) then a LOW signal (no magnet).

Latching Code (Arduino):

//latching arrangement for pin A
//must receive signal then no signal to indicate spin
int signalA = digitalRead(FLOW_PIN_A);
//detects tachometer signal, flow pin goes high every time the magnet spins past the sensor NOTE: must be integer
if(signalA==1){
latchA1=true;
//set first latch
}
if(signalA==0){
latchA2=true;
//set second latch
}
if(latchA1==true and latchA2==true){  //if both latches are enabled, increment counters
countA++;
totalCount++;
//reset latches
latchA1 = false;
latchA2=false;
}

Full Code (Arduino):

This is set up for two meters, and can be expanded to more, or easily adapted to only read one flowmeter.

inline void digitalInputWithPullup(byte pin, boolean b) {  //enables pullups
  pinMode(pin, INPUT);
  digitalWrite(pin, b?HIGH:LOW);
}

#define FLOW_PIN_A 2
#define FLOW_PIN_B 3
//#define FLOW_PIN_X_GND Y //if you want to use a digital IO pin as a ground, enable this line, and modify X and Y

unsigned long totalCount = 0;
unsigned long previousCount = 0; //used for interlocking the counter 

unsigned long windowCountA=0;

//storage variable for the timer
unsigned long previousMillis=0;
int interval=1000; //in milliseconds

//counters for each flowmeter
unsigned long countA = 0;
//latches so the counter doesn't get stuck counting if the magnet stays next to the sensor
boolean latchA1 = false;
boolean latchA2 = false;

unsigned long countB = 0;
boolean latchB1 = false;
boolean latchB2 = false;

void setup()
{
  Serial.begin(19200);
  digitalInputWithPullup(FLOW_PIN_A, true);
  digitalInputWithPullup(FLOW_PIN_B, true);
//  pinMode(FLOW_PIN_X_GND, OUTPUT);  //for using digital I/O pins as ground lines
//  digitalWrite(FLOW_PIN_X_GND, LOW); 
}

void loop(){

//latching arrangement pin A: must receive signal then no signal to indicate spin
  int signalA = digitalRead(FLOW_PIN_A); //detects tachometer signal, flow pin goes high every time the magnet spins past the sensor. NOTE: must be int.
  if(signalA==1){
    latchA1=true;
  }
  if(signalA==0){
    latchA2=true;
  }
  if(latchA1==true and latchA2==true){
    windowCountA++; //increment window counter (counts/unit time)
    countA++; //cumulative count for flowmeter A
    totalCount++; //total count on all meters
    //reset latches
    latchA1=false;
    latchA2=false;
  }

//latching arrangement pin B
  int signalB = digitalRead(FLOW_PIN_B);
  if(signalB==1){
    latchB1=true;
  }
  if(signalB==0){
    latchB2=true;
  }
  if(latchB1==true and latchB2==true){
    countB++;
    totalCount++;
    latchB1=false;
    latchB2=false;
  }

/*
//debugging code to see if signals are present (will display a 1 if there is signal)
Serial.print(signalA);
Serial.print("|");
Serial.println(signalB);
*/

//cumulative totals output
  if (totalCount > previousCount){
    Serial.print(countA);
    Serial.print(" | ");
    Serial.print(countB);
    Serial.print(" || ");
    Serial.println(totalCount);
    previousCount = totalCount; //stores L<-R, updating previousCount so it recycles
  }

/*  
//window counters
  unsigned long currentMillis = millis(); //set storage variable currentMillis to current time
  if (currentMillis - previousMillis > interval) { //if within the rolling window [interval]
    previousMillis = currentMillis;     //save last time the clock updated in previousMillis
    Serial.print(currentMillis); //timestamp
    Serial.print(" | ");
    Serial.println(windowCountA); //count of 'clicks' within the window
    windowCountA=0; //reset window counter, cumulative counters unaffected.
  }
*/

}//end loop

Stop, children … everybody look what’s going down.

Stop, children, what’s that sound? Everybody look what’s going down”—For What It’s Worth: Buffalo Springfield

I saw this NY Times op-art piece and had to stop for a moment:

http://www.nytimes.com/interactive/2010/11/14/weekinreview/14considered.html

I admire the sentiment, but the execution is a little rough—The soda labels are good, and factually accurate, but the milk bottle is confusing and the bagged meal label makes no sense.

The soda bottles are clever, eye-catching, and say the right things. Drinking too much soda can lead to weight gain, diabetes, possibly tooth decay, and is generally not supposed to be a staple item.  The average American drinks 53 gallons of soda a year, mostly made with high-fructose corn syrup, or artificial non-nutritive sweeteners.  Irrespective of whether HFCS has a different metabolic path than sucrose (cane sugar), that’s still about 79,000 kilocalories a year to drink (that would be 565 12-floz cans of Coca-Cola classic).  Or in other terms, 20 lbs of fat, in energy terms.  Whether or not aspartame or sucralose have adverse health effects is a debate I’m not going to get into here.

The milk bottle doesn’t make sense to me: the label on the side says “organic” and there’s a big ‘no’ symbol on the big kid, so what do they mean? does it contain rBGH or not?

The bagged meal, is rather confusing as well: what do you mean by “this meal will not decompose for one year”?  Strange, but not really informative.  It sounds a little like the urban legend that Twinkies ® are intended for a 25 year life.  Apparently, they’re designed to last 25 days (see Twinkie, Deconstructed)

Information presentation is supposed to get a message across.  To that end, it has to be (A) the right message and (B) intelligible.  While the point of this is satire, injecting some levity into the recent announcement of more graphic labels on cigarette packages.  Those messages will have some effect, but I think the FDA could do well saying “this product is only available because the tobacco lobby bribed congress members” (appeal to moral revulsion)

For a very good discussion of moral revulsion and how your brain is cross wired, see here: http://opinionator.blogs.nytimes.com/2010/11/14/this-is-your-brain-on-metaphors/