How to read industrial motor temperature with PT100 and ESP32
Learn how to integrate high-precision industrial PT100 temperature sensors with the ESP32 microcontroller to monitor motor health safely and accurately.
Summary
- High-precision analog signal conversion requires specialized frontend converter boards like the MAX31865.
- Electrical isolation using optical couplers prevents electromagnetic noise from destroying the microcontroller.
- Circuit calibration compensates for parasitic resistances present in long industrial wiring runs.
- Wireless communication protocols make it easy to transmit temperature data to central servers.
- Continuous temperature reading prevents catastrophic failures in motors exposed to severe thermal overloads.
Why monitor motor temperature with PT100 sensors?
electric motors operate under severe thermal stress conditions, which can degrade winding insulation and cause unplanned downtime on the production line. In industrial environments, maintaining rigorous control over internal temperature and equipment casing ensures the reliability of the manufacturing process. When the temperature rises beyond safe limits, the risk of burnout increases dramatically, generating substantial financial losses.
to capture these thermal variations accurately, engineers rely on the PT100 sensor, a platinum resistance thermometer whose electrical resistance changes predictably as temperature fluctuates. In practice, this means we measure the electrical resistance of the sensor to find out exactly how many degrees Celsius the motor is reaching. Compared to common thermocouples, the PT100 offers superior stability and excellent linearity, making it the gold standard for high-reliability industrial monitoring.
The challenges of connecting industrial sensors to microcontrollers
although the ESP32 is a fantastic microcontroller with built-in Wi-Fi, Bluetooth, and a low price point, it was designed for low-voltage logic and lacks native inputs to read sensitive resistances in an isolated manner. Attempting to connect a PT100 directly to the ESP32's analog pins results in inaccurate readings heavily affected by electrical noise. Noise generated by variable frequency drives and neighboring motors easily corrupts sensitive analog signals.
furthermore, the electrical resistance of the wires connecting the sensor to the microcontroller can alter the final reading if appropriate wiring isn't used. To solve this structural problem, we need an intermediate circuit capable of converting the resistive variation of the PT100 into a clean and stable digital signal. To optimize your factory measurement infrastructure, it is worth checking our guide on how to read 4-20mA industrial sensors with ESP32 safely, which covers complementary hardware protection techniques.
Choosing the right converter for your project
the ideal component to intermediate the reading of a PT100 and send it to the ESP32 is the MAX31865 integrated circuit. This specialized chip handles all the heavy engineering: it measures the sensor's resistance using a precise excitation current, converts the analog value into digital data, and communicates with the ESP32 via the SPI protocol, a high-speed synchronous interface for communication between microcontrollers and peripherals.
the MAX31865 supports two, three, and four-wire configurations. In practice, three or four-wire cabling is highly recommended in industrial environments because it automatically subtracts the electrical resistance of long cables, ensuring the displayed value reflects only the true temperature of the motor. To consolidate collected data on the factory floor and send it to real-time monitoring systems, you can also explore the techniques discussed in how to use MQTT to integrate industrial sensors locally.
Wiring diagram and functional code for the ESP32
to get the system running on the bench, we need to connect the MAX31865 module to the standard SPI pins of the ESP32. The official Adafruit_MAX31865 library drastically simplifies temperature reading by automatically calculating the platinum Callendar-Van Dusen calibration curve. Below is a practical example of functional code to collect temperature data with stability:
#include <Adafruit_MAX31865.h>\n\n// SPI pin configuration for MAX31865\nAdafruit_MAX31865 max = Adafruit_MAX31865(15, 23, 19, 18);\n\n// Nominal resistance of PT100 at 0°C\n#define RREF 430.0\n#define RNOMINAL 100.0\n\nvoid setup() {\n Serial.begin(115200);\n max.begin(MAX31865_3WIRE); // Configuration for 3-wire sensor\n Serial.println("PT100 sensor initialized successfully!");\n}\n\nvoid loop() {\n uint16_t rtd = max.readRTD();\n float temperature = max.temperature(RNOMINAL, RREF);\n \n Serial.print("Current motor temperature: ");\n Serial.print(temperature);\n Serial.println(" °C");\n \n delay(2000);\n}Be sure to double-check physical connections and test board continuity before powering the circuit in the field. If you notice instability in readings during commissioning, check for loose wires or electromagnetic interference near the conductors. To explore these architectural concepts further in production, see our related technical analysis on Schottky diode shorted? How to test on graphics cards.
Final considerations on reliability and preventive maintenance
integrating industrial PT100 sensors into the ESP32 proves that it is possible to build robust and economical monitoring systems without relying exclusively on expensive proprietary PLCs. The combination of proper hardware, software filtering, and shielded cabling results in a highly reliable solution to protect industrial motors against chronic overheating. With this data at hand, your maintenance team gains precious time to act before unexpected production line stoppages occur.