Welcome! Log In Create A New Profile

Advanced

PID control

Posted by DanielG 
PID control
September 08, 2010 12:07AM
I just installed a block heater I made and am having trouble heating it to the set temp.... If I use a firmware I found that has PID disabled it shoots right up and works and is fairly stable... I would rather use released firmware though and would like some help adjusting the PID for the heater...Any thoughts? Am I way off base here?

Basically I am around 30c off.. if I set it @ 190 it hovers around 160 or so... 220 its at 190 etc... With PID off it shoots right up and stays....+- 7c or so

Thanks!
Dan

Edited 1 time(s). Last edit at 09/08/2010 12:14AM by DanielG.
Re: PID control
September 08, 2010 04:42AM
If you have a heater with a high thermal mass and good conduction to the thermistor you don't need PID, simple bang bang control works great. Mine oscillates about +-C around the set point with a cycle time of a few seconds.

Theoretically PID will give smoother results but it requires tuning for each different heater and if it is out of tune it can go berserk or never reach the set point. If you make P very big and I and D zero it should emulate bang-bang.

[rant]
This is another case where I think RepRap went down the wrong path. When it moved to nichrome and Kapton PID became necessary (because the temperature rises far too quickly for the thermistor response time). So now we have a fragile heater that continually gives people problems and fragile firmware that also gives problems. The faster heating is not useful because you have to wait for the filament to melt before extruding anyway. If you don't then the extruder jams, another thing that makes the system fragile.

When a project like this is expected to be made by non-experts it has to use simple fool prof techniques, not complex fragile ones.

I don't understand why my "vitreous enamel resistor pushed into a small block of aluminium design" is not the recommended default. It isn't expensive or hard to make, especially compared to making the nozzle. It isn't fragile and the firmware becomes trivial and foolproof. I have run two for thousands of hours without failure. One even survived being encase in ABS and dug out again.
[/rant]


[www.hydraraptor.blogspot.com]
Re: PID control
September 08, 2010 04:49AM
Quote
nophead
I don't understand why my "vitreous enamel resistor pushed into a small block of aluminium design" is not the recommended default. It isn't expensive or hard to make, especially compared to making the nozzle.

YES, but most of us don't have a lathe and therefore only the brave attempt making their own nozzle using just a drill press.
I have purchased some vitreous enamel resistors but with only a drill press have not attempted to make the needed block.

The nichrome wire is fairly easy and works pretty well but I do like your solution better. thumbs up


Bob Morrison
Wörth am Rhein, Germany
"Luke, use the source!"
BLOG - PHOTOS - Thingiverse
VDX
Re: PID control
September 08, 2010 04:54AM
... i think it's in relation to DIY-ability against the need of 'vitamines' ...


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: PID control
September 08, 2010 05:05AM
I thought that is what I wrote... eye rolling smiley

The better the workshop (or tools) the more that can be done easily DIY!


Bob Morrison
Wörth am Rhein, Germany
"Luke, use the source!"
BLOG - PHOTOS - Thingiverse
VDX
Re: PID control
September 08, 2010 05:14AM
... yes, if you count the tools as 'vitamines' too winking smiley

It seems the scope is mainly focussed on building repraps in underdeveloped regions, where appropriate tools and shops aren't everywhere 'around the edge' ...


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: PID control
September 08, 2010 06:13AM
Quote

YES, but most of us don't have a lathe and therefore only the brave attempt making their own nozzle using just a drill press.
I have purchased some vitreous enamel resistors but with only a drill press have not attempted to make the needed block.

The nichrome wire is fairly easy and works pretty well but I do like your solution better. thumbs up

I made the heater block on my Mendel with only a drill press and an M6 tap. You only need a lathe or milling machine to make a combined heater and nozzle like I have on HydraRaptor. A separate nozzle can be made by spinning it in a drill press and lowering onto the drill.

Some people get the nichrome and Kapton to work, but many struggle with it constantly failing. It is the same with the PTFE insulator. This is what I mean about fragile solutions. When you make one of something it is completely different to making thousands. I am used to designing things for mass production and they have to be reliable designs that always work. RepRap is distributed mass production. That means the production environment is total uncontrolled. Which means that the designs have to be very robust indeed to have a high success rate.


[www.hydraraptor.blogspot.com]
Re: PID control
September 08, 2010 06:49AM
Quote
nophead
RepRap is distributed mass production. That means the production environment is total uncontrolled. Which means that the designs have to be very robust indeed to have a high success rate.

Agree 100%!


Bob Morrison
Wörth am Rhein, Germany
"Luke, use the source!"
BLOG - PHOTOS - Thingiverse
Re: PID control
September 08, 2010 09:02AM
Putting my own two cents in-
I agree with nophead about fragile solutions. Using plastic parts in areas meant to melt plastic is just asking for trouble.
That goes for the use of kapton tape as an insulator as well PTFE as a thermal barrier.

