Welcome! Log In Create A New Profile

Advanced

Extruder Heat Profiler reaches max temperature and aborts before outputting data.

Posted by Andromodon 
Hello! I am in the "Calibration" stage of building my extruder. [www.reprap.org] I am having problems, though.

When put 150 as my max temperature and click on "Profile" in the "Extruder Heat Profiler" window, the following happens:
1.) In my console: "Heater output 0, ambient temp is 30.0C" (that's good)
2.) It starts at Power setting 15, and in a few seconds (10-15 seconds?), the temperature is up to 45.
3.) A few seconds later (10-15 seconds?), it jumps to something the the 112's C.
4.) A few more seconds later, I get, in the console, the message "Reached max temperature -- aborted".

This would all be fine, but I don't get any temperature/power level pairs printed in my console. It's my understanding that the heat profiler is supposed to wait for the temperature to stabilize before outputting a data point. Am I supposed to be able to reach 150C using power setting 15? If not, what might be wrong?

Could the problem be thermistor related? I am using the RRRF's EPCOS 100K Thermistor (B57540G0104F000) with a 4.7k R1, and an infinite (open) R2, and a 10uF capacitor. Temperature readings seem accurate in the Extuder Excerciser, although they seem to only update once every 10 seconds or so. Is this normal for it to update only once every ten seconds? My thermocouple board's temperature reading changes much more frequently.

Would the problem have to do with these 'sendMEssage error - retrying' messages I get occasionally, or does everyone get those?

Here's an example output from when I run reprap-host:

Experimental: JNI_OnLoad called.
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version = RXTX-2.1-7
Receive error, re-sending: Timeout receiving byte
Receive error, re-sending: Timeout receiving byte
Heater output 0, ambient temp is 30.0C
Reached max temperature -- aborted
sendMessage error - retrying
sendMessage error - retrying
sendMessage error - retrying
sendMessage error - retrying

Could some setting be the culprit?
Here are my reprap properties:

