Forum Software Ferduino code How to calibrate ph et orp probe

How to calibrate ph et orp probe  [SOLVED]


Post Number:#1 Post Thu Oct 16, 2014 4:37 pm
Posts: 92
Topics: 10
Solve rating: 0
Joined: Sat May 17, 2014 9:03 am
Topics: 10
Age: 43
Gender: None specified
National Flag:
France
Hi Fernando

My probe don't work with FerduinoMega, but it's work with test code.
The leds of multiplexer move only at startup.

Post Number:#2 Post Thu Oct 16, 2014 5:01 pm
Posts: 1699
Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm
Topics: 38
Age: 39
Location: São Paulo
Gender: Male
National Flag:
Brazil

Hi!

The topic's title and your question are incompatibles.

In the tab "Ferduino" change:

boolean Stamps = false;


to:

boolean Stamps = true;


You can calibrate the probes using the example to send the commands following the stamp's datasheet.

Best regards.
Post your doubts on forum because it can help another user too. Just PM me for support if it's absolutely necessary.

Post Number:#3 Post Thu Oct 16, 2014 5:12 pm
Posts: 92
Topics: 10
Solve rating: 0
Joined: Sat May 17, 2014 9:03 am
Topics: 10
Age: 43
Gender: None specified
National Flag:
France
Because i had two questions.

i have always changed stamp to true. but it don't work

i read the atlas scientific sample code and it's difficult to apply it with the ferduino mega

Post Number:#4 Post Thu Oct 16, 2014 5:21 pm
Posts: 1699
Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm
Topics: 38
Age: 39
Location: São Paulo
Gender: Male
National Flag:
Brazil

I'm talking about the example available on forum.

const int multiplexadorS0Pin = 16; // S0
const int multiplexadorS1Pin = 17; // S1

String inputstring = "";                                                       
String sensorstring = "";                                                     
boolean input_stringcomplete = false;                                       
boolean sensor_stringcomplete = false;
int index = 0;
char inData[2];

void setup()
{                                                       
  Serial.begin(38400);                                             
  Serial3.begin(38400);                                               
  inputstring.reserve(5);                                               
  sensorstring.reserve(30);                                             
  pinMode(multiplexadorS0Pin, OUTPUT);
  pinMode(multiplexadorS1Pin, OUTPUT);

  Serial.println("To communication with the stamp of PH of the tank enter: y0");

  Serial.println("To communication with the stamp of PH of the reactor enter: y1");

  Serial.println("To communication with the stamp of ORP enter: y2");

  Serial.println("To communication with the stamp of EC enter: y3");

  Serial.println("To clear the channel opened enter: 00");
}

void serialEvent()
{                                                       
  char inchar = (char)Serial.read();                           
  inputstring += inchar;                                     
  inData[index] = inchar;
  index++;

  if((inData[0] == 'y') && (inData[1] == '0'))
  {
    digitalWrite(multiplexadorS0Pin, LOW);
    digitalWrite(multiplexadorS1Pin, LOW);
    Serial.println("Channel for PH of the tank is opened.");
    inData[0] = '9';
    inData[1] = '9';
  }
  if((inData[0] == 'y') && (inData[1] == '1'))
  {
    digitalWrite(multiplexadorS0Pin, HIGH);
    digitalWrite(multiplexadorS1Pin, LOW);
    Serial.println("Channel for PH of the reactor is opened.");
    inData[0] = '9';
    inData[1] = '9';
  }
  if((inData[0] == 'y') && (inData[1] == '2'))
  {
    digitalWrite(multiplexadorS0Pin, LOW);
    digitalWrite(multiplexadorS1Pin, HIGH);
    Serial.println("Channel for ORP is opened.");
    inData[0] = '9';
    inData[1] = '9';
  }
  if((inData[0] == 'y') && (inData[1] == '3'))
  {
    digitalWrite(multiplexadorS0Pin, HIGH);
    digitalWrite(multiplexadorS1Pin, HIGH);
    Serial.println("Channel for EC is opened.");
    inData[0] = '9';
    inData[1] = '9';
  }
  if((inData[0] == '0') && (inData[1] == '0'))
  {
    Serial3.flush();
    Serial.println("Clean.");
    inData[0] = '9';
    inData[1] = '9';
  }
  if(inchar == '\r')
  {
    input_stringcomplete = true;
  }               
}

