Temperature sensors - Cover image

How to measure temperature with a PLC — A practical guide using the EQSP32 IoT controller

In industrial automation, temperature is one of the most critical variables to monitor—whether you’re ensuring equipment safety, controlling environmental conditions, or optimizing process performance. Reliable temperature acquisition is essential and PLCs (Programmable Logic Controllers) offer a robust and scalable method to integrate sensing into automated systems.

The EQSP32 IoT PLC stands out by combining the reliability of traditional PLCs with the connectivity of modern IIoT systems. It natively supports NTC thermistors and is easily expandable to handle RTD PT100 sensors and K-type thermocouples through dedicated, low-cost expansion modules. This makes it a flexible and scalable solution for temperature monitoring across a wide range of industrial applications and requirements.

In this practical guide, you’ll learn how to connect and read NTC thermistors, RTD PT100 and K-type thermocouple temperature sensors using the EQSP32.

Measuring temperature with NTC thermistors.

Measuring temperature with RTD PT100 sensors.

Measuring temperature with thermocouples.

Conclusion and comparison.

Measuring temperature with NTC thermistors (TIN mode)

NTC (Negative Temperature Coefficient) thermistors are simple, low-cost temperature sensors ideal for general-purpose monitoring. As the temperature increases, the resistance of the thermistor decreases and this change can be measured as a voltage drop and correlated to a temperature value.

The EQSP32 supports NTC thermistors directly on its analog-capable pins (ADIO 1–8) using the special TIN (temperature input) mode.

View EQSP32 datasheet.

EQSP32 X1 connector with analog input support

Temperature input mode is a special analog input mode that automatically converts the measured voltage into temperature in degrees Celsius. The user must provide the beta value of the thermistor and the reference resistance in software to ensure accurate conversion.

NTC thermistor wiring

To connect an NTC thermistor to the EQSP32, wire it directly between the controller’s 5V power output (Vout) and any analog-capable ADIO pin (1–8). This setup requires no external resistors.

  • Connect one end of the thermistor to the 5Vout terminal on the EQSP32
  • Connect the other end to an analog-capable ADIO pin (e.g., pin 1)
EQSP32 industrial IoT controller - NTC thermistor / Connecting temperature sensor wiring diagram
Connect the NTC thermistor between the EQSP32’s 5Vout and one of the ADIO pins (1–8)

It is important to use the EQSP32’s on board 5V supply out as the power source of the NTC. This voltage is continuously monitored internally and used as a reference to ensure accurate temperature conversion.

Example code for NTC temperature measurement

For a hands-on example of reading an NTC thermistor using the EQSP32, refer to the official demonstration code:

View the full example on GitHub: EQSP32_TIN_Demo.ino

This example demonstrates:

  • Configuring an analog-capable ADIO pin in TIN mode.
  • Setting the thermistor’s beta value and reference resistance.
  • Reading temperature values and validating them.
  • Outputting the temperature readings via the serial monitor.

Measuring temperature with RTD PT100 sensors (EQXPT module)

RTD (Resistance Temperature Detector) sensors like the PT100 are widely used in industrial automation for their accuracy, stability, and repeatability. A PT100 sensor has a resistance of 100 ohms at 0°C and increases linearly with temperature.

The EQSP32 supports PT100 sensors via the EQXPT expansion module, which provides dedicated analog circuitry for precise temperature measurement. The module supports both 2/4-wire (PT100_24W) and 3-wire (PT100_3W) wiring configurations. For most applications, 3-wire wiring provides a good balance between accuracy and wiring simplicity.

View EQXPT datasheet.

Each module offers two RTD input channels across two terminal blocks (X1 and X2).

EQXPT02 X1 connector pinout. Screw terminals for RTD (PT100) sensor 1. Supports 2-wire, 3-wire and 4-wire PT100 sensors.
RTD PT100 channel 1 – X1 connector
EQXPT02 X2 connector pinout. Screw terminals for RTD (PT100) sensor 2. Supports 2-wire, 3-wire and 4-wire PT100 sensors.
RTD PT100 channel 2 – X2 connector

PT100 sensor wiring

To wire a 2-, 3-, or 4-wire PT100 RTD sensor, you must ensure proper connection of the excitation (I+ / I−) and measuring (M+ / M−) terminals on the EQXPT module. The internal circuit relies on these inputs to measure resistance and calculate temperature accurately.

It is important to note that for 2-wire and 3-wire configurations, certain terminals must be shorted to simulate a full 4-wire measurement and compensate for missing wires:

  • 2-wire setup: short I+ to M+ and I− to M−.
  • 3-wire setup: short I+ to M+ only.

If you’re using a shielded PT100 cable, connect the shielding wire to the GND terminal on the EQXPT input block (X1 or X2). This helps reduce interference and improves signal stability, especially in 3- and 4-wire configurations.

Use the following diagrams based on your sensor type:

2-wire PT100

EQXPT02 RTD sensor expansion module for EQSP32 Micro PLC, 2-wire PT100 sensor example wiring with optional sensor shielding. Terminals I+ and M+ must be shorted in this configuration. Similarly, I- and M- must be shorted. The 2-wire PT100 sensor is the simplest and most cost-effective option, ideal for short-distance installations where lead wire resistance is negligible. It is commonly used in non-critical applications where high accuracy is not a priority. However, lead wire resistance can introduce errors in longer cable runs, making it less suitable for precise measurements.
Simplest but least accurate. Wire resistance is included in the measurement.

3-wire PT100

