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.
-
OWHL/
- This contains the ArduinoOWHL.ino
file 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 theOWHL.ino
program 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 Arduinoboards.txt
file. 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 toContents/Java/hardware/arduino/avr/boards.txt
. -
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 theOWHL_revC
directory. 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 fileOWHL_RevC_parts_simplified_20191001.xlsx
can also be found in theOWHL_revC
subdirectory. -
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 Arduino/libraries/
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
use the settime_Serial.ino
sketch (also found in the settime_Serial/
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.
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
An assembly video for OWHL Revision C hardware is found here: https://youtu.be/N2AALRY_woE or in a permanent archive here: http://doi.org/10.5281/zenodo.3679029
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.
-
oceanwaves
: https://cran.r-project.org/package=oceanwaves
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