Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for the Steinhart-Hart equation for calibration #248

Closed
magnusoverli opened this issue May 27, 2019 · 0 comments · Fixed by esphome/esphome#560
Closed

Add support for the Steinhart-Hart equation for calibration #248

magnusoverli opened this issue May 27, 2019 · 0 comments · Fixed by esphome/esphome#560

Comments

@magnusoverli
Copy link

magnusoverli commented May 27, 2019

Describe the problem you have/What new integration you would like

Hi!
I am trying to use a NTC thermistor to measure temps using my ESP32. This connects to the ADC pin (using a voltage divider). The issue is that a thermistor is not linear in its resitance along the temperature axis. To make measurements using a thermistor usable, one uses the Steinhart-Hart equation, as described here.
It takes three pairs of temperature/resistance as constants, and let you read out the calibrated temperature measured by the thermistor.

I was hoping the equation could be implemented in ESPhome, so that the end user was left with only gathering data on their thermistor.

Please describe your use case for this integration and alternatives you've tried:

Other temp sensors (such as the DHT22) can be directly connected to the ESP, but in some use cases the user is forced to use an already existing sensor. For example in my case, I am trying to control the floor heating in a tiled floor where the sensor is embedded into the concrete underneath the tiles. There simply is no other way of going about it.
This would enable the use of any NTC temp sensor (thermistor), such as high temperature sensors in hostile environments, and reading the temps directly on an ESP using the ADC functionality.

I think this is a versatile addition to ESPhome and it would enable the use of MANY sensors that doesn't need further support in ESPhome, outside this calibration tool.

Additional context

The config could look something like this:

- adc-temp-sensor
  name: Temp sensor
  unit_of_measurement: "°C"
  accuracy_decimals: 1
  filters:
    - sliding_window_moving_average:
        window_size: 10
        send_every: 10
  shh_calibration:
    - t1: 0     //temperature reading 1
    - r1: 20k   //resistance reading 1
    - t2: 10    //temperature reading 2
    - r2: 15k   //resistance reading 2
    - t3: 20    //temperature reading 3
    - r3: 10k   //resistance reading 3
OttoWinter added a commit to esphome/esphome that referenced this issue May 28, 2019
OttoWinter added a commit to esphome/esphome that referenced this issue May 28, 2019
* Add NTC and resistance sensor

Fixes esphome/feature-requests#248

* Fix

* Fix platformio4 moved get_project_dir
OttoWinter added a commit to esphome/esphome that referenced this issue May 28, 2019
* Add NTC and resistance sensor

Fixes esphome/feature-requests#248

* Fix

* Fix platformio4 moved get_project_dir
@esphome esphome locked and limited conversation to collaborators Jun 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant