pH monitor hack?

I managed to cobble this sketch together with some much appreciated help with 'if'. I soon realized that getting Arduino to recognize a pH probe and display the value on an LCD was way over my head, not to mention calibrating the probe with Arduino.

So, I wondered if it might be doable to feed the Arduino from my Pinpoint pH monitor.

I pulled the circuit out of the Pinpoint pH monitor and checked all the LCD connections with my DMM, hoping to find one that displayed the same thing as what's on the LCD. But I thought that maybe I'm missing something...

Anyway, I wondered if I could get an opinion as to whether something like this might be feasible.

[int pHpin = A7;
  float pHvalue = 0;

  unsigned long hoursInMs(int h)  
{  
  return h*3600000UL;         //values will be expressed in hours 
 
}

  long minutesInMs(int m){ 
  return m*60000L;           //values will be expressed in minutes 
 
} 

  long secondsInMs(int s){ 
  return s*1000L;            //values will be expressed in seconds
} 

 
 void setup() 
{  
  pinMode(A7, INPUT);       // pin A7 connected to pH probe
  pinMode(7, OUTPUT);       // pin 7 controls mixing pump
  pinMode(8, OUTPUT);       // pin 8 controls kalk slurry
  pinMode(9, OUTPUT);       // pin 9 controls washing soda
  pinMode(10, OUTPUT);      // pin 10 controls calcium chloride
}


  void loop() 
{
 int reading = analogRead(pHpin);  // read pH sensor

 pHvalue = 8.3;                    // convert to pH value

 if( pHvalue < 8.3 )            // if pH is 8.3 or higher, kalk slurry will not be added and mixing pump will not turn on
{

 
  digitalWrite(8, LOW);     // turn kalk slurry dosing pump off
  digitalWrite(9, LOW);     // turn washing soda dosing pump off
  digitalWrite(10, LOW);    // turn calcium chloride dosing pump off
  digitalWrite(7, HIGH);    // turn mixing pump on using a NO relay
  delay(secondsInMs(3));    // let mixing pump run for 20 seconds, or long enough to create kalk slurry    
  digitalWrite(7, LOW);     // turn mixing pump off
  delay(secondsInMs(3));    // leave mixing pump off for 30 seconds to allow any solid chunks to fall to the bottom of container
  
  digitalWrite(8, HIGH);    // turn kalk slurry dosing pump on using a second NO relay      
  delay(secondsInMs(3));    // let kalk slurry dosing pump run only briefly to prevent a precipitation event
  digitalWrite(8, LOW);     // turn kalk slurry dosing pump off 
  delay(secondsInMs(3));    // leave kalk slurry dosing pump off briefly to allow slurry to dissipate
  
  digitalWrite(8, HIGH);    // same as above, this just spreads out the kalk slurry.      
  delay(secondsInMs(3));
  digitalWrite(8, LOW);   
  delay(secondsInMs(3));
 
  digitalWrite(8, HIGH);    // same as above.      
  delay(secondsInMs(3));
  digitalWrite(8, LOW);
  delay(secondsInMs(3));

  digitalWrite(8, HIGH);    // almost same as above.      
  delay(secondsInMs(3));
  digitalWrite(8, LOW);      
  delay(secondsInMs(3));    // in 5 minutes, the dosing series continues

                            
}
 

  digitalWrite(7, LOW);       // turn mixing pump off
  digitalWrite(8, LOW);       // turn kalk slurry dosing pump off   
  digitalWrite(10, LOW);      // turn calcium chloride dosing pump off
  digitalWrite(9, HIGH);      // turn washing soda dosing pump on using a third NO relay
  delay(secondsInMs(3));      // dose washing soda for 5 seconds   
  digitalWrite(9, LOW);       // turn washing soda dosing pump off 
  delay(secondsInMs(3));      // wait 5 minutes before next dose
 

  digitalWrite(7, LOW);       // turn mixing pump off
  digitalWrite(8, LOW);       // turn kalk slurry dosing pump off
  digitalWrite(9, LOW);       // turn washing soda dosing pump off
  digitalWrite(10, HIGH);     // turn calcium chloride dosing pump on using a fourth NO relay
  delay(secondsInMs(3));      // dose calcium chloride for 5 seconds
  digitalWrite(10, LOW);      // turn calcium chloride dosing pump off 
  delay(hoursInMs(6));        // wait 6 hours before starting at the top with a new dosing series. 

  
  }
/code]

