Public Lab is launching a new 🎈 Mini Balloon & Kite Kit as part of Kickstarter Gold -- take a look!

Public Lab Research note

  • 8

KnowFlow: automatic water moniter

by shanlter |

shanlter was awarded the Photo Documentation Barnstar by Bronwen for their work in this research note.

For couple of months I'm at Shanghai, working with DFRobot, a robotics and open source hardware provider company, to develop an open source automatic water quality monitoring device that could be used for Pearl River monitoring.

Background in environmental investigation NGO, my knowledge on electronic development is very limited. Hopefully this document could help people like me to easily understand and replicate such a tool.

KnowFlow is the name of this water quality monitoring device, based on Arduino Uno. It can automatically monitor 5 parameters of water: pH, Temperature, Dissolved Oxygen, Electronic Conductivity, ORP.

Currently, KnowFlow is powered by a 7.4V lipo battery, the data is stored in a SD card. The field test will be described in a separate research note.

DFRobot produces all the electronic components except for DO, which is produced by Atlas Scientific (btw, all the DFRobot's products are open source), most of the materials I listed are made by them.

Prepare the materials

image description

  • Central Control Unit: Arduino Uno (DFRobot Bluno in this case) and Expansion Shield (DFRobot Expansion Shield V7.1 in this case)
  • Water Sensors: pH (pH probe and pH circuit board); EC (EC probe and EC circuit board); ORP (ORP probe and ORP circuit board); Temperature (temperature probe and temperature circuit board); Dissolved Oxygen (DO probe, BNC and circuit board); real time clock circuit board
  • Data Storage: Micro-SD module, Micro SD card
  • Fit and fix: mounting plate, water proof box( 200mm_150mm_75mm), water proof joint
  • Other parts: Cables (Wires), bread board, bolts and nuts, screws, battery, double-sided adhesive, write on tape, small wrench, spiral cable wrap

The size, modal, drawings, and other specifications of the materials can be found here at google docs.


  1. Download Arduino IDE
  2. Download Knowflow code from KnowFlow github
  3. find "WaterMonitor.ino" from the downloaded file, open it with Arduino IDE
  4. Connect your Arduino Uno board, in menus, select "Tools - Board: Arduino Uno", and "Ports - /dev/cu.usb..."
  5. click "Verify", than "Upload" the software to your board.


We need to connect all the sensors, MicroSD card module to the Arduino, then fixed it to the plate and the waterproof box, connected to the power supply.

Those who are familiar with the Arduino could directly read code annotation

1. Connect the circuit board and other modules to the Arduino expansion (I / O Expansion Shield V7.1)

  • Connect EC: Plug one end of the "orange-red-black" cable to the EC circuit board, other end to the IN terminal of the isolation module. Plug the white end of the "blue-red-black" cable to the OUT terminal of the isolation module, the black end to Analog port A1, note the color should be matched.

image description

image description

  • Connect the pH: Plug the white end of the "blue-red-black" cable to the pH data transfer board, the black end to port A2.

image description

  • Connect ORP: Like EC, Plug one end of the "orange-red-black" cable to the EC data adapter and the other end to the IN terminal of the isolation module. Plug the white end of the "blue-red-black" cable to the OUT terminal of the isolation module, and the black end to the A3

image description

  • Connection temperature: Plug the white end of the "green-red-black" cable to the Plugable Terminal V2, and the black end to Digital Port D5

image description

  • Connect the dissolved oxygen DO: The connection of the dissolved oxygen is bit complicated. Using four wires and breadboard to connect DO to the serial port (connection principle is GND-GND, VCC-VCC, TX-RX, RX-TX)

image description

image description

Note! Very important! Each time you re-upload the program to Arduino, you need to pull out the Rx (0) Tx (1) cable, and re-plug it after uploading. Otherwise it can not be programmed successfully.

  • Connect the Real Time Clock (RTC) module: Plug the white end of the "blue-green-red-black" cable to RTC, and the black end to the blue I2C interface (you might need to wrap the line in case it's too long)
  • Connect the MicroSD card module to the blue SD card slot (note the direction) and insert the Micro SD card

image description

Great!!! All sensors are connected!

Tips: You can use the write-on tape to mark different sensors to avoid confounding, and wrap the analog cables and DO cables respectively to avoid clutter.

2. Place the mounting plate to the waterproof box

(The drawing of the mounting plate is here at GitHub )

Find the mounting plate, bolts and screws, install the hexagonal column to the small holes. The nylon column is mounted on the front of the board and the nut is mounted on the opposite side. Among which, the 4 Arduino fixing hole requires 6mm nylon column, which the rest requires 4mm nylon columns. You can use a small wrench to help tighten.

image description

image description

Use two 4mm screws to secure the board in the waterproof box. (Some waterproof box might conflict with the lower right column, it can be removed in this case)

image description

3. Attach the electronic components to the mounting plate

  • Since the DO module is more difficult to install, so we should install it first. (it can also be soldered). Attach the double-sided adhesive tape under the DO breadboard. Pass BNC interface from the circuit board through the hole, adhere the breadboard.

image description

  • Fix Arduino Uno, place the Arduino expansion board.

image description

  • Pass the BNC of ORP's circuit board though the rightmost hole of the waterproof box, fix it to the mounting plate with screws, install EC and pH in the same way.

image description

  • Adhere the two isolating modules to the top right of the mounting plate by tape.

image description

  • Fix RTC

image description

  • Now, only left temperature module. Tighten the waterproof connector to the round hole outlet of the temperature probe

image description

image description

  • Then, the temperature probe has a bare end of the line, followed by waterproof connector cover and round hole,

image description

  • There are three "gates" in the front of the temperature signal adapter board. Press the button above, and the "gate" will open. Plug the yellow wire in the A gate, the red wire to B gate, black wire to C gate. Try to pull out the three wires respectively to make sure there're fastened after plugging in.

image description

  • Use a screw to secure the temperature signal adapter board to the board and tighten the waterproof connector nut on the housing.

image description

  • In-box part is completed, now connect the battery to test whether the installation is correct. If the light turns on, it means that the circuit is normal.

image description

  • Close the box and connect each probes.

image description


image description

The field test of this device will be written in a separate research note.

image description

Post your attempt to replicate this activity 

Replications (0)

None yet. Be the first to post one!

This is marked this as an activity for others to try.
Try it now   Click here to add some more details.

arduino water-quality water open-water china data-logging knowflow

barnstar:photo-documentation activity:water-monitoring activity:data-logging


So cool!!

Thank you for these well-written and elegantly photographed instructions! I found this note very inviting and i can't wait to order the parts and make one! @bronwen, can we order a set of these parts for NYC?

Absolutely, @liz ! This is a really exciting (and well documented!) research note. Thanks for sharing, @shanlter !

@Bronwen awards a barnstar to shanlter for their awesome contribution!

@bronwen, @liz, am I wrong or this could be considered as "method"? It's own particularities made the KnowFlow a different one than Coqui, Riffle or Mae d'aigua. I'm basically thinking about the possibility of using a tag like "activity:knowflow" to facilitate builds and its tracking. Mmmm water monitoring tools spreading ;)

Thanks for saying so @xose! Compared with Riffle or Mae d'aigua, this one is much simpler, we use Arduino board, haven't do many field test yet, etc. It'll be improved, meanwhile hoping more people could join the developing process :)

Thanks @liz and @Bronwen, if you are going to order the parts from DFRobot, let me know. The isolation module been used hasn't been online yet (but soon), also the box and mounting plate I can mail to you together.

@xose - i've tagged it as an activity, but if other related (next steps) activities were added, and a Q+A section, this could be the first post on a Methods page, for sure! See how we've started to build that for the -- and if you want one for the #orange-pi camera, that's a great idea!

Wooow!! Great @warren! I'm having some troubles with the orange pi by now. This week we'll lift up a raspberry 2 with both a drone and a ballon. Let's see what happens. Orange pi is awesome. As soon as I got something I'll be back. The main issue by now with the orange one is low camera compatibilities and the one I got is just 2megapixels. Let's see what can we do ;)

@xose - awesome. And even "having some troubles" is ok to post -- if we break out the issues perhaps there are folks who can chime in with solutions. Thanks!!

You must be logged in to comment.