Hello Mr. Russell, Thanks for your mail. But, if your display shows strange characters or if the circuit does not reach the voltages shown by the uP then the Holmes' law of necessary reality* [tm] says that your code or your processor must be malfunctioning. You were right on the malfunctioning. As Mr. Segio pointed out, I corrected the error in my code. To eliminate frequent jumping in my display readings, I learnt that I must sample the ADC readings and take an average of the same. Hence, I averaged 256 samples with 1ms delay between them. I see that my display is stable now. I dont get any junk characters on my display since I have controlled the code section. However, when I lift my probe out of the water, I see that my amplifier is amplifying all noise signals and sending them to the PIC. It takes a lot of time for the PIC to read '0000'. I have added a 0.1uF capacitor and a 10uF capacitor between the PIC input and opamp output. Since I have a 1K capacitor, could this act as a RC filter combination? As you had suggested, I am going to gain access to an oscilloscope and check the op-amp signals. Sairam ________________________________ From: Russell McMahon To: Microcontroller discussion list - Public. Sent: Mon, March 22, 2010 6:24:46 PM Subject: Re: [PIC] ORP problem > Before getting reduced to zero, my voltage values are shooting upto those values which is not possible If it is not possible, then is there any way for it to NOT be a code problem? :-) (Actually, yes, but unlikely - eg the PIC could be behaving badly eg as may happen if you bias its pins badly as per prior discussions). Looking at the voltages being measured with an oscilloscope (as already suggested) is a very easy way to see if what is being reported is anything like what is happening. But, if your display shows strange characters or if the circuit does not reach the voltages shown by the uP then the Holmes' law of necessary reality* [tm] says that your code or your processor must be malfunctioning. R * After you have eliminated the impossible, what remains, no matter how improbable, must be reality. (The trick is in determining the bounds of "impossible"). i.e While getting reduced to 0 from 225mV, I am reading values as high as 300 or 400mV. This cannot happen when my opamp input behavior is normal. Can I attribute coding errors for the same? > > Sairam > > > ________________________________ > From: Russell McMahon > To: Microcontroller discussion list - Public. > Sent: Sun, March 21, 2010 1:18:38 PM > Subject: Re: [PIC] ORP problem > > Sairam, > > pH probe impedances are in the 10's to 100's of megohms, maybe 1000 > megohms, so signals induced into the probe leads cab be expected to > need considering. would expect the result might easily be much as you > describe. > > It depends in part on how your probe behaves when it only has target > solution on random parts of its exterior. If probe impedance rises > when it is not fully immersed then induced signals in the probe leads > may be significant. Placing a meter at the input is quite likely to > make a difference. A 10 Mohn input resistance meter could swamp your > probe and even a 100 Mohm input R meter may cause major problems. > > Measuring at Vsense (IC3 pin1 ) is safer. An oscilloscope on Vsense > should show you if the signal is stable. > > Op amp input bias current is 20 pA so may not be an issue - although > with a 1000 MOhn probe it would be noticeable. > eg 20 E-12 x E9 ohm = 20 mV. > So if the probe resistance varies greatly from immersed to 'in air' > then it could cause problems. > > Having the display show "/" indicates software problems unless you are > applying "/" volts at the time :-) > > > > > Russell McMahon > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > > > > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist