Phidgets ph adapter interfaceing

Hi all,

finally i got the 1130 - pH/ORP Adapter of phidgets (pH/ORP Adapter - 1130_0B at Phidgets
and PH elctrode from ebay.

i tired to write the C code for it to but the results isn't correct.\

i bought 3 water bottles (PH 6.8, 7.45, 7.8) but the result that i get isn't good, according to the formula in the manual guide: http://www.robotshop.com/content/PDF/product-manual-1130.pdf

const int PHprobe = 1;


void setup() {
  Serial.begin(9600);
}

void loop() {
int WaterTemp = 18;
float pH1, pH2, pH3;
int i;

for(i = 0;i <= 7;i++) {
pH2 += 0.0178 * analogRead(PHprobe) - 1.889;
  pH3 += 7 - (2.5 - analogRead(PHprobe)/1024) / (0.257179 + 0.000941468 * WaterTemp);
            delay(1000);
      } 

pH1 = analogRead(PHprobe);
       Serial.print(pH1,  DEC);
       Serial.print("\n");
       pH2 = pH2 / 8;
        Serial.print(pH2,  DEC);
        Serial.print("\n");
        pH3 = pH3 / 8;
         Serial.print(pH3,  DEC);
         Serial.print("\n");
       Serial.print("====================================");
       Serial.print("\n");
       delay(10000);
}

the results i got:

pH1 || pH2 || pH3 || Voltage

7.8 water 532 7.58 5.188 2.662

7.45 water 552 7.93 5.188 2.655

6.8 water 499 6.99 5.188 2.428

tnx alot for the helpers...

Anytime I have used pH meters, step #1 was calibrating. If you interpolate between the high pH sensor value and low pH sensor value can you predict what the middle pH sensor value would be? Aka make up your own equation.

With such close pH values in your samples, it is possible the setup is having trouble. It might be worth beginning with detecting pH3 pH10 then going for precision measurements around pH 7

However I would first alter the code to get more consistent readings. I would analog read once each loop, there may be variations between each reading in your loop (i would bet on it). This would cause inconsistent variation between the corrected and uncorrected values.

I would change the code to:

  • read the sensor value x 8
  • determine the mean sensor value over 8 measurements.
  • calculate the pH based on the mean sensor value
  • calculate the temp corrected pH based on the mean sensor value

Also, It might be worth taking more than 8 readings. (say, 80, but only delay 100...?)

The temperature corrected value seems off, your calculation uses 1024 rather than 200.