A Device Design Based on TDS Water Quality Detection

The traditional water quality detection method is sampling and detection by artificial nodes, which is easily interfered by weather and environment. The presented design method is a new water quality detection device for marine and other waters. The device is spherical in shape and uses a built-in sensor and control system to detect the water quality in the form of drifting. This device has a built-in micro control system, TDS detection module, power voltage regulator module, GPS module and wireless signal transmission module. The TDS module detects the concentration of total dissolved matter in the water, and the GPS module measures the current location of the device, which sends the data to the micro control system. The micro control system sends the water quality information and the geographical location information through the wireless transmitting module, and the user can view the water quality status by the device in real time through the Internet. The power supply voltage regulator module provides the different voltages required by the entire device to achieve the function of detecting the current water quality.


Introduction
Looking at the increasingly serious environmental problems nowadays, the solution of water pollution is imminent. In order to solve these problems of pollution investigation and treatment, we have produced a device that integrates the detection function of pollutants, the traceability function of pollution sources, and the emergency treatment function.
The device can collect water quality conditions in multiple directions for calculation and analysis through sensors at the same time, find the direction of the pollution source according to the principle of diffusion, trace it back, find the source of the pollution, put specific microbial algae after scientific calculation, and treat the pollution by biological methods 1 . The biggest feature of this device is the combination of pollutant detection, traceability, and treatment, and the biological treatment method adopted greatly avoids the problem of secondary pollution caused by water pollution in the expanded area. It can be applied to many aspects such as pollution detection and treatment in general waters, pollutant leakage detection in emergency and dangerous situations, etc. The application is very broad 2 .
Water quality detection drift ball, a new water quality detection device for ocean waters and other waters. This device is spherical in shape, and has a built-in microcontrol system, TDS detection module, power supply regulator module, GPS module and wireless signal transmission module. The TDS module detects the concentration of total dissolved substances in the water, the GPS module measures the current position of the device, and both send data to the micro control system. The micro control system sends water quality information and geographic location information to the network through a wireless transmission module, and users can view the water quality status of the water area where the device is located in real time through the Internet. The power supply voltage stabilization module provides different voltages required by the entire device to implement the function of detecting the current water quality. In the form of drifting, the water quality of the water area is tested by built-in sensors and control systems. The device is shown in Fig.1.

Arduino Mega2560
Arduino is an open-source electronic prototyping platform enabling users to create interactive electronic objects. The controller has a large number of network exposed information and exposed instances, and is easy to operate, so it has a large number of users and advocates.
ATmega2560 is a high-performance, low-power Microchip 8-bit AVR RISC-based microcontroller combines 256KB ISP flash memory, 8KB SRAM, 4KB EEPROM, 86 general purpose I/O lines, 32 general purpose working registers, real time counter, six flexible timer/counters with compare modes, PWM, 4 USARTs, byte oriented 2-wire serial interface, 16-channel 10-bit A/D converter, and a JTAG interface for on-chip debugging. The device achieves a throughput of 16 MIPS at 16 MHz and operates between 4.5-5.5 volts. The Arduino Mega2560 is shown in Fig.2.

TDS Conductivity Sensor
The full name of TDS is Total Dissolved Solids, which refers to the concentration of total soluble substances in water, in milligrams per liter (mg/L). TDS mainly reflects the concentration of ions in water, and has a good corresponding relationship with the hardness and conductivity of water. TDS is commonly used to measure the concentration of pure water. When the TDS value is smaller, it means that the concentration of ions in the water is lower, the conductivity is smaller, and the purity of purified water is higher.
In general, the TDS value of distilled water is zero. The size of the TDS value can also be used to reflect the concentration of harmful heavy metal ions in most water, the number of bacteria in the water, the level of organic matter, whether the nitrous acid concentration exceeds the standard, and whether there are crop residues. TDS is also an important indicator of domestic water consumption, and the value of TDS directly reflects the potable quality of water.
Adopt the analog TDS water quality detection sensor module developed and produced by DFROBOT. It can detect the TDS value of various water quality in real time, as well as the chemical conductivity parameters of chemical water quality liquid. The module adopts the TTL serial port form, and has a certain protocol for query, and then reads the sensor module data. It can be directly connected to different development boards or serial ports, and it can also be directly connected to the serial port of the microcontroller. It has the following characteristics:  The choice of the TDS Conductivity Sensor is shown in Fig.3.

pH sensor
The pH of water quality is an important indicator for measuring whether the water quality meets drinking water standards. The pH value of the water we want to drink in daily life should be between 6.5 and 8.5. The standard of pH value is based on the standard of hydrogen ions. If it is less than 7, it is significantly acidic, if it is more than 7, it is alkaline. The standard of drinking water is just neutral. However, the pH value does not change the color of the water quality. We cannot observe and distinguish directly with the naked eye, so we still need to use a sensor to measure the PH value.
The pH of a soil is also one of the most important characteristics for crop production. Agricultural soil should have the pH from 4.5 to 7. For high soil pH, the increase in waste water pH results in increase in combined pH of soil and waste water. Increased pH cause natural precipitation. As discussed earlier, for better plant growth the pH range required is from 5.5 to 7. So it is necessary to determine the soil pH first based on which the waste water need to be treated such that for a particular soil, the pH optimized waste water will ensure the suitable pH range of 5.5 to 7 for irrigation. By using fully automated method or semi-automated method it is possible to maintain the combined pH of waste water and soil in the range of 5.5 to 7 3 . The module we choose has the following characteristics: The choice of the PH Sensor is shown in Fig.4.

Positioning module
ATK1218-BD uses SkyTra's GPS and Beidou dual-mode positioning module: S1216, external active antenna, positioning within 30 seconds. This module not only supports GPS positioning system, but also supports Beidou navigation system. The module comes with a back battery, which can save ephemeris data 4 . It can be powered on again within half an hour after power failure, and can be repositioned in a few seconds. In terms of interface, it is connected to the outside through a 2.54mm pin with a pitch of 1*5Pin. It uses serial communication, and the configuration data can be saved, which is very convenient to use 5 . The choice of the Positioning module is shown in Fig.5.

GSM module
This module uses high-performance industrial-grade GSM/GPRS quad-band SIM800C module, and the working frequency band is GSM850/900/1800/ 1900MHz 6 . Not only can realize telephone voice, SMS (short message, multimedia message), GPRS data transmission functions, but also have DTMF decoding (can identify the other party's key), TTS (voice broadcast) and Bluetooth. This module supports 3.3V and 5V TTL serial ports, and supports 5V-18V working voltage 7 . Along with 5G network coverage, the module will also upgrade to support 5G network connectivity. The GSM/GPRS communication module is shown in Fig.6.

Conclusion
The device also has the function of fixed-point monitoring. Fixing the device in a certain water area, such as urban water source, can also play the role of realtime water quality monitoring. When a certain water quality index occurs abnormal, the first time to inform the relevant part, effectively prevent the further deterioration of water quality. In the face of the current shortage of water resources and the serious water pollution environment and living conditions, most of the existing water pollution monitoring devices in the market perform separate detection and treatment 8 . This device integrates the detection and treatment of pollution in water, can effectively optimize the water quality for limited water resources, take different treatment measures for different pollution categories and pollution levels, and innovatively add a traceability link In order to form a chain structure for the governance of water pollution, the management loopholes and technical blind spots caused by divide and conquer are relatively reduced.