From phidget user forum site on adapting equation for Arduino connection:
Does it means my formula will be 0.0178*(Vin*200)-1.889 as my input is (0V-5V)?
For obtaining exact ph – sensor value equation you need two standard buffer solutions( buffer 7 and buffer 4).
First put the electrode in buffer 7 then read the sensor value 7 then wash the electrode dry it and put it in buffer 4 solution and read sensor value 4.
With this two point you can write the exact equation for pH -sensor value .
From this project site they try to use linear equation to fit 2 data point calibration and phidgets site has basic information on calibrating sensors:
2 Point Calibration using pH 4 and 7 buffer solution measurements
m = ((7-4)/760-534)) = 3/226 = 0.0133
b= 4 – 0.0133*534 = -3.1022
pH(cal) = 0.0133(RawSensorValue) – 3.1022
You need to know the water temperature in order to properly due to the calibration. In our case I’m using the waterproof DS18B20 from Adafruit.
Connection is 5V, GND, and a digital input pin but you also need to put a 4.7K pullup resistor between VCC and the data pin.
Found some code for reading just the DHT11 water temp sensor (no humidity) on a different pool monitor project site or you can use the Adafruit library example.
Programming the Arduino to read ORP
From the user guide there are formulas you can use and modify to calculate the ORP value from the ORP probe:
There’s no required temperature calibration for measuring ORP and can be directly calculated on the Arduino using the same equation.
Reading pH Probe and ORP Probe with Temperature Calibration on Arduino
Putting this all together I ran some tests first with just the pH probe with calibrated temperature coming from the water temperature probe. (*Probe not working properly so used manual temperature measurement of water for calibration)
Below is the setup that I used with pH buffer solutions of 4, 7, and 10. I also have filtered water.
Using pH and TDS meter following results for pH and temperature: