Ph cal

Would you like to help?
Share your walkthrough tutorial with others
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Ph cal

Post by rimai »

Just to be sure you are not getting stray voltages, make sure that you have the controller disconnected from the computer.
When you were calibrating, did you take notes of the values shown on the screen?
Roberto.
thjoca3
Posts: 11
Joined: Mon Jul 18, 2011 7:03 pm

Re: Ph cal

Post by thjoca3 »

updated see below
Last edited by thjoca3 on Wed Aug 03, 2011 6:11 am, edited 1 time in total.
thjoca3
Posts: 11
Joined: Mon Jul 18, 2011 7:03 pm

Re: Ph cal

Post by thjoca3 »

OK, home....third shifter, re- did the calibration, power cycled, same results.

for the calibration screen numbers

7.0 - 502

10 - 827

I tested these standards which were brand new and sealed the first time I calibrated, against my handheld again, for kicks and they were dead on.

right now the handheld reads the tank at 8.1, while the controller is saying 7.63 - 7.65 moves around between those


thanks,

Tom
Bryan
Posts: 147
Joined: Wed Jul 06, 2011 1:49 am
Location: Vancouver, B.C.

Re: Ph cal

Post by Bryan »

What ph readings do you get with the RA and the calibration solutions?
-=Bryan=-
thjoca3
Posts: 11
Joined: Mon Jul 18, 2011 7:03 pm

Re: Ph cal

Post by thjoca3 »

6.8 and 9.7 respectively, the 3rd number bounces around alot

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

Re: Ph cal

Post by rimai »

I forgot to ask, but are you using the preloaded code that came with the RA or a code that you have created with RAGen?
Roberto.
thjoca3
Posts: 11
Joined: Mon Jul 18, 2011 7:03 pm

Re: Ph cal

Post by thjoca3 »

Its a RAGen code, it also shipped with the new optiboot bootloader, if that makes any difference

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

Re: Ph cal

Post by rimai »

Load this code:

Code: Select all

#include <ReefAngel_Features.h>
#include <ReefAngel_Globals.h>
#include <ReefAngel_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <ReefAngel_EEPROM.h>
#include <ReefAngel_NokiaLCD.h>
#include <ReefAngel_ATO.h>
#include <ReefAngel_Joystick.h>
#include <ReefAngel_LED.h>
#include <ReefAngel_TempSensor.h>
#include <ReefAngel_Relay.h>
#include <ReefAngel_PWM.h>
#include <ReefAngel_Timer.h>
#include <ReefAngel_Memory.h>
#include <ReefAngel.h>


void setup()
{
  ReefAngel.Init();  //Initialize controller
  ReefAngel.LCD.SetContrast(60);  // Set contrast to 60
  ReefAngel.LCD.DrawText(0,255,10,10,"v"ReefAngel_Version);
  ReefAngel.LCD.DrawText(0,255,10,20,ReefAngel.PHMin);
  ReefAngel.LCD.DrawText(0,255,10,30,ReefAngel.PHMax);
}
void loop()
{
  ReefAngel.Refresh();
  ReefAngel.LCD.Clear(255,10,40,130,50);
  ReefAngel.LCD.DrawText(0,255,10,40,ReefAngel.Params.PH);
  delay(500);
}
1st line is library version
2nd line is pH 7.0 calibrated reading (should be 502, according to numbers above)
3rd line is pH 10.0 calibrated reading (should be 827, according to numbers above)
4th line is actual reading.
If you place the probe back into pH7.0, what is the actual reading?
What about pH10.0?
Now, place it on tank water. What is the reading?
Roberto.
thjoca3
Posts: 11
Joined: Mon Jul 18, 2011 7:03 pm

Re: Ph cal

Post by thjoca3 »

ok, loaded code heres what I see/got

1st line is library version
V0.8.5.16

2nd line is pH 7.0 calibrated reading (should be 502, according to numbers above)
550
3rd line is pH 10.0 calibrated reading (should be 827, according to numbers above)
846
4th line is actual reading.
If you place the probe back into pH7.0, what is the actual reading?
683
What about pH10.0?
976
Now, place it on tank water. What is the reading?
780


seems like the 2nd and 3rd lines were not what was found above....
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Ph cal

Post by rimai »

I'm so sorry.
I made a mistake and used the wrong stuff.
Can you do it one more time, please?
Here is the code:

