Go Down

Topic: Phidgets ph adapter interfaceing (Read 7280 times) previous topic - next topic


Hi all,

finally i got the 1130 - pH/ORP Adapter of phidgets (http://www.phidgets.com/products.php?category=20&product_id=1130
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

Code: [Select]
const int PHprobe = 1;

void setup() {

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);

pH1 = analogRead(PHprobe);
      Serial.print(pH1,  DEC);
      pH2 = pH2 / 8;
       Serial.print(pH2,  DEC);
       pH3 = pH3 / 8;
        Serial.print(pH3,  DEC);

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...


Jan 21, 2011, 12:00 am Last Edit: Jan 21, 2011, 12:26 am by zwatts Reason: 1
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.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131