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.
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.
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
Eagle_files - This directory contains Eagle CAD designs for the OWHL printed circuit boards. Revision C is the current version (circa mid-2016) and is not physically compatible with the earlier revisions. The same software works on all hardware versions.
R_files/OWHL - R scripts for dealing with OWHL data files.
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.
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 I have written. They are
contained in separate repositories for each model. Choose
the appropriate repository that matches your sensor's pressure
range, and install the library contents in the
- 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. 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.
Developed under Arduino v1.0.5-r2, rewritten to work with Arduino v1.6.6