The LCD will have a driver circuit to drive each segment. This would be meaningless to your Arduino.

I doubt you will be able to find somewhere useful with a circuit diagram.

Weedpharma

I don't get the point of this, especially since 'reading' is never used anywhere in your code and 'phValue' cannot possibly be less than 8.3:-

void loop()
{
 int reading = analogRead(pHpin);  // read pH sensor

 pHvalue = 8.3;                    // convert to pH value

 if( pHvalue < 8.3 )            // if pH is 8.3 or higher, kalk slurry will not be added and mixing pump will not turn on
{
.
.
.

Do you have any evidence that the pH meter has an output port?
If not, it will be difficult to impossible to add an Arduino compatible one.

Is it your intention to use the Pinpoint probe? Or a different sensor? It might not matter, not sure.

The Arduino will never 'recognise' a sensor :wink:

Maybe the below will help

http://www.aliexpress.com/w/wholesale-arduino-ph.html

Found using the images while googling for ph sensor arduino.

"This would be meaningless to your Arduino." "it will be difficult to impossible to add an Arduino compatible one."

weedpharma and jremington, not what I wanted to hear, but I guess using my existing pH monitor to send a signal to Arduino is a no go. Thanks for pointing that out.

OldSteve, I manually set the pH value at 8.3 to see if the 'if' function worked-it does. The idea is for the Arduino to be able to know when pH is getting too high, at which point no more kalk will be added to the tank. IDK the answer to your code question, but somehow Arduino will need to 'read' the pH probe.

sterretje, I had no idea there was a pH module available for Arduino, that looks like the ticket! Thank You! pH probes seem to be universal in use and most have a BNC connector, as does that Arduino pH module.

Other than G and V+, that module has Po, Do and To connection points. Would those go to a LCD?

A pH probe outputs a voltage - a low voltage - from minus half a volt to plus half a volt. You could certainly make an amplifier circuit that would translate this to the 0-5 volt range that you could use with an Arduino. But it's way more complicated than just hooking up a LCD to the probe! :o

You will want to read the voltage from the probe (or more correctly, from your amplifier) on an analog input pin, then use the pins you need to display data on the LCD. Look for a tutorial or example of displaying numeric data on an LCD.

Never looked into the Pinpoint meters circuit, but if it has an op amp before its main controller chip then you might be able to take a signal out from that, however you will have to ensure you do not get false readings if your connection 'loads' the signal

Alternativlely you could make your own PH op amp circuit, many out there, some work, some ... here's my stand alone PH amplifier I did some years ago, designed with a Pic micro in mind but will work fine on a 5v Arduino ADC pin

Be aware that the quality of ph probes varies, the genuine Pinpoint one quiet good, the old saying, you gets what you pays for.

PH_Amplifier(1).pdf (730 KB)

Hi,
Do you have a ph probe?
It will need significant signal conditioning, unless you use a complete ph measuring unit that outputs a ttl, or analog signal that can be interpreted by the arduino.

I suggest you research ph meters and their interfaces, cost, and maintenance and how to calibrate them.
Some are designed for handheld, intermittent only operation, others for continuous immersion continuous measurement.
Tom... :slight_smile:

TomGeorge, I have a pH probe on the way. It's the one sold by BRS-it has a double junction-hopefully it will hold up for awhile. I've used the Pinpoint probe with no complaints. So, I'm somewhat familiar with pH probes, but never used one to control anything.

ChrisTenone, I'll look into a tutorial for LCD. Is that pic you? I wanna stay on your good side! ricky101, I'll try to become a little familiar with an op amp and see if I can find one in the Pinpoint monitor. Wow, if you created that schematic and it works, does not look 101 to me.

Thanks all.

That is indeed me in all my gorey ... er, glory.