Code: Select all

#include <ReefAngel_Features.h>
#include <ReefAngel_Globals.h>
#include <ReefAngel_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <ReefAngel_EEPROM.h>
#include <ReefAngel_NokiaLCD.h>
#include <ReefAngel_ATO.h>
#include <ReefAngel_Joystick.h>
#include <ReefAngel_LED.h>
#include <ReefAngel_TempSensor.h>
#include <ReefAngel_Relay.h>
#include <ReefAngel_PWM.h>
#include <ReefAngel_Timer.h>
#include <ReefAngel_Memory.h>
#include <ReefAngel.h>


void setup()
{
  ReefAngel.Init();  //Initialize controller
  ReefAngel.LCD.SetContrast(60);  // Set contrast to 60
  ReefAngel.LCD.DrawText(0,255,10,10,"v"ReefAngel_Version);
  ReefAngel.LCD.DrawText(0,255,10,20,ReefAngel.PHMin);
  ReefAngel.LCD.DrawText(0,255,10,30,ReefAngel.PHMax);
}
void loop()
{
  ReefAngel.Refresh();
  ReefAngel.LCD.Clear(255,10,40,130,50);
  ReefAngel.LCD.DrawText(0,255,10,40,analogRead(PHPin));
  delay(500);
}
Roberto.
thjoca3
Posts: 11
Joined: Mon Jul 18, 2011 7:03 pm

Re: Ph cal

Post by thjoca3 »

ok, tried to recalibrate, before seeing this, after I loaded a new memory file, as I wanted to make some changes, readings came in as follows, 7.0 - 537 10 - 825, then hit ok, and unpluged the controller, and plugged back in, same thing.

loaded your above code,

same version
550
840
7.0 - 529
10 - 819
tank - 613
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Ph cal

Post by rimai »

That's strange.... It seems that the calibration is not saving the settings.
Let's try something else:
Add these 2 lines to your PDE file, just bellow the ReefAngel.Init()

Code: Select all

ReefAngel.PHMin=529
ReefAngel.PHMax=819
Check the pH of tank water now. Does it look correct?
Roberto.
thjoca3
Posts: 11
Joined: Mon Jul 18, 2011 7:03 pm

Re: Ph cal

Post by thjoca3 »

well it was still off but after messing around with the numbers a bit I got it to read the tank and the 10.0 solution correctly , but 7.0 reads at 7.3

ended up with 502 and 817

is it a concern that its not saving the calibration in mem?

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

Re: Ph cal

Post by rimai »

Maybe you are clicking Cancel, instead of Ok?
I'm not sure why it is not saving. Did you try modifying the memory settings with the RAGen Internal Memory tab? Or with the Client 2.2?
Roberto.
thjoca3
Posts: 11
Joined: Mon Jul 18, 2011 7:03 pm

Re: Ph cal

Post by thjoca3 »

Im pretty sure im hitting ok, it looks highlighted, unless cancel is default, :?: but ive tried both. I modified the pde, but also did the mem settings in RAGen
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Ph cal

Post by rimai »

This is how RA reads/writes the calibration data:
When you use the calibration function, it will store the data in the memory.
It will use this data for as long as you do not write anything over. If you use the calibration function again, it overwrites the previous data. If you use the Internal Memory sketch from RAGen, it overwrites the previous data. If you push memory settings with Client 2.2, it overwrites the data.
If you add the 2 lines of code mentioned above, it will use the data in the code and disregard any settings stored in the memory, but it will not overwrite anything. If you remove the 2 lines, you go back to use whatever was stored in the memory.
To make sure that it is indeed saving settings on the memory, you can either use the calibration function again and upload the above code right after to check if it is reading the same values as you saw on the screen while calibrating or you can use the internal memory sketch and upload the above code right after, checking for the same data you entered on the RAGen Internal Memory tab.
It should show you the same data.
Roberto.
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Ph cal

Post by binder »

I previously commented that I'd fix the PH calibration to take affect immediately. I just looked at the code more closely and it should take affect immediately. The values get updated when you press the OK button. They actually get written to memory and copied over right away.

curt
jemw
Posts: 41
Joined: Sat Oct 08, 2011 9:21 am

Re: Ph cal

Post by jemw »

