Go Down

### Topic: Phidgets 1130 working ! (Read 1 time)previous topic - next topic

#### simkard

##### Oct 07, 2011, 01:30 pm
Hi,

I'm writing here for all those who wants to have a pH controller that works for cheap (... or let's say "quite cheap") ...

For a project i'm on, i required a pH probe to sense the value of some liquids and do actions to correct it.

I found a lot of complicated schematics with OP-AMP (not that OP-AMPs are difficult to deal with, but ...) needing precision as a pH probe variates between -400mV and 400mV representing 0 and 14 pH respectively.
So instead of building it, i searched for a module ready to go with ! ... and i found it ! ---> http://www.phidgets.com/products.php?product_id=1130
Based on the datasheet, i thought that it would be easy to deal with on an analog pin of the Arduino ...

The value sensed on an analog pin had to go through some very basic maths formula to convert it to pH value (datasheet says : "pH = ( 0.0178 x [SENSOR VALUE]) - 1.889" )

Well ... pH probes are delivered with a pH neutral solution to preserve the glass electrode.
Sensing the value on an analog pin gave me this value : ~556
Going through the maths formula gave me "8.0078" ... Errr ... Oooppsss ! there must be some kind of problem.
So i searched why the hell was the value false ! ... and found !

In fact, arduino doesn't sense values from 0 to +5v on analog pins.
Instead, it sense from 0 to +4.5v which is exactly 10% less.

Based on this, i modified the formula to correct the value sensed on the analog pin to reflect the changes.

Here is the good formula : "pH = (0.0178 x ([SENSOR VALUE] x 0.9)) - 1.889"

This time, calculating the pH was good with the 556 value and gave me a pH of "7,01812" !

Hope that helps everyone who wants to gather pH values !

SimKard

#### RuggedCircuits

#1
##### Oct 07, 2011, 06:53 pm
Quote
In fact, arduino doesn't sense values from 0 to +5v on analog pins. Instead, it sense from 0 to +4.5v which is exactly 10% less.

Uh...no, that's not quite true. The Arduino senses analog voltages relative to its supply voltage (Vcc) which depends upon where it's coming from. With external power, this voltage will be 5V +/-4% (generally...this is what linear regulators commonly provide). Now, if the Arduino is USB-powered, then Vcc is whatever is coming out of your computer's USB port (and perhaps past hubs and such), which can be quite a bit lower than 5V (I believe the spec at the PC itself is at least 4.4V).

So you are either doing some math wrong, or you are using a USB-powered Arduino with a "low" USB voltage.

--
The Basic Motor Driver: simple, inexpensive motor driver for 1 stepper motor or 2 DC motors

Go Up