PH BNC Probe, Instrumentation Amp, Crazy readings

Hi All

I am a good coder, bu new to electronics. Please help me with this....

I have a PH probe. It's a 2 wire off a BNC connector.
I have a MAX 4209 Instrumentation Amp. It's 8 pin.
Pins I am using....
8 VDD - arduino +5v. This is off a nano extension board
4 VSS - arduino Gnd. This is off a nano extension board
2 probe + (no connection to arduino +, not powered separately.)
3 probe - (no connection to arduino gnd)
7 analogue sensor to arduino

1 - RefIn. I am using a 10k voltage divider centred here. from VDD and VSS
5 I have to arduino ground through 0.1uf - possibly wrong
6 I have to arduino ground through 0.1uf - possibly wrong

My readings are all over the place. No difference if the probe is connected or not. No difference in liquid used for probe.
Please help me get this working.

Post a schematic diagram (NOT a Fritzing) of the circuit.

Also it would help to post your code. (Formatted with indents and placed between code tags.)

Hi,
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Can you please post a copy of your sketch, using code tags?
They are made with the </> icon in the reply Menu.
See section 7 http://forum.arduino.cc/index.php/topic,148850.0.html

Thanks.. Tom..... :slight_smile:

Hi All

Here is an attempt at a sketch.

Code is a very simple readaalogue. Here is it...

#include <Wire.h>
#include "MicroLCD.h"
#include "AM2320.h"

LCD_SH1106 lcd;  // enable for larger OLED
#define SerialDebug Serial
//---
AM2320 th;
int inPin = A0;
int minval=1025;
int maxval=-10;
int lastValback=-2;
//------------------------------------------------------------------------------------
void setup()
{
SerialDebug.begin(9600);
SerialDebug.println("---------------- starting setup");
lcd.begin();
pinMode(inPin, INPUT);
//--
SerialDebug.println("---------------- setup complete");
}
//------------------------------------------------------------------------------------
void loop() // water is 7.8ph, coffee is 5.2ph
{
char OLEDinfo[20];

int valback = analogRead(inPin);

if (maxval<valback)
  {
  maxval=valback;
  sprintf(OLEDinfo,"%d%s",maxval,"  ");SetDisplayUp(0,3,"Max Value",OLEDinfo);
  }
if (minval>valback)
  {
  minval=valback;
  sprintf(OLEDinfo,"%d%s",minval,"  ");SetDisplayUp(0,4,"Min Value",OLEDinfo);
  }
if (lastValback!=valback)
  {
  lastValback=valback;
  sprintf(OLEDinfo,"%d%s",valback,"  ");SetDisplayUp(0,1,"Value back",OLEDinfo);
  }
SerialDebug.println(valback);
}
//------------------------------------------------------------------------------------
void SetDisplayUp(uint8_t XP,uint8_t YP,char* Info, char* value)
{
lcd.setFontSize(FONT_SIZE_SMALL);
lcd.setCursor(XP,YP);
lcd.print(Info);
lcd.print(" : ");
lcd.print(value);
}
//------------------------------------------------------------------------------------

Here is a screen shot of the output from the Arduino serial plotter
You can see it's all over the place. There is no delay() function used, so it's is an as-fast-as real time plotting.

Just a side note.
I am putting together a system to measure
EC - electrical conductivity
PH
TDS - Total dissolved solids
Redox - reduction-oxidation
temp
... all for water. I have BNC probes for all of these. I'll have to find a way to clean the probes. I'm told that you should switch current to AC for a short while every now and then which will clean the probes - haven't tried.

So, getting the PH reading right is important as I want to use the same technique for the rest of the probes. I really would love a London based expert to join me... hopeful.

Other probes that could be added are calcium, magnesium, sodium cloride - water hardness.

In the end it will be a cool way to test water for all kinds of applications. I'm a really good coder ... but electronics for me is a new one.

Best regards
Dean

Do you have a multimeter?

Hi,
If you remove the PH sensor from the 4209 and short the 4209 inputs together, what do you get as output?
Also what do you get if you gnd both inputs?

