กลับหน้าหลัก
views
How to Use Arduino MAX31865 with PT100/PT1000 Temperature Sensor
Last updated on

How to Use Arduino MAX31865 with PT100/PT1000 Temperature Sensor


How to Use Arduino MAX31865 with PT100/PT1000 Temperature Sensor

This guide explains how to connect the MAX31865 RTD-to-Digital Converter module with Arduino to measure temperature using PT100 or PT1000 sensors. These are Platinum Resistance Temperature Detector (RTD) sensors known for high accuracy, suitable for industrial applications and laboratory use.

Required Components

  • Arduino UNO R3 with USB cable
  • MAX31865 PT100/PT1000 RTD-to-Digital Converter Board (3.3V/5V compatible)
  • PT100 or PT1000 Temperature Sensor Probe
  • Power Adapter 9V 2A for external power
  • Breadboard MB-102 830 Point
  • Jumper wires: Male-to-Male, Male-to-Female, Female-to-Female (20cm)

Wiring MAX31865 to Arduino

Wiring diagram showing Arduino UNO R3 connected to MAX31865 module with SPI pins (CS, SDI, SDO, CLK) and power connections labeled

Connect Arduino UNO R3 to MAX31865 as follows

Arduino UNO R3MAX31865
GNDGND
5VVIN
Pin 10CS
Pin 11SDI
Pin 12SDO
Pin 13CLK

Connecting PT100/PT1000 to MAX31865

Close-up diagram of MAX31865 terminal block showing F-, F+, 2-Wire/3-Wire positions with red and blue wire colors for PT100 connection

For PT100 Temperature Sensor connection to MAX31865

MAX31865PT100 Probe
F-Blue wire
F+Red wire (any one)
F+Red wire (second wire)

Preparing the MAX31865 Board

Before using MAX31865, you need to prepare the board

  1. Scrape the middle trace above position number 24 on the board
  2. Solder the 2/3Wire jumper position
  3. Solder positions numbered 3 and 4
MAX31865 board diagram highlighting solder points (2/3Wire, 3, 4) and the trace that needs to be scraped

This preparation is critical. Without these steps, the circuit will be incomplete and readings will fail.

Installing Adafruit MAX31865 Library

Download the library from Adafruit or install via Arduino Library Manager by searching “Adafruit MAX31865”

Manual installation steps

  1. Download the ZIP file from GitHub
  2. Extract using WinRAR or WinZip
  3. Move the extracted folder to Documents/Arduino/libraries/
  4. Restart Arduino IDE

Arduino Code Example for MAX31865

#include <Adafruit_MAX31865.h>

// Define SPI pins
#define CS_PIN   10
#define MOSI_PIN 11
#define MISO_PIN 12
#define CLK_PIN  13

// Create MAX31865 object
// Adafruit_MAX31865 max31865 = Adafruit_MAX31865(CS_PIN);

// Note: Modify RTD type in Adafruit_MAX31865.h
// - For PT100: #define MAX31865_RTD_NOMINAL 100
// - For PT1000: #define MAX31865_RTD_NOMINAL 1000

// Calibration values for PT100 (standard)
#define RREF      430.0   // Reference resistor value (check your board)
#define RTD_NOMINAL 100.0 // Change to 1000.0 for PT1000

Adafruit_MAX31865 max31865 = Adafruit_MAX31865(CS_PIN);

void setup() {
  Serial.begin(115200);
  Serial.println("Arduino MAX31865 PT100/PT1000 Temperature Reading");

  // Initialize SPI communication with MAX31865
  // Use MAX31865_2WIRE, MAX31865_3WIRE, or MAX31865_4WIRE based on wiring
  if (!max31865.begin(MAX31865_3WIRE)) {
    Serial.println("MAX31865 not found. Check wiring!");
    while (1) delay(10);
  }
  Serial.println("MAX31865 initialized successfully");
}

