Skip to content

suoapvs/NTC_Thermistor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NTC Thermistor Library

For Arduino ant STM32 boards.

The Library implements a set of methods for working with a NTC thermistor. Provides a temperature reading in Celsius, Fahrenheit and Kelvin.

Installation

  1. Download the Latest release from gitHub.
  2. Unzip and modify the Folder name to "NTC_Thermistor" (Remove the '-version')
  3. Paste the modified folder on your Library folder (On your libraries folder inside Sketchbooks or Arduino software).
  4. Restart the Arduino IDE.

Circuit Diagram

Connect to the analog side of an Arduino Uno. Run GND through the thermistor, then a pull-down resistor (R0), and into 5V. To measure the temperature pull a line off the junction of the thermistor and the resistor, and into an analog pin (A1 here).

Diagram

Methods

    // Instantiation:
    /**
        pin - an analog port number to be attached to the thermistor.
        R0 - reference resistance.
        Rn - nominal resistance.
        Tn - nominal temperature in Celsius.
        B - b-value of a thermistor.
    */
    NTC_Thermistor thermistor(pin, R0, Rn, Tn, B);

    // Read a temperature in Celsius.
    double celsius = thermistor.readCelsius();
    // Read a temperature in Kelvin.
    double Kelvin = thermistor.readKelvin();
    // Read a temperature in Fahrenheit.
    double fahrenheit = thermistor.readFahrenheit();
    // For older devices.
    double farenheit = thermistor.readFarenheit();

Examples

Serial Reading

Average Measurement

Smooth Measurement

STM32...

All examples...

Created by Yurii Salimov.