#Reprap properties [reprap.org]
#Sat Jun 28 17:16:07 CDT 2008
WorldName=RepRap-World
CommsDebug=false
Extruder0_ColourR(0..1)=0.3
Extruder0_XYSpeed(0..255)=230
Extruder1_Beta(K)=3480
Extruder1_OutlineSpeed(0..1)=0.6
Extruder1_Reverse(ms)=0
SelectedColourR(0..1)=0.6
RadiusFactor=0.7
SelectedColourG(0..1)=0.2
Extruder1_NozzleWipeStrokehot smileymm)=15
Extruder0_NozzleWipeDatumY(mm)=12
BoundFactor=3.0
Extruder0_OutlineSpeed(0..1)=0.6
Extruder0_ExtrusionInfillWidth(mm)=0.7
Extruder0_ExtrusionSpeed(0..255)=200
Extruder1_OffsetY(mm)=0
Extruder0_IncrementedStart=false
Extruder0_NozzleWipeFreq=4
Extruder1_NozzleWipeDatumhot smileymm)=20
Extruder1_ExtrusionSize(mm)=0.7
Extruder0_ExtrusionDelayForHatch(ms)=1000
Extruder0_CoolingPeriod(s)=40
ZAxisAddress=4
Debug=false
Extruder1_InfillSpeed(0..1)=1.0
Extruder1_NozzleClearTime(s)=-1
DisplaySimulation=true
Extruder1_Rz(ohms)=29000
Extruder0_hm(C/pwr)=1.7
Extruder0_NozzleClearTime(s)=-1
MovementSpeedZ(0..255)=212
Extruder1_IncrementedStart=false
Extruder0_NozzleWipeDatumhot smileymm)=20
Extruder1_CoolingPeriod(s)=10
Extruder1_MaterialType(name)=PDMS
WorkingZ(mm)=300
Extruder1_Capacitor(F)=0.0000001
Extruder0_Address=8
Extruder0_MaterialType(name)=HDPE
Extruder0_ShortSpeed(0..1)=1
Extruder1_Offsethot smileymm)=0
WorkingLocation=reprap-wv.stl
Extruder0_RandomStart=false
Extruder1_MinimumZClearance(mm)=0
Extruder0_ExtrusionSize(mm)=0.7
Extruder0_t0(0..255)=0
Extruder0_Capacitor(F)=.000003
Extruder1_ColourB(0..1)=0.3
Extruder1_InfillOverlap(mm)=0
MouseZoomFactor=50
MouseTranslationFactor=50
Extruder1_ExtrusionDelayForHatch(ms)=1000
WorkingY(mm)=300
BackFactor=2.0
Extruder1_AngleSpeedFactor(0..1)=0.5
NumberOfExtruders=2
Extruder1_ColourR(0..1)=0.3
ZAxisTorque(%)=100
Extruder1_hb(C)=20
Extruder1_ColourG(0..1)=0.6
Extruder0_InfillSpeed(0..1)=1.0
Extruder0_NozzleWipeStrokeY(mm)=15
Extruder1_ShortSpeed(0..1)=1
Extruder0_Reverse(ms)=0
MachineColourB(0..1)=0.3
Extruder0_OffsetZ(mm)=0
Extruder0_Beta(K)=550
Extruder0_MaxSpeed(0..255)=230
Extruder1_AngleSpeedLength(mm)=2.5
WorkingOffsetZ(mm)=-2
BaudRate=19200
FrontFactor=0.001
RememberWindowPosition=false
YAxisTorque(%)=100
Extruder0_InfillOverlap(mm)=0
Extruder1_t0(0..255)=0
Extruder1_ExtrusionHeight(mm)=0.8
Extruder1_ShortLength(mm)=1.5
UnselectedColourB(0..1)=0.3
ZAxisScale(steps/mm)=320
Extruder1_hm(C/pwr)=1.7
MachineColourG(0..1)=0.4
Extruder1_MaxSpeed(0..255)=230
Workinghot smileymm)=300
YAxisScale(steps/mm)=11.4855
Extruder0_AngleSpeedLength(mm)=2.5
XAxisAddress=2
IdleZAxis=true
XAxisScale(steps/mm)=11.4855
Extruder0_Rz(ohms)=4837
Extruder0_NozzleWipeStrokehot smileymm)=15
Extruder0_ExtrusionDelayForBorder(ms)=1000
Extruder1_ExtrusionInfillWidth(mm)=0.7
Extruder0_OffsetY(mm)=0
UnselectedColourR(0..1)=0.3
Extruder0_hb(C)=20
Extruder1_NozzleWipeEnabled=false
UnselectedColourG(0..1)=0.3
Extruder1_ExtrusionOverRun(mm)=2
MachineColourR(0..1)=0.3
Extruder1_NozzleWaitTime(s)=10
Geometry=nullcartesian
WorkingOffsetY(mm)=-24.85
Extruder0_AngleSpeedFactor(0..1)=0.5
Extruder1_Address=9
XAxisTorque(%)=100
Extruder0_ColourB(0..1)=0.6
AxisCount=3
Extruder0_ShortLength(mm)=1.5
Extruder1_ExtrusionSpeed(0..255)=200
Port(name)=/dev/ttyUSB0
BackColourB(0..1)=0.9
Extruder1_RandomStart=false
Extruder0_ExtrusionOverRun(mm)=2
Extruder0_MinimumZClearance(mm)=0
Extruder0_ExtrusionTemp(C)=110
FastSpeed(0..255)=200
Extruder1_NozzleWipeStrokeY(mm)=15
Extruder0_ExtrusionHeight(mm)=0.8
Extruder1_ExtrusionDelayForBorder(ms)=1000
Extruder0_ColourG(0..1)=0.3
Extruder0_Offsethot smileymm)=0
Subtractive=false
YAxisAddress=3
Extruder0_NozzleWipeEnabled=false
Extruder1_XYSpeed(0..255)=230
Extruder1_OffsetZ(mm)=0
BackColourR(0..1)=0.9
Extruder0_NozzleWaitTime(s)=10
WorkingOffsethot smileymm)=-17.3
SelectedColourB(0..1)=0.2
BackColourG(0..1)=0.9
Extruder1_NozzleWipeFreq=4
Extruder1_NozzleWipeDatumY(mm)=12
Extruder1_ExtrusionTemp(C)=-273

