Using an Op-amp to collect microvoltages

You also need to do something with the unused op-amp. You can not just leave the signals unconnected. Connect the output to the inverting input and connect the other input to ground.
You will need some gain in the other op-amp before you see any reading.

The second amplifier could well be a gain block for the low level signals from the probe. Probably it will need to be. You should be able to get 1000 to 10000 voltage gains easily when driven by the low impedance of the buffer amp (the voltage follower) this means that very low resistance values can be used to keep the feedback resistor value lower (More sane as a 1M ohm input resistance would require a 10 M ohm feedback resistor for a gain of 10 and a gain to 100 could never be realized because the PCB leakage would exceed the feedback current available from a 100 M ohm resistor. There are several different things to be considered about using Op-Amps as dc gain blocks especially at the voltage and impedance (current available) from a PH Probe. I would make very very certain that the voltage for the op-Amp come from a clean well regulated source Switchers should drive linear regulators if switchers are the primary power source. The Power source must have a minimum of a 100 uF cap as well as a 1 uF and a .1uF and the .1uF cap should be right between the power pins of the Op-Amp. There are some very real possible issues here as the power source must have NO connection to GROUND whatsoever an isolated supply or batteries MUST be used if this device is intended to measure anything except a sample in an isolated ground container... like a test tube or beaker it WILL NOT FUNCTION AT ALL WELL if it's probe has any electrical connectivity to earth ground because any leakage current from the probe to ground will become a part of the measurement making returned information invalid... I spent several years designing soil conductivity moisture and Ph Meters remember Kirchhoff was there first and wrote the law about the sum of the currents.

Bob

Mike, according to the article the OP linked to, the probe output should be 59mV per ph unit, so he should be able to get readings for low ph values without amplification. On the other hand, the ph probe output is negative when the ph is higher than 7, so unless he adds an offset, he won't be able to measure high ph values.

Docedison, good point about either the measuring unit or the sample needing to be isolated from ground.

The original circuit is a follower (no gain) on dual rails. So it does not amplify the input signal. If the input signal is in the mv range, the output signal is in the mv range. For amplification of a small signal, it needs low offset voltage. It also requires the opamp to be unity gain stable.

Your set-up is not configured as the circuit you had quoted - no feedback look;

Your set-up is single rail - So it requires an opamp that can swing within mv of the ground - check the datasheet for that.

You also want to make sure that your opamp is unity gain stable - check the datasheet for that.

I think that even if you fix the wiring, your circuit will not work, for swing, and for its high offset.

If you are looking for amplification, use dual rails.

If you are looking for impedance matching, 1) remember that your adc has very high input impedance (in many cases much higher than most opamp can offer), and 2) a jfet is a better choice for single rail applications.

The op amp circuit you want for a pH probe actually involves three op amps, and is referred to an an instrumentation amplifier, or simply IA. Google it or check this out to have a read:

Hey everyone!
Thanks for the suggestions, Ive tried most of it and I think I've got the solution already

Here is what I did,
This is most stable set up I have got so far.

One thing I did was connect the ground of the arduino to the BNC ground which happens to be the metal outer jacket of the BNC connector.
It seems by doing that, I got very consistent readings.

When the pH probe was still in its buffer solution of KCl, it read around 0.00 V for many readings but after awhile there is some fluctuation.
When I took the pH probe out of its buffer, the reading became like 0.08 +- 0.05 V
I will be testing this out in my school lab on Wednesday with acids and bases to calibrate it and find out whether it is accurate.

Any ideas on how to reduce the fluctuation even further and make it more accurate?

Also, I tried Mike's suggestion of connecting the Output A and Inverting Output A together and Non inverting output A with gnd.
My chip heated up for some reason. Any ideas ?

Another thing I did was to use a 9V battery supply for the power rail and it worked well. But when I changed it back to Arduino's 5V supply, I noticed the readings were more consistent.

Thanks guys!

dc42:
Your circuit looks OK to me, with inverting output B connected to output B (you can add gain later when you haver got it working). I suggest you add a 0.1uF decoupling capacitor between the op-amp V+ and V- pins.

No real need for high-speed decoupling (0.1uF ceramic) on a standard op-amp - these are slow devices compared to digital logic. Something more like 100uF electrolytic or so somewhere close is fine to reduce noise levels on the supply (but check the manufacturers recommendations in the datasheet - they will have tested what works best)

MarkT:

dc42:
Your circuit looks OK to me, with inverting output B connected to output B (you can add gain later when you haver got it working). I suggest you add a 0.1uF decoupling capacitor between the op-amp V+ and V- pins.

No real need for high-speed decoupling (0.1uF ceramic) on a standard op-amp - these are slow devices compared to digital logic. Something more like 100uF electrolytic or so somewhere close is fine to reduce noise levels on the supply (but check the manufacturers recommendations in the datasheet - they will have tested what works best)

They may be slow devices, but some types can be unstable without decoupling capacitors.

Opamps heat up for many reasons but typically due to overloading or oscillation. Oscillation can be caused by many reasons: poor decoupling, capacitive loads, parasitics, etc.

I would start with decoupling: putting a small ceramic (11n - 110n for example) between Vcc/gnd pins. I would also put a 1k resistor on the opamp's output line. I would put a large resistor (100k - 10k, depending on your sensor) from the non-inverting input to the ground to provide a current path for the input stage, in case your sensor is ac-coupled. If you do that, also put a similarly valued resistor between the output and the inverting input.

