0
\$\begingroup\$

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.

Experimental value:

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.

enter image description here

\$\endgroup\$
4
  • \$\begingroup\$ Try sampling at mains frequency to see if that gives a stable reading by eliminating variations in mains pickup. Report back in your question and we'll go from there. \$\endgroup\$
    – Transistor
    Jun 9, 2020 at 19:01
  • \$\begingroup\$ What happens if you use a nice bench power supply to provide 0.4V to the ADC? Do you get steady readings or large variation? \$\endgroup\$ Jun 9, 2020 at 19:25
  • \$\begingroup\$ The opa388 output swing could be upwards of 15mv from ground. \$\endgroup\$ Jun 10, 2020 at 1:01
  • \$\begingroup\$ How are you temperature compensating the membrane? Also, is the voltage the mcu sees tracking what it really is, like compared to multitester? \$\endgroup\$ Jun 10, 2020 at 1:03

1 Answer 1

2
\$\begingroup\$

C12 is really bad ju-ju. You must not put much of a capacitor directly on the output of most op-amps or they will oscillate. It would be better to have the RC filter at the input of the op-amp anyway, you could use 10K + 100nF, for example.

A few hundred pF is okay with this op-amp at G=1 (worst-case) but 100,000pF is not okay. The Zener and the ADC input will have some capacitance, but that's okay. From the datasheet:

enter image description here

As generally good practice, you might want to add a 1M to ground at the input so the reading goes to approximately zero rather than drifting around if the sensor happens to get disconnected.

\$\endgroup\$
3
  • 1
    \$\begingroup\$ OPA388 Figure 26, Page 15. In case anyone wonders where the chart came from. \$\endgroup\$
    – jonk
    Jun 9, 2020 at 19:27
  • 1
    \$\begingroup\$ Removed 0.1uF cap (C12) & Zener diode (ZD4), then it is showing stable readings, 20.5% O2 concentration in ambient air. \$\endgroup\$
    – TapasX
    Jun 10, 2020 at 18:35
  • \$\begingroup\$ @TapasX Thank you for the feedback, it is always good to know when the suggested solution does the trick. \$\endgroup\$ Jun 10, 2020 at 18:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.