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.

Testing DIY EC sensors in Papawai Stream

It is the first time I install and test the two EC probes at Papawai Stream. I am close to where the wastewater pipe is crossing the stream. I have decided to audio record myself talking along with my fieldwork for better documentation of my process and challenges in the field. The writing in this post is a combination of re-telling of events based on the photos I took with my mobile phone and a transcript of my audio recording, which has been edited to aid clarity and flow of narrative.

moving The kit from lab to field

I have put together a kit that is transportable by one person. The wooden crates make it easy to carry the probes and they could also play in the role during installation in the field to keep the electronics in place and safely stored outside of the water during the recording of data.

Additionally, I am carrying a backpack with my Thinkpad laptop, and a waterproof bag with additional equipment such as the TDS reader, spare batteries and USB cables and other necessities such as extra jars, paper towels, cable ties, pens, and a notebook. I also take a little camping stool and my smartphone with me. I transport the equipment by car to the Prince of Wales Park and from there carry it from the carpark to the install site.

After a short hike up the council walkway, I reach the entrance to the site where I plan to install my work, just on the left before the bridge. The narrow walking path to access Papawai stream is covered in pine needles, lined by grass, bushes and pine trees.

Path to access Papawai Upstream. Brown narrow footpath in grass lined by bushes and pine trees.

I follow the stream upstream and reach the site that I have scouted earlier as a possible install location. The stream flows on the right side of the walkway. From there it takes me about one minute to reach the install location further upstream where the path meets the water again. I have placed the probes in reused jars, but I have not waterproofed them yet, so I temporarily propped the jars up with bubble wrap to protect the electronics from humidity and insects while making them easily accessible during the testing.

Papawai test Install site showing crates with probes next to stream

Setting up

The Raspberry Pi has been on all the time since I tested it back in the lab, so the Moturoa_Transmissions network is still up and running, but no nodes are connected to it yet. I start unrolling the cables and connect the probes one by one to their batteries. I make sure the crate is in a stable position, so it does not create a hazard once I launch the probes into the stream water.

When I attempt to launch the first probe, I notice it does not easily drown. The water is just a couple of centimetres deep.

Looks weird. Two electrical plugs in the water.

I am also testing whether the new code on my SD card node is working. I have updated the code so that a new CSV file is created every time the node is being reset, as opposed to overwriting any old data, which was good enough for earlier experiments, but now I need a more stable way of collecting and keeping data. I chose not to thoroughly test the SD card code in the lab because the main focus of this experiment was to evaluate the functionality of EC probes and I needed to get into the field as soon as possible to avoid having to work after dark.

I notice I haven’t brought a dedicated battery for the temperature probe, so I need to use the spare one from the equipment bag. The temperature probe is still in the plastic bottle casing from the previous install. It could work if I redesigned the cap to aid with accessibility to charge/change the batteries. The probe itself also still has a stone gaffer taped at the bottom of the wire to add weight to the probe for easier launching into less reachable parts of water. The previous install location at Moturoa Stream was wildly overgrown, and I made this with what I had at hand in the field. I could add some fluoro-pink tape over the black to make the submerged probe more visible as it is difficult to spot under water. The temperature probe got a quite long cable (partly seen on the photo below with red, yellow and black strands) and it already got entangled with a plant around here even though I have just carefully de-tangled the cable before leaving the lab. I am launching the probe into the water close to the already submersed EC probes, but carefully, not to short-circuit the prongs of the other probes.

2 EC probes and temperature probe submersed in stream water

That looks pretty good. I am also taking a panorama of the setup to capture the relationships of the probes with the stream.

Panorama of experiment setup showing a latop on a stool on the left side. Next to the stool are two wooden crates with glass jars containing electronics. Three probes are submersed in the stream visible on the right side. Cables can be seen on the ground.

accessing the sensor data

So now I got the probes in the water, I am moving on to the exciting part of seeing the data, and what values the two EC probes return. It’s quite sunny and dry today, so I thought it would be fine to take my development laptop with me into the field and use it to live-view the data of my devices.