connecting the Output A and Inverting Output A together and Non inverting output A with gnd.
My chip heated up for some reason. Any ideas ?

That's a bad practice. If you want to terminate an opamp, terminate it with a resistor, like 10k. Tying the output to gnd/vcc overloads the opamp.

Quote
connecting the Output A and Inverting Output A together and Non inverting output A with gnd.
My chip heated up for some reason. Any ideas ?

That's a bad practice. If you want to terminate an opamp, terminate it with a resistor, like 10k. Tying the output to gnd/vcc overloads the opamp.

He apparently means Inverting 'Input' A, and indicates he's got it wired as a folllower-amp with the
noninverting input tied to gnd. That's ok.

OP needs to get his terminology STRAIGHTENED OUT!

The most common cause for those parts to overheat is being plugged in backwards.

As well as what oric_dan(333) said:-

connecting the Output A and Inverting Output A together and Non inverting output A with gnd.
My chip heated up for some reason. Any ideas ?

Instead of connecting the input to ground, connect it to a mid point formed by two 1K resistors between rail and ground. That way the output will sit in the middle. It looks like the amp is not as rail to rail as you might have hoped.

Grumpy_Mike:
It looks like the amp is not as rail to rail as you might have hoped.

First para of data sheet:

The LMC662 CMOS Dual operational amplifier is ideal for
operation from a single supply. It operates from +5V to +15V
and features rail-to-rail output swing in addition to an input
common-mode range that includes ground.

rail-to-rail output swing

R2R doesn't mean the opamp can swing to the rails. Just that it will swing sufficiently close to the rails. How close it can swing to the rails is specified in the datasheet.

Hey guys!

I have recently tested out my device.

My pH probe is getting readings of 0.39V in a 1M Hydrochloric Acid. However, When I move it to an alkali, it reads nothing.
I changed the ground and signal on the pH probe and it read for the alkali around 0.5V.
Any ideas on how to get this circuit to read negative voltages? Is it a bug in my code?

*     ---------------------------------------------------------
 *     |  Arduino Experimentation Kit Example Code             |
 *     |  CIRC-10 .: Temperature :. (TMP36 Temperature Sensor) |
 *     ---------------------------------------------------------
 *   
 *  A simple program to output the current temperature to the IDE's debug window 
 * 
 *  For more details on this circuit: http://tinyurl.com/c89tvd 
 */

//TMP36 Pin Variables
int temperaturePin = 0; //the analog pin the TMP36's Vout (sense) pin is connected to
                        //the resolution is 10 mV / degree centigrade 
                        //(500 mV offset) to make negative temperatures an option

/*
 * setup() - this function runs once when you turn your Arduino on
 * We initialize the serial connection with the computer
 */
void setup()
{
  Serial.begin(9600);  //Start the serial connection with the copmuter
                       //to view the result open the serial monitor 
                       //last button beneath the file bar (looks like a box with an antenae)
}
 
void loop()                     // run over and over again
{
 float temperature = getVoltage(temperaturePin);  //getting the voltage reading from the temperature sensor
           //converting from 10 mv per degree wit 500 mV offset
                                                  //to degrees ((volatge - 500mV) times 100)
 Serial.println(temperature);                     //printing the result
 delay(1000);                                     //waiting a second
}

/*
 * getVoltage() - returns the voltage on the analog input defined by
 * pin
 */
float getVoltage(int pin){
 return (analogRead(pin) * .004882814); //converting from a 0 to 1023 digital range
                                        // to 0 to 5 volts (each 1 reading equals ~ 5 millivolts
}

Also, is there a way to make it more sensitive to read up from 0 to 5V ?

Thanks!

To increase the sensitivity, use a couple of resistors to make the op amp provide gain, See the section "Non inverting amplifier" in Operational amplifier applications - Wikipedia.

To read negative voltages, if you want to keep the probe grounded then you'll need to feed the op amp from a dual supply, e.g. +5V and -5V. You'll also need to shift the level to bring it into the 0 to 5V range. You can use the second op amp in the package to do that.

If you have a spare Arduino PWM pin, you can generate a low-current -3v supply from it using 2 diodes, 2 capacitors and a resistor. That should be enough for the op-amp.

Any ideas on how to get this circuit to read negative voltages? Is it a bug in my code?

There is no bug in the code. You can't read negitave voltages on the arduino so you have to alter the voltages to make them all fall in the range of zero to five volts as seen by the arduino like dc42 said.

What some people do to read negative voltages in a +5V only system is to use
a pullup-R to 5V on the measuring-node, and apply the negative voltage through
a series-R,

Vin -- SeriesR -- + -- pullupR -- +5V
                  |
                to ADC

To do this successfully, you would have to know the output-resistance [impedance] of
the probe. It would probably also be best to use this ckt with the opAmp in there
before the ADC.

One way to read negative voltages is to introduce a positive offset.

To increase sensitivity, you can use programmable gain amplifiers (like ad603 or regulator opamp + digital pot, or even a resistor network + mcu pins) where you can alter gains based on the input voltage.

To expand on my reply #17, here is an outline schematic. The first op amp provides a high input resistance for the probe and amplifies the signal by a factor of 6. The following resistor network level shifts the signal but also attenuates it by a factor of 2/3. The second op amp amplifies it by a factor of 1.5 to restore the signal level and use the full range of the ADC.