Circuit to output a variable simulating a pH probe reading

Hi all

I created a program that calculates a variable and I would like to output it as a signal simulating a pH probe.
The reason behind my idea is the intention to interface my Arduino project to a comercial pH meter so the program calculates a number that will be displayed in this pH equipment but it will be not a pH reading.
How do I scale the output signal to simulate the pH sensor ?

many thanks

That's going to be tough. It may be easier to rip out the display from the commercial unit and put your own display in.

A pH Meter measures tiny tiny voltages. While the basic principle is well-known and you don't have to reverse-engineer it, getting it to work "right" with your unit may be impossible. The unit is probably only measuring the voltage intermittently and it may be applying some clever processing to work around the limitations of the physical process. Reversing that processing will be difficult since you don't know what it is.

pH sensors put out about 60 mV per pH point - negative for alkaline solutions, positive for acidic solution, with an output impedance of typically in the order of 10-100 MOhm. This can not be read directly by an Arduino, so there's a hardware driver in between. Usually an offset is applied so you don't have to deal with negative voltages.

So you have to scale your output voltage (do you have a DAC?) to whatever offset the commercial meter applies (or not) plus/minus that 60 mV/pH point.

MorganS:
That's going to be tough. It may be easier to rip out the display from the commercial unit and put your own display in.

I believe OP wants to pretend to be pH probe, rather than trying to read the probe.

The voltages are not the problem, they're big enough: 60 mV per pH point. The problem is with the tiny tiny current, which is 1 nA at most and more likely in the order of 100 pA.

The other day I actually built a pH sensor circuit from scratch on protoboard, and it works quite well - better than expected, as in it actually just worked - considering the noise it just has to be picking up. Offset voltage to the shiel, OpAmp amplifier with 2x gain (going to change that to 3x to cover more of the 3.3V range - otherwise that 10-bit ADC is really too coarse), and then to the analog in of a NodeMCU board.

does anybody know a DAC module that I can use to emulate the pH signal ?

mizario:
does anybody know a DAC module that I can use to emulate the pH signal ?

What does your pH probe do?. i.e.: What is its output shape?. Is it analog?. If yes: what is the proportionality constant. What is the "0.0 Volt" pH?

Regards

A pH probe produces a small voltage (58 mV per pH point normally with pH=7 at 0V and any pH higher than 7 producing a negative voltage and lower than 7 a positive voltage). A DAC that can output negative voltages will do. A pH probe also has a huge output impedance - typically in the order of 10-100 MΩ or even higher - which you can emulate by putting a resistor of such a value on the output of your ADC.

wvmarle thanks for your help. Do you know a DAC module that is compatible with my needs ?

As I understood first I will need to scale my digital variable into a analogic signal. Let's say variable = 7 will output 0 V. Then I need to calibrate my microprocessorB and tell him 0 v corresponds to a pH 7 and also calibrate with another voltage and pH reading.
Doing that my microprocessorB will be able to display the Arduino variable like a conventional pH reading but in reality is other parameter that was calculated.

Arduino --> DAC---> analogic signal ---> MicroprocessorB

No specific suggestions for the DAC. Take a look at Digikey or Mouser. But before selecting a board you have to fully understand what you're trying to simulate and I don't have the feeling that's the case for you.

You're missing a very important part here: the pH sensor amplifier. You need this due to the very high output impedance of the probe, connect the probe directly to A0 and you'll always read 0V (or the offset voltage, if applied). This amplifier will normally also add an offset to the probe's output, so you can read with with a normal Ardruino ADC (which can do only positive voltages). You can simulate that with the DAC of course as well. Just set your pH=7 level at that offset.

Isn't it easier (and closer to reality) to just get yourself a pH probe + amplifier board?

You ignore the analog interface. The "nature" of the pH probe can be resistive, voltage or current based, and this is what an according analog circuit will have to provide to the meter. How many wires connect the probe and the meter?

I am assuming a standard glass ion selective electrode, which is a voltage source with very high output impedance.