Thermistor conversion techniques

Use this section to discuss your embedded Flowcode projects.
Post Reply
jay_dee
Posts: 215
http://meble-kuchenne.info.pl
Joined: Sun Dec 20, 2020 6:06 pm
Has thanked: 81 times
Been thanked: 57 times

Thermistor conversion techniques

Post by jay_dee »

Hi,
Thermistors, I will be reading in several thermistor values via a I2C Analog expander and pull up resistor.
I see there is a Thermistor Component but this seems to be only for sensors directly attached to the ADC of the PIC.

Brief reading indicate that there are two common equations for converting a Thermistor ADC value to a temp, while compensating for the non linear characteristic curve of the sensor. These are the Steinhart-Hart and B parameter Equations.
There is also the method of using a look-up table.

I dont need a high level of accuracy , what is the suggested method to use in FC?
Has anyone had good success doing something similar?
Thanks, J.

medelec35
Matrix Staff
Posts: 1955
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 626 times
Been thanked: 656 times

Re: Thermistor conversion techniques

Post by medelec35 »

I have had great success is using a formula based on the ADC value, and not using a thermistor component.
I uploaded it here.
So long as your ADC expander using the 0 to 1023 from 0 to 5V, I don't see why it should not work.
Martin

jay_dee
Posts: 215
Joined: Sun Dec 20, 2020 6:06 pm
Has thanked: 81 times
Been thanked: 57 times

Re: Thermistor conversion techniques

Post by jay_dee »

Thanks Martin,
Resulst look good in the sim, I've not run it is hardware yet.
I've just re-arranged the thermistor Beta FC you gave so it is easier to deploy as a Conversion Macro within my Project and I moved the Constants to Variables as I will set these in my Initiallisation Macro.
I appreciate my simplified conversion from Float to INT drops the decimal places but that is good enough for my initial testing.
Thanks for doing all the hard work!
Thermistor Macro v1.0.fcfx
(10.83 KiB) Downloaded 19 times

medelec35
Matrix Staff
Posts: 1955
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 626 times
Been thanked: 656 times

Re: Thermistor conversion techniques

Post by medelec35 »

You're welcome Jay.
Good luck with your project.
Martin

Post Reply