Merged
Conversation
* Added thermistor component with example for NTC * Updated and rebuilt docs
* Added image to readme
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Motivation and Context
Thermistors (temperature sensitive resistors) are cheap, common, and useful tools for measuring the temperature of the circuit or its surroundings. Conversion from the measured voltage across the resistor to the actual temperature requires the implementation of the Steinhart-Hart equation to compute the temperature as a function of the log of the measured resistance proportional to the nominal resistance. This requires the use of a
ln()function (for which we already have afast_ln()implementation in themathcomponent) as well as storing some information about the thermistor and the circuit it is in (such as the voltage divider configuration, supply voltage, nominal resistance, fixed resistance, and beta value). This component / class stores those information in a way that makes it much easier / cleaner to measure the temperature using a thermistor.How has this been tested?
Running the new example on an TinyPico (ESP32) board. I don't have an NTC on hand, so the main part of the example that tests is the comparison to the manually entered table from the datasheet. To check our calculated temperature vs. the datasheet.
Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):
Note: I didn't have an NTC to connect to the ADC, so it's not able to read actual temperature in the screenshot below.

Types of changes
Checklist:
Software
.github/workflows/build.ymlfile to add my new test to the automated cloud build github action.