Modifications

Sauter à la navigation Sauter à la recherche
2 963 octets ajoutés ,  16 janvier 2014 à 20:56
aucun résumé de modification
Ligne 6 : Ligne 6 :  
== MAX6675/MAX31855 ==
 
== MAX6675/MAX31855 ==
   −
[[Fichier:Thermocouple-20.jpg|480px]]
+
{{ADFImage|Thermocouple-20.jpg|480px}}
    
Si vous envisagez utiliser un MAX6675/MAX31855, il y a un peu plus de tâches à réaliser. Pour commencer GND et Vin doivent être connectés sur une source d'alimentation de 3 à 5V.  
 
Si vous envisagez utiliser un MAX6675/MAX31855, il y a un peu plus de tâches à réaliser. Pour commencer GND et Vin doivent être connectés sur une source d'alimentation de 3 à 5V.  
Ligne 32 : Ligne 32 :  
== Librairie Arduino ==
 
== Librairie Arduino ==
   −
If you have an older MAX6675 breakout, [http://github.com/adafruit/MAX6675-library download the MAX6675 Arduino library code] by going to the github page and clicking Download Source. Then uncompress the folder and rename it MAX6675 and install it into the library folder according to our handy tutorial.
+
Si vous disposez d'un ancien breakout MAX6675 alors [http://github.com/adafruit/MAX6675-library téléchargez la librairie Arduino pour MAX6675] en allant sur la page github et en cliquant sur "Download". Décompressez le répertoire, renommez le MAX6675 et installez le dans le répertoire des librairies. Voir aussi notre tutoriel sur l'[[Installation d'un librairie Arduino]]
   −
If you have the newer MAX31855 breakout, [https://github.com/adafruit/Adafruit-MAX31855-library download the MAX31855 Arduino library code] by going to the github page and clicking Download Source. Then uncompress the folder and rename it Adafruit_MAX31855 and install it into the library folder according to our handy tutorial.
+
Si vous disposez du nouveau breakout MAX31855 alors [https://github.com/adafruit/Adafruit-MAX31855-library téléchargez la librairie Arduino pour MAX31855] en allant sur la page github et en cliquant sur "Download". Décompressez le répertoire, renommez le MAX31855 et installez le dans le répertoire des librairies. Voir aussi notre tutoriel sur l'[[Installation d'un librairie Arduino]]
   −
Restart the Arduino IDE and open up the '''File->Examples->MAX6675/Adafruit_MAX31855->serialthermocouple''' sketch and upload it to your Arduino. Once uploaded, open up the serial port monitor to display the current temperatures in both Celsius and Fahrenheit
+
Redémarrez votre Arduino IDE et ouvrez ensuite le croquis/sketch '''Fichier->Exemples->MAX6675/Adafruit_MAX31855->serialthermocouple''' et télécharger/téléversez le sur votre Arduino.
   −
[[Fichier:Thermocouple-30.jpg]]
+
<nowiki>/***************************************************
 +
Voici un exemple pour l'amplificateur Thermocouple MAX31855
 +
d'AdaFruit avec un thermocouple Type K
   −
As you can see, its pretty simple to use the library, simply tell the sensor object what the clock, chip select and data pins are, then call readCelsius() or readFahrenheit() to get a floating point result.
+
Conçu spécificque pour fonctionner avec le senseur thermocouple
 +
disponible
 +
----> http://shop.mchobby.be/product.php?id_product=301 (MCHobby Belgique/France)
 +
----> https://www.adafruit.com/products/269 (AdaFruit USA)
 +
 
 +
Ce programme utilise SPI pour communiquer, 3 broches sont nécessaire pour
 +
l'interface.
 +
 
 +
Adafruit Investit du temps et des ressource pour fournir du code open source,
 +
s'il vous plait, supportez AdaFruit et l'Open Hardware en achetant des
 +
produit Adafruit!
 +
 
 +
MCHobby investit du temps et des ressource pour traduire les documentations
 +
d'AdaFruit en Français. C'est une tâche longue et fastidieuse.
 +
Aidez nous à produire plus de documentation en achetant vos produits
 +
AdaFruit & autres chez MCHobby.
 +
 
 +
Ecrit par Limor Fried/Ladyada pour Adafruit Industries.
 +
BSD license, tout le texte ci-dessus doit être inclus dans toutes les redistribution
 +
 
 +
Traduit par Meurisse D. pour MCHobby.be - distributeur AdaFruit France et Belgique
 +
Tout les référence MCHobby doivent également être redistribué (pour sa tâche de traduction).
 +
Tutoriel Français complet disponible sur:
 +
  http://mchobby.be/wiki/index.php?title=Senseur_Thermocouple
 +
****************************************************/
 +
 
 +
#include "Adafruit_MAX31855.h"
 +
 
 +
int thermoDO = 3;
 +
int thermoCS = 4;
 +
int thermoCLK = 5;
 +
 
 +
Adafruit_MAX31855 thermocouple(thermoCLK, thermoCS, thermoDO);
 +
 
 +
void setup() {
 +
  Serial.begin(9600);
 +
 
 +
  Serial.println("MAX31855 test");
 +
  // Attendre que le circuit MAX se stabilise.
 +
  delay(500);
 +
}
 +
 
 +
void loop() {
 +
    // Test de lecture basique, afficher simplement la température courante
 +
  Serial.print("Internal Temp = ");
 +
  Serial.println(thermocouple.readInternal());
 +
 
 +
  // Lecture en degrés Celcius
 +
  double c = thermocouple.readCelsius();
 +
  if (isnan(c)) {
 +
    Serial.println("Quelque chose ne fonctionne pas avec le thermocouple!");
 +
  } else {
 +
    Serial.print("C = ");
 +
    Serial.println(c);
 +
  }
 +
 
 +
  // Décommenter les lignes suivante pour afficher la température
 +
  // en degrés Farenheit (unité qui à cours au USA)
 +
  //Serial.print("F = ");
 +
  //Serial.println(thermocouple.readFarenheit());
 +
 +
  // Attendre une seconde
 +
  delay(1000);
 +
}</nowiki>
 +
 
 +
Ensuite, ouvrez le moniteur série pour afficher la température aussi bien en degrés Celsius qu'en degrés Fahrenheit
 +
 
 +
{{ADFImage|Thermocouple-30.jpg}}
 +
 
 +
Comme vous pouvez le constater, la librairie est vraiment simple à utiliser. Il faut seulement indiquer à la librairie quel est sont les broches "clock", "chip select" et "data" et appelé ensuite '''readCelsius()''' ou readFahrenheit() pour obtenir la valeur sous forme d'un nombre décimal.
    
== Ajouter un afficheur ==  
 
== Ajouter un afficheur ==  
   −
A common request is to have the temperature output onto a 'classic' character LCD such as the ones in this tutorial.
+
Une demande courante est d'afficher la température sur un afficheur LCD 'classic' tel que celui présenté dans ce tutoriel.
 +
 
 +
{{ADFImage|Thermocouple-40.jpg}}
 +
 
 +
Pour ce raccordement, nous avons connecté:
 +
* '''CLK''' sur la broche digital 3,
 +
* '''CS''' sur la broche digital 4
 +
* et '''DO''' sir la broche digital 5.  
 +
 
 +
Une fois que tout fonctionne, vous pouvez modifier la connexion des broches dans votre sketck/
   −
[[Fichier:Thermocouple-40.jpg]]
+
Nous disposons également d'un croquis/sketch d'exemple. Pour commencer, [[Afficheur_LCD|branchez et faite fonctionner un afficheur LCD l'aide de ce tutoriel]]. Ensuite, charger le sketch '''Fichier->Exemples->MAX31855>lcdthermocouple''' et branchez le thermocouple utilisé dans le test "serial thermocouple" ci dessus.
   −
For this wiring, we connected '''CLK''' to digital 3, '''CS''' to digital 4 and '''DO''' to digital 5. Once you get it working, you can change the pin connections in the sketch
+
Vérifiez que les déclarations de broche dans le programme correspondent bien à votre montage (modifiez le programme si necessaire) et téléchargez/téléversez le sur votre Arduino.
   −
We have an example sketch for this as well. First get the ***LINK*** LCD working by following our tutorial ***. Now load up the new sketch '''File->Examples->MAX31855>lcdthermocouple''' and plug in the thermocouple module as we did in the serial thermocouple test, you'll see the internal temperature and the thermocouple temperature displayed in Celsius
+
Vous devriez voir la température interne et celle du thermocouple s'afficher en degrés Celsius.
    
{{Thermocouple-TRAILER}}
 
{{Thermocouple-TRAILER}}
29 917

modifications

Menu de navigation