Turbidity Visualization – alternative design

In the first turbidity node design I re-used leftover plastic of one of the bottle designs as the circuit carrier and copper tape for connections. This proved to be tricky as the heat during soldering would distort the plastic and dissolve the glue of the copper tape, making it lift off the surface and weaken the connections.

In a new attempt to provide a seamful design, this new prototype uses copper coated welding rods and copper wire as conducting elements and at the same time as structural element. This means the circuit would not require a surface, such as paper or plastic, but would only consist of conducting copper elements. For a first test I used a 1.2mm rod and experimented with soldering various wires and components to the rod. Soldering wire to the copper rod works well after removing the oxidation layer with sandpaper. The enameled copper wire also only solders well after sanding, which is time consuming when many components are involved. The advantage of this, however, is that the 3 dimensional circuit is less likely to be short-circuited, if parts accidentally touch – except for the conductive elements of the LEDs and the solder points.

I envisioned the test design to contain a set of 3 addressable LED sets that fit inside a glass jar. I bent the Ground wire into a circular shape to act as a base for the circuit which will connect to a set of LEDs to be controlled by a Wemos D1 board. After a hopeless attempt to use SMD LEDs for this circuit I found that 3mm LED diodes are much better suited for this kind of circuit.

In the end, I connected a set of three LEDs to three individually addressable wires. The copper rod needs to be bent carefully with flat pliers while the copper wire bends into shapes very easily. This gives the final circuit a quite messy look and I am unsure the design in this form would be suitable to provide any meaningful visualization of the turbidity reading.

The circuit appears quite fragile, the copper wires can be bent and crushed in the hand which gives it quite a unique aesthetic when handheld. Once transferred into a glass jar, the intricacies of the circuit design fade into the background, and the bright blue LEDs, as well as the battery and the small circuit board, distract from the fragile wires. I programmed the board with a simple test sketch that loops through the three LEDs.

The next step involves connecting this design to the turbidity sensor through my local MQTT network. I submerge my turbidity sensor into a glass bowl filled with water to get more realistic sensor data readings for this test. Unfortunately, the circuit design appears to be tricky to be programmed, and only after a while am I able to successfully de-tangle the wires that must have short-circuited somewhere, causing the code to malfunction and print nonsensical glyphs in the serial monitor when I try to debug my code.

Once my LED node is properly connecting to the WiFi network and correctly receiving the sensor data I map the turbidity to the amount of LEDs being switched on. To achieve a more murky fluid for this test I add a teabag to the water. I notice that the value changes are not as extreme as i would have hoped for and assume that a different resistor, perhaps a trimpot, would help to get more accurate data. Another issue with the sensor data is jumpiness. This could be because the LDR is just not suitable for an accurate measurement, or perhaps the sensor design is not waterproof and hence unreliable. Perhaps the code could be improved by measuring a running average over a couple of miliseconds, instead of measuring the brightness only once sand immediately transmitting this data.

Despite issues with the quality of sensor data, I learned a lot about the feasibility of this circuit design. While the copper wire gives the circuit a unique, messy look that I generally like, it is unsuitable for providing an easily understandable visualization of sensor data. Using only copper rods in combination with 3mm LEDs could work with a refined sketch on how to accurately map the sensor reading to an arrat of LEDs.

Giving voice to the stream: An audio node part I

Several participants in my design evaluation interviews indicated the interest in having audio as a medium to access the stream sensor data. As a result of this, I looked at options to use the ESP8266 chip in combination with a simple audio interface. I found some research on using the Wemos D1 for sound applications, a previously purchased microcontroller, the Adafruit Feather Huzzah can be expanded with the Music Maker FeatherWing, which adds an audio interface with a headphone jack output which could be used as a standalone version in the field.

Setting up the Adafruit Feather Huzzah

The Feather requires you to install a USB-driver (USB to UART Bridge VCP drivers) to work with your operating system properly. Note: For this install you need to restart your computer.

The Huzzah is part of the ESP8266 board manager, which needs to be added to the Arduino IDE under via Arduino…Preferences…Additional Board Manager URLs…

If step one and two have been successful, the Feather should be ready to be programmed with the Arduino IDE.

Arduino…Tools menu showing correct Board and Port to work with the Feather

Success. The Blink sketch is running smoothly on my Feather.

    Feather Huzzah running the Blink script