void loop()
{                                                                   
  if (input_stringcomplete)
  {                                                   
    Serial3.print(inputstring);                                           
    inputstring = "";                                                       
    input_stringcomplete = false;                                                                         
    index = 0;
  }

  while (Serial3.available())
  {                                             
    char inchar = (char)Serial3.read();                                 
    sensorstring += inchar;                                             
    if (inchar == '\r')
    {
      sensor_stringcomplete = true;
    }                   
  }

  if (sensor_stringcomplete)
  {                                                 
    Serial.print(sensorstring);                                             
    sensorstring = "";   
    sensor_stringcomplete = false;                                         
    Serial.println("");
  }
}


Your stamp have a new version, so need change the commands here:

https://github.com/FernandoGarcia/Fedui ... mps.ino#L7

https://github.com/FernandoGarcia/Fedui ... s.ino#L121

My code works until V4.x.
Post your doubts on forum because it can help another user too. Just PM me for support if it's absolutely necessary.

Post Number:#5 Post Thu Oct 16, 2014 5:36 pm
Posts: 92
Topics: 10
Solve rating: 0
Joined: Sat May 17, 2014 9:03 am
Topics: 10
Age: 43
Gender: None specified
National Flag:
France
i have test with this example and it's work but no calibrated.

i have always modified my code


Open_channel(ph1);
    Serial3.print(tempC); //Para se obter um valor compensado pode-se enviar um valor de temperatura da água.
    Serial3.print('\r');
    delay(500);
    Serial3.print("r");
    Serial3.print('\r');
    delay(500);


-------------------------------- Last edited Thu Oct 16, 2014 9:46 pm --------------------------------

with the example code i select channel with y0 y1 y2 y3


