Wi-Fi Enabled Temperature Monitoring System with NodeMCU and MAX31865
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit is designed to measure temperature using an RTD PT100 sensor interfaced with an Adafruit MAX31865 RTD Sensor Breakout. The data is processed and displayed using a NodeMCU V3 ESP8266 microcontroller. The NodeMCU reads the temperature data from the MAX31865 and outputs it via the serial monitor.
Component List
Adafruit MAX31865 RTD Sensor Breakout
- Description: A breakout board for the MAX31865 RTD-to-Digital converter, used to interface with RTD sensors like the PT100.
- Pins: VIN, GND, 3.3V, SCLK, SDO, SDI, CS, DRDY, FORCE+, RTDIN+, RTDIN-, FORCE-
NodeMCU V3 ESP8266
- Description: A low-cost Wi-Fi microcontroller with GPIO, ADC, and serial communication capabilities.
- Pins: A0, GND, VU, S3, S2, S1, SC, S0, SK, 3V3, EN, RST, Vin, D0, D1, D2, D3, D4, D5, D6, D7, D8, RX, TX
RTD PT100
- Description: A platinum resistance temperature detector (RTD) with a resistance of 100 ohms at 0°C.
- Pins: 1, 2
Wiring Details
Adafruit MAX31865 RTD Sensor Breakout
- VIN: Connected to 3V3 of NodeMCU V3 ESP8266
- GND: Connected to GND of NodeMCU V3 ESP8266
- SCLK: Connected to D5 of NodeMCU V3 ESP8266
- SDO: Connected to D6 of NodeMCU V3 ESP8266
- SDI: Connected to D7 of NodeMCU V3 ESP8266
- CS: Connected to D8 of NodeMCU V3 ESP8266
- FORCE+: Connected to pin 2 of RTD PT100
- RTDIN+: Connected to pin 2 of RTD PT100
- RTDIN-: Connected to pin 1 of RTD PT100
- FORCE-: Connected to pin 1 of RTD PT100
NodeMCU V3 ESP8266
- 3V3: Connected to VIN of Adafruit MAX31865 RTD Sensor Breakout
- GND: Connected to GND of Adafruit MAX31865 RTD Sensor Breakout
- D5: Connected to SCLK of Adafruit MAX31865 RTD Sensor Breakout
- D6: Connected to SDO of Adafruit MAX31865 RTD Sensor Breakout
- D7: Connected to SDI of Adafruit MAX31865 RTD Sensor Breakout
- D8: Connected to CS of Adafruit MAX31865 RTD Sensor Breakout
RTD PT100
- Pin 1: Connected to RTDIN- and FORCE- of Adafruit MAX31865 RTD Sensor Breakout
- Pin 2: Connected to RTDIN+ and FORCE+ of Adafruit MAX31865 RTD Sensor Breakout
Code Documentation
sketch.ino
#include <Adafruit_MAX31865.h>
// MAX31865 pins
#define MAX_CS 8 // Chip Select
#define MAX_MOSI 7 // Master Out Slave In
#define MAX_MISO 6 // Master In Slave Out
#define MAX_CLK 5 // Clock
// Create an instance of the sensor (RTD type, wires)
Adafruit_MAX31865 max31865 = Adafruit_MAX31865(MAX_CS, MAX_MOSI, MAX_MISO, MAX_CLK);
void setup() {
Serial.begin(9600); // 115200
// Initialize the MAX31865 (2-wire PT100)
max31865.begin(MAX31865_2WIRE);
}
void loop() {
// Read temperature
float temperature = max31865.temperature(100.0, 430.0); // 100.0: PT100; 430: Reference resistance
Serial.print("Temperature: ");
Serial.print(temperature);
Serial.println(" °C");
delay(5000); // 1 second delay
}
This code initializes the MAX31865 sensor and reads the temperature from the RTD PT100 sensor. The temperature is then printed to the serial monitor every 5 seconds.