amplifying sensor signal and negative potentials

Hi, I'm trying to deal with conditioning the signal of a Honeywell Durafet III pH sensor for use with an arduino. By using the Durafet (7777DVP) together with its cap adapter (P/N: 51453388-002), I get a pH signal whose output is a range from -300mV to 300mV.
To make things more complicated, I need to trim the range because the arduino A/D converter is 8 bits only, so I would like to take only a short fraction of the full output range, for example, the -10mV to 100mV (but this has to be variable) and amplify to a standard 0-5V to be able of using the arduino.
Could somebody give me some help?
Thanks in advance

A simple way to do this is enclosed.

Set the analog reference to 1.1v, and you'll get nearly 9 bits resolution from the arduino's 10-bit a/d

regards

Allan

pHif.pdf (16.9 KB)

because the arduino A/D converter is 8 bits only,

No it is not. As Allan says it is 10 bits.

allanhurst:
A simple way to do this is enclosed.

Set the analog reference to 1.1v, and you'll get nearly 9 bits resolution from the arduino's 10-bit a/d

regards

Allan

Many thanks for your help and your time to do the circuit.
I'm very newbie in general electronics knowledge, so all this help from both is very appreciated.
I delayed this post because I was trying to fully understand your response.
As I wasn't able to calculate by hand the output voltages in your circuit (my fault), I tried to simulate it by using some apps I tried. Luckily, I was able to get your output V values with circuitlab and a TL431 model :grin: :grin:, so this can help me a lot to deal with the sensor.
Again, thanks for this, as your circuit avoids negative voltage values in sensor output (and I didn't know how to deal with them). I'll put some effort in trying to understand your advice of putting analog reference to 1.1V.
I thought that A/D converter was 8 bits because i read somewhere that output was a uint8. Having 9 or 10 bits would be nice (16 or even 24 would be perfect), as the durafet sensor is very precise, so this impacts directly in the precision I could get in the end. Still, I would need to get some kind of amplification to deprecate extreme values and being able to use full arduino A/D scale for a narrow range from sensor.
I'll try to advance on this in parallel with some other open fronts, as I've to be able to (first) power the sensor (-3V,GND,+3V) and also to read the temperature sensor...

Thanks,
Anton

Output is not input - yes, the analogWrite output values are 8 bit, but that unrelated.

If 10 is nice but 24 is perfect, its hard to know what your requirement actually is! Presumably
you want a certain precision in terms of pH units...

MarkT:
Output is not input - yes, the analogWrite output values are 8 bit, but that unrelated.

If 10 is nice but 24 is perfect, its hard to know what your requirement actually is! Presumably
you want a certain precision in terms of pH units...

Exactly, I would like 0.001 precision in pH units. As the -300mV to 300mV from the sensor accounts for the full range from 0 to 14, I would need 14 bits for this (14/2^14=0.0008) if I'm able to translate the range to the full A/D range. Allan circuit gives me 0.01 to 0.44V (and solves negative voltage problems), so I will lose a lot of range if use it in a 0-5V input directly, so I think I should apply some gain (without adding noise). However, I think I've some kind of alternatives:

1.- If I could use a 24bit A/D converter, that 0.01..0.44V range in volts would not be a problem (AFAIK), as even when used in a 0..5V input that 0.43V range would mean a precision of about 1E-5 in pH units, meeting and even exceeding my requirements (If this way doesn't have any other implications in precision).

2.- The other approach could be to narrow the range and applying some gain. I think I could discard out of range values for my application, focusing, for example in the range 6.9..8 pH units. That would mean that I could use a 10bits A/D (1.1/2^10=0.001) for meeting the required precision. If I could amplify that 6.9..8 (it means -0.04..0.43V from sensor) to 0..5V, that would also be another option.

Thanks for your interest and time.

0.001 pH? Wow.

So you definitely need a 14 or 16 bit ADC with a reference input, a precision voltage reference, and
an opamp circuit to boost the incoming signal.

Or a chip with all of that built in like the MCP3426 http://ww1.microchip.com/downloads/en/DeviceDoc/22226a.pdf

(Well you still need to shift the voltage... perhaps the differential inputs will finesse that issue)

MarkT:
0.001 pH? Wow.

So you definitely need a 14 or 16 bit ADC with a reference input, a precision voltage reference, and
an opamp circuit to boost the incoming signal.

Or a chip with all of that built in like the MCP3426 http://ww1.microchip.com/downloads/en/DeviceDoc/22226a.pdf

(Well you still need to shift the voltage... perhaps the differential inputs will finesse that issue)

It's me who says wow!!

Your advice about MCP3426 is impressive and sounds great!

As I've read in specs, the gain amplifier is programable by I2C, and that solves a BIG problem for me as avoids the need to build this. Having the differential outputs looks also very promising to deal with -0.3..0.3V. Finally, having two channels is also a good improvements as the second one could probably deal with the temperature measurement.
And as an very appreciated extra value, I've found the MCP3426 as arduino module here: https://www.controleverything.com/content/Analog-Digital-Converters?sku=MCP3426_I2CADC
This simplifies things a lot for me.

Many thanks for your advice.

PD: About the 0.001 requirement in precision, that it's probably around the limit of the sensing capabilities of the durafet piece (it's an Ion-Sensitive FET), but some authors report that it's easily achievable.

Differential inputs. And no you cannot apply a negative voltage to any pin, they must stay between GND
and Vcc, BUT if you have your pH meter at a floating potential w.r.t. the ADC/Arduino, you can feed the
two wires to differential input pins, and adding a potential divider (2 10k resistors the GND and Vcc)
to keep one of the wires at mid-range of the ADC.

If you cannot isolate the systems, you'll need a stage of differential amplification with an op-amp, probably
just a unity-gain differential amplifier configuration using a quality opamp (low offset voltage).

Just breathing CO2 at a solution might swing the pH that amount I'd have thought!

MarkT:
Just breathing CO2 at a solution might swing the pH that amount I'd have thought!

Yes. In fact, that is, in a manner, one of the deployment scenarios. A big tank of seawater bubbled with air with a known concentration of CO2. Last time we derived the pH from the CO2, but this time we want to measure that pH continuously.

If you need 16-bit resolution my original suggestion is inadequate.

You presumably need a +/- supply to drive your sensor - you mentioned +/- 3v

Run the a/d from that , and use level translators to get the I2C to the arduino 0... +5 levels.

regards

Allan.