0
\$\begingroup\$

I recently purchased a pH-4502C pH module online and started playing with it and figuring it out over the past week.

I've found the circuit online and then checked the components and probed it to make sure that the circuit diagram was actually correct. From there I've come up with the below circuit diagram:

enter image description here

What I'm trying to achieve is to determine the NTC resistance value to get from there to the temperature measurement.

This circuit uses a non-inverting amplifier on the final stage and the gain of this can be calculated by the following formula (Referenced to circuit diagram symbols):

Gain = 1 + (R12/R10) = 1 + (51000 / 10000) = 6.1

Now I can use this gain to calculate the output from the differential amplifier back from the To pin e.g., voltage measured at To / 6.1 = voltage output of the differential amplifier stage.

This works well for me, however, when I try to back calculate the voltage input on the differential amplifier, then I start running into trouble and here I would like some help.

I've come across this guide for calculating values on a differential amplifier and I reworked the formula to solve for V1:

Reworked formula:

V1 * (R3/R1) = [ V2 * (R4 / (R2 + R4)) * ((R1 + R3) / R1) ] - Vout

  • R1: 10k
  • R2: 10k
  • R3: 20k
  • R4: 22k (I didn't have a 20k resistor lying around)

Factoring these values into the formula yields the following result:

V1 * (20/10) = [ V2 * (22 / (10 + 22)) * ((10 + 20) / 10) ] - Vout

V1 * 2 = [ V2 * 0.6875 * 3 ] - Vout

V1 = { (V2 * 2.0625) - Vout } / 2

Vout is back calculated from the inverting amplifier and V2 is a stable value which I measured at 1.062 which should allow me to back calculate V1 effectively.

V1 = { (1.062 * 2.0625) - Vout } / 2

         = ( 2.190375 - Vout ) / 2

Once I got to this point, I then tested at different approximate temperatures:

  • 20.5°C ambient room temperature
  • ~35°C body temperature, kept the NTC below my tongue
  • ~0°C lass filled with ice and water

When I measure the values of Vout and V1 at these temperatures and compare it to the calculated values, then the math makes sense for 20.5°C and for ~0°C but not at ~35°C and I can't seem to understand why.

Examples of measured values vs math:

enter image description here

If the temperature is 20°C or below, then the math seems to work but when the temperature rises to above 24°C, then the math seems to fall apart.

cCn anyone let me know if I'm maybe missing something here? I tried replacing the op-amp, but the new op-amp yielded the same results.

\$\endgroup\$
7
  • \$\begingroup\$ Have you taken into account that, wiring U3A and resistors ( R16, R17, R18) on the bridge can modify your equations? \$\endgroup\$
    – Antonio51
    Jun 21, 2022 at 9:09
  • \$\begingroup\$ Are you also aware that you should use rail to rail op-amp (LM358 is not). \$\endgroup\$
    – Antonio51
    Jun 21, 2022 at 9:30
  • \$\begingroup\$ But NTC is nonlinear. Are you aware of that? \$\endgroup\$
    – tlfong01
    Jun 21, 2022 at 10:38
  • \$\begingroup\$ Note also that your U3B is "NOT inverting" op-amp stage ... \$\endgroup\$
    – Antonio51
    Jun 21, 2022 at 10:45
  • \$\begingroup\$ The op-amp stages provides a linear output. I am aware that the NTC has a non-linear response which is why I'm hoping to back calculate to the NTC resistance so that I can apply the Steinhart-HART equation to the resistance to in tern get a correct temperature measurement from there. \$\endgroup\$
    – DSteyn
    Jun 23, 2022 at 2:49

1 Answer 1

1
\$\begingroup\$

Ok. It seems also that your R14 & R15 are swapped.
EDIT: R14 & Th1.
Or more probably, perhaps labels Vout_1 & Vout_2 are swapped.

For information.
Here are two cases of choice of differential op-amps resistors (10k,20k or 100k,200k).

And the change of op-amps (LM358 is ok and rail to rail LMC2001 is also ok).
Note that @25 °C, the output of U3A should be at 1.25 V logically as the four resistances of the bridge are all 10 kOhm.
But if you multiply these "curves by "6.1" ... you should get "saturation" at "To" output.

enter image description here

enter image description here

ADDED: Here, checked and measured onboard voltage at "Vout_diff_amp" on my board.
(parameter NTC, Ro varied for convenience)

enter image description here

And the formula found with Maple ...
If one want another NTC law, see this from VISHAY NTC.

enter image description here

\$\endgroup\$
6
  • \$\begingroup\$ Hello Antonio, Thank you for your responses, much appreciated. Have you taken into account that, wiring U3A and resistors ( R16, R17, R18) on the bridge can modify your equations? > Yes, I believe I did, which is why I used a larger equation for determining V1. Are you also aware that you should use rail to rail op-amp (LM358 is not). > Please keep in mind that this is a module that you can purchase of Ebay / AliExpress etc. and I did not design this, I simply reverse engineered the circuit and am trying to utilize it. \$\endgroup\$
    – DSteyn
    Jun 23, 2022 at 2:46
  • \$\begingroup\$ Note also that your U3B is "NOT inverting" op-amp stage ... > Thanks, yes, not sure what I was thinking there, I corrected it on my circuit diagram. Ok. It seems also that your R14 & R15 are swapped. > This has no bearing on the circuit, both resistors are 10k resistors of the Wheatstone bridge. Maybe you are referring to the labeling but ultimately that doesn't really matter. \$\endgroup\$
    – DSteyn
    Jun 23, 2022 at 2:46
  • \$\begingroup\$ Note that @20 °C, the output of U3A should be at 1.25 V logically as the four resistances of the bridge are all 10 kOhm. > Typically the resistance of an NTC is based on the reference temperature of 25°C, nto a big deal, but I thought I would mention this. But if you multiply these "curves by "6.1" ... you should get "saturation" at "To" output. > This is understood, but I'm trying to work backwards from "To" to get V1 which seems to be not working correctly. Thank you for the feedback that you provided, it is really appreciated. \$\endgroup\$
    – DSteyn
    Jun 23, 2022 at 2:46
  • \$\begingroup\$ Little error mine ... "R14 & Th1 (not R15) swapped" ... When T° increases, Resistance Th1 decreases, so Vout_1 increases. As it is wired to op-amp negative input, Vout_diff_amp should decrease? I understand now why the next stage is labeled "inverting op-amp" ... which obviously it is not. Just to be sure, how is varying Vout_1? \$\endgroup\$
    – Antonio51
    Jun 29, 2022 at 18:42
  • \$\begingroup\$ @DSteyn mcucity.com/product/1055/ph-sensor-module-v1-1-1pc-ph-probe I have this module. Will try it. Keep "wired" ... Could you test all voltages with points Ph- and Ph+ shorted? And check if Ph- is not connected to GND? \$\endgroup\$
    – Antonio51
    Jun 29, 2022 at 19:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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