Welcome! Log In Create A New Profile

Advanced

temperature swinging

Posted by Anonymous User 
Anonymous User
temperature swinging
July 15, 2007 07:34AM
hi,

in the heat-profiler the temperature of my extruder is swinging between e.g. the current temperature of 18
Re: temperature swinging
July 15, 2007 12:02PM
andreas... try reading over the wiki extruder page. i believe that it talks about this very issue and what you can do to address it. i'm going to be going over that myself this weekend, so if i run into it and/or fix that problem i'll let you know.
Anonymous User
Re: temperature swinging
July 15, 2007 02:50PM
hi zach,
I read several extruder-pages, but the only tip in respect of swinging is to increase hb or hm, but these values are not used during the heat-profiling sad smiley

the only thing I can try is increasing the capacitor, but I have to buy one first.

andreas
Anonymous User
Re: temperature swinging
July 15, 2007 03:55PM
Interesting... Perhaps the problem I've been experiencing isn't an issue with my hardware after all...

When I set my temp to 100 degrees in the extruder exerciser, I'll watch the temp fluctuate a bit, but every 5th or 6th value will be way low - it will read something like 101 - 98 - 99 - 75 - 102 - 100 or something like that - one value just jumps WAY low on occasion. I know that the actual temperature of the extruder is not going that low, since the next reading is right on, and when experimenting with higher temps I've seen it drop 30 degrees for one reading, and back up on the next, and the extruder can't heat and cool THAT fast.

Zach - if you can provide a link to the page you were referring to I would appreciate it.
Anonymous User
Re: temperature swinging
July 15, 2007 05:55PM
Cap value depends on your thermistor characteristics. My for instabce

Here is the resistance reading and temperatures

R0 2850 ohms
T0 66 F 18.89 C

R 17.0 ohms
T 381 F 193.89 C
Beta= ln(17/2850)/((1/(T+273.15))-(1/(T0+273.15)))=3991.96

Rz=7334.8
1.987 microfarads or about 2 microfarads
Re: temperature swinging
July 15, 2007 06:24PM
perhaps we need to tweak the temperature profiling code to keep a running average, and drop any numbers that are extremely out of line. does this effect how the extruder operates at all?
Re: temperature swinging
July 15, 2007 07:02PM
I'm out of my area of expertise a bit here, but I suspect that hooking up a voltmeter across the temp sensor should allow Reprappers to verify the output from it "by hand", thus (after a little computation) learning whether the issue is in the sensor circuitry, or in firmware/software? Or is there something about the circuit concerned that makes this unhelpful? Narrowing down where the issue really is is sounds like a good way to go on this one to me. Sticking a K-type thermocouple into the extruder nozzle is another way (mentioned in the docs) to get an independent temp reading that might help understand this better.

Zach's idea of throwing away outlying values is sound, as long as the reason for having them is at least somewhat understood -- if they are in fact "correct" values, caused by say a bug in the way the PIC turns the heater on and off, then throwing them out could have 'interesting' consequences! (Example: if you were seeing 220,220,220,220,260,220,220,220,220,260 and the 260s were actually correct, you'd be polluting the local air with HF from overheated PTFE 20% of the time, for example, and ignoring this "little" problem because they are outlying values!!). So (in admittedly unlikely circumstances), throwing away these outlying values could become a safety issue, unless we know for *sure* they are bogus.

Jonathan
Anonymous User
Re: temperature swinging
July 15, 2007 08:30PM
well, in hooking up a voltmeter to the thermistor as it is cooling, and watching the values, I saw a nicely linear progression of the resistance, without any instances of it jumping out of whack suddenly, so I would guess that it is either a software/firmware bug, or an issue with the capacitor. I am pretty confident that it is not representing actual values since I have seen a 30-40 degree drop and return in a matter of 5 or 6 seconds, and with the heater entirely unplugged from the extruder controller, it takes a couple of minutes for the nozzle to cool that much (as measured with an actual thermometer).
Anonymous User
Re: temperature swinging
July 15, 2007 08:33PM
If I understand correctly, the PIC uses a known capacitance value and a timer to measure the resistance. Perhaps the PIC is getting interrupted or otherwise busy while counting, and it 'loses its count'?
Re: temperature swinging
July 15, 2007 08:47PM
Eric Morgan Wrote:
-------------------------------------------------------
> If I understand correctly, the PIC uses a known
> capacitance value and a timer to measure the
> resistance. Perhaps the PIC is getting
> interrupted or otherwise busy while counting, and
> it 'loses its count'?