EQXPT02 RTD sensor expansion module for EQSP32 Micro PLC, 3-wire PT100 sensor example wiring with optional sensor shielding. Terminals I+ and M+ must be shorted in this configuration. The 3-wire PT100 sensor is a balanced solution for moderate distances, as it compensates for lead wire resistance by using a third wire. This configuration is widely used in industrial applications where reasonable accuracy is required without the added complexity of a 4-wire setup. It is ideal for medium-accuracy systems where cost and performance need to be balanced.
Recommended for most industrial uses. One leg is shared for current and sense.

4-wire PT100

EQXPT02 RTD sensor expansion module for EQSP32 Micro PLC, 4-wire PT100 sensor example wiring with optional sensor shielding. The 4-wire PT100 sensor provides the highest accuracy by completely eliminating the effects of lead wire resistance. This configuration is essential for long-distance installations or critical applications requiring precise temperature measurements, such as laboratory environments or industrial process control. It is preferred when minimizing measurement errors is of utmost importance.
Best accuracy. No shorting required — uses separate wires for current and voltage.

Example code for PT100 temperature measurement

For a hands-on example of reading a PT100 sensor using the EQSP32 and the EQXPT expansion module, refer to the official demonstration code:

View the full example on GitHub: EQSP32_EQXPT_Demo.ino

This example demonstrates:

  • Setting the correct wiring mode (2/3/4-wire).
  • Reading temperature values from PT100 sensors.
  • Detecting open or faulted connections.
  • Outputting the readings through the serial monitor.

Measuring temperature with thermocouples (EQXTC module)

Thermocouples are widely used for high-temperature monitoring in industrial environments due to their simplicity, durability, and wide sensing range.

The EQSP32 PLC controller supports thermocouples via the EQXTC expansion module, which integrates cold-junction compensation, fault detection and analog front-end circuitry.

View EQXTC datasheet.

Each EQXTC module provides six thermocouple input channels, distributed across the two connectors X1 and X2.

EQXTC06 – Six-Channel K-type Thermocouple Sensor Expansion Module for EQSP32 Micro PLC X1 connector pinout. X1 connector illustration, showing terminals for the first three K-type thermocouples (TC1, TC2, TC3) with secure screw terminal wiring for precise temperature measurements.
EQXTC X1 connector providing inputs for thermocouple channels TC1, TC2, and TC3
EQXTC06 – Six-Channel K-type Thermocouple Sensor Expansion Module for EQSP32 Micro PLC X2 connector pinout. The X2 connector illustration featuring terminals for three additional K-type thermocouples (TC4, TC5, TC6) with easy-to-use screw terminal wiring for industrial applications.
EQXTC X2 connector providing inputs for thermocouple channels TC4, TC5, and TC6

Thermocouple sensor wiring

The EQXTC expansion module supports K-type thermocouples. Each channel includes a T+ (positive) and T− (negative) terminal. It is critical to observe correct polarity — reversed wiring will result in incorrect readings.

EQXTC06 – Six-Channel K-type Thermocouple Sensor Expansion Module for EQSP32 Micro PLC IIoT controller. Thermocouple wiring example showcasing T+ and T- terminal connections for K-type thermocouples, ensuring accurate industrial temperature measurement with fault detection and cold-junction compensation.
EQXTC thermocouple wiring example

Example code for thermocouple temperature measurement

For a hands-on example of reading a thermocouple using the EQSP32 and EQXTC expansion module, refer to the official demonstration code:

View the full example on GitHub: EQSP32_EQXTC_Demo.ino

This example demonstrates:

  • Selecting a thermocouple input channel on the EQXTC module.
  • Reading temperature values from K-type thermocouples.
  • Validating the readings using built-in fault detection.
  • Detecting open or short circuit detection.
  • Outputting temperature values via the serial monitor.

Conclusion and comparison

The EQSP32 IoT PLC provides a flexible and reliable platform for temperature monitoring across a wide range of industrial applications. It supports multiple sensor types to match varying requirements for accuracy, cost, and temperature range.

  • NTC thermistors are supported natively through TIN mode on the main controller. These sensors are cost-effective and suitable for general-purpose temperature monitoring, such as ambient or enclosure measurements, where precision is not critical.
  • RTD PT100 sensors are used with the EQXPT expansion module and offer high accuracy and long-term stability. They are well-suited for applications that require precise temperature control, including manufacturing processes, environmental monitoring, and HVAC systems. Multiple wiring options (2-, 3-, or 4-wire) allow for adaptation to the required measurement accuracy.
  • K-type thermocouples are supported via the EQXTC expansion module and are designed for high-temperature environments. They are a good choice for industrial ovens, heating systems, and other applications where ruggedness and extended temperature range are important.
FeatureNTC (TIN)PT100 (EQXPT)Thermocouple (EQXTC)
AccuracyModerateHighMedium
Temperature range−40 °C to ~125 °C−200 °C to +600 °C−200 °C to +1250 °C
CostLowMediumMedium
Expansion requiredNoYes (EQXPT)Yes (EQXTC)
Wiring complexityVery lowMedium (2/3/4-wire)Low
Typical useGeneral automationPrecision monitoringHigh-temp process control

By choosing the appropriate sensor and configuration, the EQSP32 enables scalable, accurate and industrial-grade temperature acquisition across diverse operational contexts.

To learn more about the working principles of thermocouples and RTDs, and how to choose the right one for your application, check out the following article.

Our team is always happy to assist you in finding the best solution for your automation needs.

For any questions, reach out to our support team at info@erqos.com.

Referenced products

Add a Comment

Your email address will not be published. Required fields are marked *