NTC thermistor Temp sensor
Moderator: Benj
-
- Posts: 348
- Joined: Mon Jul 09, 2018 12:43 pm
- Has thanked: 67 times
- Been thanked: 33 times
- Contact:
NTC thermistor Temp sensor
Hi Everyone, am trying to make a temp sensor with a 10k NTC thermistor and the Steinhart and Hart Equation, I need it to read the temperature of upto 120 degrees Celsius but am having trouble please check my code, Help show me where i go wrong.And how do we enter a coefficient of say 1.125509474e-3 into the calculation box?
- Attachments
-
- Steinhart and Hart TEMP.fcfx
- (14.83 KiB) Downloaded 244 times
Last edited by Derrihj on Thu Aug 27, 2020 3:31 pm, edited 1 time in total.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: NTC thermistor Temp sensor
Hello,
0.001125509474
I beleive that would be...how do we enter a coeffient of say 1.125509474e-3 into the calculation box?
0.001125509474
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 348
- Joined: Mon Jul 09, 2018 12:43 pm
- Has thanked: 67 times
- Been thanked: 33 times
- Contact:
Re: NTC thermistor Temp sensor
Ok that is what i used Benj but my display shows only 28.68 degrees at full range , there must be something am not doing right with the Steinhart and Hart equation as in Flowcode entry data eg the calculation box. Here is my Temperature (in Degrees C)/Resistance (in Ohms) Table of my 10K NTC Thermistor: (-40c/336,500 Ohms), (-30c/177,000 Ohms), (-20c/97,070 Ohms), (-10c/55,330 Ohms), (0c/32,650 Ohms), (10c/19,900 Ohms), (20c/12,490 Ohms), (25c/10,000 Ohms), (30c/8,057.0 Ohms), (40c/5327.0 Ohms), (50c/3,603.0 Ohms), (60c/2,488.0 Ohms), (70c/1,752.0 Ohms), (80c/1,255.0 Ohms), (90c/915.30 Ohms), (100c/678.30 Ohms), (110c/510.30 Ohms), (120c/398.30 Ohms), (130c/300.93 Ohms), (140c/235.27 Ohms), (150c/185.97 Ohms). But on my hardware, when i replace the NTC thermistor with a well known 10k 1% resistor to work as my NTC @ 25 °C , my displays shows 26.70°C on a real board this is wrong and it only goes up to 31.02°C at full range with the NTC in place.This is dead wrong.
-
- Valued Contributor
- Posts: 1188
- Joined: Wed May 31, 2017 11:57 am
- Has thanked: 70 times
- Been thanked: 439 times
- Contact:
Re: NTC thermistor Temp sensor
Hi Derrihj,
I'm not sure the calculation of the resistance of the thermocouple is correct (for example you will get an error at vOut = 1.0 (div by 0) )- see https://circuitdigest.com/calculators/v ... calculator
and also https://www.ti.com/lit/an/sbaa439/sbaa439.pdf
Martin
I'm not sure the calculation of the resistance of the thermocouple is correct (for example you will get an error at vOut = 1.0 (div by 0) )- see https://circuitdigest.com/calculators/v ... calculator
and also https://www.ti.com/lit/an/sbaa439/sbaa439.pdf
Martin
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: NTC thermistor Temp sensor
Hi Derrihj,
There is a thermistor component built in to Flowcode, just use search and enter therm.
If not suitable then I created a flowchart that uses a themistor based on the beta value and results are very accurate.
It does not even rely on VDD fluctuations or what the supply voltage is!
If you want me to post it then let me know.
It's part of a huge flowchart so will need to modify to your needs.
There is a thermistor component built in to Flowcode, just use search and enter therm.
If not suitable then I created a flowchart that uses a themistor based on the beta value and results are very accurate.
It does not even rely on VDD fluctuations or what the supply voltage is!
If you want me to post it then let me know.
It's part of a huge flowchart so will need to modify to your needs.
Martin
-
- Posts: 348
- Joined: Mon Jul 09, 2018 12:43 pm
- Has thanked: 67 times
- Been thanked: 33 times
- Contact:
Re: NTC thermistor Temp sensor
Am trying to convert an Arduino project to flowcode here is the link; https://www.ametherm.com/blog/thermisto ... hermistors
-
- Posts: 348
- Joined: Mon Jul 09, 2018 12:43 pm
- Has thanked: 67 times
- Been thanked: 33 times
- Contact:
Re: NTC thermistor Temp sensor
Medelec35, nice to see you please post your project i have a look at it am very sure i will learn allot from it
-
- Posts: 198
- Joined: Sun Nov 04, 2018 7:13 pm
- Has thanked: 27 times
- Been thanked: 33 times
- Contact:
Re: NTC thermistor Temp sensor
Hi Martin, I also am tiring to read a thermistor. I got the sensor package and used the thermistor component. It is reading but the values don't work correct. I think there might be something broken in it.
If you have a nice flow of a temp reader it would be super cool if you could strip it out and post it.
I wish that flowcode had a curated user component or code chunk menu.
Thanks,
Chad
If you have a nice flow of a temp reader it would be super cool if you could strip it out and post it.
I wish that flowcode had a curated user component or code chunk menu.
Thanks,
Chad
-
- Posts: 348
- Joined: Mon Jul 09, 2018 12:43 pm
- Has thanked: 67 times
- Been thanked: 33 times
- Contact:
Re: NTC thermistor Temp sensor
I also used the thermistor component but the results were not good am also waiting for Medelec35's flowchat
-
- Posts: 198
- Joined: Sun Nov 04, 2018 7:13 pm
- Has thanked: 27 times
- Been thanked: 33 times
- Contact:
Re: NTC thermistor Temp sensor
Thanks for confirming that. Looking at the adc numbers things look ok but there is something broken with the component.
Martin is super smart so I would like to see what he comes up with too.
Thanks,
Chad
Martin is super smart so I would like to see what he comes up with too.
Thanks,
Chad
-
- Posts: 348
- Joined: Mon Jul 09, 2018 12:43 pm
- Has thanked: 67 times
- Been thanked: 33 times
- Contact:
Re: NTC thermistor Temp sensor
It will be so nice if Medelec35 can do for both the Beta version and also the Steinhart and Hart equation version in a flowchat example.But all in all what he has to offer i believe will be profitable.
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: NTC thermistor Temp sensor
Been a busy couple of days.
Currently modifying & testing the beta version works.
Should be able to post this evening, all going well.
Currently modifying & testing the beta version works.
Should be able to post this evening, all going well.
Martin
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: NTC thermistor Temp sensor
Hi Derrihj,
You're welcome.
Attached is beta version working for Eblocks2 PIC Multiprogrammer (16F1788).
So will need to change Target device, LCD and ADC to suit your hardware.
You're welcome.
Attached is beta version working for Eblocks2 PIC Multiprogrammer (16F1788).
So will need to change Target device, LCD and ADC to suit your hardware.
- Attachments
-
- Thermistor Temperature Measurement v1.0.fcfx
- (12.8 KiB) Downloaded 235 times
Martin
-
- Posts: 348
- Joined: Mon Jul 09, 2018 12:43 pm
- Has thanked: 67 times
- Been thanked: 33 times
- Contact:
Re: NTC thermistor Temp sensor
Ok now this is where it becomes interesting "learning time" i changed the code to work with my hardware running @ 8mhz external crystal with the PIC16F886 but to my supplies when i heat up the thermistor with a soldering gun interested of the temperature going up,it goes down to negatives but the resistance increases so it's the opposite of what it should do when i increase the heat may be am doing something wrong.And when i replace the NTC with a 10k res 1% it gives me -20C
- Attachments
-
- IMG_20200829_015617_062.jpg (98.13 KiB) Viewed 11120 times
Last edited by Derrihj on Sat Aug 29, 2020 12:13 am, edited 1 time in total.
-
- Posts: 198
- Joined: Sun Nov 04, 2018 7:13 pm
- Has thanked: 27 times
- Been thanked: 33 times
- Contact:
Re: NTC thermistor Temp sensor
I think you have a PTC thermistor? How to inverse all of thins I have no idea.
I just got mine up and running.
Chad
I just got mine up and running.
Chad
-
- Posts: 348
- Joined: Mon Jul 09, 2018 12:43 pm
- Has thanked: 67 times
- Been thanked: 33 times
- Contact:
Re: NTC thermistor Temp sensor
No it's an NTC coz before i hook it up on the board i first heat it up with a soldering gun and it does what NTC does best as temp goes up resistance goes down see pics below.
- Attachments
-
- IMG_20200829_021918_483.jpg (72.35 KiB) Viewed 11116 times
-
- IMG_20200829_021931_115.jpg (72.25 KiB) Viewed 11116 times
-
- IMG_20200829_021947_603.jpg (74.71 KiB) Viewed 11116 times
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: NTC thermistor Temp sensor
Can you let me know the thermistor value at 25C and have you got the themistor connected to i/p pin and GND?
What value pull-up resistor have you got between i/p and +ve?
LCD is saying it thinks the current value of thermistor is 47K which does not sound correct as if 10K thermistor, it will be really cold.
You will need to look at all the Constant variables and make sure all values are correctly entered.
The issue might be to have connected themistor between ADC i/p and + supply?
What value pull-up resistor have you got between i/p and +ve?
LCD is saying it thinks the current value of thermistor is 47K which does not sound correct as if 10K thermistor, it will be really cold.
You will need to look at all the Constant variables and make sure all values are correctly entered.
The issue might be to have connected themistor between ADC i/p and + supply?
Martin
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
-
- Posts: 348
- Joined: Mon Jul 09, 2018 12:43 pm
- Has thanked: 67 times
- Been thanked: 33 times
- Contact:
Re: NTC thermistor Temp sensor
Thanks Medelec35 issue was themistor between ADC i/p and + supply? Since i had already done the PCB before your flowchat so i changed to pull-up to +ve 5v and thermistor to GND and it obeyed like a humble dog now i have a task and that is to get to understand the code.
-
- Posts: 348
- Joined: Mon Jul 09, 2018 12:43 pm
- Has thanked: 67 times
- Been thanked: 33 times
- Contact:
Re: NTC thermistor Temp sensor
I know my thermistor Datasheet may not be that correct at the moment as i got this from an old DC to AC inverter coz when i measure it at room temp, I get around 12k but that isn't a big deal as i just wanted a code that works so that when i order a well known thermistor with the correct Datasheet am pretty sure things won't back fire on me.
- Attachments
-
- IMG_20200829_025150_652.jpg (85.66 KiB) Viewed 11106 times
Last edited by Derrihj on Sat Aug 29, 2020 1:27 am, edited 2 times in total.
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: NTC thermistor Temp sensor
Glad you have got your issue sorted out now.
If the beta is not known,
what about using the Flowcode built-in themistor component?
Just search for therm .
You will have to enter resistance values for a few set temperatures.
Some data sheets just give those values.
Don't need to know beta or Steinhart and Hart Equation.
If the beta is not known,
what about using the Flowcode built-in themistor component?
Just search for therm .
You will have to enter resistance values for a few set temperatures.
Some data sheets just give those values.
Don't need to know beta or Steinhart and Hart Equation.
Martin
-
- Posts: 348
- Joined: Mon Jul 09, 2018 12:43 pm
- Has thanked: 67 times
- Been thanked: 33 times
- Contact:
Re: NTC thermistor Temp sensor
Thanks allot for the code Medelec35 God Bless u am planning to build a digital timer with a temperature sensor for my mother for her local cake cooker and mount it on the wall in an adaptable box and run sensor wires down to the cooker oven,what do you think is the best temp sensor i should use Medelec35, RTD or Thermister with that sensor distance from the wall thanks.
Last edited by Derrihj on Sat Aug 29, 2020 1:36 am, edited 1 time in total.
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact: