Sunday, May 23, 2010

A couple of Emriver Em2 birds leave the nest.

On Friday Lily, Josh, and I palletized and shipped off a couple of Em2 models.  One to Texas, the other to Oregon.

I did this time lapse (a bunch of still frames) to record the whole process; it's a lot of work!  One goal of our Em2 redesign is to make this process much easier.

Wednesday, May 19, 2010

Eureka, maybe? The ultimate flow sensor?

Lily and I've been kicking around different ways to digitally sense flow for the last week, including making our own little propeller/turbine sensor.  Today as we cranked on finishing a proposal we're working on with NCED and Winona State, I glanced at a little propeller I keep on my desk and thought "the Em2's pump has a propeller in it."

Yes, people, all that junk is to inspire things like this.  Really.

And of course the rotational rate of that little propeller (technically an impeller), when driven by a pulse-width-modulated (PWM) output, is closely related to the pump's volumetric output of water.

So after the proposal was done (hardest part was the budget, is it always like that?) we ran into the shop and simply hooked a PWM unit and voltmeter up to a pump.  Measuring flow volumetrically (stopwatch and graduated cylinder) we produced this beautiful curve.  It's even straight!


PWM units output a square wave, which in this case has a 12 volt max.  The tops of the "plateaus" are varied in width; the volt meter reads this as an average voltage (the frequency is quite high).

A little Arduino board can output the PWM with both transistors tied behind its back, and also monitor the voltage, and provide a visual readout.

And we have completely eliminated our flow sensor!  Another part gone, actually several, because those need a fine filter.  The pump already has one, and isn't much affected by small particles anyway.

Of course the pump's output is going to be sensitive to how much media is on its intake filter, and any changes in the tubing system, but if we keep those things steady, the relationship should be reliable.  And the Arduino is smart--if the calibration changes, variables in the unit can be adjusted.

Looks very promising.  And very open-source adaptable because no sensor is required, and the electronics, both hardware and theory, are pretty simple.

Tuesday, May 18, 2010

Lily's first circuit, R&D at LRRD.

A big day.  Lily hooked up her first electronic circuit, and hacked some microprocessor code.  My work was interrupted by exclamations of "YES!" and "COOL!" from the lab.

Lab sounds I like to hear.

Lily has strong skills in biology, chemistry, hydrology and other sciences; this interest in physical computing is a wonderful bonus for LRRD.

Confession:  During Lily's interview/evaluation process I planted gadgets in the lab and learned she was interested in physical computing and design (I hope she'll forgive me).  Not too many people are interested in, let alone good at this stuff, but clearly she is.

We're working on digital flow measurement for our Emriver models, and had a lively chalkboard discussion today:
  • Would a tipping bucket system be practical?  
  • A flow shunting system like this one?  
  • Waterwheels, propellers, paddlewheels? See this post.
  • Infrared or Hall Effect senders?
  • Is it OK for the meter to be a black box, or should its guts be visible to students?
We have unique needs for a meter, so again we're breaking new ground.  I'm glad to have Lily's enthusiastic help figuring it out.

Sunday, May 16, 2010

How open source happens: hard work.

The top photo shows a little windmill at which I've been tilting.

We're working on what I hope will be (just like the 1969 version I once owned) the VW Beetle of stream tables.  A practical, dependable, scientifically robust, open source, and economical stream table for every university geoscience and engineering lab.  And something affordable by those with lesser budgets, like river conservation NGO's and high schools.

Everything has to be optimized.

We have a lot of Em2 models in the wild, and we have near zero problems.  That's how we roll.  Busy teachers need simplicity and durability; that lab time is precious and can't be wasted on fussy equipment.

Here we have a Jaycar ZD-1200 flowmeter; I've blogged about this low cost (~US$25) new development.  We've hooked it up to a $30 open source, in both hardware and software,  Arduino microprocessor board, and initial results are promising. 

But the Jaycar meter's little turbine is not happy with our plastic grit modeling media.  After hours of erratic output I attributed to software problems, I took this one apart and found that a few tiny particles were gumming it up.

But take-apart-and-clean-flowmeter won't appear in our user manual.  Adding filters  to protect the meter is not good; filters are a pain (when's the last time you changed your furnace/oil/etc.?)

This little sensor is very well designed, built, and priced.  It uses a Hall Effect sender that pulses the Arduino with every rotation of that little paddle shaft.

The Aurdino reads those pulses, compares them to elapsed time, does a little math, and then sends the results to a nearby compter or liquid crystal display.  Simple.

No, not really--the Arduino's microprocessor can only record events like this with software interrupts which means other processes (say, to send data to the nearby computer) are suspended.  And so does the internal clock that's used to keep track of time.

It's not pretty.  Almost literally like trying to count money while somebody is shouting random numbers.

