The Feather Wave Gauge is an affordable, open-source instrument designed for coastal researchers, educators, and environmental monitoring. Built around the Adafruit Feather 32u4 Adalogger microcontroller and a high-precision pressure sensor, this system logs water pressure data that can be used to derive wave height, periods, and other hydrodynamic parameters.
The wave gauge is particularly well-suited for:
- Nearshore wave monitoring and coastal dynamics research
- Storm surge and flood monitoring
- Research deployments requiring multiple sensor arrays
Data is logged to an onboard microSD card in CSV format for easy post-processing with standard analysis tools.
Maintained by: NHERI RAPID
- Overview
- Features
- Repository Structure
- System Requirements
- Getting Started
- Configuration Options
- Operation
- Data Format
- Deployment Guidelines
- Battery Life
- LED Status Indicators
- Troubleshooting
- Post-processing
- License
- Acknowledgments
- Low Cost: Economical alternative to commercial wave gauges
- Flexible Sampling: Supports continuous and burst sampling modes
- Autonomous Operation: Battery-powered with long deployment durations up to several months
- Real-Time Clock: Accurate timekeeping over many months with RTC module
- Configurable: User-adjustable sampling rates and burst parameters
sketchbooks/feathergauge_code/: The primary Arduino sketch for data logging. Configure sampling parameters inuser_config.hbefore uploading.sketchbooks/rtc_setup/: Required utility to synchronize the real-time clock before use (unless using automatic programming).libraries/: All necessary Arduino libraries packaged as ZIP files.automatic_programming/: Tools for programming multiple wave gauges efficiently (Windows only).build_info/: Hardware assembly guide, bill of materials, and 3D models for internal components.
- Arduino IDE (latest version recommended)
- Windows 10/11 (for automatic driver installation) or Linux/Mac with appropriate drivers
- Microcontroller: Adafruit Feather 32u4 Adalogger
- Pressure Sensor: SparkFun MS5803-14BA
- Storage: MicroSD card (8GB recommended, large capacity cards may not work correctly)
- RTC: DS3231 Real-time clock, connected to microcontroller using I2C
Download the Arduino IDE from arduino.cc
Configure Board Support:
-
Open Arduino IDE and navigate to File → Preferences
-
Add the Adafruit boards URL to "Additional Boards Manager URLs":
https://adafruit.github.io/arduino-board-index/package_adafruit_index.json -
Go to Tools → Board → Boards Manager
-
Search for "Adafruit AVR Boards" (leave Type set to "All")
-
Install the board package
-
Close and reopen Arduino IDE (required for changes to take effect)
Windows 10/11 Users: Driver installation is automatic. No manual driver installation required.
- Download this repository as a ZIP file (Code → Download ZIP)
- Extract to a location on your local hard drive
- In Arduino IDE, navigate to Sketch → Include Library → Add .ZIP Library...
- Navigate to the
libraries/folder in the extracted repository - Add each
.ZIPfile one at a time:Adafruit_BusIO-master.zipLow-Power-1.81.zipRTClib-2.1.4.zipSD-master.zipTimerOne-<version>.zip
Troubleshooting: If you see compilation errors like
xxx.h: No such file or directory, close and reopen Arduino IDE after installing libraries.
- Connect the Feather board to your computer using a micro-USB cable
- In Arduino IDE, click the board selection dropdown (upper left)
- Click "Select other board and port..."
- Under Boards, search for and select "Adafruit Feather 32u4"
- Under Ports, select the COM port labeled with (USB)
- If multiple USB ports appear, try each until successful upload
The RTC must be set for proper timestamping. This is a one-time setup unless the RTC battery is removed.
Setting the Clock:
- Open
sketchbooks/rtc_setup/rtc_setup.inoin Arduino IDE - Ensure the correct board and port are selected
- Click Upload
- If upload hangs on "Waiting for upload port," press the small black reset button on the board
- Once uploaded, open Serial Monitor (magnifying glass icon, top right)
- Set baud rate to 57600 baud if message appears corrupted
- Type the current date/time in the Serial Monitor message box using this format:
Example:
MMM DD YYYY HH:MM:SSDec 19 2025 14:30:00(24-hour format) - Enter the command a few seconds ahead of actual time, then press Enter when time matches
- The RTC is now synchronized. Ensure a CR1220 coin cell battery is installed for backup power.
- Ensure the device is powered off (no USB, no battery)
- Insert microSD card into SD card slot
- Connect battery (if applicable)
- Connect USB cable to computer
- Open
sketchbooks/feathergauge_code/feathergauge_code.ino - Configure sampling parameters in
user_config.h(see Configuration Options) - Click Upload
- If upload hangs, press the reset button immediately after clicking upload to enter the bootloader.
- Once upload completes, disconnect USB cable
- The red LED will flash 1-6 times then stop, indicating successful startup.
⚠️ Error: Continuously flashing LED indicates a fatal error. See LED Status Indicators.
Edit user_config.h before uploading to configure sampling behavior:
SAMPLE_FREQ = 16; // Sampling frequency in Hz
BURST_SAMPLING = false;
BURST_SAMPLING_ONE_SAMPLE = false;
DELAY_START = false;SAMPLE_FREQ = 16; // Frequency during burst
BURST_SAMPLING = true;
BURST_SAMPLING_ONE_SAMPLE = false; // Set true for single sample per burst
writeSeconds = 30; // Sampling duration (seconds)
sleepSeconds = 120; // Sleep duration between bursts (seconds)
DELAY_START = false;SAMPLE_FREQ = 1; // Must be 1 Hz for single sample
BURST_SAMPLING = true;
BURST_SAMPLING_ONE_SAMPLE = true;
writeSeconds = 5
sleepSeconds = 120;
DELAY_START = false;Battery Life Considerations:
- Higher sampling frequencies reduce battery life
- Burst sampling with longer sleep intervals extends battery life
After Initial Programming: The gauge starts automatically after uploading code (see step 5 above).
Restarting After Battery Disconnect: Plug in the battery. If the gauge starts successfully, you will see 1-6 LED flashes, just like when the wave gauge was programmed.
- Format:
MM-DD-YY.CSV(date when sampling began) - Example:
12-19-25.CSVfor December 19, 2025
Each file contains:
- Header row: Wave gauge serial number and metadata
- Data rows: Timestamp, pressure (mbar), temperature (°C)
W.G. Num: 01,Timestamp,Pressure [mbar],Temp [deg C],Battery [VDC]
2025/9/19,12:19:51:018,1006.20,26.94,4.47
2025/9/19,12:19:51:078,1006.30,26.95,4.47Always deploy with sensor facing down. This prevents immersion of electronics if a minor leak occurs, maximizing data recovery probability
Sensors should be positioned to detect dynamic pressure fluctuations of the shortest wave period. Wave-induced pressure attenuates exponentially with depth:
- Decay Coefficient (K): Want K ≈ 1.0 for target wave periods
- Avoid: Placing sensors too high above seabed for short-period waves
- Example: At 3m depth on seabed, wave periods ≤2s will not be detected
Figure 1. Deployment Guidance for Pressure Attenuation with Depth
- Allow gauge to sample in atmospheric pressure for 1-2 minutes
- Submerge all gauges in bucket of seawater (sensor at bottom)
- Sample for 1-2 minutes with consistent orientation
- Use these reference samples for minor calibration adjustments
- Keep gauge sensor-down during recovery to prevent water intrusion
⚠️ Warning: If leak occurred, gauge may be under pressure. Do not point at self when opening.- Inspect for water with sensor-down orientation
- If water present: Remove electronics, unplug battery, pour out water
- Do not reuse water-exposed batteries
- Allow to dry completely before reinserting electronics
| Configuration | Battery Capacity | Estimated Life |
|---|---|---|
| Single sample burst (2 min interval) | 4400 mAh | ~2 months |
| Single sample burst (2 min interval) | 10200 mAh | >3 months |
| 16 Hz continuous sampling | 4400 mAh | ~3 weeks |
| 16 Hz continuous sampling | 10500 mAh | >1 month |
| Flash Count | Meaning |
|---|---|
| 1-6 flashes then off | Normal - Program started successfully |
| Flash Count | Meaning | Solution |
|---|---|---|
| 1 flash (repeating) | SD Card Error - Not initialized | Check SD card insertion; verify card format; try different card |
| 2 flashes (repeating) | File Creation Error - Cannot write to SD | Check SD card has free space; verify card is not write-protected; card may be faulty |
- Cause: Using power-only micro-USB cable
- Solution: Use a data+power micro-USB cable. Check Device Manager (Windows) for COM port.
- Solution: Refer to Setting the Real-Time Clock
- Ensure CR1220 coin cell battery is installed for RTC backup
- Library not found: Close and reopen Arduino IDE after installing libraries
- Board not selected: Ensure "Adafruit Feather 32u4" is selected in Tools → Board
- Port not available: Check USB cable connection and try different port
-
Upload simple test: File → Examples → Basics → Blink
- If fails: Board hardware issue
- If works: Check below
-
Check microSD card:
- Is it inserted correctly?
- Using recommended 8GB card? (Large capacity cards may not be supported)
- Is card formatted correctly?
-
Check code configuration:
- Verify all parameters in lines 1-50 are set correctly
- Ensure
DELAY_START = false
- Check wiring: Ensure SCL and SDA are not reversed
- Press the small black reset button on the board immediately after clicking "Upload".
- This forces the board into bootloader mode
Data files contain absolute pressure readings. Post-processing steps:
Subtract atmospheric pressure to obtain gauge pressure
- Use nearby atmospheric reference time-series (preferred)
- Or use estimated average atmospheric pressure
- Conversion: 1 millibar ≈ 1 cm water height
This project is licensed under CC0 1.0 Universal (Creative Commons Public Domain Dedication) - see the LICENSE file for details.
Exception: The serial_number_generator component (Sketchbooks/serial_number_generator/) is licensed under GNU GPL v3 - see Sketchbooks/serial_number_generator/license.txt for details.
Included Libraries: Arduino libraries have their own licenses, which can be viewed by searching for them in the Arduino IDE.
Special thanks to:
- Bret Webb at the University of South Alabama for his research that developed the feather wave gauge.
- Jordan Cheung from the University of Washington for her help improving the wave gauge's software functionality.