Could be that its interrupt stack is overflowing.

Edited 1 time(s). Last edit at 07/16/2007 06:48AM by Forrest Higgs.
Anonymous User
Re: temperature swinging
July 15, 2007 08:48PM
We "linearize" the non-linear resistance change. You have to get physical resistance readings at two temperatures and these temps have to be accurately known. The code just measures a discharge time for the Cap. Everyone has to get specific data for their thermistor, if different from the "standard" one. Cap values can be evaluated and eveything will be fine.
Re: temperature swinging
July 16, 2007 04:36AM
From the wiki:

"Note, an interrupt occurring during the timing routine will upset the timing. Shouldn't this disable interrupts??!

Ah, actually it shouldn't disable interrupts because the sample time is too long. However if an interrupt occurs, it should set a flag to tell it to disregard that particular sample"

Looks like "should" means on the to do list.


[www.hydraraptor.blogspot.com]
Anonymous User
Re: temperature swinging
July 16, 2007 12:04PM
hello,

ad engelwood: its not a problem of the resistance values. I measured them several times and they are as expected. it must be something in the software/firmware. I see a similar behavier like eric. the jumps are more erratic.

I am using the extruder.hex file from the reprap-firmware-1.0.zip, (because I was not able to compile the firmware by myself).

I attach the console-log after starting the "extruder heat profiler".
I printed the raw-values of the raw heat and calibration in the function getDeviceTemperature() after the line "calibration = reply.getCalibration();".
As you can see from the log, not only the temp is jumping also the calibration.


...
java lib Version = RXTX-2.1-7
CAPA extruder vRefFactor set to 7
CAPA extruder raw temp 43, raw calibration: 19
CAPA extruder re-ranging temperature (slower)
CAPA extruder vRefFactor set to 8
CAPA extruder raw temp 42, raw calibration: 59
CAPA extruder re-ranging temperature (slower)
CAPA extruder vRefFactor set to 9
CAPA extruder raw temp 46, raw calibration: 43
CAPA extruder re-ranging temperature (slower)
CAPA extruder vRefFactor set to 10
CAPA extruder raw temp 123, raw calibration: 119
CAPA extruder raw temp 124, raw calibration: 119
CAPA extruder raw temp 198, raw calibration: 101
CAPA extruder raw temp 103, raw calibration: 107
CAPA extruder raw temp 198, raw calibration: 101
CAPA extruder raw temp 103, raw calibration: 180
CAPA extruder raw temp 103, raw calibration: 180
CAPA extruder raw temp 198, raw calibration: 101
CAPA extruder raw temp 123, raw calibration: 119
CAPA extruder raw temp 104, raw calibration: 180
Re: temperature swinging
July 16, 2007 12:19PM
You know I had a problem some time ago that your output sort of reminds me of.

I had dimensioned a vector of a certain length. Next to it in RAM were a couple of other variables, related ones. Those other variables, from time to time, would go crazy. After a LOT of trying to figure out what the hell was wrong I discovered that the firmware code working with the vector was, at intervals, sending out subscript values greater than the dimensioned length of the vector. When that happened the values of my other variables were getting overwritten with vector values and then all hell would break out in my firmware as the firmware tried to use these bonkers values.

The point was that the compiler I use to program firmware doesn't do limits detection on dimensioned variables. I wonder if SDCC does. confused smiley
Re: temperature swinging
July 16, 2007 12:27PM
C compilers don't generally check array bounds, it would be considered too big an overhead on an embedded micro. It's not a "hand holding" language, it is focused on efficiency.

Lint can do some static analysis which finds some but not all.


[www.hydraraptor.blogspot.com]
Anonymous User
Re: temperature swinging
July 31, 2007 03:27PM
hi,

I have now disabled the interrupts during the measurement of the temperature. Now it is working without jumps.

I am wondering if there is someone out there who is using this firmware with the 10K thermistor and the 0,1uF capacitor, as recommended for darwin? these people also must see this behavior. or are eric and I the only ones with this combination?

