Huliwai: A Low-cost Water Level Logger

A wild logger spotted!

The huliwai is a data logger capable of measuring temperature, pressure, and light intensity for over 100 days at one measurement per minute. Powered by two AA battery cells, it is user-serviceable and completely self-contained, with sensors and data logger integrated in one waterproof package.

Specifications

Variable Metric Value Unit Condition Note
Temperature Range [0,40] °C - -
Accuracy +/-0.1 °C - -
Resolution 16 or 24 bit - Configuration-dependent.
Pressure Range [0,30] Bar - Roughly 300 meters depth; configuration-dependent.
Accuracy 100 mBar - -
Resolution 0.5 mBar - -
RGB Light Range [0,65535] N/A - RGB+W; un-calibrated raw count.
Ambient Light (HDR) Range [0,65535] N/A - Dual-channel; un-calibrated raw count.
Sampling Interval - {0.2, 1, 60} Second - User-configurable.
Endurance - 43 Hour 0.2s interval Memory-limited.
- 9 Day 1s interval Memory-limited.
- 110 Day 60s interval; Energizer EN91 Battery-limited.

Note: Endurance tests were conducted with off-the-shelf alkaline cells (e.g. Energizer EN91). Lithium primaries such as Energizer L91 typically last ~30% longer.

Interface

The logger has an IrCOMM (IrDA) interface to enable configuration and data transfer without opening the housing. A USB to IR adapter is used to communicate with the loggers.

USB-IR Adapter

Quick Start Guide

  • Download the example software from https://github.com/smartcoastlines-org/huliwai
  • Install Python 3:
  • Install Python libraries. Open a terminal / command prompt:
    • Mac/Linux: python3 -m pip install --upgrade pyserial matplotlib
    • Windows: python -m pip install --upgrade pyserial matplotlib
  • (optional for modern computers) Install the driver for the USB IR Adapter
    • https://www.ftdichip.com/Drivers/VCP.htm
    • Recent Windows, Mac, and Debian Linux either already have the driver built-in or can fetch and install automatically when USB IR Adapter is plugged in the first time
  • Connect the USB IR Adapter to the logger
    • Try different orientations until the blue light on the logger come on
    • Verify that the green light on the logger is flashing
    • Logger and USB IR Adapter can communicate while separated by up to 10 cm
  • Connect the USB cable to your computer / Raspberry Pi
    • (optional) Locate the serial port on the PC/Mac. On the Raspberry Pi it’s usually /dev/ttyUSB0
  • Press the Reset Switch at least once on the USB IR Adapter (see photo below)
  • Execute the script discover.py in the downloaded example folder
    • Mac/Linux: python3 discover.py
    • Windows: python discover.py

Operating Modes

In sleep mode, power consumption is reduced to minimum and communication with the logger is not possible. In idle mode, logger is ready to accept commands from PC.

The logger automatically enters sleep mode if

  • A magnet is not present on the sensor frontend
  • There is no active sampling session, and
  • There is no communication from the PC in the past few minutes.

The logger would exit sleep mode and enter idle mode if

  • Power to the logger was interrupted, or
  • A magnet is present on the sensor frontend

When sampling at 1-minute interval, the logger would enter sleep mode between measurements. A magnet is needed to re-establish communication with the PC.

When the logger is idling, a green light would flash every second. A (very dim) red light would flash every time a measurement is taken. The blue light would come on when a magnet is present regardless of the mode the logger is currently in.

Handling and Maintenance

  • Remove the batteries if the logger won’t be used for an extended period of time
    • The logger would still draw a small amount of power even when idling. Completely drained alkaline cells are prone to leakage
  • Inspect pressure sensor port, epoxy surface, and sensor frontend before and after every deployment
    • It is recommended to cover the pressure sensor port with high-vacuum grease before every deployment (see image below)
  • Do not poke the pressure sensor port
  • Do not twist the grey sensor front end
  • Do not shake or drop the logger
  • Do not let the magnet go near ferromagnetic material or it might be attracted to it and shatter itself on impact

Annotated sensor frontend

A note on battery replacement

The sensor frontend is retained by friction only. It can be pulled out straight from the tube (avoid twisting). The O-ring is 3/32 width, dash number 118. Accepted batteries are 1.2 V Ni-MH rechargeable cells and 1.5 V lithium primaries. 1.5 V alkaline batteries will work but are not recommended due to the risk of gas leak. It's been observed that when depleted, alkaline batteries tend to release gas that would pop the sensor frontend, breaking the watertight seal.

Logger internals

The sensor frontend is connected to the circuit board (color may vary) with a 2x5 2mm-pitch connector:

Sensor frontend connector

If the sensor frontend is disconnected from the circuit board, it must be reattached in the orientation shown below (notice the D-shape cutout):

Correct orientation example Incorrect orientation example

Sensor frontend cutout orientation

Troubleshooting

Symptoms Possible Causes and Proposed Solutions
Logger does not wake up with magnet Replace the batteries
Verify sensor frontend connection
Logger not responding to PC Bring the magnet close to the magnet switch on the sensor frontend to wake it up
Press the reset switch on the USB Adapter
Verify the selection of serial port on the PC
Frequent communication error Bring the logger closer to the USB Adapter
Shield the sensor frontend from external light source
Data extraction stopped before reaching 100% The percentage denotes the amount of data with respect to the total capacity of the logger, not the total amount of data stored in memory.
I have started logging but the red light is not flashing The red light is very dim when lit. It only lights up when the logger is actively taking a measurement at the moment. If the sampling interval is 60 seconds, the red LED would only turn on briefly once every 60 seconds.
The clock is wrong The example scripts set the logger to UTC time using the clock on the PC/RPi just before logging is started. Logger would lose track of time if power is out (low battery, or after battery replacement).