Hallo zusammen.
Ich versuche seit Tagen mit einem Arduino Nano und einem MAX31855K
Temperaturen zu messen. Der Fühler ist ebenfalls ein K-Typ. An meinem
Multimeter zeigt er die richtige Temperatur an.
Der Sketch ist der Beispiel-Sketch von Adafruit.
1 | /***************************************************
|
2 | This is an example for the Adafruit Thermocouple Sensor w/MAX31855K
|
3 |
|
4 | Designed specifically to work with the Adafruit Thermocouple Sensor
|
5 | ----> https://www.adafruit.com/products/269
|
6 |
|
7 | These displays use SPI to communicate, 3 pins are required to
|
8 | interface
|
9 | Adafruit invests time and resources providing this open source code,
|
10 | please support Adafruit and open-source hardware by purchasing
|
11 | products from Adafruit!
|
12 |
|
13 | Written by Limor Fried/Ladyada for Adafruit Industries.
|
14 | BSD license, all text above must be included in any redistribution
|
15 | ****************************************************/
|
16 |
|
17 | #include <SPI.h>
|
18 | #include "Adafruit_MAX31855.h"
|
19 |
|
20 | // Default connection is using software SPI, but comment and uncomment one of
|
21 | // the two examples below to switch between software SPI and hardware SPI:
|
22 |
|
23 | // Example creating a thermocouple instance with software SPI on any three
|
24 | // digital IO pins.
|
25 | #define MAXDO 3
|
26 | #define MAXCS 4
|
27 | #define MAXCLK 5
|
28 |
|
29 | // initialize the Thermocouple
|
30 | Adafruit_MAX31855 thermocouple(MAXCLK, MAXCS, MAXDO);
|
31 |
|
32 | // Example creating a thermocouple instance with hardware SPI
|
33 | // on a given CS pin.
|
34 | //#define MAXCS 10
|
35 | //Adafruit_MAX31855 thermocouple(MAXCS);
|
36 |
|
37 | void setup() {
|
38 | while (!Serial); // wait for Serial on Leonardo/Zero, etc
|
39 |
|
40 | Serial.begin(9600);
|
41 |
|
42 | Serial.println("MAX31855 test");
|
43 | // wait for MAX chip to stabilize
|
44 | delay(500);
|
45 | }
|
46 |
|
47 | void loop() {
|
48 | // basic readout test, just print the current temp
|
49 | Serial.print("Internal Temp = ");
|
50 | Serial.println(thermocouple.readInternal());
|
51 |
|
52 | double c = thermocouple.readCelsius();
|
53 | if (isnan(c)) {
|
54 | Serial.println("Something wrong with thermocouple!");
|
55 | } else {
|
56 | Serial.print("C = ");
|
57 | Serial.println(c);
|
58 | }
|
59 | //Serial.print("F = ");
|
60 | //Serial.println(thermocouple.readFarenheit());
|
61 |
|
62 | delay(1000);
|
63 | }
|
Als Ergebnis kommt dies dabei rum:
Internal Temp = -56.00
C = -931.75
Internal Temp = 97.00
C = -64.00
Internal Temp = -62.00
C = -505.75
Internal Temp = -80.00
C = -387.75
Internal Temp = -96.00
C = -124.75
Internal Temp = -100.00
C = -1087.25
Internal Temp = 32.00
C = -1262.25
Internal Temp = 0.00
C = -1146.25
Internal Temp = 0.00
C = -1166.50
Internal Temp = -58.00
C = -1063.25
Internal Temp = -64.00
C = -1043.75
Im Anhang sind der Schaltplan und ein paar Bilder.
Kann mir da einer helfen?
Kalli