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
Connect Arduino UNO R3 to MAX31865 as follows
| Arduino UNO R3 | MAX31865 |
|---|---|
| GND | GND |
| 5V | VIN |
| Pin 10 | CS |
| Pin 11 | SDI |
| Pin 12 | SDO |
| Pin 13 | CLK |
Connecting PT100/PT1000 to MAX31865
For PT100 Temperature Sensor connection to MAX31865
| MAX31865 | PT100 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
- Scrape the middle trace above position number 24 on the board
- Solder the 2/3Wire jumper position
- Solder positions numbered 3 and 4
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
- Download the ZIP file from GitHub
- Extract using WinRAR or WinZip
- Move the extracted folder to
Documents/Arduino/libraries/ - 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_NOMINALto1000.0 - Select correct mode:
MAX31865_2WIRE,MAX31865_3WIRE, orMAX31865_4WIREto match your wiring - The
RREFvalue (reference resistor) should match the resistor on your MAX31865 board (commonly 430.0 Ω)
Uploading Code and Viewing Results
- Open Arduino IDE and paste the code above
- Select Board as Arduino UNO
- Select the correct Port
- Click Upload
- After uploading, open Serial Monitor
- Set Baud Rate to 115200
- 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
อยากทำโปรเจคแบบนี้?
รับทำโปรเจค Arduino / IoT จบงานไว ส่งงานครบ พร้อมสอน
If you need Arduino project service or urgent IoT development, see full service details on the home page
จ้างทำโปรเจคเลย