Wireless Recycled Reef Controller |
| Home | Recent Edits | Search | Edit this page |
|
ph Sensors:
Here's the basic conversion from mV to pH. The ratio is: 6 mV = 0.1 pH if you massage that it becomes: mV * 60 = pH So I expanded to include a calibration offset [mV_offset] (mV + mV_offset) * 60 = pH Now the mV put out by the probe are very tiny and would require a very precise meter, so we are upping the voltage using the MAX406? Amplifier. To take this into the equation we must divide the observed mV readings by the amplification factor (Ampfactor) to get back to the true mV at the probe: (mV + mV_offset) / Ampfactor * 60 = pH pH is also dependant upon temperature and requires a correction based on the pH & Temp observed. I obtained a table from a pH probe manufacture as follows:
And so base on that info I have create this code snippet to adjust the pH based on the temp of the water:
if temp > 25
if ph > 7
ph= ph-(ph-7)*(temp-25)*.03/10
else
ph= ph+(7-ph)*(temp-25)*.03/10
fi
else
if ph > 7
ph= ph+(ph-7)*(25-temp)*.03/10
else
ph= ph-(7-ph)*(25-temp)*.03/10
fi
fi
Ok, that wasn't too hard, but now we have to fit it to the measurable voltage range of the DS2438. There's two inputs Vdd [2.4v-10v] and Vad [1.5v-10v]. The Vdd has a better accuracy (+-10mV vs +- 25 on the Vad) so I think we want the Vdd pin for measurement. We need to fit the mV scale to the range using the correct op-amp multiplier. I've arbitrarily set our usable pH scale to 3-11 pH. I chose this since calibration solutions come in 4, 7, 10 pH mixtures so we want those plus a little cushion. Given that the probe measures 60mV per 1 pH our observed mV range for pH 3-11 is 480mv Our measurable range with the DS2438 on Vdd is aprox 6.25v (2.5v-10v minus 0.5v on each end for a little cushion) so to find the op-amp gain multiplier I took: 0.48 * X = 6.25 X=13 So our optimal voltage multiplier should be 13 times. Of course there's a big caveat to all this though: pH probes reference 7pH (neutral) as 0 mV and pH readings below 7 are negative and above 7pH are positive voltage. This means we need to shift the voltage readings upwards since our 1-wire input can only read positive voltage. I don't know enough about electronics to do this. Is it even possible to shift a voltage like that with a positive and negative scale? I need some help to get over this hurdle. This page has lots of great links to DIY pH meters and schematics, etc. http://www.home.zonnet.nl/rsetteur/aquarium/karel/ph/index_ph.htm http://www.seabird.com/application_notes/AN18_1.htm Formula for ph Calculations from you voltage output also some notes on ORP http://www.emesystems.com//OL2ph.htm A Pic Basic PH probe example and source code
Other Schematics
http://www.edn.com/index.asp?layout=article&articleid=CA250813 Most Likely Canidate for WRRC http://bytality.com/wrrc/images/15092ph-circuit.JPG The outputs from the MAX406? should go straight to a DS2450 1-Wire ADC?. So all we have to do is read the voltage from the DS2450's input, apply the temperature and slope formula from above to get our pH scale data. Source for Cheap pH probes http://www.weissresearch.com/ |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||