I don't know what to do. Thanks for your help!
emt
Re: Extruder Heat Profiler reaches max temperature and aborts before outputting data.
June 30, 2008 05:59AM
Hi Andy

I had trouble at this stage as well. In the end I guessed some numbers.
I fixed 2 thermistors to the extruder.

I then used the extruder Excerciser to set a temperature and then checked the second thermistor using a direct resistance measurement and the thermistor manufacturers table to establish the actual temperature.

I played with the numbers until got reasonable results around 130 degrees which is what they suggest for Capa in the Tweaking Manual.


Regards

Ian
I am pretty confident that my temperature readings are accurate, as both the thermistor and thermocouple I have record the same temperature.

Any thoughts as to the cause/solution of my situation?
Ok.. No one seems to be able to help so far...

Maybe it would be easier if I asked more specific questions. smiling smiley

What temperature does your extruder plateau at with a power setting of 15? Mine will go all the way up to 200C if I let it. I don't know if this is normal or not.

If you (yes you! smiling smiley have a spreadsheet left over of power settings and their corresponding temperatures, please post it. That would help me a lot.
I have an oscilliscope that I can use to monitor my nichrome wire heater signal. Does anyone know what the correlation between "power settings" and duty cycle should be? What is the expected duty cycle for a power setting of 15?

Also, the output should be 0-12V, right?

Thanks for your help!
Ok... I've done some troubleshooting steps to try to narrow down the source of the problem, but I still need some help.

I've hooked up an oscilliscope to pin PWM/DIGITAL6 of the single arduino in my setup. This is supposed to output a pulse-width modulated signal that is essentially buffered by the PWM Driver board. Whenever PWM/DIGITAL6 is high, the heater is full on, and whenever it's low, the heater is full off.

At power setting 15 (out of 255), I would imagine that the pin should output a PWM signal with a duty cycle somewhere between full on and full off (maybe 15/255=5% duty cycle?).

When I start the Extruder Heat profiler, however, the PWM/DIGITAL6 PWM/DIGITAL6 goes from a really-low duty cycle pulse train to a full-on signal. It continues this, driving the heater full-bore until the maximum temperature is reached. This does not seem to me to be the correct behavior.

If this is indeed not the correct behavior, this suggests that the problem is either in the arduino, the arduino firmware, the reprap-host software, or the reprap-host's properties. Is that correct reasoning?

Things I have tried:

I have replaced my arduino board with another I have laying around. Same effect.

I have re-programmed each arduino board with the latest (V1.3) firmware.

I have re-downloaded the latest reprap-host software.

I have moved my ~/.reprap/reprap.properties file so reprap-host makes a new one. Then, I copied over a few settings specific to my arduino-based setup. Here are the differences between my edited file and the brand-spanking new one that was just created by reprap-host:

14,15c14,15
< Extruder0_Beta(K)=550
< Extruder0_Capacitor(F)=.000003
---
> Extruder0_Beta(K)=3480
> Extruder0_Capacitor(F)=0.0000001
35c35
< Extruder0_MaterialType(name)=HDPE
---
> Extruder0_MaterialType(name)=CAPA
53c53
< Extruder0_Rz(ohms)=4837
---
> Extruder0_Rz(ohms)=29000
123c123
< #Mon Jul 07 22:42:20 CDT 2008
---
> #Mon Jul 07 22:37:32 CDT 2008
128c128
< Port(name)=/dev/ttyUSB1
---
> Port(name)=/dev/ttyS0

Do these seem like the correct changes in the properties file? Should any of these settings directly effect the Extruder Heat Profiler?

After trying each of the above, I re-ran the extruder heat profiler and it still drove the PWM/DIGITAL6 pin high.

What am I missing? What else can I try?
emt
Re: Extruder Heat Profiler reaches max temperature and aborts before outputting data.
July 08, 2008 04:46AM
Hi Andy

Are you using the extruder excerciser in the host? The value there is in degrees.

First off I am sure the output goes high UNTIL you reach temperature so you will not see a duty cycle until you are hovering around the temperature required.

So the signal you may need to look at is the temperature input and not PWM.

If I look at the PWM led on my set up I can see the LED at full brightness then start to flicker when temperature is reached.

Having said all that I fired up my machine to check your numbers and found I am getting odd temperature feed back. I am sure it was working correctly when I last used it.

Now I can't use my machine at the moment until I build some new stepper drives so I have been playing with various versions of the software.

There may have been some firmware/host mods that have changed things. What versions of host and firmware are you using?

Also have you the correct thermistor data in your firmware?

I would test the thermistor set up using the arduino sketch on the temperature_sensor build page. (I think you may need to change the pin to match the actual input used).

You could also test the PWM set up with the test software on the build page.

Your preference values look correct to me


Regards

Ian
I am using the "Extruder Heat Profiler" in the reprap-host program. You're right about the behavior of the extruder exerciser, and that works fine for me.

I am using reprap firmware V 1.3 (the single Arudino snap file), and reprap-host from 2008-05-23.

I am sure i have the right thermistor data in my firmware, because the thermistor test and extruder exerciser both give the correct temperatures for ice water and boiling water.

I have also tested the PWM board, as you suggest.

Keep the ideas coming! smiling smiley One of them will probably lead to the solution. smiling smiley

-----------------------------
I've tried looking into the source for the firmware and reprap-host applications to gain more insight to my problem. I am able to track down where the reprap-host program assembles a message to send to the Arduino that tells it to set a given power level, but I cannot find where in the Arduino code that message is received and acted upon. Any thoughts?
I think I found the message processing area of the firmware. I still need help though. smiling smiley
Alright, guys... I think I found the problem, and it's in the Arduino firmware.

Looking through the reprap-host source code, I traced the series of steps that would begin when I hit the "Profile" button in the Extruder profiler. Eventually, clicking that button results in the following 5-byte message packet being sent to the Arduino (see below). This is supposed to communicate that the host computer wants the Arduino to set the heater power level to 15 (15/255 of the maximum), and if for some reason the temperature gets above the max allowed, the Arduino should stop any heating:

{MSG_SetHeat , 15, 15, , }

The 0th byte, MSG_SetHeat, which is a constant for the number 9, represents the command. This collection of five bytes is interpreted in the Arduino firmware's ThermoplastExtruder_SNAP_v1.cpp file, and the part that processes the command 9 starts at line 98:

...
case CMD_SETHEAT:
//extruder.heater_low = snap.getByte(1);
//extruder.heater_high = snap.getByte(2);
extruder.heater_low = 64;
extruder.heater_high = 255;
extruder.target_celsius =calculateTemperatureForPicTemp(snap.getByte(3));
extruder.max_celsius = calculateTemperatureForPicTemp(snap.getByte(4));
break;
...

Do you see the problem? This code only uses the bytes with indices 0 (the command number) ,3 (the max temp), and 4 (the max temp). The lines that use the bytes of indices 1 and 2 (the ones that communicate the power setting) are commented out.

I have a feeling that the extruder heat profiler would work correctly for me if these lines were uncommented. Does anyone know why these were commented out? Zach Smith, do you know? smiling smiley

If I am right that these lines are the culprit, the latest version of the Arduino firmware shouldn't allow ANYONE to successfully use the Extruder Heat Profiler. Everyone should have my symptoms. Can someone check to see if this is broken for them too, please? smiling smiley
Re: Extruder Heat Profiler reaches max temperature and aborts before outputting data.
July 09, 2008 03:08PM
Hey Andy,

You are correct, those two lines do allow the host to set the heater values.

I'm not entirely sure why they are commented out, but my guess is that I was having some problems and/or debugging and just hardcoded them.

Feel free to re-enable those lines and test it out. If it works, let me know and we can get those into the next release.
I tried, but it didn't seem to work. I'm new to this Arduino stuff, so maybe I did something wrong.

Here's what I did:

I edited the file in the arduino libraries directory (/opt/arduino/arduino-0011/hardware/libraries/ThermoplastExtruder_SNAP_v1/ThermoplastExtruder_SNAP_v1.cpp on my machine) to uncomment those two lines.

Then I deleted the corresponding object file (ThermoplastExtruder_SNAP_v1.o). Is this necessary, or will the Arduino program look at the timestamps and recognize that a re-compile is called for?

I then opened the Single_Arduino_SNAP.pde file in the Arduino Alpha program, an pressed the "Verify" button, followed by the "Upload to I/O Board" button. After the transfer successfully finished, I tried the Extruder Heat Profiler again and got the same result as before.

Did I miss something in the firmware change? Is there something else I need to be doing to implement this change, or does this mean that these two lines are not the culprit of my problems?

Then, I pressed
emt
Re: Extruder Heat Profiler reaches max temperature and aborts before outputting data.
July 10, 2008 03:59AM
Hi Andy

I can't help with the problem but I can confirm you must delete Arduino library object files to force a recompile.

I routinely delete all the object files as it is easy to miss a change when downloading updates and if you do chaos reigns until you realise your error.


Regards

Ian
Thank you, Ian! Just for confirmation, do I just need to delete the objct file associated with the cpp file I'm editing, or do I need to delete all of the object files?
emt
Re: Extruder Heat Profiler reaches max temperature and aborts before outputting data.
July 11, 2008 04:09AM
Hi Andy

Only the library file you are editing. However, having got myself in a right mess by missing a change (got a high level interrupt and forgot where I was) I wrote a batch file that deletes all object files to force a full recompile of the firmware.


Regards

Ian
Re: Extruder Heat Profiler reaches max temperature and aborts before outputting data.
July 11, 2008 12:49PM
Ian and Andy; I had the same problem with Arduino object files, figured it out the hard way too. And, as usual, I found a note in the documentation about it after I'd been denting the wall with my cranium all day. smiling smiley It's mentioned here: [reprap.org]

I came across that while bugging Zach for hints on getting the Thermocouple to work; thanks Zach, btw!

I ran into the same problem as Andy, but since the heater control is closed loop, I just left the values at their defaults and forged ahead.

Extruder0_hb(C) = 20
Extruder0_hm(C/pwr) = 1.7

Having those exactly right will make your extruder a little more stable temperature wise, but the defaults work fine for me. I think Nophead has been just bit banging his heater, with obviously excellent results.

Good on you for debugging the code Andy. It's tough! I'm running into the hesitation bugs now, where my bot stops and extrudes a mess every few seconds; suddenly I see the attraction of the gcode software.
Thanks, Ian and Wade!

Wade: I'm glad someone else has experienced this problem and it's not just me.

I'm going to follow your lead and forge ahead. Like you said, the performance of the temperature control loop is not critical.

Whew... I'm glad to be past this. smiling smiley

~Andy

P.S. Good luck with your hesitation bugs.
emt
Re: Extruder Heat Profiler reaches max temperature and aborts before outputting data.
July 12, 2008 04:08AM
Hi Wade

Have you got the latest host from the SVN. I understand Adrian has implemented buffering for move data that may help solve the hesitation you are seeing.


Regards

Ian
Re: Extruder Heat Profiler reaches max temperature and aborts before outputting data.
July 13, 2008 11:04AM
Yeah, will try that Ian, thanks. I'm also getting lockups while using the stepper exerciser though; I think it might be something beyond just comm pauses.

Wade
Sorry, only registered users may post in this forum.

Click here to login