Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] pH Meter Value Conversion

Status
Not open for further replies.

pic.programmer

Advanced Member level 3
Joined
Aug 19, 2015
Messages
773
Helped
141
Reputation
284
Reaction score
140
Trophy points
43
Activity points
7,531
Hi

I am making a pH meter. I have built the pH probe interfacing circuit and it is working fine. Now I need some help in ADC voltage to pH conversion.

pH range is 0 to 14.

voltages are like this.

0-2.5633 V
7-2.985 V
14-2.137 V

How to convert these voltages to 0 to 14 values. Also I need to convert the voltages like this.

2.5633 - 2.985 to 0 to +420mV
2.5633 - 2.137 to 0 to -420 mV.

How to do these conversions.
 

in my opinion your results are wrong. Maybe you have problem with circuit, but I think you mistake reference solutions. With such problems you should measure different pH samples to get more points.

Btw. by three points, you can run any straight line on condition that it will be thick enough ;)
 

This is the circuit I am using.

What about this circuit ?

https://www.66pacific.com/ph/phschematic.htm

To interface the circuit in the about like with PIC should I only take the Amplifier section and Voltage Inverter section ?


Sorry, KamW. I posted the wrong circuit. This is my circuit but it uses OP07C OpAmps.
 

Attachments

  • pH Probe Interfacing OP07C.rar
    14.5 KB · Views: 94
  • Circuit.png
    Circuit.png
    17.9 KB · Views: 128
Last edited:

I have built the pH probe interfacing circuit and it is working fine. Now I need some help in ADC voltage to pH conversion.

pH range is 0 to 14.

voltages are like this.

0-2.5633 V
7-2.985 V
14-2.137 V

How to convert these voltages to 0 to 14 values. Also I need to convert the voltages like this.

2.5633 - 2.985 to 0 to +420mV
2.5633 - 2.137 to 0 to -420 mV.

How to do these conversions.

The slope should be approx 60mV/pH and the potential at pH=7 should be close to zero.

To calibrate with two points;

select pH7; set observed potential as zero.

select another pH; select slope to correct the reading.

((E_obs - E_pH7)/60)+7
 

To use the equation, the potentials must be in mV. You can use volts but then use slope in V/pH.

the pH value extends from -inf to +inf. A relevant range in water is 0-14 (but that that does not mean that the pH cannot be -1 or 15 in water).

Measuring pH values in non-aq media is tricky (perhaps not possible).
 

OP07 it is not the best choice for pH amplifier. There is up to a few nA input current while for pH electrodes it is fA range current recommended.
In my opinion it could be explanation of your results.
There is a lot of amplifiers with small current with MOS input for instance. As examples - for amateur meter there is TL081 or for single supply very popular TLC272, or my favourite A8033 and more, more...
Another question is output voltage of OP07. It is not directly written in datasheet but there is output voltage swing of +- 12V with 15V supply. That mean that OP07 could work up to about 3V below rail. With your 5V it mean that your signal it could be rail voltage.
Another question is why there is so high voltage while there should be zero crossing with about 1.25V.
 

I am designing the circuit for someone and she says that she can only use OP07C or 741 opamps. What is wrong with the circuit posted in post #3 (.rar file) ?

Why the level shifting is not working ?
 

circiut from post 3 is OK. It is on ideal opamps with null impedance voltage source.
Question is what happened if you change ideal (I think) voltage source to Gohm internal resistance voltage source.
What hapened when you connect pH electrode which could source for instance 10 pA with opamp input which sink 4000 pA.
In fact I do not want to know what happened. But you could analyse simplified schematic of OP07 and decde what happened then.
In my opiinion opamp will push output to rail, but it might as well start oscilate, or maybe could work as some kind of antena ???
I think you should reconsider your assumption. it is impossible to pH sensor change sign of its slope. and what is the reason to get max signal in 0 pH not for instance 1 pH
 

How about his circuit. I made this but the output is inverted. How to remove the inversion ?
 

Attachments

  • pH Probe Interfacing Circuit.rar
    13.3 KB · Views: 115

Ok. I decided to use TL081 as the OpAmp. I have built this circuit and it seems it is working fine. I want to know how to do the maths.

