Introduction

Author: Irene Abraham, Microchip Technology Inc.

Total Dissolved Solids (TDS) in water are described as the presence of inorganic salts and small amounts of organic matter in water. TDS can be measured by determining the conductivity of water using a conductivity probe that can detect the presence of ions in water. It is one of the most important factors that determines water quality. Ensuring acceptable values of TDS in water is important for human health, food and food processing, fish farming and other water-related industries. TDS measurement in water has applications in the medical, industrial, and residential fields.

This application note provides an overview of the concept and methods used for TDS measurement in water. It also provides a working code example that demonstrates the measurement of conductivity and TDS in water using a relaxation oscillator circuit designed with the Integrated Operational Amplifier (OPA) of the PIC16F17146 microcontroller.

The PIC16F17146 microcontroller family is equipped with advanced analog peripherals such as an OPA, 12-bit differential Analog-to-Digital converter with computation (ADCC), 8-bit buffered Digital-to-Analog converter (DAC), internal fixed voltage reference (FVR) along with core independent peripherals such as Capture Compare and PWM (CCP), 16-bit and 8-bit Timers. This application note describes the usage of integrated OPA, ADCC and CCP peripherals of the PIC16F17146 microcontroller family to measure TDS in water. The code example is available on GitHub at the link below: