Arduino and Android code for University of Wisconsin-Whitewater water quality array
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

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:

The image below shows how the components area assembled within the water-resistance housing:

alt text

Assemble as follows:

  1. Connect the Tentacle Shield to the Arduino Uno/RedBoard and install all Atlas Scientific "stamp" controllers to the Tentacle Shield.
  2. Set the jumpers on the Tentacle Shield to I2C mode.
  3. 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.
  4. Connect the temperature sensor's power and ground wires to the appropriate power rows in the mini breadboard.
  5. 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
  6. Connect the data cable from the temperature probe to the new pull-up resistor row (usually the yellow wire).
  7. Connect a jumper wire from this row to pin 7 on the RedBoard.
  8. Connect jumper wires from the mini bread board 5V power and GND rows to the power and ground on the Bluetooth adaptor.
  9. Connect the RXD on the Bluetooth adaptor to pin 6 on the RedBoard.
  10. Connect the TXD on the Bluetooth adaptor to pin 5 on the RedBoard.
  11. 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.

Arduino code

The Arduino code was built using the Arduino IDE (version 1.6.8, available at and requires the following libraries (all available in the standard Arduino IDE repository):

  1. OneWire
  2. DallasTemperature
  3. Wire
  4. SoftwareSerial

Android apps

The Android apps were built using MIT App Inventor 2 Beta (nb155 Component Release, available at 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.

alt text

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.

alt text

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.