For 0 - 14 pH scale

I have to get 7 pH for 0.32 V and 0 pH for 1.83V
I have to get 14 pH for 3.35V
 

Attachments

  • pH Circuit.png
    pH Circuit.png
    50.7 KB · Views: 122
Last edited:

In my oppinion once again you should check your bufor solutions. I have changed 0 pH and 7 pH samples there is straight line ...
 

I calculated the values. I used the straight line formula y = mx + c. I found the slope of the line and made the required maths. It is working in Simulator. Is my Circuit correct that is circuit in post #10 ?

I split the output values into half and considered them as two separate straight lines.
 

Your data can not be explained with physical phenomena. Please do explain - If you get 1V what does it mean - it will be 4 or 10 pH ???
As it was written in another thread If you would like sb to see your circuit present it in readable format.....
 

4 pH. In what format you need the circuit ? I can provide Proteus file and image file.
 

let's reverse question. what voltage would you get for 10 pH? do you remember that mid range point (0V) it is 7 i pH scale?
According to pictures. Assume that I have sent you answer #11 in opj format. Would it be usable for you?
Answer is - any format readable with a few clicks. Except you would like to ask question ONLY to current Proteus user. Assuming that they read your post on computer with Proteus (very limited cluster)
You want us to check your circuit. In Proteus all circuit will work fine except that you use 5k potentiometer for pH probe simulation. Why not 1G for instance In my oppinion schematic #3 could be even better than #10. It is time to return into real word. Simulation work ok, but you should exchange simulation element with real parts.
What would be power source? How about decoupling capacitors? How about negative voltage on ADC input?
Maybe it would be better idea to use single power supply?
 

Sorry, there was some mistake. Here are the new readings.

0- 0.635 V
7- 1.867 V
14- 3.500 V

Wait. Another two set of readings are being taken. I will give you the final readings in another 15 minutes.
 

Actually I am only testing the circuit in Proteus. I am designing this for someone and that person is testing it in hardware.

She gave these values and these are final.

0- 0.635 V
7- 1.867 V
14- 3.500 V

But why in Proteus I am getting voltages like this ?

7 pH = +420 mV = 0.32
0 pH = 0 mV = 1.83
14 pH = -420 mV = 3.35


???
 

please read carefully what you have written in last post. mid scale of pH probe it is 0V for 7 pH !!! not +420 mV for 7 pH.
in fact you have difference between simulation and real world. answer what is the reason depends on what is the circuit. element values, component tolerances etc.

- - - Updated - - -

this time your data looks near OK
 

She said she is using the same circuit that I provided but she if getting voltages in a different format and I am getting it in another format.

What is the reason for it. This is my latest circuit. How can I change the circuit so that I get voltages in the below format.

0 pH = 0 V

7 Ph = 2.5V

14 pH = 5V

??

The 3 images shows voltages I am getting for 0, 7 and 14 pH values.


No, in the last post

mid scale 0V = 0 pH

-420 mV = 14 pH

+420 mV = 7 pH


PH Probe gives 60 mV per pH

0 pH = 0mV

1 pH = 60 mV

2 pH = 120 mV

7 pH = 420 mV

8 pH = -60 mV

14 pH = -420 mV
 

Attachments

  • pH Meter OPA350 Based.rar
    19.6 KB · Views: 68
  • PH Circuit 1.png
    PH Circuit 1.png
    21.1 KB · Views: 87
  • PH Circuit 2.png
    PH Circuit 2.png
    21.2 KB · Views: 114
  • PH Circuit 3.png
    PH Circuit 3.png
    21.3 KB · Views: 132
Last edited:

First of all could you explain phisical phenomena of -480 (minus !) mV change in signal between pH 7 and 8? and why 0 pH (very strong acid) should be between 7 pH (neutral) and 14 (alkaline)?
According to your circuits #19 post one is the worst you have presented so far. Especially RV6 is unconventional solution....
I don't know Proteus, but I think you should plot full characteristics not only simple point values.

- - - Updated - - -

I am wondering if your electrode has signal like you have written, then with -1 pH we should get -60mV - the same as with 8 pH?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top