Outils pour utilisateurs

Outils du site


wiki:projets:phmconduc:brouillon

Ceci est une ancienne révision du document !


BROUILLON

bouton long court :

int btn = 13;
int U4 = 0;
int U7 = 0;
float temps1 = 0;
float temps2 = 0;

void setup()
{ 
Serial.begin(9600); 
pinMode(btn, INPUT);
}

void loop()//la fonction appelée par l'interruption
{

if (digitalRead(btn) == LOW){ //si le bouton est encore appuyé
temps1=millis();
}
else{ // s'il est relaché, il est temps de regarder le temps qu'on l'a tenu appuyé
temps2=millis();}
if (temps2 - temps1 <= 3000){
U4 = 4; //metton l'allumage de ta led
}
else{
U7 = 7;//le reset, par exemple.
}
Serial.print(U4);
Serial.print(U7);
delay(1000);

}

- établir les valeurs extrêmes de résistance

- fixer la tension

- sonde température → faire des corrections (direct dans la programmation?)

- pour la sensibilité → il faut que les deux résistances soient du meme ordre de grandeur (une fixe et une variable)

- prendre un dico et avoir toutes les conductivités et ph utiles

  • Programme intéressant
//Fonctionnement: La valeur de la tension de sortie du capteur pH 
//         se convertit en pH et s'affiche ensuite sur le moniteur série.
#define Vref 4.95
void setup()
{ 
  Serial.begin(9600);
}
void loop()
{
  int sensorValue;
  int m;
  long sensorSum;
  for(m=0;m<50;m++)
  {
    sensorValue=analogRead(A0);//Connecter le capteur de pH au port A0
    sensorSum += sensorValue;
  }
   sensorValue =   sensorSum/50;
 Serial.print(" the PH value is"); 
 Serial.println(7-1000*(sensorValue-372)*Vref/59.16/1023);

} 

http://pdf.datasheetcatalog.com/datasheet/texasinstruments/tl081.pdf

  • Protocole pour l'étalonnage (dsl c'est en anglais mais il est plutot complet et sa provient d'un site qui represente une sorte de projet, comme nous)
Calibration
To calibrate a pH meter you need two buffer solutions. Select the buffer solutions depending on the pH range that you will work. This procedure considers that you pH sensor is linear in the working range: from 1 or 2 to 10 or 12 typically. Without this range the glass electrode has deviation.

Acid or neutral solutions: pH 4 and 7 buffers.
Alkaline solutions: pH 7 and 9 or 10 buffers.
Pay attention that you can find buffer solutions with values a little bit different. Example of buffer values for pH meter calibration are 4.01, 6,86, 7.01, 9.18, 10.01, and etc. What is important is to know the correct buffer value.

You can buy bottles or sachets of ready to use buffer solutions or buy sachets of poured buffer to mix with distillated water. Buffer solutions must be maintained in a refrigerator (don´t mix with food!) and they have a life time (they can develop fungus or bacterias).

Calibration Procedure
WARNING: Take care with the glass bubble. It is fragile.

Calibration for acid or neutral range
Adjust the gain trimpot to an intermediate value.
Remove the glass electrode protection.
Wash the electrode with distillated water and dry it using a soft paper carefully.
Put the pH sensor inside of pH 7 solution (remember that can be the pH 6.86 o 7.01).
Wait for the stabilization of the signal.
Adjust the offset trimpot to the nominal buffer value.
Wash the electrode with distillated water and dry it using a soft paper carefully.
Put the pH sensor inside of pH 4 solution (remember that can be the pH 4.01).
Wait for the stabilization of the signal.
Adjust the gain trimpot to the nominal buffer value.
Wash the electrode with distillated water and dry it using a soft paper carefully.
Calibration for alkaline range
Adjust the gain trimpot to an intermediate value.
Remove the glass electrode protection.
Wash the electrode with distillated water and dry it using a soft paper carefully.
Put the pH sensor inside of pH 7 solution (remember that can be the pH 6.86 o 7.01).
Wait for the stabilization of the signal.
Adjust the offset trimpot to the nominal buffer value.
Wash the electrode with distillated water and dry it using a soft paper carefully.
Put the pH sensor inside of pH 9 solution (remember that can be the pH 9.18 or 10.01).
Wait for the stabilization of the signal.
Adjust the gain trimpot to the nominal buffer value.
Wash the electrode with distillated water and dry it using a soft paper carefully.
The pH sensor is ready to use. To read the pH of your sample, put it inside of the sample and wait for stabilization of the signal. Always wash it and dry it carefully to avoid contamination when you change the samples.

After the use, wash it and dry it with a piece of soft paper carefully, and keep it in water solution to avoid dehydration of the glass bubble and the reference electrode porous ions channel.

http://pdf.datasheetcatalog.com/datasheet/texasinstruments/tl081.pdf

int btn = 13; int U4 = 0; int U7 = 0; float temps1 = 0; float temps2 = 0; int pin = A0;

void setup() { Serial.begin(9600); pinMode(btn, INPUT); }

void loop()la fonction appelée par l'interruption { if (digitalRead(btn) == LOW){ temps1=millis(); } else{ s'il est relaché, il est temps de regarder le temps qu'on l'a tenu appuyé

temps2=millis();}

if 1){ U4 = 4; metton l'allumage de ta led } else{ U7 = 7;le reset, par exemple. } Serial.print(U4); Serial.print(';'); Serial.print(U7); Serial.print(';'); delay(1000);

1)
temps2 - temps1 ⇐ 3000) && (digitalRead(btn) == LOW
wiki/projets/phmconduc/brouillon.1427877565.txt.gz · Dernière modification: 2016/09/11 11:02 (modification externe)