Plants are already losing some bits and pieces on my keyboard.

I spend some time failing to connect to my Moturoa_Transmissions WiFI network  and need to restart my machine. This takes a while and gives me time to look at the probes again. I rearrange them because the cables are overlapping, but find it difficult to place them the way I like because the curl of the cable dictates the placement on the ground. I also notice that the probes disappear when underwater and I could consider adding some elements of color to set them visually apart from the surroundings. While trying to rearrange cables and probes, I notice that it would have helped to bring some gloves since I am not entirely sure if it is safe to touch the water. Additionally, some hand disinfectant as used during the SHMAK workshop would have been a good addition to my carry bag.

My laptop has rebooted, and I finally see my own WiFI network, but I also notice another wireless network named AI-THINKER, which curiously seems to be another ESP8266 based Internet of Things network.

I open a terminal window on my laptop and use the mosquitto_sub command to subscribe to all topics to see all data floating around in my little PubSub network.

This is exciting.

I see EC returning a value of 267 and EC_rua on 276, which appears to be consistent with previous readings, where EC_rua returned a slightly higher value than EC. The readings seem to be remaining constant, which is good.

I don’t see the temperature in the feed, so maybe the battery I used is not working. It does not have an indicator light so I do not know whether it is discharging or not. I will swap the power supply to the spare solar battery I brought along. This one is clearly discharging according to the LED, so I should see a temperature value soon.

Oh yeah, watertemp here we go. 14.2

Now I will cross-check this result (in degrees Celsius) with the temperature my TDS reader returns. So I am stepping down towards the probes and submerge the prongs in the water, and it seems to be about 1 degree off. I might jot these values down in my notebook just in case.

EC is 265. EC_rua is 275. Watertemp sensor returns 14.2°C, the TDS 15.5°C. The TDS reader shows 158 ppm.

concluding the experiment

I would call this a successful experiment, I have collected 15 minutes of data so far. No one has walked past yet. It worked this way, but the gear obstructs the walking path a little, and I need to find a more stable and safe spot for longer installs that can also be left alone for some time. This was easier at the previous install where most devices were installed behind a fence and the others were safely suspended, with just the probes touching the ground without obstructing anyone’s path, sheltered by large Harakeke plants. The jars work well, so I should continue working with them as material and find a suitable solution to make them both outdoor- and longterm install-proof as well as provide easy access to the electronics for charging and possible hardware updates. The electrical cords work, but the way they are lying on the ground like this looks quite ugly. The white colour of the cable helps to set them apart from the dark ground, but I should consider some more thoughtful decoration or support for the cables. Suspending the electronics on one of the fallen trees, as previously planned, could work, but needs some careful consideration of the environment.

Observations and recommendations for next install:

Design development and install

  • Draft some designs, so the probes are stable and visible underwater while not disturbing the natural flow of the stream.
  • Design versions of outdoor-proof but easily accessible lids for glass jars.
  • Overall the electrical cords in this setup are visually not appealing. The white colour sets the cables visually apart from the background, which is good for safety but aesthetically unpleasant.
  • The installation of probes should be tested suspended from trees. This needs additional install tools such as hooks, cable ties and a variety of options should be tested in lab and field.
  • Replicate the probes and connect them within the network. Build three probe pairs temperature & EC and design an output that is accessible from the bridge.

Equipment and electronics

  • Bring all spare batteries just in case.
  • Use a lapel microphone attached to an audio recorder for hands-free recording.

Hygiene, health and safety:

  • Bring some (plastic) gloves to be able to safely touch the water when adjustment of probes in water is required.
  • Add paper tissues and hand sanitizer to the kit if getting in contact with water or dirt.
  • Consider bringing gumboots for installing probes in more inaccessible, boggy areas.
  • To stabilize the setup, I would need to bring something like pegs to fix the cables to the ground.
  • Add some colours to the bottom of the probes or consider using makers to make sensors and cables more visible when submerged in the stream water. Especially the black wire of the temperature probe disappears into the environment.

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.