Skip to content

Easy coefficient and temperature calculations using the Steinhart-Hart equation

Notifications You must be signed in to change notification settings

keidyz/steinhart-hart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

steinhart-hart

steinhart-hart allows easy coefficient and temperature calculations using your ntc thermistor's resistance.

Installation

npm i steinhart-hart

Usage

import SteinhartHart from 'steinhart-hart';

// To start, gather three known operating points for your ntc thermistor- you will most
// likely find these in your thermistor's datasheet
// celsius = -25 (248.15 in Kelvin) ---- resistance = 87041
// celsius = 0 (273.15 in Kelvin) ---- resistance = 27326
// celsius = 25 (298.15 in Kelvin) ---- resistance = 10000
const steinhartHart = new SteinhartHart([87041, 27326, 10000], [248.15, 273.15, 298.15]);

const {a, b, c} = steinhartHart.getCoefficients();

// returns 307.9031K which is 34.7531C if converted to celsius
const temperature = steinhartHart.getKTemperatureAtResistance(7000)

License

MIT

About

Easy coefficient and temperature calculations using the Steinhart-Hart equation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published