btw. reading the firmware-source extruder2.c, in the function checkTemperature(), VRCON is st to BIN(10100001) to test the discharge of the capacitor. I think it should be BIN(10100000) to test for 0V, or is there a reason to not test for 0V?
Anonymous User
Re: temperature swinging
July 31, 2007 05:40PM
0.1 Microfarad ? It is 1 microfarad with the Beta and Rz for the given Thermistor. Check the extruder page in the preferences or just calculate it.
I got almost 2 Microfarad for my Thermistor. The calculator is located at
[reprap.org], all you need is the Beta and the Rz
Anonymous User
Re: temperature swinging
July 31, 2007 08:07PM
I'm glad to hear you were able to stabilize your temp measurements, andreas. How did you eliminate the interrupts? Was it by modifying the firmware? If so, I'd love to have a copy of that firmware to test on my machine.
Anonymous User
Re: temperature swinging
August 02, 2007 06:06AM
hi englewood,

I am talking from the thermistor from RS 484-0149 as recommended on the page [www.reprap.org].
there is also written: "The best value of C2 for the standard thermistor is 0.1uF."

I have also used the calculator to verify this:
Using the following values for the calculation with the calculator:
(beta and Rz values are also from the above webpage and are also written on [www.reprap.org] and I have also compared them with the data-sheet of the thermistor, and the seem to be ok)
beta: 3480
Rz: 29000

measuring with the default max temp. of 250 C and the default error of 2 C gives an capacitor of 0,235uF
measuring with an max temp. of 200 C and the default error of 2 C gives an capacitor of 0,095uF

englewood how to you come to 1uF???

I have also tried a bigger capacitor of 4uF, it also had the jumping behavier until I changed in the firmware-source extruder2.c, in the function checkTemperature(), the value for VRCON from BIN(10100001) to BIN(10100000). but I didn't test it very long. (after then I changed the capacitor to 0,1uF).

you are using a 2uF capacitor, this means you are not using the RS 484-0149 thermistor, or?
Anonymous User
Re: temperature swinging
August 02, 2007 06:25AM
hi eric,

I changed the firmware. I can send you the hex-file or the extruder2.c file at the weekend (maybe not until monday, because I am not at home now), but I need your email.

but if you can compile the firmware, try to move the line "GIE = 1;" from line 477 in extruder2.c to line 469.
I think its only a quick hack and not the final solution, because if the duration of the uninterruptable state is to long then I assume that no more messages/commands are coming through. Therefor I will try to measure the time in the interrupts and subtract them from the measurement. But my first attempt failed, because I subtracted all, but I think I only have to subtract the time of the last interrupt.
Re: temperature swinging
August 02, 2007 08:21AM
The solution suggested in the wiki sounds easier to implement: clear a flag at the start of the measurement, set it in the interrupt handler and then test it after the measurement. If it is set the measurement was interrupted so discard the sample.


[www.hydraraptor.blogspot.com]
Anonymous User
Re: temperature swinging
August 02, 2007 08:58AM
hi nophead,

but it is only working if there is not always an interrupt during the measurement. my first tests shows that there seem to be always interrupts sad smiley
Anonymous User
Re: temperature swinging
August 02, 2007 09:31AM
but thinking over it, setting the flag and throwing away the measurement is maybe better because it needs less of the programm-memory. interrupts are alway occuring during the measurment, but most of them do not influence the result because the occur before the capacitor is loaded. only the last interrupt before reaching the vref-voltage and the interrupts after reaching and before setting the variable are the problem. if we can catch them, it should work.

calculating the duration would not work, because we also have to catch these interrupts and its not possible to know at what time during the interrupt the vref-voltage is reached, so the max error would be the longest duration of the interrupt sad smiley

So I will try to implement the flag, I will also disable interrupts after the while loop and setting the lasttemperatur-variable and keep the old temperature when the flag is set.
but for security-reasons I will implement a mechanism to switch off the heater if to much calculations have been thrown away.
Re: temperature swinging
August 02, 2007 09:57AM
andreas Wrote:
-------------------------------------------------------
> but for security-reasons I will implement a
> mechanism to switch off the heater if to much
> calculations have been thrown away.

Good idea. Relying on software alone for safetly would not be allowed on a commercial product with safety approvals. It should really have a thermostatic cutout as a failsafe. Either that or the heating element resistance should be such that it will not exceed the safe temperature of the PTFE when on 100% of the time. The recomended resistance is 8 ohms which gives 18W at 12V. That is not much less than a 25W soldering iron which would get up to about 300C I think. The barrel is smaller and better insulated than a soldering iron so I expect it would get to a similar temperature left to its own devices.