I am also having pH calibration issues. After following the procedure here, I test with cal solution and find:
pH 7.0 solution reads 7.0 and stable after 10 minutes
pH 10.0 solution reads 9.76 after 20 minutes and still drifting up and down by 1.

And yes I did power cycle after calibration. Dev Lib Version 0.8.5.19

Readings during calibration (stabilized):
7 - 544/548
10 - 835/851

Any suggestions?
_____
Jim
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Ph cal

Post by rimai »

Are you saying it is drifting by 1 whole pH unit? like 9 and 11pH?
If it is just drifiting by 0.01, then you are fine. You will never get lab grade pH readings. Even the probe is not lab grade.
Seems like the PHMin is fine according to your results. Just increase/decrease the PHMax until you get the correct reading.
You can use the Client to change those values too.
The value must be somewhere in the middle of the range you observed.
Or hard code it like this in the setup() section:

Code: Select all

ReefAngel.PHMin=546
ReefAngel.PHMax=835
Roberto.
jemw
Posts: 41
Joined: Sat Oct 08, 2011 9:21 am

Re: Ph cal

Post by jemw »

rimai wrote:Are you saying it is drifting by 1 whole pH unit? like 9 and 11pH?
If it is just drifiting by 0.01, then you are fine. You will never get lab grade pH readings. Even the probe is not lab grade.
Seems like the PHMin is fine according to your results. Just increase/decrease the PHMax until you get the correct reading.
You can use the Client to change those values too.
The value must be somewhere in the middle of the range you observed.
Or hard code it like this in the setup() section:

Code: Select all

ReefAngel.PHMin=546
ReefAngel.PHMax=835
Sorry - it's drifting between 9.75 and 9.77 and ReefAngel shows:
pH 7: 544
pH10: 851

So do I increase or decrease pH10 to raise the value measured?
_____
Jim
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Ph cal

Post by rimai »

You should increase slightly.
Roberto.
jemw
Posts: 41
Joined: Sat Oct 08, 2011 9:21 am

Re: Ph cal

Post by jemw »

rimai wrote:You should increase slightly.

Do I have to reboot controller?
_____
Jim
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Ph cal

Post by rimai »

Yes, for every change you make on the PHMax value.
Roberto.
jemw
Posts: 41
Joined: Sat Oct 08, 2011 9:21 am

Re: Ph cal

Post by jemw »

Not sure what is going on, but the pH calibration function appears not to function correctly. I finally had to take the initial readings given by the function and then read the pH7 and pH10 calibration fluids and manually adjust from within ReefAngel Client. It took me about three adjustments with each the pH7 and pH10 calibration fluids to tune it in. My pH probe is now in sync with my pH test kit.

Needless to say that cycling the equipment that many times adds to the possibility of failure. :( You really need to address this issue.
_____
Jim
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Ph cal

Post by rimai »

Thanks for the observations and it's been logged for future updates.
Roberto.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Ph cal

Post by rimai »

Did you rinse the probe before transfering and let it stabilize on the pH 10 for while?
Roberto.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Ph cal

Post by rimai »

They shouldn't be the same.
What happens to those numbers if you dip the probe into vinegar?
Roberto.
alexwbush
Posts: 327
Joined: Tue Mar 22, 2011 12:45 am
Location: San Diego, CA

Re: Ph cal

Post by alexwbush »

mine was weird in that my numbers were:
211 (7.0)
523 (10.0)

Right now reads 7.82
Sebyte

Re: Ph cal

Post by Sebyte »

For a Standard test that is cheep and repeatable I use the 20 Mule Team Borax test.

Borax or sodium metaborate solution will always be at a pH of 9.18 + 0.02, even if you do a poor job of making this solution.

Use a pint of water (473ml) and add a half teaspoon (1/2 level tsp.) of borax to make a resultant pH standard solution with about 2 gm of sodium metaborate per 473 ml or 4.3 grams of sodium metborate/litre.

Although using this method to make the standard will only result in an accuracy of about plus or minus 10% of the lab standard sodium metaborate pH calibration solution, for me it's a good and cheap test to make sure the probe is on the mark. Compared to commercial solutions you can afford to use this test every week when you clean your probe.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Ph cal

Post by rimai »

Add these 2 lines to your PDE file, just bellow the ReefAngel.Init()

Code: Select all

ReefAngel.PHMin=520
ReefAngel.PHMax=801
Roberto.
Post Reply