In this post, we show how to design a solar-powered water quality monitor using readily available components. The device is designed to float in salt water and send temperature, dissolved oxygen and other readings every 30 minutes to an online dashboard. We placed the monitor in a basin off the East River in the Navy Yard located near two Combined Sewer Overflows (CSOs) and hope to see how rainfall affects dissolved oxygen levels in the waterway. Overview Device’s GitHub Device’s AdafruitIO datafeeds This is a continuation of the water quality monitor development project that I documented in a recent post. That initial device configuration leveraged cloud connectivity and power-saving functionality to generate water temperature with one solitary probe. Here, we add two additional probes from Brooklyn neighbors Atlas Scientific: Electrical Conductivity Probe (K=1.0) Dissolved Oxygen Probe Dissolved oxygen is our most important metric, but to operate the DO probe in saltwater (such as the East River, a tidal estuary), conductivity and temperature measurements are necessary to produce accurate DO results. With this combination of three probes, we are able to track six water quality metrics: Temperature Electrical conductivity Salinity Total dissolved solids Specific gravity Dissolved oxygen Hardware Configuration The temperature probe returns an analog 10-bit value that is then converted to Celsius, but the two additional probes communicate with intermediary circuits (green and yellow components for EC and DO probes, respectively, in images below) to receive commands/send responses and measurements via UART interface. (We incorporated a voltage isolator circuit, the purple component in images below, that was necessary for accurate readings when using the two probes in concert) This two-way UART communication enables the microcontroller to send commands for sleep mode, temp/EC compensation values, and for measurement requests from the probes. We wired the EC circuit to the Adafruit Feather’s only available hardware serial port, so we needed to wire the DO circuit for communication via the SoftwareSerial Arduino library, which is handled slightly differently in the microcontroller firmware. The components were all mounted and wired on a red prototyping board. See below for the fritzing wiring diagram. Adafruit Feather FONA 32u4 integrated with probe circuits and connector ports Device wiring diagram Testing Both the EC and DO probes required calibration using solutions provided by Atlas Scientific. With the microcontroller running ‘atlas-probe-configuration.ino’ (located in the device’s GitHub page), we submerged the probes in their appropriate solutions and sent ‘calibrate’ commands through the Arduino IDE’s Serial Monitor. We calibrated each probe individually by block-commenting out lines of code that would send commands to the incorrect probe. More detailed calibration instructions are described in Atlas Scientific’s documentation for each of the two probes. We then verified the probes’ correct behaviors by submerging the probes in tap water and observing the expected effects of mixing in salt and ice (e.g. increase in salinity/conductivity, increase in dissolved oxygen, respectively). Wired circuit with probes connected Test setup with probes submerged in water We uploaded the final ‘voltaic-water-sensor-arduino.ino’ code and tested for reliable sleep/wake cycles after measurements, behavior in absence of network signal, and for a robust startup sequence following loss of power. By alternately disconnecting power supply or antenna (thus removing network signal), we could again observe behavior on the Arduino IDE’s Serial Monitor. During normal device operation, the USB Serial communication is disabled by the microcontroller’s Watchdog sleep mode, which prevents output to the Serial Monitor, making observing debugging output impossible in the final configuration we ultimately deployed. AdafruitIO Datafeeds The device transmits its data to public datafeeds located on the AdafruitIO browser interface. The Adafruit Feather FONA 32u4 board we used contains a wireless communication module, into which we inserted a pre-activated Ting SIM card to connect to cellular data network, provided that signal is available. Leveraging an Arduino library from Adafruit, data is transmitted by MQTT packets to AdafruitIO’s remote server, with the server’s address and access credentials defined in the firmware (we did not provide these credentials in the code hosted on GitHub). Power Consumption Because a Voltaic Systems solar panel is the sole source of power to the device, reducing power draw was a high priority in planning this design, both in choosing bare-bones components and in implementing low-power sleep modes in between readings and transmissions. Transmitting data with the FONA module is by far the most energy-demanding process in each cycle. The device was configured to awaken and transmit a measurement every 30 minutes in the presence of network signal, but to sleep for 2 hours if a signal is absent. With this frequency, we estimated an average power consumption of 46 mW, equating to 1.1 Wh per day, based on sparse documentation. The actual consumption appeared be higher, around 2.2 Wh per day from an average drain of 94 mW. Next steps: enclose the electronics in a weatherproof container and install the device in the East River off the Brooklyn Navy Yard! Learn more about solar powered remote monitoring on our IoT page. 2 Responses Rob October 25, 2017 Very interesting project. How will you keep the probes calibrated for long-term deployment? Reply Voltaic Systems October 25, 2017 We are learning as we are going. We can clean the probes of the biofouling every few weeks fairly easily. The spec sheet says that they need recalibration every 2 years although that seems optimistic based on initial results. Voltaic is more knowledgeable on the power side of things at this point. Reply Leave a Reply Cancel Reply Your email address will not be published.CommentName* Email* Website This site uses Akismet to reduce spam. Learn how your comment data is processed.