We are using Oxygen sensor from SGX Sensortech. The datasheet link is attached here. [link]. We are using ARM Cortex-M7 core. The ADC voltage range is 0-3.3V, it has 12 bit ADC. We are using OPA388 (Zero-Drift, Zero-Crossover,) operational amplifier from Texas Instruments in the non-inverting configuration. We have selected the gain of 40. The circuit is shown below.
The sensor gives output of 9-13mV for 21% O2 concentration, which translates to ca. 45mV - 65mV at 100% O2.
Voltage from the sensor 10.2 mV. After amplification from Opamp we are getting 0.405 (405 mV). The gain of the amplifier is set at 40. In the program we are getting variation in the oxygen concentration from 19% to 30% (it should be 21%). We are using a shielded cable pair and our wire length is one meter from sensor to the controller.
The logic of the program is: First it will measure the mV at 21% stores the value ; the voltage from O2 sensor vary linearly from 21% to 100% of O2 concentration.
We are planning to moving avg filter or Kalman filter to reduce variations. Any recommendations, mistakes in the above logic/ circuit.