Thermistor component Range

A forum where Flowcode v7 user created components can be shared, discussed and reviewed.

Moderator: Benj

cortex
Posts: 12
Joined: Sun Feb 19, 2017 3:25 am
Has thanked: 2 times
Been thanked: 4 times
Contact:

Thermistor component Range

Postby cortex » Sun Aug 11, 2019 11:02 pm

Hi,
I'm working on an extruder machine to recycle water bottle caps into 3D printer filaments.

I figured i could use one of my ramps board to drive the whole contraption. So far accesing the ramps pins via flowcode works great.

Right now i'm hitting a stag with the thermistor component as it only ranges from -25c to 125c. For the purpose of the project i'd need it to range to 300c.

Is there a way in flowcode to increase the range of this component ?

Thank you already for any clues i could get :D .

mnf
Valued Contributor
Valued Contributor
Posts: 503
Joined: Wed May 31, 2017 11:57 am
Has thanked: 52 times
Been thanked: 278 times
Contact:

Re: Thermistor component Range

Postby mnf » Mon Aug 12, 2019 6:32 am

There is an excellent description of usage on the Adafruitv site https://learn.adafruit.com/thermistor/overview
They describe the range of the thermistor as going to 125C but if you have a device capable of more then the techniques used the should be applicable.

Martin
These users thanked the author mnf for the post:
cortex (Wed Aug 14, 2019 11:36 pm)
Rating: 5.26%
 

cortex
Posts: 12
Joined: Sun Feb 19, 2017 3:25 am
Has thanked: 2 times
Been thanked: 4 times
Contact:

Re: Thermistor component Range

Postby cortex » Mon Aug 12, 2019 12:36 pm

Hi Martin,
Thanks for your reply.

I did not mentionned it in my initial post but i've already been playing around with adafruit's tutorial.
Converting it in flowcode and downloading it on a regular Arduino Uno or Mega works fine.
But as soon as i mount the RAMPS shield (that i know is not broken)on the Mega, hook up the thermistor on the T1 pin (An 14 on Mega), my readings gets totaly off.

The RAMPS uses a integrated 4.7K resistor instead of the 10K of the tutorial.
http://domoticx.com/wp-content/uploads/ ... schema.png

Yet when i use the thermistor EBM003 component in flowcode i get a good readings of that same thermistor, but max out to 125c when i need to go all the way to 300c or 270c.

Which is why i'd like the keep the EBM003 component and just increase its range.

CorteX

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8376
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2384 times
Been thanked: 3415 times
Contact:

Re: Thermistor component Range

Postby medelec35 » Mon Aug 12, 2019 9:05 pm

What is the formula you used for thermistor?
Best to upload your flowchart.
I'm using a formula that works for any value of pull-up and thermistor value.
It seems to be nice and accurate.

I can check your formula for 4k7 with your themistor.
You will need to state thermistor value at 25C and Beta for the range required.
These users thanked the author medelec35 for the post:
cortex (Wed Aug 14, 2019 11:36 pm)
Rating: 5.26%
 
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

cortex
Posts: 12
Joined: Sun Feb 19, 2017 3:25 am
Has thanked: 2 times
Been thanked: 4 times
Contact:

Re: Thermistor component Range

Postby cortex » Mon Aug 12, 2019 11:58 pm

Ok let met clean it up, and i'll upload it here

cortex
Posts: 12
Joined: Sun Feb 19, 2017 3:25 am
Has thanked: 2 times
Been thanked: 4 times
Contact:

Re: Thermistor component Range

Postby cortex » Tue Aug 13, 2019 4:13 am

Hi thanks a lot for jumping in.
i figured out my issue.

I used the following formula to calculate the Thermistor Resistance: R = 10K*ADC / (1023 - ADC)
And the inverse of the following minus 273.15 to calculate the temperature in C: Image

My issue came from the fact that i did not convert to floats every non-float variables and constants. I did it for some variables and not others, obliviously assuming that if i didn't get an error at validation it meant that the compiler would by default do the convertion.

I was wrong.
I haven't tried yet to heat up the thermistor all the way to 270C (i'm using regular dupon wires at the time), but i got a clean and coherent reading all the way to 150c before my wires started to smoke....

If interested I can still upload the flowchart here
These users thanked the author cortex for the post:
medelec35 (Tue Aug 13, 2019 2:40 pm)
Rating: 5.26%
 

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8376
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2384 times
Been thanked: 3415 times
Contact:

Re: Thermistor component Range

Postby medelec35 » Tue Aug 13, 2019 2:40 pm

Hi cortex,
I'm glad you have figured out your issue.
If you had not, then I have got a calculation that works with Flowcode and is a single calculation.
I will post my calculation if interested?
cortex wrote:If interested I can still upload the flowchart here

Yes please, as it will be handy for anyone else who had the same issue as you.
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

cortex
Posts: 12
Joined: Sun Feb 19, 2017 3:25 am
Has thanked: 2 times
Been thanked: 4 times
Contact:

Re: Thermistor component Range

Postby cortex » Wed Aug 14, 2019 11:35 pm

Hi Medelec,

I'll be glad to check out your calculation, i'm always interested in learning new stuff.

You can find my working flowchart here (flowcode 7):
Ramps-Thermistor_LCD.fcfx
(14.74 KiB) Downloaded 32 times


CorteX
These users thanked the author cortex for the post:
medelec35 (Thu Aug 15, 2019 7:16 am)
Rating: 5.26%
 

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8376
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2384 times
Been thanked: 3415 times
Contact:

Re: Thermistor component Range

Postby medelec35 » Thu Aug 15, 2019 7:26 am

Hi cortex.
The calculation I used is:

Code: Select all

TemperatureFloatVariable = 1 / ((log (SeriesPullUpResistanceValue / (1024.0 / ADCIntVariable - 1) / ThermistorResistanceAt25C)) / BetaValue + 1 / (25 + 273.15)) - 273.15

Where it does not state a variable type, I have used Constants.
Note: The .0 in 1024.0 is vital as it negates the requirement for int2float.
Without .0 the temperature value will be completely wrong!
Which is what you mentioned was the issue with your flowchart.

Have yo got a link to the thermistor you are using?
One way to check accuracy is to use a fixed 10K resistor with a good tolerance e.g 1% in place of the thermistor.
Check the temperature displayed is 25C.
Also, check the resistance of thermistor from the datasheet at the extremes of temperature you wish to measure.
Used fixed resistors for those values and check the temperature displayed is within expected ranges.
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

jgu1
Posts: 1079
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 978 times
Been thanked: 249 times
Contact:

Re: Thermistor component Range

Postby jgu1 » Sun Sep 15, 2019 5:57 pm

Hi Cortex/Martin!

What kind of Termistor are you using, Please.

Br Jorgen

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8376
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2384 times
Been thanked: 3415 times
Contact:

Re: Thermistor component Range

Postby medelec35 » Sun Sep 15, 2019 8:10 pm

Hi Jorgen,
I'm just using a cheap standard 10K ntc thermistor.
Nothing special about it at all.
These users thanked the author medelec35 for the post:
jgu1 (Mon Sep 16, 2019 5:39 am)
Rating: 5.26%
 
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

jgu1
Posts: 1079
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 978 times
Been thanked: 249 times
Contact:

Re: Thermistor component Range

Postby jgu1 » Mon Sep 16, 2019 5:39 am

Hi Martin!

Thank you very much. :D

Br Jorgen