PH calibration

Basic / Standard Reef Angel hardware
Post Reply
rwijbenga
Posts: 16
Joined: Thu Aug 11, 2011 11:00 am
Location: Netherlands

PH calibration

Post by rwijbenga »

Hi,

I want to calibrate my PH sensor, but I only have PH7 and PH9.2 fluid available here at the moment. What can I do? is there a setting that I can change to successfully calibrate my sensor with the PH 9.2 fluid ?


Cheers.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: PH calibration

Post by rimai »

One way to do it is to go through the calibration and write down the numbers you get on screen.
Post in here and I can do a math on the interpolation to find out which number you need for pH 10.0
Roberto.
rwijbenga
Posts: 16
Joined: Thu Aug 11, 2011 11:00 am
Location: Netherlands

Re: PH calibration

Post by rwijbenga »

Hi Roberto,

I have ordered a few PH10 powder solutions's online. So I can calibrate wihout any problems.. :) They should arrive next week. Then I can tweak and test my setup.

Remco
wolfador
Posts: 241
Joined: Sun Sep 04, 2011 9:59 am
Location: Pittsburgh, PA

Re: PH calibration

Post by wolfador »

I got a packet of the pH 7 and pH 10 on ebay for around 4 bucks as my LFS does not carry them. These should work for this correct? Should I have ordered more?
John
ReefAngel and ReefAngel-HD developer
If the RA iOS app has helped please consider a donation
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: PH calibration

Post by rimai »

Yeah, they work.
Just make sure to write down the numbers when you are doing the calibration.
If something goes wrong, we can always manually enter those numbers later.
The pH7.0 should give a number around 500s and the pH10 should be around 800s.
Roberto.
wolfador
Posts: 241
Joined: Sun Sep 04, 2011 9:59 am
Location: Pittsburgh, PA

Re: PH calibration

Post by wolfador »

got sent the wrong packet got a 4 and 7 so my pH will have to wait until the new one comes in :(
John
ReefAngel and ReefAngel-HD developer
If the RA iOS app has helped please consider a donation
Image
rwijbenga
Posts: 16
Joined: Thu Aug 11, 2011 11:00 am
Location: Netherlands

Re: PH calibration

Post by rwijbenga »

@rimai

Is there a way to select the calibration fluid used for the high and low ? The local fish store's here in Europe only have PH4 and PH7 mostly.

I have looked at the code but can't really find where the calculation work is done...

Or can you share the calculation needed to use PH 4 for the low and PH 7 for the high?

The PH we use for our tanks is always below PH7 so I think calibrating the sensor between the PH4 and PH7 makes it more accurate.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: PH calibration

Post by rimai »

Below 7 huh?
Is it freshwater plant tank?
The calibration is nothing more than simple interpolation.
You can actually choose any 2 points and manually calculate the interpolation of what pH10 would be.
If you provide me the numbers that show on the screen when you go through the calibration, for pH4 and pH7, I can help you calculate that number.
Roberto.
rwijbenga
Posts: 16
Joined: Thu Aug 11, 2011 11:00 am
Location: Netherlands

Re: PH calibration

Post by rwijbenga »

It is a fresh water tank yes, and the recommended PH is 6.8..

I will do a calibration later today and provide you with the numbers. Hopefully you can share the calculation you did, so I can always recalibrate... :D
wolfador
Posts: 241
Joined: Sun Sep 04, 2011 9:59 am
Location: Pittsburgh, PA

Re: PH calibration

Post by wolfador »

rwijbenga wrote:
I have looked at the code but can't really find where the calculation work is done...
I think it is in the ReefAngel.cpp

Code: Select all

Params.PH=map(Params.PH, PHMin, PHMax, 700, 1000);
At least that is all that I could find. Here is the explanation of the map() command

http://www.arduino.cc/en/Reference/Map
John
ReefAngel and ReefAngel-HD developer
If the RA iOS app has helped please consider a donation
Image
rwijbenga
Posts: 16
Joined: Thu Aug 11, 2011 11:00 am
Location: Netherlands

Re: PH calibration

Post by rwijbenga »

Here are the numbers..

PH4 217
PH7 512

Hopefully you can show me how to calculate the PH10 number from this.

Remco
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: PH calibration

Post by rimai »

http://en.wikipedia.org/wiki/Linear_interpolation
Let's say that x axis is pH and y axis is the raw numbers.
We know the following:
x0=4
y0=217
x1=7
y1=512
So, the formula would be:
y=217+((x-4)*((512-217)/(7-4)))

We want to interpolate and find the y value for when x=10
y=217+((10-4)*((512-217)/(7-4)))
y=807

So, in your case, you can use PHMin=512 and PHMax=807
Just place these lines just below the ReefAngel.Init() function:

Code: Select all

ReefAngel.PHMin=512;
ReefAngel.PHMax=807;
Let me know if it got too confusing.
Roberto.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: PH calibration

Post by rimai »

An easier way for the future, for those that don't want to bother with the math part of it.
Just take the difference between pH7 and pH4, add it to pH7 and you've got your pH10 number.
512-217=295
512+295=807
807 is your number to be used for PHMax.
PHMin is always the same as pH7 raw number reading.
Roberto.
rwijbenga
Posts: 16
Joined: Thu Aug 11, 2011 11:00 am
Location: Netherlands

Re: PH calibration

Post by rwijbenga »

Thnx for all the info ! :)

I also have tested changing the PH.Params map. That worked also without a problem. :)

So now I have 2 way's of using PH4 calibration fluid.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: PH calibration

Post by rimai »

Just remember that the changes in the map function inside the library will get overwriten by any update that Curt releases on the libraries and you will need to change it again.
Roberto.
Post Reply