0
\$\begingroup\$

I have a new pH sensor board, the circuitry looks like this. The Op Amp is operated at 3.3v and the input is "float" to 1.8v with a separate voltage regulator. The output is connected to the Analog Input of an Arduino Nano.

schematic

simulate this circuit – Schematic created using CircuitLab

The Arduino sketch provided by the vendor constantly reading 40 sensor values at an interval of 20mS (with an Arduino delay(20); statement) and uses the 40 values to get an average reading. Since each ADC conversion only took 104uS based on ATMega328 spreadhsheet, so I was thinking to shorten the sensing interval to say 2mS, this is when I noticed that by changing the sensing interval, I get quite different readings from the sensor board. I get the same unstable readings when switching from Arduino Nano to a STM32 Blue Pill.

A quick search on ATMega328 datasheet, under the section 24.6.1 “Analog Input Circuitry”, it said:

“The ADC is optimized for analog signals with an output impedance of approximately 10k ohm or less. If such a source is used, the sampling time will be negligible. If a source with higher impedance is used, the sampling time will depend on how long time the source needs to charge the S/H capacitor, with can vary widely. The user is recommended to only use low impedance sources with slowly varying signals, since this minimizes the required charge transfer to the S/H capacitor”.

I suspected this is what I'm facing, so I added a 10k resistor between A0 of Arduino ADC input and ground, this solved the problem. I'm able to get consistent reading no matter whether the sensing interval is 2mS or 20mS. The output voltage that I get is only about 2/3 of the original value due to the voltage divider formed by the R3 and the added 10k resistor.

My question is that although my approach to the problem seems to a workable workaround, but is it the right way to do it? or is there a better way to just simply changing the value of existing components? or do I need to add a voltage follower using an Op Amp or transistor?

\$\endgroup\$
  • \$\begingroup\$ It looks like you already have less than 10 kΩ of output impedance from your amplifier. \$\endgroup\$ – evildemonic Jul 2 at 14:43
  • \$\begingroup\$ Where did you get this board? Is it an amateur design? I would think OPA333 would be inappropriate for a pH sensor because of the front end design. \$\endgroup\$ – Spehro Pefhany Jul 2 at 21:56
  • \$\begingroup\$ @SpehroPefhany From a Chinese maker Seeed Studio. \$\endgroup\$ – hcheung Jul 3 at 0:18
  • \$\begingroup\$ @SpehroPefhany For my learning, can you elaborate more on what do you means "I would think OPA333 would be inappropriate for a pH sensor because of the front end design"? What are the key reasons that it is not suitable? \$\endgroup\$ – hcheung Jul 3 at 1:25
  • 1
    \$\begingroup\$ It is a zero-drift type which has relatively high peak input transient currents, and a pH sensor is extremely high impedance. \$\endgroup\$ – Spehro Pefhany Jul 3 at 2:15
1
\$\begingroup\$

How about making R3 10x smaller, and C2 10X larger?

The opa333 has poor settling time; the ADC sampling_charge demand will initiate another settling behavior, and the datasheet shows about 50 microseconds is needed for 100pF connected directly on the Vout pin.

The passive R+C low pass filter is a different matter. The resistor lowers the instantaneous peak output current, causing less of a transient inside the OPA333.

experiment with that R+C filter.

If not satisfactory, and a larger VDD bypass does not help, then as FASTER opamp may be the solution.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Thanks for the suggestion. I will experimenting it with changing the RC design to see how it will go. \$\endgroup\$ – hcheung Jul 3 at 0:14

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.