[www.hydraraptor.blogspot.com]
Re: temperature swinging
August 02, 2007 10:15AM
nophead Wrote:
-------------------------------------------------------
> Good idea. Relying on software alone for safetly
> would not be allowed on a commercial product with
> safety approvals. It should really have a
> thermostatic cutout as a failsafe. Either that or
> the heating element resistance should be such that
> it will not exceed the safe temperature of the
> PTFE when on 100% of the time. The recomended
> resistance is 8 ohms which gives 18W at 12V. That
> is not much less than a 25W soldering iron which
> would get up to about 300C I think. The barrel is
> smaller and better insulated than a soldering iron
> so I expect it would get to a similar temperature
> left to its own devices.

I just leave my barrel uninsulated. That uses more power, mind, but it also means that the brass plate that attaches the extruder barrel to the HDPE thermal break never sees more than about 120C and usually something like 90 when it is on 100% of the time. I feel that it is better to make the design intrinsically safe than to depend on electronics to prevent a meltdown.
Re: temperature swinging
August 02, 2007 12:40PM
Forrest Higgs Wrote:
"the brass plate that attaches the extruder barrel to the HDPE thermal break never sees more than about 120C and usually something like 90 when it is on 100% of the time."

I assume you meant PTFE not HDPE? Is there a temperature gradient down your barrel then? I ask because I suggested to englewood that putting the heater at the top of the barrel rather than the bottom might be a bad idea and he replied that because of the biot number (something I had to google) being small it would all be at the same temperature. I suppose now I have my heater up and running I could measure it myself.


[www.hydraraptor.blogspot.com]
Re: temperature swinging
August 02, 2007 01:10PM
andreas... you could upload the firmware to the forums, i'm sure there are others here that would like to take a look at it. =)
Re: temperature swinging
August 02, 2007 01:26PM
Sorry Nop, I'm so used to talking about HDPE that I did slip and use HDPE for PTFE.

Yes indeed, there is a rather steep temperature gradient down my extruder barrel. At the 0.5 mm orifice the temperature is running about 200C. That drops to about 80-90C at the connection with the PTFE. I do it that way because I want that filament going into the barrel without getting pliable too quickly. If you insulate the barrel you get effectively no gradient and the brass at the PTFE is hot enough to melt the filament, so you have to depend on the PTFE to act as a pressure vessel instead of just the extruder barrel. That puts some very strong limitations about how you are able to attach the barrel to the PTFE. With mine, the barrel extends about 1/8 inch into the PTFE and is held tight with the bolted brass mounting flange. The PTFE only has to serve as a guide for the filament and the force is all in downward thrust only instead of isotropic fluid pressure. It makes things a lot easier to deal with.

Edited 1 time(s). Last edit at 08/02/2007 02:56PM by Forrest Higgs.
Anonymous User
Re: temperature swinging
August 02, 2007 02:28PM
The Biot number is the ratio of heat loss to conductivity. Since the barrel is suppose to be insulated and Aluminum has a high conductivity, then uniform temperature radially through the barrel wall and length is reasonable. It had nothing to do with the heating wire, which should be uniform across the length of the barrel, but the thermistor placement. I didn't want to permanently attach the thermistor to a removable nozzle, so I think it should be located immediately behind the nozzle on the barrel. I'm a Mechanical engineer and the biot number is a way to quantify an answer so it isn't an opinion. Bi= hDc/K, Dc= volume/ surface area and h is the still air convection coefficient. The insulation reduces heat loss, even if it increases surface area. I just don't want to have to put thermistors on all the nozzles. I sent it to you yesterday,let me know when you get it. I don't have any specs on it, but I do know it works up to 381F, because I tested it there. In an extruder the combination of the uniformly heated barrel , (usually by a pumped heated oil circulating) and mechanical friction melt and liquefy the plastic. The oil helps control the temperature and prevents over temperature.
Re: temperature swinging
August 02, 2007 03:53PM
Forrest,
Yes rather than insulation you effectively have a heatsink at the top of the barrel increasing the gradient. That might be a good idea. I am not sure what the purpose of the fiberglass insulation is. Is it to keep heat in, or is it to stop heat radiating out and melting the workpiece?

englewood,
Yes I realised later you were talking about the position of the thermistor but I find whether or not there is a significant gradient, and whether it is desirable interesting. I think the latest official design concentrates the heater winding at the bottom, presumably for a reason. I think as well as the convection losses you also have the cooling effect of the incoming filament which has a very high specific heat capacity compared to the barrel. The flow rate is not much so it may not be significant. I expect I could calculate it giving a bit of time with Google. Or I can measure it on my machine. Its in bits at the moment so I should stop browsing the forum an put it back together again!


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

Click here to login