- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
Attached is my Thermistor Calculator component ("myThermistor"). It calculates thermistor temperature from the resistance, similar to the Creator's stock Thermistor component. Calculated temperature returned as float-precision value with accuracy approx. 0.001 degC. Calculation speed is about 14-15x times faster than stock Thermistor component (formula-based) taking about 1100 CPU cycles.
The component was developed for fast TEC control, where accuracy, speed and wide temperature range were important. Attached archive contains the workspace bundle of the demo project, datasheet, screenshots and reference materials. Tested on PSoC5LP.
regards,
odissey1
P.S. Updated link to SRS Thermistor Calculator:
https://www.thinksrs.com/downloads/programs/therm%20calc/ntccalibrator/ntccalculator.html
- Labels:
-
PSoC 345 LP
- Tags:
- calculator
- community component
- component
- custom component
- fast log
- odissey1
- steinhart hart
- thermistor
- thermistor calculator
- thermistor component
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for sharing this with the community.
Praveen
Praveen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I opened this design and not see any connections to thermistor. How it`s work ?
Usually exist thermistor and normal resistor and ADC that calculate difference between ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is a pure software component that offers different ways to calculate the temperature from ADC values. See datasheet.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, I tried it and it work fine. Just one problem. Instead of it`s "pure software component" when I change my device to PROC Components tab is not visible and receive error :Component is not supported by this device...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I will take a look what is going on. But don't hold your breath...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is an answer. The custom component creation is not supported for PRoC family of devices. (?!)
The FastThermistorCalculator is indeed is just a piece of C code with component symbol attached to it. All you need is to copy *.h and *.c files into your project and set parameters in code like that.
Replace in *.h:
/***************************************
* API Constants
***************************************/
#define `$INSTANCE_NAME`_REF_RESISTOR ((float) `$ReferenceResistor`) //Reference resistor value [oHm]
#define `$INSTANCE_NAME`_K2C (273.15f) //conversion degK to degC, deg: Tc = Tk - K2C
#define `$INSTANCE_NAME`_THA ((float) `$SteinhartHart_THA`) //Steinhart-Hart coeff A
#define `$INSTANCE_NAME`_THB ((float) `$SteinhartHart_THB`) //Steinhart-Hart coeff B
#define `$INSTANCE_NAME`_THC ((float) `$SteinhartHart_THC`) //Steinhart-Hart coeff C
with something like (use your parameters!):
/***************************************
* API Constants
***************************************/
#define `$INSTANCE_NAME`_REF_RESISTOR ((float) 10000.0) //Reference resistor value [oHm]
#define `$INSTANCE_NAME`_K2C (273.15f) //conversion degK to degC, deg: Tc = Tk - K2C
#define `$INSTANCE_NAME`_THA ((float) 0.0011259) //Steinhart-Hart coeff A
#define `$INSTANCE_NAME`_THB ((float) 0.0002346498) //Steinhart-Hart coeff B
#define `$INSTANCE_NAME`_THC ((float) 8.564001E-08) //Steinhart-Hart coeff C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks ! I found second way. Just changed to PSOC device, compiled, copy generated code to my project and return to PROC.
Thanks for your code again !!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi !
What a range of temperatures this calculator ? In datasheet not exist this information.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good question. The accuracy was tested using a set of A,B,C coefficients
for a 10k thermistor, which I typically use (TS-91), using the test demo
project provided. The Datasheet clearly states that accuracy comparison
was done in Range 0-50C (from Rmin=3.602 k to Rmax=33.660 k)
You can run demo using your set of Steinhart coefficients to check the
accuracy of approximation in the range of interest.