Water Quality Array
This repostity contains the instructions for building the water quality array along with Arduino and Android code for University of Wisconsin-Whitewater water quality array used in the "Testing the Waters" event in May 2016 in cooperation with the Rock River Coalition.
The device consists of off-the-self components connected together within a water-resistant case. The bill of materials includes:
- SparkFun Red Board, https://www.sparkfun.com/products/13975 (same as Arduino Uno)
- Temperature sensor, DS18B20, https://www.sparkfun.com/products/11050
- Tentacle Shield for Atlas Scientific Probes (with electronic isolation), https://www.atlas-scientific.com/product_pages/components/tentacle-shield.html
- Atlas Scientific pH probe kit, https://www.atlas-scientific.com/product_pages/kits/ph-kit.html
- Atlas Scientific conductivity probe kit (K 0.1 for fresh water), https://www.atlas-scientific.com/product_pages/kits/ec_k0_1_kit.html
- Atlas Scientific dissolved oxygen probe kit, https://www.atlas-scientific.com/product_pages/kits/do_kit.html
- Bluetooth HC-06 module, https://www.amazon.com/Pass-Through-Communication-Compatible-Atomic-Market/dp/B00TNOO438
- AA (x6) battery pack, https://www.amazon.com/Philmore-Battery-Holder-Standard-Connector/dp/B000LFVFU8
- Small breadboard, https://www.sparkfun.com/products/12046
- Breadboard jumper wires, https://www.sparkfun.com/products/1102
- 9V to barrel jack adapter, https://www.sparkfun.com/products/9518
- 4.7K ohm resistor, from https://www.sparkfun.com/products/10969
The image below shows how the components area assembled within the water-resistance housing:
Assemble as follows:
- Connect the Tentacle Shield to the Arduino Uno/RedBoard and install all Atlas Scientific "stamp" controllers to the Tentacle Shield.
- Set the jumpers on the Tentacle Shield to I2C mode.
- Add jumper wires from 5V and GND pins on the Tentacle Shield to two separate rows on the mini breadboard. This will provide power to the temperature sensor and the Bluetooth adapter.
- Connect the temperature sensor's power and ground wires to the appropriate power rows in the mini breadboard.
- Add the 4.7k ohm resistor from the 5V breadboard row to a new row. This will be the "pull-up" resistor for the OneWire temperature sensor (read more at https://cdn-learn.adafruit.com/downloads/pdf/adafruits-raspberry-pi-lesson-11-ds18b20-temperature-sensing.pdf)
- Connect the data cable from the temperature probe to the new pull-up resistor row (usually the yellow wire).
- Connect a jumper wire from this row to pin 7 on the RedBoard.
- Connect jumper wires from the mini bread board 5V power and GND rows to the power and ground on the Bluetooth adaptor.
- Connect the RXD on the Bluetooth adaptor to pin 6 on the RedBoard.
- Connect the TXD on the Bluetooth adaptor to pin 5 on the RedBoard.
- Connect the barrel power connector from the RedBoard to the 6x AA battery holder.
You're now ready to upload the Arduino code below to the device and initiate testing.
The Arduino code was built using the Arduino IDE (version 1.6.8, available at https://www.arduino.cc/en/Main/Software) and requires the following libraries (all available in the standard Arduino IDE repository):
The Android apps were built using MIT App Inventor 2 Beta (nb155 Component Release, available at http://ai2.appinventor.mit.edu) and the exported .aia are available here. To replicate, use the "Import" functionality within App Inventor to import these projects.
Device probe and kayak mount
For the prototype, we constructed our kayak mount using a stock fishing pole mount. On this platform, we added aluminum brackets that would hold the probe mounts (see photo). The probe mounts are held in the aluminum brackets using rubberbands above and below. This allows the probe mounts to be set at various depths and swing and snap back into place when either hitting objects, e.g. rocks, or when vegetation accumulated on the probe holder.
This relatively primitive mount, while successful in our initial testing, needs substantial refinement. The probe would either creep up or down when hitting objects, and, more importantly, was not self-cleaning when encountering vegetation. The probes are out of reach of the paddler and would require the assistance of another paddler to clean.
The probe mounts are carbon arrow shafts glued to 1" diameter PVC pipe using JB Weld marine epoxy. These turned out to be light, durable, and did a sufficient job of protecting the probes as they moved through the water. Multiple angled holes were drilled into the PVC to facilitate water movement through the probe housing.