void loop() {
  // Read RTD raw value
  uint16_t rtd = max31865.readRTD();

  // Calculate temperature
  float temperature = max31865.temperature(RTD_NOMINAL, RREF);

  // Display raw RTD value and temperature
  Serial.print("RTD Raw Value: ");
  Serial.println(rtd);

  Serial.print("Temperature: ");
  Serial.print(temperature, 2);
  Serial.println(" *C");

  // Check and display fault status
  uint8_t fault = max31865.readFault();
  if (fault) {
    Serial.print("Fault 0x");
    Serial.println(fault, HEX);
    if (fault & MAX31865_FAULT_HIGHTHRESH) {
      Serial.println("RTD High Threshold");
    }
    if (fault & MAX31865_FAULT_LOWTHRESH) {
      Serial.println("RTD Low Threshold");
    }
    if (fault & MAX31865_FAULT_REFINLOW) {
      Serial.println("REFIN- > 0.85 x Rail");
    }
    if (fault & MAX31865_FAULT_REFINHIGH) {
      Serial.println("REFIN- < 0.85 x Rail - REFINT > 0.85");
    }
    if (fault & MAX31865_FAULT_RTDINLOW) {
      Serial.println("RTDIN- < 0.85 x Rail");
    }
    if (fault & MAX31865_FAULT_OVUV) {
      Serial.println("Overvoltage/Undervoltage Fault");
    }
    max31865.clearFault();
  }

  Serial.println();
  delay(1000);
}

Code Usage Notes:

  • For PT1000, change RTD_NOMINAL to 1000.0
  • Select correct mode: MAX31865_2WIRE, MAX31865_3WIRE, or MAX31865_4WIRE to match your wiring
  • The RREF value (reference resistor) should match the resistor on your MAX31865 board (commonly 430.0 Ω)

Uploading Code and Viewing Results

  1. Open Arduino IDE and paste the code above
  2. Select Board as Arduino UNO
  3. Select the correct Port
  4. Click Upload
  5. After uploading, open Serial Monitor
  6. Set Baud Rate to 115200
  7. Temperature values will display every 1 second

Testing Temperature Measurement

Place the PT100 Temperature Probe in warm or hot water. The temperature value shown in Serial Monitor will change according to the actual water temperature.

Key Takeaways

  • MAX31865 converts RTD signals to digital with high precision and stability, better than using standard Analog input
  • Always solder all required jumper positions on the board before use
  • Match the code settings to your sensor type (PT100 or PT1000)
  • Temperature range: -200°C to +850°C depending on PT100 Probe specifications

Reference Video

https://www.youtube.com/embed/P4mhz9S5GVM

อยากทำโปรเจคแบบนี้?

รับทำโปรเจค Arduino / IoT จบงานไว ส่งงานครบ พร้อมสอน

If you need Arduino project service or urgent IoT development, see full service details on the home page

จ้างทำโปรเจคเลย

ประเมินราคาอัตโนมัติ + Reference Code

ขอให้ AI ประเมินราคาโปรเจคนี้

กรอกข้อมูลให้ครบ ระบบจะสร้างรหัสอ้างอิงและประเมินราคา/ระยะเวลาคร่าว ๆ จากรายละเอียดงาน แล้วให้กด Add LINE พร้อมพิมพ์รหัสนี้เพื่อคุยต่อ

คำถามให้ AI ประเมินแม่นขึ้น

หลังส่งฟอร์ม ระบบจะโชว์ Reference Code ให้ copy แล้วกด Add LINE เพื่อคุยต่อ ข้อมูลส่วนตัวจะไม่ถูกส่งเข้า GA4

ความคิดเห็น

รีวิวจากคนใช้งานจริง

รีวิวจากลูกค้าและคนที่เคยใช้งาน

ถ้าเคยสั่งงาน เคยอ่านหน้านี้แล้วได้ประโยชน์ หรือมีข้อเสนอแนะ ฝากรีวิวไว้ได้เลย

กำลังโหลดรีวิว...