Part of the problem I see with reprap in general is that it seems to me there is very little engineering going on. There is a lot of hacking, but almost no thermal engineering or systems control analysis(PID). Instead there is this almost random Darwinian approach that leads to suboptimal solutions and leaves people scratching their heads wondering why their barrels melt, PID controllers go nuts and filament melts up to the top of the barrel.

I had a post a while back where I tried to apply my 1 semester of thermal analysis to the heater barrel to get an idea of what kinds of temperatures and power requirements would be needed so I could select appropriate materials. It was nothing really complicated. Just the thermal equivalent of Ohms law. I have been watching the reprap forums for about three years and have not seen anyone try to put any numbers to what is being done. I know no one would even think about designing an electronic circuit without doing a little math first. Why should reprap be any different.

Again just my 2 cents.
Re: PID control
September 08, 2010 02:28PM
Thanks for the thoughts guys... I think I will go ahead a disable the PID control... dont see the point now..

I also made my block with just a drill press and an m6 tap... It was a HELL of alot easier than the wire and tape (for me)
This is fun stuff! and getting easier everyday.......
Re: PID control
September 13, 2010 12:52PM
VDX Wrote:
-------------------------------------------------------
> It seems the scope is mainly focussed on building
> repraps in underdeveloped regions, where
> appropriate tools and shops aren't everywhere
> 'around the edge' ...

Having RP tech in underdeveloped regions is great, but these machines are still rare in the developed world as well. The machines are out of the price range and time constraints of most people, everywhere. It's almost like development needs two tracks; One for improving design simplicity using ANY material or tools in order to push the machines to new evolutionary steps, and another that creates a simple, cheap, easily built, and easily sourced machine.

On the other hand, the ability to procure the raw plastic spools is the determinant factor in whether building a proper Reprap is even advisable. In other words, if you can't get ABS or PLA spools, you are going to have to build something custom anyway. I don't know, but i'd assume that the plastic spools are harder to get than any of the electronic components. So in that case, maybe development (of Reprap proper) should not be constrained by whats easiest to build/procure in the underdeveloped world. If the concentration is on getting more machines out there in the developed world, availability of raw materials and parts will spread into the underdeveloped world, and with more machines out there, parts and materials will be cheaper.
Re: PID control
September 16, 2010 05:54AM
Just to add my two cents here....

XCBot'c hot-end is made from a resistor block. I don't have a lathe. I used a drill-press, but considering we are talking 2 holes, that don't need to be perfectly aligned, a hand-drill would be fine. And an M6 tap.

Having read a ton before starting, I decided to go with nophead's resistor block, and the resistors he suggests, as it seems the most simple/foolproof.
I went through 3 iterations, taking half an hour each time to make a block, stick an alu foil wrapped resistor in it and surround it with some 1mm PTFE (kapton would also work fine). (Changes were due to insufficient power from small resistors)

I tried a PTFE isloator (also made with only a drill-press), but had leakage problems, so went back to my drill-press drilled M6 threaded rod isolator with salvaged heat-sink. My nozzle is a re-worked MIT torch tip, reworked with a tubing cutter, 3.5mm drill and a file. See my blog post: [araspitfire.blogspot.com]

The current one has printed 2/3 of a mendel and hasn't missed a beat. I'll put it on the wiki now that I feel it's a reliable design, but it pretty much comes right off of nophead's blog posts.

Al...

Edited 1 time(s). Last edit at 09/16/2010 07:36AM by araspitfire.


[araspitfire.blogspot.com]
Re: PID control
September 17, 2010 04:36AM
I couldnt find Aluminium block in my local hardware store, so I made my resistor block from 3mm strips.
I used 2 3.9 ohm resistors so that the heater leads come out on the same side of the block:
I was able to sandwich my thermocouple between two of the strips (you can just see the notch I used in the first picture).

First image: [reprap.org]
Second image: [reprap.org]
Re: PID control
September 17, 2010 07:01AM
I Like It!

What wattage resistors? Have a link to where you got them?
Arvin
Re: PID control
September 17, 2010 07:40AM
Looks good. Did you insulate the thermocouple?


[www.hydraraptor.blogspot.com]
Re: PID control
September 17, 2010 08:30AM
I am not sure whether you need to or not. You would think the AL would short it out, but I think it just forms more hot cold junctions that add up to the same voltage.