Do you have any specs for this PH sensor.
I think there is a lot more involved than just connecting an instrumentation amplifier.

Thanks..... Tom.... :slight_smile:

Hi,
Just found this if its a help.
Surprised you hadn't googled.

https://www.youtube.com/watch?v=1x_1Rzn6WWw

http://www.australianrobotics.com.au/sites/default/files/datasheet-p-0010.pdf

Interesting they manage to use single ended amps, the last link is the most informative.

Tom... :slight_smile:

2 probe + (no connection to arduino +, not powered separately.)
3 probe - (no connection to arduino gnd)

This won't work. The input is floating and will violate the common mode input voltage range specification.
An amp with a gain of 100 is a poor choice.

Try TomGeorge's third link, but for a person who is new to electronics, you've picked quite a challenging project!

TomGeorge:
Do you have any specs for this PH sensor.
I think there is a lot more involved than just connecting an instrumentation amplifier.

I was thinking the same thing.

I'm a chemist I do a lot of pH testing. I once looked into making my own pH meter. The instruction included warnings about never touching some of the chips used since the skin oils would provide a path to ground.

Once you have a working pH meter, there's a lot involved in calibrating the meter. pH electrodes wear out like batteries. They will often last a year or so but depending on how they're treated can last a few months.

No problem to build an interface for that probe, if you are comfortable with the design and construction of amplifiers with 1 gigaOhm input impedance!

Hi All

Thanks for your feedback. That has helped.

@Tom

  • I traced the youtube,code etc for the BNC shield. It's no longer available as PracticalMaker is offline. I stalked Andrew and hopefully he can share his schema. I did find this schema for the board - no idea what App opens it.
  • I looked for specs on the PH probe off ebay.. All I found that could help is "Internal Resistance: ≤250MΩ"
  • I did short the BNC inputs together and also grounded them - results in pic attached.

@mikb55

  • Yes, I have a multimeter

@jremington

  • I read somewhere another person had a ground problem. That's why I made the ground point in the text. Do you have a suggestion on how to fix that please.
  • It was adafruit who suggested the MAX4209 to me. they gave me some suggestions but.. outcome not good.
  • That pdf is a fantastic suggestion. It uses a LM35. Are you able to draw a quick diagram on how to connect with that please, or is it all in that diagram?

I can add that I can buy a solution board for 20 bucks, but that throws the cost of the project out. I really need to be able to build a circuit for all BNC connections. I know there are guys out there that could fix this in their sleep. I'm just not one of them.

Best regards
Dean

is it all in that diagram?

There are two outputs, Temperature and Vph+512mV. Those would go to two analog inputs. Don't forget to connect the grounds.

Have someone who knows what they are doing make and assemble a PCB for you, and it must be scrupulously clean (not even a fingerprint). Otherwise you are just wasting your time. From that PDF:

With such a low input-bias current, any PCB parasitic-leakage current which reaches the input pins of the device could have a significant adverse effect on system accuracy. The LMP7721 amplifier minimizes this effect with a special pinout that isolates the amplifier’s input from the power supply and output pins. As Figure 5 shows, this unique pinout makes it easy to guard the LMP7721 amplifier’s input and achieve optimal system performance.

Hi jremington

I've taken a look at the circuitry. It uses the LMP7721 as the amplifier chip, and it needs 2 of them. They sell for around 20GBP each which is too much.

Do you think I could use the MAX4209 in its place, or , I'll have to keep investigating.

Best regards
Dean

It really depends on how accurately you want to measure the pH, or are just experimenting.

The technical difficulties are such that an amateur at electronics will be hard pressed to make a pH meter that will do more than indicate acidic or basic.

I would not be surprised if you discovered that the probe you have was not worth the postage.

Hi All

I have found a solution.
for PH make this
for EC make this
and I'm sure I'll find the rest on DFrobot too.

The price for the components should be about 4 GBP. I don't understand the schemas, but I can make them and they even come with sample code.

Thanks everyone for your input.

Regards
Dean