At 10:54 PM 5/1/00 -0400, you wrote: >Jim Ruxton wrote: > > > > I was wondering if anyone can recommend a PH sensor that is fairly > > simple to interface with a PIC either through A/D or serial etc. I'm not > > looking for anything too fancy. I want to be able to monitor the PH of > > the water in a fish tank I'll also be measuring temperature so if there > > is something that does both that would be a bonus. > > Thanks for any suggestions. > > Jim > >You might want to look at some medical lab supply stores for the probes. >Is this a salt water tank? If so you'll need a fairly high quality one. >I KNOW I've seen some designs around some where for something similar >(NOT PIC related) I'll see what I can find out.. >http://www.sasala.com/fish/electronic/index.html >has a few schematics on hooking up a PH probe you can look into it. >you'll need to probably calibrate it for temperature to be accurate. I >have a 300 Gallon Reef tank an am looking into making a super PIC >controlled controller for everything (Just a dream thus far) I need to >play w/ the pics some more first :) My wife's company (JR Research, 757-467-0954) sells pH probes and calibration buffers. They're about $60 new, I believe. If you're willing to take a working, but older probe, with 18" leads, I've got an extra one you can have for $20 plus postage. A pH electrode puts out +/- 60 mV per pH unit relative to pH 7, and has an intrinsic impedance of about 1 Mohm. You can damage them by drawing too much current. The usual signal conditioning is to run the shielded cable to a JFET or MOSFET input opamp buffer (or a voltage follower-rigged bipolar, but watch the size of the bias current!), bypassed by a low-leakage poly capacitor (470pF - 1000 pF) to remove high frequency noise. Then you might follow by a low pass filter (rolloff @ < 10 Hz) to eliminate 50/60 Hz, and a 5x or 10x gain stage. Since your application is an aquarium, you probably are looking at pH 7 +/- 1 unit, so you'd want 50x gain to bring the +/- 60 mV up to +/- 3 V for an ADC input. You would then add a summer to bias the output to 0-5 V. All of this could be done with a cheap quad opamp, such as a TL084. You don't have to worry about zero (using about +/- 10 mV at most) or calibration (usually 5% change or less) in hardware: you can do this with the PIC in software. If you're going to calibrate using pH 4 and pH 7 buffers, you will need to adjust your gain to allow this swing of ~ 180 mV input. ================================================================ Robert A. LaBudde, PhD, PAS, Dpl. ACAFS e-mail: ral@lcfltd.com Least Cost Formulations, Ltd. URL: http://lcfltd.com/ 824 Timberlake Drive Tel: 757-467-0954 Virginia Beach, VA 23464-3239 Fax: 757-467-2947 "Vere scire est per causas scire" ================================================================