Project

tuscan

0.0
No commit activity in last 3 years
No release in over 3 years
Converts from from temperature sensor's electrical signal to temperature and vice-versa. Allowable sensors: ITS-90 compliant SPRT's, IEC 60751 compliant PRT's and IEC 60584 compliant thermocouples.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
~> 10.0
>= 0

Runtime

~> 1.2
 Project Readme

TUSCAn

TemperatUre Sensor CAlculator

Makes available functions for:

  • ITS-90 compatible temperature sensors (Standard Platinum Resistance Thermometers), allowing:
    • Retrieval of reference resistance ratio WR from t90R reference temperature
    • Retrieval of reference temperature t90R from WR reference resistance ratio
    • Given sensor coefficient's: sub-range, Rtpw, a, b, c, d, W660, c1, c2, c3, c4, c5
      • Retrieval of t90 temperature from sensor's resistance res
      • Retrieval of res resistance from sensor's t90 temperature.
  • IEC 60751 compatible temperature sensors (Platinum Resistance Thermometers), allowing:
    • Retrieval of reference resistance resR from t90R reference temperature
    • Retrieval of reference temperature t90R from resR reference resistance
    • Given sensor coefficient's: R0, A, B, C
      • Retrieval of sensor's resistance res from t90 temperature
      • Retrieval of temperature t90 from sensor's resistance res
  • IEC 60584 compatible temperature sensors (Thermocouples), allowing, for a given type:
    • Retrieval of reference voltage emfR from t90R reference temperature
    • Retrieval of reference temperature t90R from reference voltage emfR
    • Given sensor coefficient's: a, b, c, d
      • Retrieval of sensor's voltage emf from t90 temperature
      • Retrieval of temperature t90 from sensor's voltage emf

Installation

Add this line to your application's Gemfile:

gem 'tuscan'

And then execute:

$ bundle

Or install it yourself as:

$ gem install tuscan

Usage examples

ITS-90

# Reference functions (ºC vs Ohm/Ohm)
Tuscan.wr(:its90, 23.456)
Tuscan.t90r(:its90, 1.15)

# Corrected for specific sensor (ºC vs Ohm)
Tuscan.t90(:its90, 25.319871, rtpw: 25.319871, subrange: 7, a: -1.2134e-04, b: -9.9190e-06)
Tuscan.res(:its90, 0.01,      rtpw: 25.319871, subrange: 7, a: -1.2134e-04, b: -9.9190e-06)

IEC 60751

# Reference functions (ºC vs Ohm)
Tuscan.t90r(:iec60751, 110)
Tuscan.resr(:iec60751, 10)

# Corrected for specific sensor
Tuscan.t90(:iec60751, 110, r0: 99.876, a:3.9083e-03, b:-5.7750e-07, c:-4.1830e-12)
Tuscan.res(:iec60751, 10,  r0: 99.876, a:3.9083e-03, b:-5.7750e-07, c:-4.1830e-12)

IEC 60584

# Reference functions (ºC vs mV)
Tuscan.t90r(:iec60584, 1.234,  type: :k)
Tuscan.emfr(:iec60584, 10.123, type: :k)

# Corrected for specific sensor
Tuscan.t90(:iec60584, 3.6105,  type: :k, a: 0, b: -1.39363e-05, c: 3.75578e-08, d: -2.17624e-11)
Tuscan.emf(:iec60584, 419.527, type: :k, a: 0, b: -1.39363e-05, c: 3.75578e-08, d: -2.17624e-11)

Notes

  • t90 aliased to t, temperature
  • res aliased to r, resistance
  • emf aliased to v, voltage

Contributing

  1. Fork it ( https://github.com/[my-github-username]/tuscan/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request