riparian rap

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.