LoRaWAN solar water quality magnesium ion sensor is a wireless sensor used to measure the concentration of magnesium ions in water. It is a wireless water quality monitoring device designed specifically for outdoor scenarios and can operate without connecting to mains power. It has the characteristics of automatic temperature compensation, low environmental impact, and high measurement accuracy. Wireless communication is achieved through the connection of aviation connectors and LoRaWAN collectors, which are widely used in the online automatic continuous analysis and detection of ions in industrial wastewater, surface water, drinking water, and seawater, as well as industrial production process control.