[www.hydraraptor.blogspot.com]
Re: PID control
September 17, 2010 10:02AM
so i'm assuming bang bang control means just using on/off commands instead of PID... can the resister go into the same pins on the extruder controller as the nicrome wire? or different pins and firmware change? i'm definitely going down this path i'm sick of working with nichrome.
Re: PID control
September 17, 2010 10:11AM
Nophead,
If you look at the data sheets for thermocouples, the voltage difference at the cold ends varies by a fraction of a millivolt per degree C change across the length of each wire. That means that a very sensitive differential amplifier is needed to boost the signal and make it easy to read. And that probably means that if it is grounded or shorted to anything else is may interfere with getting as good temperature reading, so I would be very careful about insulating the thermocouple tip to ensure reliable operation.

Greg, looks like a great design for people without the fancy tools. Do you have instructions online yet for making this? I would like to try one and compare it to wrapping nichrome wire around the end. The full surface heating of the aluminum may improve the flow in the tip of the nozzle.

Mike
Re: PID control
September 17, 2010 11:45AM
@mlagana.
Yes you can connect the resistors to the same output terminals as the nichrome as long as the resistance is not less than 6 ohm. Adrian tells me that if you set the P term to 0 it will do bang bang.

Quote
Adrian Bowyer
It's now a parameter in the firmware. You set the proportional band
in deg C. Setting that to 0 gives bang-bang.

@rocket_scientist
Yes I know the thermocouple output voltage is very low, but as it comes from a short circuit it also has a very low output impedance. That is why you can operate a solenoid direct from a thermocouple in a flame. That is how fail safe gas pilot lights work. The thermocouple generate enough current to energise a very low resistance solenoid to hold the gas valve open. The voltage is still only a fraction of a volt, but the current is significant. The solenoid has a few turns or very thick wire.

Wade, knows more about this than me, but I think it doesn't matter what intermediate sequence of metals you use, the total voltage will be the same. For example you can connect one wire to one slice of the aluminium and the other to another, and as long both junctions are at the same temperature you wont affect the reading. You get one voltage at the nichrome - aluminium junction and another at the aluminium - alumel junction and the sum of those is the same as you would get from a nichrome - alumel junction at the same temperature.

So I think you can totally short circuit the thermocouple with aluminium and not affect its result. You end up with a nichome alumel junction in parallel with (nichrome - aluminium in series with the aluminium - alumel) but since both arms of the parallel branch generate the same voltage it make no difference.

That is as long as the nozzle is insulated from the rest of the machine.

Edited 1 time(s). Last edit at 09/17/2010 11:47AM by nophead.


[www.hydraraptor.blogspot.com]
Re: PID control
September 17, 2010 09:29PM
@Arvin: The resistors I used are only 1 Watt. I got them from Jaycar (in meat space) a local electronics store ($0.44AU for a packet of 2). I'm not sure how long they will last.

@nophead: I did insulate the thermocouple (Although based on what you have said, perhaps I didn't need to). I just folded a piece of kapton over the end, just the right size to reach the insulation on the individual thermocouple wires. I then folded a second piece of kapton, this one further up the to grip the insulated thermocouple wires firmly. All of that sandwiched between 2 layers of Al.

@rocket_scientist: There is really nothing to the design other than drilling holes. The hole for the barrel is tapped (in my case M7x1). One of the strips has M3 tap, the others a 3mm hole. This allows the screws to hold the whole thing together. The holes for the resistors are 4.5mm (This is a little big, but 4mm was not enough). If someone can get a solid block of aluminium, that would be better (and easier, other than perhaps attaching the thermocouple).

Edited 1 time(s). Last edit at 09/17/2010 09:30PM by Greg Frost.
Re: PID control
September 17, 2010 11:56PM
awesome, think i will go with these:

[reprapkit.com]

for nozzle + bed
Re: PID control
September 20, 2010 01:38AM
Man just finished my new block heater plus thermocouple design, and had one hell of a time with the new "official" firmware.. was doing REALLY weird thing things.. seemed like digital interference when I plugged in the thermocouple... almost like it froze the comm bus.... heater, fan lights flashing and no temp reading.... weird... changed to old "hacked" extruder firmware and all things are good now... oh well now i can calibrate again and MAYBE print!!!!!!!!!!!!!
Re: PID control
September 20, 2010 10:36AM
Nophead,

Are you running the heating element from a Relay or a MOSFET?

Andy
Re: PID control
September 20, 2010 11:29AM
A MOSFET, relays are so last century and not at all suited to this application, they wear out when they switch on and off constantly.

I have run my Mendel constantly for about 2500 hours. In that time I expect the heater will have switched on and off about every 7 seconds (the time constant of the thermistor) so that would be several million operations, more than the life of a typical relay.


[www.hydraraptor.blogspot.com]
Re: PID control
September 23, 2010 01:10AM
Its finally printing parts for a new machine!!!!! the new copper encased extruder is working great!


Sorry, only registered users may post in this forum.

Click here to login