Every 10ms or so, this little chip running at 17mHz does math to see if it's time to report to an LCD or laptop as the ZD-1200 sends it pulses at up to 300Hz (once every 3 ms).  And the Arduino's system is picky about how variables and numbers are stored and doesn't like to divide a short integer (ml/second conversion factor) by a long one (total elapsed time in milliseconds).

Here's some output.  There is a lot of noise.  The $300 flow sensor we use on our big Em4 would make a nice, clean signal, but at ten times the cost of the ZD-1200.

More work.

Friday, May 14, 2010

The Dalai Lama and Missouri Stream Teams.

This week Kate and I traveled to Bloomington, Indiana to take some time off in that beautiful university town (maybe the coolest place ever if you're into architectural limestone) and hear the Dalai Lama speak.  He's an amazing, inspirational man, and it was touching to see thousands of people of all beliefs gather to hear him.

Home tonight I was further inspired by an email announcing the Missouri's Stream Team program's 20th anniversary and 4,000th local chapter.  The program was created by the Missouri Department of Conservation (MDC) to involve laypeople in monitoring and protecting local streams, and has been phenomenally successful.  I was lucky to have been working for MDC's Streams Unit when this program was conceived.

This new video celebrates that achievement.  In it you'll see environmentalists of many stripes.  If your job is in stream conservation, watch it (it's long, but worth your time) and you'll be reminded that there are hundreds of thousands of laypeople out there who appreciate and will support you.  And it's particularly powerful if you need an antidote to ridiculous "environmentalist wacko" labels.

Ozarkian streams are my favorites (see underwater video I shot here),  and I've maintained close ties with Missouri colleages.  We have pending proposals to work with MDC and the Stream Team program to place river models and curriculum throughout Missouri.  I have high hopes of working with these inspiring volunteers.

River conservation these days is a frustrating battle.  To quote the Dalai Lama, "Never give up, no matter what is going on around you, never give up."

Sunday, May 9, 2010

Awesome open-source Emriver instrumentation.

After quite a few weeks of work we managed today to hack thoughtfully meld a bunch of code and electronics to produce a device that can do three things:

1.  Control a 12-volt pump's speed and flow output, and

2.  precisely measure that output in ml/second,

3.  send that information to a nearby computer, and take commands from it.

And all this for less than $100 or so in parts.*  We used an Arduino Duemilanove development board, a new $25 flow sensor from Jaycar in Australia, and other common components.  And we started with open source ideas from these guys, who I discovered through this book.

This figure shows the Emriver Em2's recirculating flow path.  The valve array and notch gage could be replaced by this device.

Working with our Em2 model (or any other small model), students can use the Arduino (or another small microprocessor like it, we're still experimenting) to create and measure hydrographs, to monitor long term experiments, even to produce real-time graphs of hydrographs they create manually.

How cool is that--to create and digitally plot a real (though miniature) hydrograph in real time?  Has this been done before?

I'm telling you, and any competitors we might have, about this because the beauty of open source design is that it's good for everybody.   If your business involves keeping secrets from your customers, you're not a good company.

*And hundreds of hours of development work, and the use of a big lab and big brains trained at great expense, etc.  And this thing hasn't been put in a waterproof box yet or tested for durability or safety, and isn't ROHS compliant for European export, and who knows about software support?  Don't get too excited.  But it has great promise!

Thursday, May 6, 2010

Lily Hwang joins LRRD as Ecohydrologist.

I’m happy to announce Lily Charnsmorn Hwang has joined LRRD as our Ecohydrologist.  We were lucky to spot Lily as she approached a successful defense of her thesis at Southern Illinois University Carbondale (SIUC).  We were poised to do a national search, but I’m sure we could not have found a better partner!

Lily was born and grew up in New Jersey as a first generation Chinese-Thai-American and is fluent in English and Thai.  A Renaissance woman with talent and training in photography and art, she has a BS in Biology (with honors) from William Paterson University.  Her Master’s in Forestry centered on the effects of urbanization in Metro-East St. Louis area.  There Lily helped identify water quality issues, studying stream-borne nitrate, orthosphosphate, bacterial coliform, and even caffeine as urbanization indicators.  Who’d believe that the ubiquitous Starbucks would be of scientific use?

Lily was inspired to study environmental sustainability by the problems she saw in New York-New Jersey area.  She’s interested in urban “island biogeography” (one of my favorite courses in grad school); and how impervious surfaces in the northeastern US have produced huge “oceans” where insects and other fauna become isolated and genotypically fragmented.

She likes big, complicated, relevant problems, and wants to use science and education to make a difference.  A perfect fit for us!  Lily is also a techie, and is interested in our ongoing work to instrument our models and provide open source hardware and software for them.

Lily will be doing research and development work on our Emriver geomodels, she’ll also develop new ways to use them for education and outreach.

I was impressed with Lily from the moment I met her, and hired her as much for her wonderful, warm, personality as for her impressive science skills.  She has a strong environmental ethic and wants to make a difference.  And something we demand at LRRD -- a great sense of humor!