Navigation
Powered by Squarespace
« Using a reprap to make adult objects( aka things for sexy times) | Main | Reprap Firmware and G-code fun (if by fun I mean madness inducement) »
Sunday
04Oct2009

Adjusting PID controller for the heater

The makerbot version 1.6 firmware includes a PID controller. This is designed based on a makerbot extruder, which used nicrome and kapton tape.

 

I use a combination of 2 5 Watt ceramic resistors and fire cement (all wrapped up in PTFE tape) for my rebuilt BfB extruder(it's hard to find insulated nichrome in Australian electronic stores). Normally if it was running at room temperature I would need about 10 seconds before it started to show any effect in repg and (ie the lag between the ceramic heaters and the thermistor is pretty big) so my range would be around 235-255(probably much higher) for a setting of 250.

Running the PID enabled makerbot firmware I've found that for something with such a large mass and time lag then I needed to adjust the PID settings. The effect was that it would tend to sit about 5-10 degree's below the set point because it would stop driving as hard a little too low. I adjusted the PID settings and now it runs pretty much perfectly, with it floating at 248-250.

The original settings were:
+#define TEMP_PID_INTEGRAL_DRIVE_MAX 110
+#define TEMP_PID_PGAIN 5.0
+#define TEMP_PID_IGAIN 0.1
+#define TEMP_PID_DGAIN 100.0
My settings are:

#define TEMP_PID_INTEGRAL_DRIVE_MAX 120
#define TEMP_PID_PGAIN 8.5
#define TEMP_PID_IGAIN 0.13
#define TEMP_PID_DGAIN 30

Basically what I did was increase the max drive a little (more to make initial warmup a bit faster for me, i'm not running the motor at this point anyway so it won't really have that much of an effect). I then drove the PID more towards a PI controller than a PID. I've found that this controller works when the dominant effect is loss of heat. At low temperatures (I tried it at 150C) then the weakened derivative controller really has an effect and it see saws alot (it really moved around in a range of 135 to 165 and was all over the place). But I've found that at higher temperatures with a lot of heat loss then there is much less fluctuation and the stability is great.

BfB's wiki page on Gcodes already defines an M code which is made to change the PID controller variables. This would make tuning much easier so I'm having a go at simply making these an M code that the extruder can understand with a quick patch to the firmware.
-Peter Hillier

 

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>