Aquarium Controller PH problem!

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
User avatar
Jordy101091
Posts: 519
Joined: Sat Jan 08, 2011 4:02 pm
Location: The Netherlands
Has thanked: 25 times
Been thanked: 188 times
Contact:

Aquarium Controller PH problem!

Post by Jordy101091 »

Hi, all

I have my aquarium Controller almost up ad running, the only thing I need to do is an automatic callibration of my ph probe.
I have searched the web for a while and found only some PH probe vs temperature correction charts, To get that same result you need to do some calculation with difficult formules. These are not easy to program into my micro.

Here is a article of PH vs. Temp
http://www.all-about-ph.com/ph-versus-temperature.html
Here they use the nernst equation ????? :?

Im hoping somebody can solf this problem with me!

Regards Jordy
the will to learn, should not be stopped by any price

User avatar
JonnyW
Posts: 1230
Joined: Fri Oct 29, 2010 9:13 am
Location: Matrix Multimedia Ltd
Has thanked: 63 times
Been thanked: 290 times
Contact:

Re: Aquarium Controller PH problem!

Post by JonnyW »

Hi Jordy.

The formula you link to seems doable in a PIC:

Code: Select all

pH = (E0 - E) / (k * T)
The unknowns here are E0 (which is probably a constant), E, k (another constant) and T. I do not know what E (or E0) represent from the link you sent, but at a guess, E0 would be the reading at pH 7 and E would be the reading at the current pH.

If so, what this formula means is 'pH is the reading (E) minus a bias for your probe (E0) so that pH7 reads zero, then scaled by temperature (k * T)'.

You would have to experiment with known pH values and temperatures to find appropriate values for E0 and k - find the value for E0 first (this can be an integer) by testing with pH 7 then experiment with temperature to find k, which may need to be a floating point, a fixed point or a multiplier-divisor pair.

Edit:
From the link http://www.all-about-ph.com/ph-temperature.html
An ideal electrode at 25°C will produce 0.0 mV when placed in a solution with a pH of 7.00. But a real electrode will have an actual reading which varies from 0 mV. This variation is called the electrode’s offset error.
So to calculate E0 above, ensure temperature of 25degC, pH of 7 and record the reading on your probe.

I hope this helps (and that the assumptions are right!),

Jonny

User avatar
DavidA
Matrix Staff
Posts: 1076
Joined: Fri Apr 23, 2010 2:18 pm
Location: Matrix Multimedia Ltd
Has thanked: 58 times
Been thanked: 258 times
Contact:

Re: Aquarium Controller PH problem!

Post by DavidA »

This post comes from dazz in this thread who was kind enough to reply: http://www.matrixmultimedia.com/mmforum ... 314#p31314
Hi
im posting this here as i cant post in your thread( i signed up to answer you post)

Looking at the formula i cant do :lol: not into maths, however all you need to do is measure the output from the probe at at known temp, ie 25degrees c in a ph7 solution then measure in another ph solution then build a table from that, at 25deg c there shouldnt be any temperature compensation needed, but not all aquariums sit at 25degrees .two sites bellow have a good write up (sorrry if its too simple)

http://www.66pacific.com/ph/simplest_ph.aspx simple ph circuit

http://www.sensorex.com/support/more/ph ... _education nice temp chart

check around the saltwater forums as a lot of people are building diy aquarium stuff so an easier answer could be found there

also look out for aquatroller source code is online although written for an arduino and in c ,if you look at the code his ph solution is in there you should be able to modify it for use in your programme
hope this helps
dazz

Post Reply