| With the progress of times and the continuous development of technology and industrial,resulted wide range of living and industrial sewage, the water environment for human survivalhas been damaged and polluted in different degrees. It becomes necessary to make study ofinstruments monitoring water quality for the protection and governance of the water environment,the counterparts abroad is higher in precision, but more expensive, and harder to popularize indomestic. To develop a cost-effective on-line monitor has great significance.Benefit from the development of electronic-based computer technology, embeddedcomputer systems are used in more areas that it make great support for instrument on powerconsumption, cost reduction, miniaturization, processing capabilities, eal-time, intellectualizationand expansion.Embedded computer systems developed for water quality monitoring should consider inthe following four aspects. Firstly, select the detection principle for water quality parameters. Byreading the literature and contrast experiment, potassium dichromate and photometric was usedas method for the online detection of chemical oxygen demand, ammonia-sensitive electrodemethod for ammonia content, electrode method for pH. Secondly, hardware system design,including select microcontroller, peripheral devices for functions and design related circuit.Thirdly, software design, choose and transplant operating system, and write hardware drivers andapplication software based on the hardware. Finally, do experiments and debugs in actual,processe, analyze and assess the experimental results to improve the stability and accuracy ofthis system.μC/OS-II was used as an the embedded operating system and STM32F103VE that basedon ARM Cortex-M3kernel as the microcontroller to build the embedded computers for onlinewater quality monitoring system. After studying the process of construction and development ofthe ARM Cortex-M3processor system, we design the embedded computer hardware systembased on the STM32F103micro-controller according the product needs independently, and maximize the microcontroller powerful features. In the software parts, the real-time operatingsystemμC/OS-II and its advantage and characteristics were narratived, its kernel cut and systemtransplanted, then were the bottom layer drivers and applications. Finally, some experimentalanalysis and validation are did. The embedded computer system for online water qualitymonitoring have realized the requirements such as cost-effective, low power, miniaturization,and can be applied to the markets. |