| In order to monitor the water quality of fish ponds and rivers for a long time,a multi-parameter real-time online water quality detection system based on cloud platform has been studied in this paper.The system has flexible sensor access ability and data fusion performance,which can track the changes of water quality parameters,trace pollution sources and assist fishermen in aquaculture.This system uses STM32F103,including sensor and data processing circuit.The lower computer communicates with the host computer through the RS485/MODBUS protocol.The host computer can adopt different internet access modes and communicate with the PC through the MQTT protocol and the JSON data format.The collected water quality parameters include five basic parameters,such as temperature,p H,ORP,conductivity and dissolved oxygen.This paper mainly completes the following tasks: designing the overall scheme of the system,calibrating the sensor parameters,designing the hardware circuit,writing the underlying driver software,writing the PC client software,and the overall debugging of the system.The system is mainly composed of three parts.The first part is a sensor parameter acquisition module,which realizes data acquisition of parameters such as temperature,p H,ORP,conductivity,dissolved oxygen,etc.,and then transmits the data to the second part of the system through the RS485/MODBUS protocol.The second part is a multi-function remote communication module with four Internet access modes: WIFI,RJ45 and LORA.It has two main functions: first,the data of the sensor parameter acquisition module is read regularly;second,communicate with the cloud to parse and execute data commands.The third part of the system is the PC client software based on the cloud platform.Because the communication uses the MQTT protocol and data storage,the MQTT server and the MYSQL database are installed on the cloud server.After a long period of debugging and testing,the error between the system data and the calibration data is within the allowable range,and the system stability is good,which meets the system design goals,and can realize long-term online monitoring of the water quality of fish ponds and rivers. |