send the "s" command to calibrate to a pH of 7.00
send "f" command to calibrate to a pH of 4.00
void t_cal(){
send the "t" command to calibrate to a pH of 10.00
send the "X" command to factory reset the device
send the "I" command to query the information
L1 for leds on
L0 for leds off

but when i send that , on return i have "*er"

:-\

Post Number:#6 Post Thu Oct 16, 2014 5:59 pm
Posts: 1699
Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm
Topics: 38
Age: 39
Location: São Paulo
Gender: Male
National Flag:
Brazil

What's the version of your stamp?
Post your doubts on forum because it can help another user too. Just PM me for support if it's absolutely necessary.

Post Number:#7 Post Thu Oct 16, 2014 6:12 pm
Posts: 92
Topics: 10
Solve rating: 0
Joined: Sat May 17, 2014 9:03 am
Topics: 10
Age: 43
Gender: None specified
National Flag:
France
i have the lastest version.

i found the good command for calibrate

38400bauds and select " carriage return"


Cal,clear<CR>
(If the response code is enabled, the EZO™ class circuit will respond “*OK<CR>”)
There is no other output associated output with this command.
Cal,mid,X.XX<CR>
(If the response code is enabled, the EZO™ class circuit will respond “*OK<CR>”)
The LED will turn Cyan during the calibration.
Cal,low,X.XX<CR>
(If the response code is enabled, the EZO™ class circuit will respond “*OK<CR>”)
The LED will turn Cyan during the calibration.
Cal,high,XX.XX<CR>
(If the response code is enabled, the EZO™ class circuit will respond “*OK<CR>”)
The LED will turn Cyan during the calibration.
Cal,?<CR>
(If the response code is enabled, the EZO™ class circuit will respond “*OK<CR>”)
If not calibrated: ?CAL,0
If single point calibration: ?CAL,1
If two point calibration: ?CAL,2
If three point calibration: ?CAL,3


and my stamp are calibrated.

-------------------------------- Last edited Thu Oct 16, 2014 10:44 pm --------------------------------

I do not have the DO stamp , the code must be changed it in this case?

Thank you

Post Number:#8 Post Fri Oct 17, 2014 2:48 am
Posts: 92
Topics: 10
Solve rating: 0
Joined: Sat May 17, 2014 9:03 am
Topics: 10
Age: 43
Gender: None specified
National Flag:
France
HI Fernando!

I have PH EZO

I haven't Ph5.0
Thank You

Post Number:#9 Post Fri Oct 17, 2014 8:23 am
Posts: 1699
Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm
Topics: 38
Age: 39
Location: São Paulo
Gender: Male
National Flag:
Brazil

Post your doubts on forum because it can help another user too. Just PM me for support if it's absolutely necessary.

Post Number:#10 Post Fri Oct 17, 2014 9:55 am
Posts: 92
Topics: 10
Solve rating: 0
Joined: Sat May 17, 2014 9:03 am
Topics: 10
Age: 43
Gender: None specified
National Flag:
France
Ok i make change in code, the leds of shutdown but value of ph are not good, can you watch my code please :

void parametros()
{
  int i;
  do{
    Open_channel(ph1);
    Serial3.print("T,"); //Para se obter um valor compensado pode-se enviar um valor de temperatura da água.
    Serial3.print(tempC);
    Serial3.print('\r');
    delay(500);
    Serial3.print("R\r");
    delay(500);
   
    if(Serial3.available() > 3)
    {
      holding = Serial3.available();
      for(i=1; i <= holding; i++)
      {
        sensorstring[i]= Serial3.read();
      }

      if(holding ==5)
      {
        PHT = ((sensorstring[1]-48)*100 + (sensorstring[3]-48)*10 + (sensorstring[4]-48));
        PHA = PHT/100;
      }
      else
      {
        PHT = ((sensorstring[1]-48)*1000 + (sensorstring[2]-48)*100 + (sensorstring[4]-48)*10 + (sensorstring[5]-48));
        PHA = PHT/100;
      } 
      PHT=0;
      Serial3.flush();
      break;
    }
  }
  while (done==1);
  done=0;

  do{
    Open_channel(ph2);
    Serial3.print("T,"); //Para se obter um valor compensado pode-se enviar um valor de temperatura da água.
    Serial3.print(tempC);
    Serial3.print('\r');
    delay(500);
    Serial3.print("R\r");
    delay(500);

    if(Serial3.available() > 3)
    {
      holding = Serial3.available();
      for(i=1; i <= holding; i++)
      {
        sensorstring[i]= Serial3.read();
      }
      if(holding ==5)
      {
        PHT = ((sensorstring[1]-48)*100 + (sensorstring[3]-48)*10 + (sensorstring[4]-48));
        PHR = PHT/100;
      }
      else
      {
        PHT = ((sensorstring[1]-48)*1000 + (sensorstring[2]-48)*100 + (sensorstring[4]-48)*10 + (sensorstring[5]-48));
        PHR = PHT/100;
      } 
      PHT=0;
      Serial3.flush();
      break;
    }

  }
  while (done==1);
  done=0;

  do{
    Open_channel(orp);
    Serial3.print("R\r");
    delay(500);

    if(Serial3.available() > 3)
    {
      holding = Serial3.available();
      for(i=1; i <= holding; i++)
      {
        sensorstring[i]= Serial3.read();
      }

      ORPT = ((sensorstring[1]-48)*100 + (sensorstring[2]-48)*10 + (sensorstring[3]-48));
      ORP = ORPT;
      ORPT=0;
      Serial3.flush();     
      break;
    }
  }
  while (done==1);
  done=0;
/*
  do{
    Open_channel(ec);
    Serial3.print(tempC); //Para se obter um valor compensado pode-se enviar um valor de temperatura da água.
    Serial3.print('\r');
    delay(500);
    if(Serial3.available() > 3)
    {
      Serial.print("Densidade:");
      holding = Serial3.available();
      for(i=1; i <= 15; i++)
      {
        sensorstring[i]= Serial3.read();
        Serial.print(sensorstring[i]);
      }
      Serial.println();
      Serial3.flush();
      break;
    } 
  }
  while (done==1);
  done=0;
*/
}

void iniciar_stamps()
{
    Open_channel(ph1);
  delay(50);
  Serial3.print("C,0"); // Envia um comando para que o "stamp" pare de enviar as leituras.
  Serial3.print('\r');
  delay(1000);
  Serial3.flush();
  Serial3.print("L,0"); // Envia um comando para que o "stamp" apague o led de depuração.
  Serial3.print('\r');
  delay(1000);
  Open_channel(ph2);
  delay(50);
  Serial3.print("C,0"); // Envia um comando para que o "stamp" pare de enviar as leituras.
  Serial3.print('\r');
  delay(1000);
  Serial3.flush();
  Serial3.print("L,0"); // Envia um comando para que o "stamp" apague o led de depuração.
  Serial3.print('\r');
  delay(1000);
  Open_channel(orp);
  delay(50);
  Serial3.print("C,0"); // Envia um comando para que o "stamp" pare de enviar as leituras.
  Serial3.print('\r');
  delay(1000);
  Serial3.flush();
  Serial3.print("L,0"); // Envia um comando para que o "stamp" apague o led de depuração.
  Serial3.print('\r');
  delay(1000);   
  /*Open_channel(ec);
  delay(50);
  Serial3.print("e"); // Envia um comando para que o "stamp" pare de enviar as leituras.
  Serial3.print('\r');
  delay(1000);
  Serial3.flush();
  Serial3.print("L,0"); // Envia um comando para que o "stamp" apague o led de depuração.
  Serial3.print('\r');
  delay(1000); */
  parametros(); // Verifica os "stamps".
}

void Open_channel(short channel)
{
  switch (channel)
  {
  case 0:
    //open channel Y0
    //S0=0
    //S1=0
    digitalWrite(multiplexadorS0Pin, LOW);
    digitalWrite(multiplexadorS1Pin, LOW);
    break;

  case 1:
    //open channel Y1
    //S0=1
    //S1=0
    digitalWrite(multiplexadorS0Pin, HIGH);
    digitalWrite(multiplexadorS1Pin, LOW);
    break;

  case 2:
    //open channel Y2
    //S0=0
    //S1=1
    digitalWrite(multiplexadorS0Pin, LOW);
    digitalWrite(multiplexadorS1Pin, HIGH);
    break;

 /* case 3:
    //open channel Y3
    //S0=1
    //S1=1
    digitalWrite(multiplexadorS0Pin, HIGH);
    digitalWrite(multiplexadorS1Pin, HIGH);
    break; */
  }
  Serial3.print('\r');
  return;
}

Post Number:#11 Post Fri Oct 17, 2014 6:52 pm
Posts: 1699
Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm
Topics: 38
Age: 39
Location: São Paulo
Gender: Male
National Flag:
Brazil

In "void iniciar_stamps()" after:

  Serial3.print('\r');
  delay(1000);


Add:

  Serial3.print(RESPONSE,0); //  Disable response code
  Serial3.print('\r');
  delay(1000);


Here:

      for(i=1; i <= holding; i++)
      {
        sensorstring[i]= Serial3.read();
      }


You can replace with it to see what the stamp is sending.

      for(i=1; i <= holding; i++)
      {
        sensorstring[i]= Serial3.read();
        Serial.print(sensorstring[i]);
      }
     Serial.println();


Change:

delay(500);


To:

delay(1000);


In all places.
Post your doubts on forum because it can help another user too. Just PM me for support if it's absolutely necessary.

Post Number:#12 Post Fri Oct 17, 2014 7:18 pm
Posts: 92
Topics: 10
Solve rating: 0
Joined: Sat May 17, 2014 9:03 am
Topics: 10
Age: 43
Gender: None specified
National Flag:
France
Hi Fernando :-h

i do it and in the serial monitor, i have this:

*ER
*ER
*ER
*ER
7.514
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
*ER
0.000

*ER
234.3


i haven't probe on Ph2 (0.00)


My code "stamps" is this
void parametros()
{
  int i;
  do{
    Open_channel(ph1);
    Serial3.print("T,"); //Para se obter um valor compensado pode-se enviar um valor de temperatura da água.
    Serial3.print(tempC);
    Serial3.print('\r');
    delay(1000);
    Serial3.print("R\r");
    delay(1000);
   
    if(Serial3.available() > 3)
    {
      holding = Serial3.available();
      for(i=1; i <= holding; i++)
      {
        sensorstring[i]= Serial3.read();
        Serial.print(sensorstring[i]);
      }
      Serial.println();

      if(holding ==5)
      {
        PHT = ((sensorstring[1]-48)*100 + (sensorstring[3]-48)*10 + (sensorstring[4]-48));
        PHA = PHT/100;
      }
      else
      {
        PHT = ((sensorstring[1]-48)*1000 + (sensorstring[2]-48)*100 + (sensorstring[4]-48)*10 + (sensorstring[5]-48));
        PHA = PHT/100;
      } 
      PHT=0;
      Serial3.flush();
      break;
    }
  }
  while (done==1);
  done=0;

  do{
    Open_channel(ph2);
    Serial3.print("T,"); //Para se obter um valor compensado pode-se enviar um valor de temperatura da água.
    Serial3.print(tempC);
    Serial3.print('\r');
    delay(1000);
    Serial3.print("R\r");
    delay(1000);

    if(Serial3.available() > 3)
    {
      holding = Serial3.available();
      for(i=1; i <= holding; i++)
      {
        sensorstring[i]= Serial3.read();
        Serial.print(sensorstring[i]);
      }
      Serial.println();
      if(holding ==5)
      {
        PHT = ((sensorstring[1]-48)*100 + (sensorstring[3]-48)*10 + (sensorstring[4]-48));
        PHR = PHT/100;
      }
      else
      {
        PHT = ((sensorstring[1]-48)*1000 + (sensorstring[2]-48)*100 + (sensorstring[4]-48)*10 + (sensorstring[5]-48));
        PHR = PHT/100;
      } 
      PHT=0;
      Serial3.flush();
      break;
    }

  }
  while (done==1);
  done=0;

  do{
    Open_channel(orp);
    Serial3.print("R\r");
    delay(1000);

    if(Serial3.available() > 3)
    {
      holding = Serial3.available();
      for(i=1; i <= holding; i++)
      {
        sensorstring[i]= Serial3.read();
        Serial.print(sensorstring[i]);
      }
      Serial.println();

      ORPT = ((sensorstring[1]-48)*100 + (sensorstring[2]-48)*10 + (sensorstring[3]-48));
      ORP = ORPT;
      ORPT=0;
      Serial3.flush();     
      break;
    }
  }
  while (done==1);
  done=0;
/*
  do{
    Open_channel(ec);
    Serial3.print(tempC); //Para se obter um valor compensado pode-se enviar um valor de temperatura da água.
    Serial3.print('\r');
    delay(1000);
    if(Serial3.available() > 3)
    {
      Serial.print("Densidade:");
      holding = Serial3.available();
      for(i=1; i <= 15; i++)
      {
        sensorstring[i]= Serial3.read();
        Serial.print(sensorstring[i]);
      }
      Serial.println();
      Serial3.flush();
      break;
    } 
  }
  while (done==1);
  done=0;
*/
}

void iniciar_stamps()
{
    Open_channel(ph1);
  delay(50);
  Serial3.print("C,0"); // Envia um comando para que o "stamp" pare de enviar as leituras.
  Serial3.print('\r');
  delay(1000);
  Serial3.flush();
  Serial3.print("L,0"); // Envia um comando para que o "stamp" apague o led de depuração.
  Serial3.print('\r');
  delay(1000);
  Serial3.print("RESPONSE,0"); //  Disable "RESPONSE" code
  Serial3.print('\r');
  delay(1000);
  Open_channel(ph2);
  delay(50);
  Serial3.print("C,0"); // Envia um comando para que o "stamp" pare de enviar as leituras.
  Serial3.print('\r');
  delay(1000);
  Serial3.flush();
  Serial3.print("L,0"); // Envia um comando para que o "stamp" apague o led de depuração.
  Serial3.print('\r');
  delay(1000);
  Serial3.print("RESPONSE,0"); //  Disable "RESPONSE" code
  Serial3.print('\r');
  delay(1000);
  Open_channel(orp);
  delay(50);
  Serial3.print("C,0"); // Envia um comando para que o "stamp" pare de enviar as leituras.
  Serial3.print('\r');
  delay(1000);
  Serial3.flush();
  Serial3.print("L,0"); // Envia um comando para que o "stamp" apague o led de depuração.
  Serial3.print('\r');
  delay(1000);
  Serial3.print("RESPONSE,0"); //  Disable "RESPONSE" code
  Serial3.print('\r');
  delay(1000); 
  /*Open_channel(ec);
  delay(50);
  Serial3.print("e"); // Envia um comando para que o "stamp" pare de enviar as leituras.
  Serial3.print('\r');
  delay(1000);
  Serial3.flush();
  Serial3.print("L,0"); // Envia um comando para que o "stamp" apague o led de depuração.
  Serial3.print('\r');
  delay(1000); */
  parametros(); // Verifica os "stamps".
}

void Open_channel(short channel)
{
  switch (channel)
  {
  case 0:
    //open channel Y0
    //S0=0
    //S1=0
    digitalWrite(multiplexadorS0Pin, LOW);
    digitalWrite(multiplexadorS1Pin, LOW);
    break;

  case 1:
    //open channel Y1
    //S0=1
    //S1=0
    digitalWrite(multiplexadorS0Pin, HIGH);
    digitalWrite(multiplexadorS1Pin, LOW);
    break;

  case 2:
    //open channel Y2
    //S0=0
    //S1=1
    digitalWrite(multiplexadorS0Pin, LOW);
    digitalWrite(multiplexadorS1Pin, HIGH);
    break;

 /* case 3:
    //open channel Y3
    //S0=1
    //S1=1
    digitalWrite(multiplexadorS0Pin, HIGH);
    digitalWrite(multiplexadorS1Pin, HIGH);
    break; */
  }
  Serial3.print('\r');
  return;
}


Thank you

Post Number:#13 Post Fri Oct 17, 2014 7:45 pm
Posts: 1699
Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm
Topics: 38
Age: 39
Location: São Paulo
Gender: Male
National Flag:
Brazil

Try fix the code to a stamp first.

Comment out all functions to others stamps.

Check the datasheet.

A list of response codes

*ER An unknown command has been sent


Replace:

Serial3.print("R\r");


With:

    Serial3.print("R");
    Serial3.print('\r');
Post your doubts on forum because it can help another user too. Just PM me for support if it's absolutely necessary.

Post Number:#14 Post Fri Oct 17, 2014 8:20 pm
Posts: 92
Topics: 10
Solve rating: 0
Joined: Sat May 17, 2014 9:03 am
Topics: 10
Age: 43
Gender: None specified
National Flag:
France
i have change that and i have tested most code, with the example code when i put "R" the stamp just return 7.35.

~x(

I removed line for "T,tempC", same problem,

i don't found the bad command that returning these errors.

Post Number:#15 Post Mon Oct 20, 2014 4:21 pm
Posts: 1699
Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm
Topics: 38
Age: 39
Location: São Paulo
Gender: Male
National Flag:
Brazil

Before:

  Open_channel(ph2);


Add this:

   Serial.println("Debug pH 1:");
    while(Serial3.available())
    {
      Serial.print(Serial3.read());
     }
     Serial.println();


Tell me if shows something during the setup.
Post your doubts on forum because it can help another user too. Just PM me for support if it's absolutely necessary.

Post Number:#16 Post Mon Oct 20, 2014 4:28 pm
Posts: 92
Topics: 10
Solve rating: 0
Joined: Sat May 17, 2014 9:03 am
Topics: 10
Age: 43
Gender: None specified
National Flag:
France
i recieve that on the serial monitor at startup :

Debug pH 1:
426982134279751342797513

it's same at all startup

Thank you

Post Number:#17 Post Mon Oct 20, 2014 4:46 pm
Posts: 1699
Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm
Topics: 38
Age: 39
Location: São Paulo
Gender: Male
National Flag:
Brazil

Try this:

Serial.print(char(Serial3.read()));


Instead:

Serial.print(Serial3.read());
Post your doubts on forum because it can help another user too. Just PM me for support if it's absolutely necessary.

Post Number:#18 Post Mon Oct 20, 2014 4:56 pm
Posts: 92
Topics: 10
Solve rating: 0
Joined: Sat May 17, 2014 9:03 am
Topics: 10
Age: 43
Gender: None specified
National Flag:
France
Serial.print(char(Serial3.read()));


Debug pH 1:
*ER
*OK

Post Number:#19 Post Mon Oct 20, 2014 5:13 pm
Posts: 1699
Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm
Topics: 38
Age: 39
Location: São Paulo
Gender: Male
National Flag:
Brazil

In "void iniciar_stamps()" after each "delay(1000);" add the debug so you find where's the problem.

Is better put:

  Serial3.print("RESPONSE,0"); //  Disable "RESPONSE" code
  Serial3.print('\r');
  delay(1000);


After:

  delay(50);
Post your doubts on forum because it can help another user too. Just PM me for support if it's absolutely necessary.

Post Number:#20 Post Mon Oct 20, 2014 5:23 pm
Posts: 92
Topics: 10
Solve rating: 0
Joined: Sat May 17, 2014 9:03 am
Topics: 10
Age: 43
Gender: None specified
National Flag:
France
I have that:

Debug pH 1:
*ER

Open_channel(ph1);
  delay(50);
  Serial3.print("RESPONSE,0"); //  Disable "RESPONSE" code
  Serial3.print('\r');
  delay(1000);
  Serial3.print("C,0"); // Envia um comando para que o "stamp" pare de enviar as leituras.
  Serial3.print('\r');
  delay(1000);
  Serial3.print("L,1"); // Envia um comando para que o "stamp" apague o led de depuração.
  Serial3.print('\r');
  delay(1000);
  Serial.println("Debug pH 1:");
    while(Serial3.available())
    {
      Serial.print(char(Serial3.read()));
     }
     Serial.println();


In the datasheet, atlas scientific wrote:
3. After powering up the EZO™ class pH circuit when it is in UART mode the fi rst
command sent to it will comeback as an error. This is because the UART buffer will show
that it has received a character during power up. Simply send a blank character to the pH
circuit after it is powered up, this will clear the buffer. "

Next



Return to Ferduino code





Who is online

Users viewing this topic: No registered users and 1 guest

cron