Go Down

Topic: Running "hydrographs" with Arduino. (Read 1 time) previous topic - next topic


We have designed a cool Arduino-based flow controller for river models we build; they're used for education and research (see http://www.emriver.com).

The Arduino code we've written works well and does this (not posted, pretty boring and not that relevant to questions below):

--poll three buttons, two of which are "flow up," and "flow down."

--measure voltage sent to a 12v pump from a separate PWM unit, convert that to flow (there is a strong relationship) and display on an LCD

--send pulse signals to the PWM unit for up and down, i.e. speed up, slow down

--totalize and track water flow; third button and up/downs are used to reset this (with "reset?  up=yes, down=no?) functions.

So far, everything's working great!

The next thing is a little tricky.  Four steps.

1.  Using third "aux" button, enter menu mode (LCD is 16 x 2).
2.  Page through perhaps 5 choices for hydrographs (defined below).
3.  Choose a hydrograph.
4. Run the hydrograph.

Hydrographs are a measurement of the rise and fall of floods in rivers.  Many shapes, the simplest is like slicing a pointy mountain in half--a sharp rise, peak, then fall (here are some examples:  http://serc.carleton.edu/images/introgeo/socratic/examples/Hydrograph.jpg)

I picture defining the rise and fall with 7 or 8 time and flow value points, i.e. at T1 (millis), set flow to Q1 (we use Q for flow, same as Amps), then at T2, set flow to Q2, etc.  T3 might be the peak or highest flow.

Will need to slowly rise/fall to interpolate between those points.

Hydrographs will be from around 3 minutes to maby an hour long.

For our first units we want three buttons only (unit has to be kid and waterproof, very simple and durable).  No keypad--if we had that all those parameters could be set.

Advanced users can plug in USB and program/hack and make all the fancy hydrographs they want; we just want five or so generic ones for busy educators.

Any suggestions on

1.  Approach for the menu system?  I haven't seen a lot on that here, or
2.  Calling and running a routine that will run five or more different hydrographs.

Anything on general approach and especially something similar out there would greatly help, thanks.


PS.  If you REALLY want to see a hydrograph, here is a complete urban one I captured on video:  http://www.youtube.com/watch?v=hJftAYYXpVw


You may have already done this, but if not....

Look ahead to the day when you have multiple tributaries feeding a main drainage.

Don't paint yourself into a corner... build what you are doing now in a way that will someday allow you to pre-set hydrographs for the separate tributaries, maybe with "start" offsets, and then, at the press of a single button, start the whole simulation running. I.e. that single button would say "go" to multiple pump operating Arduinos.

Sounds like a pretty cool thing you are building!

Loved the video... as much fun to watch the human activity wax and wane as it is to watch the water flow.

Relating water depth (easy to measure) with water flow, cubic meters per minute, must be an "interesting" aspect of your work.



tkbyd, excellent advice, had not thought that far ahead, though I have dreamed of a bunch of pumps controlled by Arduino for cool art project!  Thanks.  With "tributary pumps" (very easy to build for us) we could simulate various watershed conditions and urban problems especially.

In the video, the thing you see upper right is a tree chipper (getting rid of the pesky forest that lived there before the development), and all the smoke is steam from the wet trees being ground to chips.  I was crazy lucky to have all that stuff going on--catching that took four or five tries.  And you can see the electricians booking out as the lightning starts!

PaulS, thanks--I looked at that before, but don't fully understand libraries and was leery of one that seems to be barely finished and with no documentation.  Of course I use the LCD library and have no earthly idea what's going on behind the scenes  :)


Aug 04, 2010, 11:54 am Last Edit: Aug 04, 2010, 11:55 am by PaulS Reason: 1
and was leery of one that seems to be barely finished and with no documentation.

Unfortunately, the name on the library page and the name that he uses when posting here don't match. If they did, and you saw the amount of effort he puts into coding and library development, you would have no problem using the library.

Search the forum. There have been several posts about how to use this library, with examples.

If nothing else, you can look at the source code, and borrow ideas for building your own menu handler.

Go Up