2.2 Application Measurement Methods
TDS in water may be measured using a microcontroller in two different methods – using a voltage divider circuit or using a relaxation oscillator circuit.
TDS Measurement Using a Voltage Divider Circuit
When using a voltage divider circuit, conductive water acts as a variable resistor and the output voltage across the variable resistor will be measured using an analog-to-digital converter (ADC). The TDS value will be calculated based on ADC results. Figure 2-1 shows the block diagram of the voltage divider circuit implemented for the measurement of TDS in water.
Advantages of a Voltage Divider Circuit:
- A wide range of TDS values may be measured
- Simple circuitry
Drawbacks of a Voltage Divider Circuit:
- Accuracy suffers due to deposition of anions and cations on the TDS probe pins over time, which results in frequent system calibration
TDS Measurement Using a Relaxation Oscillator Circuit
When using a relaxation oscillator circuit designed with the OPA of a PIC microcontroller, the TDS probe is connected as an input to the OPA and acts as variable resistance. With this arrangement, the OPA generates pulses. The value of the input capacitor determines the frequency range of the pulse signal generated by the OPA peripheral, as the resistance of water lies between 1Ω (ocean water) and 1.5 MΩ (pure water). Figure 2-2 shows the block diagram of the relaxation oscillator circuit implemented for the measurement of TDS in water.
Time period (T) of pulses (output of op-amp):
Advantages of a Relaxation Oscillator Circuit:
- No deposition of ions at the TDS probe pins because of pulsating signal
- Better resolution than voltage divider circuit
Drawbacks of a Relaxation Oscillator Circuit:
- The measurement range of the TDS value is dependent upon the frequency capturing specification of the microcontroller, whereas it is not dependent in the case of the voltage divider circuit
- Circuitry is more complex than with a voltage divider circuit and it requires more components to interface with the microcontroller