MF52 - NTC thermistor

MF52 - NTC thermistor (MF52B3950)
Fig.: MF52 - NTC thermistor (MF52B3950)

The MF52 is a negative temperature coefficient (NTC) thermistor, which means its resistance decreases as temperature increases. It's a widely used temperature sensor in electronics and industrial applications due to its small size, high sensitivity, and affordability.

The MF52 thermistor is a small sensor encapsulated in epoxy resin, available in various versions. The datasheet from the respective manufacturer provides a chart that allows you to associate a specific resistance with a given temperature at defined intervals. Due to the semiconductor properties of the NTC, it is also possible to calculate the temperature.

📄 MF52 datasheet (223 kB)

Model Code Breakdown

There are a variety of specific models of the MF52 NTC thermistor with more detailed characteristics built into the name:

MF52BxxxFyyyy

Temperature calculation

Due to the semiconductor properties of the NTC, it is also possible to calculate the temperature:

Formula for calculating the temperature of the MF52 thermistor
Fig.: Formula for calculating the temperature of the MF52 thermistor

T = Temperature in Kelvin (the value you're solving for)
TN = Nominal temperature in Kelvin (= 273.15 K + 25°C = 298.15 K)
B = B-value specified by the manufacturer (here: 3950 Kelvin)
RT = Measured resistance at unknown temperature
RN = Resistance at nominal temperature (here: 100 kΩ)

Used Components

Structure and Functionality

According to the manufacturer, the MF52B3950 has a nominal resistance of 100kΩ at 25°C. In order to determine the current resistance value using the Arduino, a second fixed nominal resistor RN with 100kΩ must be connected in series with the MF52 to create a voltage divider.
The total voltage Utotal is now divided between the MF52 and the other resistor, and the resistance RT can be calculated using the voltage divider rule:

Vtotal / (100kΩ + RT) = VNTC / RT

Rearranged, this formula can now be used to calculate RT:

RT = (100kΩ * VNTC / Vtotal) / (1 - VNTC / Vtotal)

However, the Arduino does not output the voltage directly, but rather a value between 0 and 1023. Therefore, the measured value must first be converted into a voltage, i.e.:

VNTC / Vtotal = BitValue / 1024

Setup

Setup with MF52 connected to an Arduino Uno
Fig.: Setup with MF52 connected to an Arduino Uno

Programming

#define PIN_THERMISTOR A0

float R1 = 10000.0;
float logR2, R2, T, Tc;
float c1 = 1.009249522e-03;
float c2 = 2.378405444e-04;
float c3 = 2.019202697e-07;

void setup() {
    Serial.begin(9600);
}

void loop() {
    int value = analogRead(PIN_THERMISTOR);
    R2 = R1 * (1023 / (float)value - 1);
    logR2 = log(R2);
    T = (1.0 / (c1 + c2*logR2 + c3*logR2*logR2*logR2));
    Tc = T - 273.15;

    Serial.println(String(Tc) + " °C");

    delay(2000);
}
Displaying the temperature on the serial console
Fig.: Displaying the temperature on the serial console
Last edited by Christian Grieger on 2025-05-12
X
  1. [top]
  2. Model Code Breakdown
  3. Temperature calculation
  4. Used Components
  5. Structure and Functionality
  6. Setup
  7. Programming