My daughter, Marianne, is a keen open water swimmer. As she lives in Edinburgh sea temperature is an important factor in how long it is safe to be in the water. Initially she used a Mothercare Duck or Skate to measure water temperature. These were designed to measure the temperature of babies' bath water and were not particularly accurate. They make instantaneous readings and don't keep a record of temperatures over time.
click thumbnail for full size image
I was commissioned to make a more accurate device, and one which could record time series.
A prototype was constructed using a waterproof DS18B20 semiconductor temperature sensor which is typically used in cars to provide frost alerts. This was interfaced to a Raspberry Pi Zero with a display and mounted in a waterproof Screwfix Wago capsule junction box.
Data is recorded on a microSD card but also is available via a web server running on the Raspberry Pi.
click thumbnail for full size image
Since then a number of devices have been constructed to measure a wider range of water properties from a kayak.
This work was motivated by curiosity over a period of time rather than against a specification. Thus each device is 'stand-alone' whereas if you set out to measure multiple variables you might make different design decisions (e.g. using a single processing unit).
All the devices record time-stamped measurements at 10-second intervals onto a microSD card. When data is collected a commercial GPS unit is used to record the kayak's location against time.
The image below shows an overview of the system. The thin horizontal tube has been positioned to show the nominal level of the water's surface. In use the rectangular plywood panel is velcroed to the side of the kayak alongside the paddler. Attached to the panel is an aluminium tube which holds the sensors below the water surface. This tube can rotate upwards to lift the sensors from the water (e.g. when landing or cleaning them).
click thumbnail for full size image
Each sensor is connected to its own microcomputer and display.
After data collection the GPS locations are combined with the water measurements to give geolocated and time-stamped data. This can then be visualised as time series or against map backgrounds.
A number of devices have been assembled to measure a range of variables. At present these include ...
click for full size image
The devices are all designed to be deployed from a kayak so have to be waterproof.
They all share a set of common components which makes development and support easier. The common components are ...
The components unique to specific devices are ...
Each sensor is interfaced to the Arduino processor which collects and writes data to an SD card at 10 second intervals.
The Arduino is configured with a real time clock (RTC) with battery backup which provides current date and time and an OLED display which shows the latest measurements.
Variable | Computer Interface | Units | Current (mA) | Battery life (hrs) (4,400 mAhr) | |
---|---|---|---|---|---|
Temperature | One-wire | °C | ~40 mA | 110 | |
Turbidity (or Cloudiness) | Digital | relative | ~40 mA | 110 | |
Salinity (or Conductivity) | UART (serial) | µS/cm and ppt | ~100 mA | 44 | |
Dissolved Oxygen | UART (serial) | ml/L and % | ~100 mA | 44 |
The following images show some of the components used
click a thumbnail for full size image
Sample measurements are available which graphically show warm water emerging into the River Camel.
Temperature is measured using a DS18B20 sensor. This is connected using a so called '1-wire' interface.
Data is appended to a CSV file on the SD card at 10 second intervals. A new file is created every day and is named yyyymmdd.CSV (e.g. 20221025.CSV).
data output format on SD card (spaces added for clarity) date-time, temperature (C) 2021-06-14 10:11:30, 24.94 2021-06-14 10:11:40, 25.37 2021-06-14 10:11:50, 25.50 2021-06-14 10:12:00, 25.37 2021-06-14 10:12:10, 25.25
DS18B20 wire | Wire Colour | M0 Adalogger Pin | Function |
---|---|---|---|
Vcc | Red | 3v3 | 3v3 |
GND | Black | GND | GND |
1-wire data | Green | 10 (PA18) + 4k7 resistor to 3v3 | data |
Sensor/Isolator Pin | Wire Colour | M0 Adalogger Pin | Function |
---|---|---|---|
Vcc | Red | 3v3 | 3v3 |
Off | - | - | - |
GND | Black | GND | GND |
Tx Sensor | Green | Rx CPU (16) | Rx CPU |
Rx Sensor | Yellow | Tx CPU (15) | Tx CPU |
The dissolved oxygen sensor uses an Atlas Scientific Mini Lab Dissolved Oxygen Probe. This is interfaced to the Arduino processor via an EZO Dissolved Oxygen Circuit mounted on an Electrically isolated carrier board.
Data is appended to a CSV file on the SD card at 10 second intervals. A new file is created every day and is named yyyymmdd.CSV (e.g. 20221025.CSV).
data output format on SD card (spaces added for clarity) datetime, oxygen (ml/L), oxygen (%) 2022-10-22 14:33:40, 9.09, 100.00 2022-10-22 14:33:50, 9.09, 100.00 2022-10-22 14:34:00, 9.09, 99.90 2022-10-22 14:34:10, 9.09, 100.00 2022-10-22 14:34:20, 9.09, 99.90 2022-10-22 14:34:30, 9.09, 99.90 2022-10-22 14:34:40, 9.09, 100.00
The Arduino and Sensor Interface Card communicate using serial communications (9,600 bps, 8 data bits, 1 stop bit).
Sensor/Isolator Pin | Wire Colour | M0 Adalogger Pin | Function |
---|---|---|---|
Vcc | Red | 3v3 | 3v3 |
Off | - | - | - |
GND | Black | GND | GND |
Tx Sensor | Green | Rx CPU (16) | Rx CPU |
Rx Sensor | Yellow | Tx CPU (15) | Tx CPU |
Feather M0 Adalogger Pinouts click for full size image