Welcome! Log In Create A New Profile

Advanced

Marlin 1.0.0: Extruder temperature compensation (help)

Posted by plexus 
Marlin 1.0.0: Extruder temperature compensation (help)
February 22, 2013 07:34PM
Hi there. Im the admin over at printrbottalk.com. I took measurements right off my Ubis hot end nozzle with an Apollo digital thermometer and J thermocouple. I plotted the measurements which I will call "true temp" against those the Repetier-host mac reports back from the Printrboard, called "set temp" (stock revB with the stock Marlin firmware, i think Lincomatic's fork). I worked out a linear formula that maps the set temp to the true temp. if i can apply this to the data that is sent to the host, i can have the host display a value closer to "true temp".

Basically what i'd like to do is add in a line to take the Celcius value that gets communicated to the outside world, add 14.94 and divide by 1.14. this will give a value that will be close to +/- 1C from true temp.

Can someone tell me in detail where I can do this calculation in Marlin 1.0.0 RC2? and please tell me the exact line to type as i am not a coder. smiling smiley

thanks!
Plexus

ps. here is my thread about it in the printrbottalk forum [www.printrbottalk.com]
Re: Marlin 1.0.0: Extruder temperature compensation (help)
February 22, 2013 08:01PM
Have you selected the correct thermistor in Configuration.h about line 80 i think.

there are a few to choose from. Maybe just try them see if any are close.

if not thermistortables.h will let you change the values that the thermistors read.
Re: Marlin 1.0.0: Extruder temperature compensation (help)
February 22, 2013 10:34PM
I don't think that's the right route to take. telling the system that its a different sensor than it is could result in very erroneous results. i think it should be set to what the sensor is.

I realize that my simple calculation needs to apply to the celsius value before the set temp check. if i set 230C then i need the temp that would normally result from this setting to have 14.94 added to it and then divided by 1.14. that will get it very close to 230C. so the system will hold at 230C, the temp off the sensor once calculated to celsius would be around 246C according to my chart.

SO what I need is where in the firmware i can say something like E_TEMP = (E_TEMP + 14.92) / 1.14; or whatever before that value is used in the manually set temperature comparison and out the USB.

You can tell im not a coder. smileys with beer
Re: Marlin 1.0.0: Extruder temperature compensation (help)
February 23, 2013 08:10AM
I think thermistortables.h is the ideal way to go then. Either edit the relevant list of values, or define a new one. Then just do your calculation for each value and you will get the result you want.
Re: Marlin 1.0.0: Extruder temperature compensation (help)
February 23, 2013 11:11AM
lazzymonk Wrote:
-------------------------------------------------------
> I think thermistortables.h is the ideal way to go
> then. Either edit the relevant list of values, or
> define a new one. Then just do your calculation
> for each value and you will get the result you
> want.


+1

Calculate your own table based on your data.

Doing what you want to do, the way you want to do it, is not going to be any easier. Might as well do it the proper way.
Re: Marlin 1.0.0: Extruder temperature compensation (help)
February 23, 2013 11:40AM
The more think I about this suggestion of adding into thermistortables.h the less I understand it. the reason is that I am not going to change the thermistor that is currently installed. so if i create a table (how?) for the thermocouple i used to measure the true temp, how is that going to help considering the same thermistor that is being used now will continue to be used. i could see making a thermistortables.h table that provides some compensating factors that will correct the current readings to true temp. but it doesn't seem like making a thermistortables.h in the conventional way will work based on my data because the table is going to have to take into account both the thermocouple i used for "true temp" as well as the existing thermistor.

Don't you think that adding a one line calculation agaist the Celsius value in Marlin in the appropriate spot is easier than trying to navigate this thermistortables.h approach? i mean, either way, the firmware would only be compensating for the error in the temperature being read against the data i got with my thermocouple, therefore it would end up being specific to my printer.

Another idea is to adjust the existing thermistortables.h table for the thermistor in the extruder but with new values that will result in more accurate temp readings. i could see doing it this way. i could create new table named for my specific printer and then adjust the values. perhaps i could even just do my linear calculation on the values. i guess i need to understand how thermistortables.h tables are created first.

Edited 2 time(s). Last edit at 02/23/2013 12:18PM by plexus.


[www.printrbottalk.com] Printrbot Forum and Wiki
Re: Marlin 1.0.0: Extruder temperature compensation (help)
February 23, 2013 01:53PM
To make an accurate table you just need three data points, see here: [hydraraptor.blogspot.co.uk]

I use 1% thermistors in the Mendel90 kits so they can all share the same table and be accurate enough out of the box. They agree within a couple of degrees with a thermocouple placed inside the barrel.


[www.hydraraptor.blogspot.com]
Sorry, only registered users may post in this forum.

Click here to login