Arduino-Based Water Quality Monitoring Experiment
#Project Origin#
Water is the source of life. It is an eternal topic for human survival; wherever there is water, there is life. This experiment focuses on water quality, targeting elementary school students in the “Earth and Universe Science” section of the primary science curriculum, which covers the content related to water bodies.
The sixth-grade science textbook (Education Science Press) includes a chapter titled “The Environment and Us,” which designs the content of “Investigating Natural Water Bodies in Our Hometown.” The content requires students to investigate the surrounding water environment, check for wastewater discharge, pollutants, and flora and fauna, and finally collect a water sample to take back for experimental observation. Most students collect water samples in containers from the riverbank or pond, and during discussions with students, some may ask whether the water quality at the center of the pond is the same as at the edge. Einstein once said that asking a question is often more important than solving it; students must receive a positive response to their inquiries. Out of a spirit of exploration, we attempted a project—”Zheng He No. 1 Water Quality Monitoring Boat,” designed to detect the water quality of the surrounding area and provide a quantitative standard for water quality.
This experimental project is also a participant in the “Jiangsu Province Youth Creative Programming and Intelligent Design Competition.” The teacher expanded on the boat experiment with some indoor experiments, as part of the “Scientific Exploration Experiment” competition held by DFrobot.
Author: Xu Yulang, Yangzhou Jiangdu International Middle School
Teacher: Guo Li
Since the water sample collection plan in the textbook cannot collect samples from the center of ponds or reservoirs, we developed a remotely controlled water quality monitoring boat named “Zheng He No. 1,” symbolizing our goal of exploring the stars and the sea. The “Zheng He No. 1” water quality monitoring boat can be remotely controlled to navigate and send collected water quality data to the IoT platform in real-time.
#Solution Confirmation#
The confirmation of the solution is essentially about choosing what kind of equipment to achieve our goals.
Our original intention was to enable the water quality monitoring boat to achieve true remote control, automatic navigation, and real-time feedback on water quality, even helping environmental monitoring departments to continuously monitor whether factories discharge wastewater improperly.
To achieve remote data transmission, the commonly used Wi-Fi modules and 2.4G remote controls were insufficient, so we needed to find a module similar to mobile data networking. We found DFrobot’s latest BC20 NB-IoT & GNSS communication module, which stands for Narrowband Internet of Things (NB-IoT). This module uses the BC20 chip, which was officially released by the Chinese company Quectel in 2018, supporting GNSS positioning. It is an emerging technology in the IoT field that enables remote communication via cellular base stations without Wi-Fi (similar to mobile data functionality).
Additionally, the BC20 NB-IoT & GNSS communication module also features GPS and Beidou dual-star positioning, allowing real-time feedback of the water quality monitoring boat’s latitude and longitude information, indicating the current water quality. Theoretically, the BC20 NB-IoT & GNSS communication module can achieve our initial idea without issues, so we quickly placed an order to give it a try.
The unboxing photos are as follows. Besides the built-in Unicom SIM card, DFrobot also generously provided a dedicated Telecom SIM card, which is very considerate.
After powering on and testing, we found that the built-in Unicom card was not very effective; the provided Telecom SIM card was much better.
Here we need to note that to obtain detailed latitude and longitude data, the experiment must be conducted outdoors, as indoor positioning is impossible.
After uploading the program and successfully locating the device, the serial monitor displayed several useful pieces of information, such as time, latitude, longitude, altitude, etc.
At this moment, we should proudly mention the Beidou system, which we are using. The BC20 NB-IoT & GNSS communication module can connect to Beidou satellites. However, the image below (which has been widely circulated online) is said not to actually connect to Beidou satellites but to have been achieved through other means. For specific Beidou satellite connections, see the introduction below.
On July 31, coinciding with the launch of the Beidou Navigation System, we decided to connect with our dear Beidou satellite.
We downloaded the official detailed physical location coordinate demo program. Since this demo program is suitable for Arduino MEGA, ESP32, ESP8266, and other main control boards with larger RAM, we temporarily need to replace the Arduino Nano board with an Arduino MEGA for testing.
Before running the program, we need to load the BC20 library file, as shown in the image below.
The demo program is loaded as shown in the image below.
After selecting the correct board and port, download the program. The image below shows the data printed by the serial monitor after successful positioning.
From the data printed on the serial monitor, we can see some information, including time and date (the time shown is Greenwich Mean Time; if we want Beijing time, we need to set it to the East 8 zone), as well as latitude and longitude data, the number of satellites available in the current range, and the number of satellites that can participate in positioning. Among them, GPS represents the US GPS positioning system, and Beidou represents China’s Beidou positioning system. From the data, we can see that the number of successfully searched satellites is 8, with 3 from “Beidou” and 5 from “GPS.” The latitude and longitude coordinates are clear, and first-year students may find it useful after learning geography.
This module should be used outdoors, but on such a hot day, I didn’t want to go out, so I thought of a lazy way to hang it on the window, and it still works.
Having achieved the goal of remote communication, the next urgent issue to solve is how to ensure the boat’s battery life. Continuously charging onshore is clearly impractical, so using renewable energy to power the lithium battery is a feasible solution. Thus, we thought of using a solar panel (5V 1A) and a solar power management module (5V 1A) to charge the lithium battery and solve the battery life issue.
After solving the two challenges of communication and power supply, we need to determine the sensors for monitoring water quality, aiming to quantify the quality of the water body. There are many types of water quality monitoring sensors, such as Gravity: Analog TDS sensor, Analog pH meter, Gravity: Analog turbidity sensor.
Due to the turbidity sensor not being able to be fully submerged in water for testing, we will exclude it. Of course, the remaining two sensors test different directions; the pH meter can test conductivity, while the TDS sensor can detect the total dissolved solids in water. If both can be used in this experiment, it would provide the most comprehensive reflection of water quality, but cost is also a factor to consider. Therefore, we will only use the lower-cost analog TDS sensor to monitor the total dissolved solids in the water. TDS (Total Dissolved Solids) indicates how many milligrams of dissolved solids are present in one liter of water. Generally, the higher the TDS value, the more dissolved substances in the water, making it less clean. Thus, the TDS value can serve as one of the indicators reflecting water cleanliness.
Popular Selections