Equipment Cost

I have ordered the Feather ordered at an earlier stage of the research project, but decided in the and not to chose it as the chosen as a central component of my project, mainly because of the price point (currently $33.00pp vs Wemos D1 $10.00pp on nicegear).

The Musicmaker shield adds another $36.00 to the sum.

For a complete audio player setup, an SD card (to store the mp3 files) and headphones are required. The MIDI setup does not require the SD card.

Adding the Audio Shield

Once the Musicmaker arrives I need to install some software as described in the guide by lady ada (2018):

  1. Install the library for the Adafruit VS1053 Codec Breakout (lady ada, p.13).
  2. Test the example code feather_player with two mp3 files on the SD card.
  3. Solder the MIDI jumper on the bottom of the board together and test the MIDI example.

So far so good.

Now I need to connect the Feather to my MQTT network and have audio play triggered by a callback.

After some fiddling with the code, I manage to play the test Ocarina scale from the example code when the EC sensor and the water temperature sensor transmit data across the network.

The audio jar stands now among two visual outputs. While it offers a different mode of access to the stream data, it also breaks with the convention of having one-on-one relationships between input and output nodes.

I also need to consider if the jar casing is the best choice for this node, and how an audience would access the data in the field. The node could be a hidden audio jack that participants can plug their headphones into, or headphones can be provided. Alternatively, I could use a small speaker to play the sound output and make the experience accessible to multiple users at the same time.

The opportunities for this extra node need to be tested and evaluated in the field.

References
adafruit. (2019). Adafruit_VS1053_Library [Arduino]. Retrieved from https://github.com/adafruit/Adafruit_VS1053_Library/archive/master.zip
lady ada. (2018, August 22). Adafruit Music Maker FeatherWing. Adafruit Industries. Retrieved from https://learn.adafruit.com/adafruit-music-maker-featherwing

Lab EC-sensor tests

Before using more EC probes in the field and gathering data from different parts of the stream I tested them in a controlled environment in the lab.

Experiment 1: 

The two versions tested use the same materials, same length of chord and same 560 Ohm resistor. The first test involved a jar filled with tap water, immersing both sensors in the jar and monitoring the data via mosquitto_sub.

Jar filled with tap water for testing two DIY EC probes

Note: The pink tape wrapped around one probe was an attempt to avoid the probe mistaken with a power plug on the lab table, which poses a severe hazard. The probes are stored away safely when unattended to ensure health and safety.  This version of the probe uses the Live (L) and neutral (N) prong of the plug. To improve the safety of the probe the live (L) prong should be removed and Neutral (N) and Ground (⏚) should be used for measuring the electric conductivity. 

The terminal output shows the EC probes publishing the measured values under the topics motorola/ec and moturoa/ecrua. While the test recording was done, the DHT11 sensor was also active in the lab, publishing air temperature (moturoa/atemp) and air humidity (moturoa/ahumid). Output showing values returned by two EC probes (moturoa/ec and moturoa/ecrua) and DHT11 sensor showing air temperature (moturoa/atemp) and air humidity (moturoa/ahumid)

This first test showed a deviation of around 10 between both probes, behaving relatively consistent. The next test would require measurements in the stream to see whether the probes return coherent readings from flowing  water.

Experiment 2:

Due to bad weather and high winds it was too dangerous to conduct testing in the field. However, to get a better idea of the consistency between the two probes I went to an easily accessible part of the stream outside of the forested area and collected two samples of stream water. 

Back in the lab I pour the first sample into a clean jar that is big enough to contain all three sensors. I prepared a paper sheet for keeping experiment notes, starting with date/time, location of sample taken, last weather and readings from the TDS meter at the beginning and end of the test.

  1. I boot the Raspberry Pi (the Pi acts as Wi-Fi Access POint hosting the Moturoa_Transmissions network and acts as the MQTT-broker).
  2. Connect laptop to Moturoa_Transmissions and start log with timestamp
    mosquitto_sub -v -h 192.168.42.1 -p 1883 -t '#' | xargs -d$'\n' -L1 sh -c 'date "+%D %T $0"' > data.log
  3. Immerse probes into water sample and activate by connecting the Wemos D1 micro controllers to power supplies (USB batteries).

The raw data of both test results can be found on the development repository.