Hidrosónico is a stream gauge using a MaxSonar HRXL MB7369 sonar rangefinder, a Seeeduino Stalker v3 Arduino-compatible microcontroller platform, and an Adafruit FONA 800 GSM module. It reads the distance between the sensor (specifically from where the housing meets the threading) and the water's surface directly below and sends this data at specified intervals to cloud-based storage, SMS, and/or email as determined by the user. It was designed to aid in collection of hydrological data and for flood early warning in developing countries. This version integrates a rain gauge at the request of the recipient.
The code provided sends data to data.sparkfun.com as the cloud service but it could be easily adapted to any other provider. Please note the places in the code that are marked for user-specific input.
This is a beta unit and we will be making changes as a result of the data and experiences we are collecting from pilot installations in Honduras, as well as feedback from on-the-ground partners like CODEM-DC in Tegucigalpa.
All code and hardware files are being made available under open source licensing. If you use it, please let us know (robert_ryan-silva[at]dai.com), and if you improve it, please share!
##Bill of Materials
Links to vendors are provided for convenience and not meant to imply an endorsement of that vendor; most of the items are available from other sources, and most components can be adequately substituted with equivalents. We have no connections nor receive any benefit from any of the vendors indicated.
- Seeeduino Stalker v3. Most Arduino-compatible microcontrollers will work, but most will require additional circuitry to charge the battery from a solar cell and for use of the real-time clock. Some Arduino-compatibles will require some pin changes (though the Arduino Uno and its equivalents should be fine).
- Adafruit FONA 800 and antenna. The FONA 808 would also work, but would require some wiring changes and would not fit on the circuit board as designed. Any GSM module that is not based on the SIMCOM SIM 800 series chips would need code changes to work properly.
- Maxbotix MaxSonar HRXL MB7369.
- A solar panel. We use these. We have not found any panels that terminate in the JST connector that the Stalker takes, so a JST connector is highly recommended; Scotchlok butt connectors or similar (inside the enclosure, of course) make connecting the JST connector to the solar panel quite easy.
- A lithium-ion battery. We use these.
- Rain gauge. You can collect rainfall data at the same site for a minimal additional cost with the addition of a rain gauge. The Hidrosónico code in the repository records data from a simple Argent Data Systems rain gauge. You'll need two 1K ohm resistors and a pair of 1N148 diodes to wire it to the microcontroller; an RJ-11 jack like this one from Sparkfun will make this easier to work with, but you could strip the wires and solder them directly.
- Circuit board. Eagle files for a custom circuit board to accommodate the FONA and the optional rain gauge are included in the repository. You could cut this on a CNC machine or have it fabricated by a vendor like OSH Park. It isn't strictly necessary -- you could wire the FONA directly -- but we found in practice that installation can be a violent process and connections coming loose is a real possibility. It is recommended especially if you intend to implement the rain gauge.
- Interior structure. The repository includes a STL file for an interior frame to hold the various internal components stable inside a 4 x 4 x 2 inch PVC junction box like this one. We cut a 1-inch hole in the faceplate of the junction box and use PVC cement to attach a threaded 3/4-inch coupling like this one. Again, it's not necessary, but it does keep things from banging around much during installation. Additional holes must be drilled to accommodate the solar panel and the rain gauge. We use plumber's putty to fill the gaps around the cabling.
- Mounts. You'll want to mount the solar panel and optional rain gauge somehow. The repository includes SVG files for mounts that we have used with the PVC junction boxes. We cut these from sheet metal using waterjet cutters or 3.5mm polypropylene using laser cutters; both have the advantage of being easily bendable (with heat, in the case of polypropylene) to the desired angle. For those without access to fancy CNC cutters, the repository also includes a template for a simpler sheet metal solar panel mount that could be cut with aviation shears or other sheet metal cutting implements.
- Grove <-> female jumper cable. Makes connecting the MaxBotix to the Stalker very easy indeed.
- An Xbee 802.15.4 radio will allow you to reprogram the unit from nearby without physically opening the housing, which can be a serious hassle depending on where the unit is mounted.