Forum Software Ferduino code PH meter V1.1 DFRobot Calibration

PH meter V1.1 DFRobot Calibration


Post Number:#1 Post Wed Jan 11, 2017 2:55 pm
Posts: 31
Topics: 9
Solve rating: 0
Joined: Tue Jan 10, 2017 2:19 pm
Topics: 9
Age: 41
Gender: None specified
National Flag:
Brazil
How can i calibrate my ph meter, its on 0ph solution, but shows me 14,70... i tried to rotate de potentiometer fixed on de meter but its do not work
i see another post
viewtopic.php?f=24&t=71
but i recived na error code

Post Number:#2 Post Wed Jan 11, 2017 3:05 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

There no support for this module here.

Try this wiki: https://goo.gl/8ENA4q

Before post anything here check what you wrote, this topic linked haven't anything related with pH meter.
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 Sun Apr 02, 2017 6:16 pm
Posts: 31
Topics: 9
Solve rating: 0
Joined: Tue Jan 10, 2017 2:19 pm
Topics: 9
Age: 41
Gender: None specified
National Flag:
Brazil
How i make ph meter v1.1 DFRobot Works in Ferduino with web control?

i have already do this...

// Comment the line below if you haven't a stamp for tank pH.
#define USE_STAMP_FOR_TANK_PH // Comente esta linha se você não tem um "stamp" para o pH do aquário.

but i dont´t know where conect the pins and if i need to change something in the code

Post Number:#4 Post Sun Apr 02, 2017 9:38 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

There no support for this module here.


Check this topic, maybe can help:

viewtopic.php?p=1550#p1550
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 Tue Apr 11, 2017 11:12 am
Posts: 31
Topics: 9
Solve rating: 0
Joined: Tue Jan 10, 2017 2:19 pm
Topics: 9
Age: 41
Gender: None specified
National Flag:
Brazil
Now, I,m usind the ferduino with webcontrol but i,m having some problems with the code
I copy this code to a new tab, just change the line "sensorPin A14" because i,m using this pin to the sensor

/*
 # This sample code is used to test the pH meter V1.1.
 # Editor : YouYou
 # Date   : 2014.06.23
 # Ver    : 1.1
 # Product: analog pH meter V1.1
 # SKU    : SEN0161
*/
#define SensorPin A14            //pH meter Analog output to Arduino Analog Input 2
#define Offset 0.00            //deviation compensate
#define LED 13
#define samplingInterval 20
#define printInterval 800
#define ArrayLenth  40    //times of collection
int pHArray[ArrayLenth];   //Store the average value of the sensor feedback
int pHArrayIndex=0;   
void setup(void)
{
  pinMode(LED,OUTPUT); 
  Serial.begin(9600); 
  Serial.println("pH meter experiment!");    //Test the serial monitor
}
void loop(void)
{
  static unsigned long samplingTime = millis();
  static unsigned long printTime = millis();
  static float pHValue,voltage;
  if(millis()-samplingTime > samplingInterval)
  {
      pHArray[pHArrayIndex++]=analogRead(SensorPin);
      if(pHArrayIndex==ArrayLenth)pHArrayIndex=0;
      voltage = avergearray(pHArray, ArrayLenth)*5.0/1024;
      pHValue = 3.5*voltage+Offset;
      samplingTime=millis();
  }
  if(millis() - printTime > printInterval)   //Every 800 milliseconds, print a numerical, convert the state of the LED indicator
  {
  Serial.print("Voltage:");
        Serial.print(voltage,2);
        Serial.print("    pH value: ");
  Serial.println(pHValue,2);
        digitalWrite(LED,digitalRead(LED)^1);
        printTime=millis();
  }
}
double avergearray(int* arr, int number){
  int i;
  int max,min;
  double avg;
  long amount=0;
  if(number<=0){
    Serial.println("Error number for the array to avraging!/n");
    return 0;
  }
  if(number<5){   //less than 5, calculated directly statistics
    for(i=0;i<number;i++){
      amount+=arr[i];
    }
    avg = amount/number;
    return avg;
  }else{
    if(arr[0]<arr[1]){
      min = arr[0];max=arr[1];
    }
    else{
      min=arr[1];max=arr[0];
    }
    for(i=2;i<number;i++){
      if(arr[i]<min){
        amount+=min;        //arr<min
        min=arr[i];
      }else {
        if(arr[i]>max){
          amount+=max;    //arr>max
          max=arr[i];
        }else{
          amount+=arr[i]; //min<=arr<=max
        }
      }//if
    }//for
    avg = (double)amount/(number-2);
  }//if
  return avg;
}



after that, in ferduino code, comment this line

//const byte dosadora6 = 68; // A14;     // Bomba dosadora 6



//
// Comment this two lines below if have not stamps
// Comente as duas linhas abaixo se não tiver stamps
//#define STAMPS_V4X     // Comente esta linha para usar Stamps EZO
//#define STAMPS_EZO     // Descomente esta linha para usar Stamps EZO


and add this line

#define SensorPin A14            //pH meter Analog output to Arduino Analog Input 14
#define Offset 0.00            //deviation compensate
int pHArray[10];   //Store the average value of the sensor feedback
int pHArrayIndex = 0;   
float pHValue;
unsigned long samplingTime = 0;
unsigned long samplingTime1 = 0;
byte samples = 0;



and have code error message
Last edited by Fernando Garcia on Tue Apr 11, 2017 11:59 am, edited 1 time in total.
Reason: Please use the tags [code][/code] to post a code.

Post Number:#6 Post Tue Apr 11, 2017 12:05 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

There no support for this module here.
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 Tue Apr 11, 2017 1:52 pm
Posts: 31
Topics: 9
Solve rating: 0
Joined: Tue Jan 10, 2017 2:19 pm
Topics: 9
Age: 41
Gender: None specified
National Flag:
Brazil
hello, in ferduino, i used this topic http://www.ferduino.com/forum/viewtopic.php?f=8&t=220 and it Works perfectly

but now, i´m trying to put the code in ferduino webcontrol , but i can´t find this lines

boolean Stamps = true;
to change it to false

so i coment the lines

after that, in ferduino code, comment this line

//
// Comment this two lines below if have not stamps
// Comente as duas linhas abaixo se não tiver stamps
//#define STAMPS_V4X     // Comente esta linha para usar Stamps EZO
//#define STAMPS_EZO     // Descomente esta linha para usar Stamps EZO


but i have a error message in Ferduinoweb that i didn´t have in the commom ferdunio code

Post Number:#8 Post Tue Apr 11, 2017 3:05 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

There no support for this module here. This module is not in my part list. Please don't create more topics about this module.
Post your doubts on forum because it can help another user too. Just PM me for support if it's absolutely necessary.




Return to Ferduino code





Who is online

Users viewing this topic: No registered users and 1 guest

cron