OWHL - Open Wave Height Logger
The code in this repository runs a pressure sensor data logger that can be used to log wave heights over long periods of time (continuous running of up to 1 year on a set of D-cell alkaline batteries). It is meant to be placed in 5-10m of water, where it then records absolute pressure (water + atmosphere) via a MS5803 pressure sensor and writes to a microSD card. See http://lukemiller.org/index.php/category/open-wave-height-logger/ for more information.
Directories and files
OWHL/- This contains the Arduino
OWHL.inofile to run the Open Wave Height Logger. This directory should be placed in your Arduino folder where your other sketches are normally stored.
libaries/- This directory contains archived copies of the external libraries necessary to compile and run the
OWHL.inoprogram with the Arduino software. See the External libraries section below for information on installing these files or obtaining current versions of the libraries from their respective repositories.
boards_txt_entry- This contains a text file whose contents should be copied and pasted into the standard Arduino
boards.txtfile. On Windows, this file is found in the arduino installation folder, for example:
arduino-1.6.4/hardware/arduino/avr/boards.txt. On Mac OS X, this file is found by going to your Applications folder, long-clicking on Arduino.app, and choosing "Show package contents". Then in the Contents folder that opens up, go to
Hardware_files/- This directory contains Eagle CAD designs for the OWHL printed circuit boards, along with Gerber files that can be used to order (bare) circuit boards from online suppliers. Schematic images and board layout images can be found in subdirectories of the
OWHL_revCdirectory. Revision C is the current version (circa 2016-2019) and is not physically compatible with the earlier revisions. The same software works on all hardware versions. An Excel parts list file
OWHL_RevC_parts_simplified_20191001.xlsxcan also be found in the
serial_number_generator/- This directory contains an Arduino sketch that can be used to generate and store a unique serial number on the ATmega328P EEPROM memory of an OWHL. The sketch only needs to be uploaded to the OWHL once to store the serial number. The main OWHL.ino program can retrieve this serial number and record it in every output data file. This directory should be placed in your Arduino folder where your other sketches are normally stored.
settime_Serial/- This directory contains an Arduino sketch used to set the DS3231S real time clock on an OWHL. Use the Arduino software to upload this sketch to an OWHL, and open the Serial Monitor to type in the current date and time to be programmed to the clock chip. The clock should be set before loading the main OWHL.ino program on the OWHL. We recommend always setting the date and time using the current values in the UTC time zone. This directory should be placed in your Arduino folder where your other sketches are normally stored.
settings_txt_example/- This directory contains a sample settings.txt file that could be loaded on a SD card and read when the OWHL first starts up.
To make the OWHL run properly, you need to install one of the
MS5803 pressure sensor libraries. They are
contained in separate repositories for each sensor model. Choose
the appropriate repository that matches your sensor's pressure
range, and install the library contents in the
directory. The standard choice for an OWHL would be the MS5803-14BA
model (14 bar maximum pressure).
- MS5803-01BA: http://github.com/millerlp/MS5803_01
- MS5803-02BA: http://github.com/millerlp/MS5803_02
- MS5803-05BA: http://github.com/millerlp/MS5803_05
- MS5803-14BA: http://github.com/millerlp/MS5803_14
- MS5803-30BA: http://github.com/millerlp/MS5803_30
You also need the real time clock library and SdFat library.
You must set the real time clock chip, DS3231, on the OWHL before attempting
to upload the
OWHL.ino program and collect data.
To set the real time clock, look in the examples folder of RTClib and
settime_Serial.ino sketch (also found in the
directory here). Load that sketch onto the OWHL. Open the
Arduino Serial Monitor window (use the 57600 baud speed setting) and enter the
date and time, then hit enter to
write the values to the DS3231 clock chip. You can then load the main
OWHL.ino sketch onto the OWHL to log data.
OWHL journal article
A open-access peer-reviewed article detailing the design and testing of the OWHL has been published in Limnology and Oceanography: Methods (Lyman et al. 2020). You can access the article for free here: http://dx.doi.org/10.1002/lom3.10370
Assembling OWHL electronics
Processing OWHL pressure data into wave statistics
See the following 2 R packages for help with converting OWHL pressure data into wave height statistics. R is an open source statistical program. Both packages contain instructional vignettes that explain their operation and the general workflow for processing subsurface pressure sensor data into wave data.
Ordering bare circuit boards
If you don't want to deal with the circuit board design files, you can directly order copies of each of the OWHL circuit boards (in a minimum batch of 3 per board) from these links:
- OWHL Power board: https://oshpark.com/shared_projects/ROmwZlFP
- OWHL CPU board: https://oshpark.com/shared_projects/BKAWGvvS
- OWHL MS5803 board: https://oshpark.com/shared_projects/Zr2csAMy
- OWHL drill template (optional): https://oshpark.com/shared_projects/QqxQIda4