Thermistor component Range

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

Moderator: Benj

Post Reply
cortex
Posts: 12
Joined: Sun Feb 19, 2017 3:25 am
Contact:

Thermistor component Range

Post by cortex »

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: 795
Joined: Wed May 31, 2017 11:57 am
Contact:

Re: Thermistor component Range

Post by mnf »

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

cortex
Posts: 12
Joined: Sun Feb 19, 2017 3:25 am
Contact:

Re: Thermistor component Range

Post by cortex »

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: 8925
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Contact:

Re: Thermistor component Range

Post by medelec35 »

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.
Martin

cortex
Posts: 12
Joined: Sun Feb 19, 2017 3:25 am
Contact:

Re: Thermistor component Range

Post by cortex »

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

cortex
Posts: 12
Joined: Sun Feb 19, 2017 3:25 am
Contact:

Re: Thermistor component Range

Post by cortex »

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

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8925
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Contact:

Re: Thermistor component Range

Post by medelec35 »

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

cortex
Posts: 12
Joined: Sun Feb 19, 2017 3:25 am
Contact:

Re: Thermistor component Range

Post by cortex »

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 110 times
CorteX

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8925
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Contact:

Re: Thermistor component Range

Post by medelec35 »

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

jgu1
Posts: 1191
Joined: Tue Oct 06, 2009 9:39 am
Contact:

Re: Thermistor component Range

Post by jgu1 »

Hi Cortex/Martin!

What kind of Termistor are you using, Please.

Br Jorgen

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8925
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Contact:

Re: Thermistor component Range

Post by medelec35 »

Hi Jorgen,
I'm just using a cheap standard 10K ntc thermistor.
Nothing special about it at all.
Martin

jgu1
Posts: 1191
Joined: Tue Oct 06, 2009 9:39 am
Contact:

Re: Thermistor component Range

Post by jgu1 »

Hi Martin!

Thank you very much. :D

Br Jorgen

Post Reply