MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.17k stars 19.21k forks source link

Marlin 115 tried to burn my house down during PID tuning #8103

Closed jarrodasmith closed 6 years ago

jarrodasmith commented 6 years ago

Bug Report

Attach a ZIP of Configuration.h and Configuration_adv.h by dropping here. config.zip

guiseco commented 6 years ago

AUTOTUNE does not respect MAXTEMP. If you set 500C ... KABUUUM !!!!

jarrodasmith commented 6 years ago

I did:

M303 E0 S205 C10

The issue isn't that I set a high number, it's that the thermistor went offline (it read -14C) so the firmware kept pushing amps to the heater even though it was probably close to 400C by the time I could run downstairs and manually switch off the power. The bottom ~20mm of PTFE in my throat was in a smoking puddle on the build plate....

This is a serious safety concern.

On Oct 26, 2017, at 12:36 PM, Guilherme S. Blanco notifications@github.com wrote:

AUTOTUNE does not respect MAXTEMP. If you set 500C ... KABUUUM !!!!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

ghost commented 6 years ago

Say ' THANK YOU ' to marlin Now you know , what is the maker life that have thermistors and these eternal wiring short circuit between nude wires or on the hotend Some material on the wires is enough to make a crash , a direction changes , or your finger that want to clean the nozzle and touch the wires etccc Or when you change the nozzle , you move all with force a BOUM , forced to remade all wires ..

Buy thermocouple type k or pt100 ; i suggest PT100 because all hotend have the 3 mm holes for it , volcano , or normal , and no limits of temp and ....... NO PROBLEMS OF ETERNAL MIN TEMP BRUTAL CRASHES

I love thermistors but not on a machine that can shake while 30 hours a pair of nude wires !!!!!!!!!!

Grogyan commented 6 years ago

I agree, just get a thermocouple, or PT100, these are sensors designed for high temperature, and are resilient to vibration. Those cheap thermistors, break.

Or get an E3D V6 hotend, which have temperature cartridges

jarrodasmith commented 6 years ago

Thanks for responding. This is a SERIOUS safety concern. I prefer infinity min temp crashes to one fire.

I do agree about the thermocouple - I already have parts on the way to build M3 cartridge type thermistors for this application. But even when I get those, it does not mean I want to run the risk of a fire under any circumstance just to avoid losing a few prints here and there....

This is a severe issue that needs to be addressed by both hardware and software fixes.

On Oct 26, 2017, at 5:54 PM, studiodyne notifications@github.com wrote:

Say ' THANK YOU ' to marlin Now you know , what is the maker life that have thermistors and these eternal wiring short circuit between nude wires or on the hotend

Buy thermocouple type k or pt100 ; i suggest PT100 because all hotend have the 3 mm holes for it , volcano , or normal , and no limits of temp and ....... NO PROBLEMS OF ETERNAL MIN TEMP BRUTAL CRASHES

I love thermistors but not on a machine that can shake while 30 hours a pair of nude wires !!!!!!!!!!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

jarrodasmith commented 6 years ago

On Oct 26, 2017, at 6:13 PM, Jarrod Smith JARROD.SMITH@GMAIL.COM wrote: But even when I get those, it does not mean I want to run the risk of a fire under any circumstance just to avoid losing a few prints here and there....

In hindsight what I wrote there doesn't even make sense. But I think you get my point. The good news is that we all appear to be in agreement that the thermistor issue is very real and annoying. I think that adds more weight to the argument for a software fix. Otherwise you are going to have some newbies like me buy a $300 printer off aliexpress with those crap thermistors and burn half his house down with it.

Roxy-3D commented 6 years ago

So... It is impossible to please everybody. The thermal protections numbers for THERMAL_PROTECTION_HOTENDS and THERMAL_PROTECTION_BED are much too tight for me. I always end up relaxing them significantly for my printers. But the people that did the work want them that tight and I respect their opinions. They know a lot more about the subject than I do.

If you are worried about burning your house down, you probably should only use the printer while you are watching it. And you should probably only use it with the printer placed outside in the middle of a concrete driveway. Maybe that isn't enough. Maybe you should stack some concrete blocks around it to make sure that if anything catches fire it is isolated and the fire can't spread. Also, it might be wise to put a 5 amp fuse on the circuit where you are plugging in the printer to help limit what can go wrong.

While you are doing those things we can continue to discuss other ways the firmware can help you have confidence in the safety of using your new AliExpress printer!

Spawn32 commented 6 years ago

or use dual thermistors on the hotend... not sure Marlin has support for it ?

jarrodasmith commented 6 years ago

Why the hostility? I think a request to obey Max Temp and Min Temp during PID tuning is reasonable.

On Oct 26, 2017, at 6:32 PM, Roxy-3D notifications@github.com wrote:

So... It is impossible to please everybody. The thermal protections numbers for THERMAL_PROTECTION_HOTENDS and THERMAL_PROTECTION_BED are much too tight for me. I always end up relaxing them significantly for my printers. But the people that did the work want them that tight and I respect their opinions.

If you are worried about burning your house down, you probably should only use the printer while you are watching it. And you should probably only use it with the printer placed outside in the middle of a concrete driveway. Maybe that isn't enough. Maybe you should stack some concrete blocks around it to make sure anything that catches fire is isolated and the fire can't spread. Also, it might be wise to put a 5 amp fuse on the circuit where you are plugging in the printer to help limit what can go wrong.

While you are doing those things we can continue to discuss other ways the firmware can help you have a confidence in the safety of your using your new AliExpress printer!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

Roxy-3D commented 6 years ago

Why the hostility? I think a request to obey Max Temp and Min Temp during PID tuning is reasonable.

Did M303 REALLY try to burn your house down? You are basically accusing the author (and everybody that has contributed to the M303 code) of intentionally trying to cause you harm. Perhaps it would make sense to change the title to something like "Suggested improvement for M303's thermal behavior"

ghost commented 6 years ago

STOP ! The only thing we want to say , is our experience of marlin and the brutality of the temperature alarm algorithms If temps make shit , print stop And all here knows enough marlin to say , that it's possible there is an issue about this , but , we are all sure that , before to bug , we have a hardware that don't give enough stable value Here , we are all sure that if you haven't theses thermistors 'sorry ' these nude wires that touch the hotend and receive your 3G/4G cell phone waves and more lolllllllll , you never had this issue

Yes , we must work on several wiring problems and your issue will be seriously explored

Give us , all , the circonstances , to make this crash repeat at your home to verify the issue works each times your make the scenario , give us the exact things , to create this issue at home Give all detail as possible , to recreate the same situation and we quickly see if marlin have a disease

M303 is a child of alarm function and use the temp alarm that all use in print and preheating If M303 make shit , it's all marlin that makes shit , and it's difficult to believe this , you understand ? and to finish , it's totally impossible to heat something if an anormal behavior happens on the sensors , you can trust me , just a little difference and marlin stops !!!

The only possibility is , the wiring diagram , you have connected the heater right to the left and the left to the right , and all without THERMAL PROTECTION in this case , Marlin heat the right , and measure the left sensor , if no thermal protection , the heater can reach 28000 degres approx lollll

No war here , the only war , is to have the first perfect layer with UBL loll

jarrodasmith commented 6 years ago

Thank you. If I was impolite in my wording of the subject line, it was because this incident freaked me out. I hope all you reasonable and generous people can understand that. That does not in any way diminish the otherwise extremely clever bit of software you've managed to put together so don't read any more into it than that.

On Oct 26, 2017, at 7:40 PM, studiodyne notifications@github.com wrote:

STOP ! The only thing we want to say , is our experience of marlin and the brutality of the temperature alarm algorithms If temps make shit , print stop And all here knows enough marlin to say , that it's possible there is an issue about this , but , we are all sure that , before to bug , we have a hardware that don't give enough stable value Here , we are all sure that if you haven't theses thermistors 'sorry ' these nude wires that touch the hotend and receive your 3G/4G cell phone waves and more lolllllllll , you never had this issue

Yes , we must work on several wiring problems and your issue will be seriously explored

Give us , all , the circonstances , to make this crash In a perfect order , because , we all want to try to make this at home , without your hardware , but to have the same exact situation , and after we will say if it's an issue

No war here , the only war , is to have the first perfect layer with UBL loll

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

Roxy-3D commented 6 years ago

From another perspective.... Everybody here has spent countless hours trying to make things better for the generic user. My biggest contribution is the UBL Bed Leveling. I did EVERYTHING possible to make it SAFE so it doesn't needlessly hurt anybody's machine. There are 1000 different ways the bed leveling and mesh editing software can drive a nozzle into the bed and damage the user's machine. That still does happen occasionally. But I've done everything in my power to make it not happen. The people that work on the thermal code are at least that contentious.

If people are volunteering their time (and expertise)... It is best to proceed gently and make them want to help you.

With that understanding... I suspect somebody is going to find the problem interesting and be willing to add some safety checks to M303.

RowanMeara commented 6 years ago

I know that everyone who has contributed has put in many hours to make Marlin better and safe and I appreciate their effort. However, I found the pid auto-tuning code and it seems to be a little rough (one confusing 200+ line function). I'm interested in contributing and will look around and see if I can find the issue.

jarrodasmith commented 6 years ago

If people are volunteering their time (and expertise)... It is best to proceed gently and make them want to help you.

Roxy-3D, thank you for your contributions (seriously). We all want to be recognized for our hard work, that is human nature.

Since something I said seems to have really rubbed you the wrong way, I'm going to get very specific so you and others who I may have put off will understand where I'm coming from. I am a person who watched their printer nearly go up in flames. Politeness was not at the top of mind when I came here to alert you all to an issue that could potentially cause loss of property or even life. Getting your attention was. My frank tone is not coming from a place of anger, or ego, or spite. It's out of concern that the next person who uncovers this issue may not be in a position to intervene as quickly as I was.

If someone reading this has the expertise to diagnose and fix this, don't do it for me - I know how to avoid it. Do it for the next guy or gal, who doesn't.

And thank you all for an amazing piece of software. I authored some open source software back in the '90s, so I fully understand the commitment. I once had someone at a LUG meeting tell me to my face that my software was a piece of shit. And later I got threatened with a lawsuit by a publicly traded company who decided I was infringing on their trademark by supporting their products in Linux.

This is not that.

jarrodasmith commented 6 years ago

Thank you Rowan. If I can provide any info from my end, let me know.

On Oct 27, 2017, at 1:09 AM, Rowan Meara notifications@github.com wrote:

I know that everyone who has contributed has put in many hours to make Marlin better and safe and I appreciate their effort. However, I found the pid auto-tuning code and it seems to be a little rough (one confusing 200+ line function). I'm interested in contributing and will look around and see if I can find the issue.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

ghost commented 6 years ago

@Roxy-3D Fuckkkkkkkkkkkkkkkkkkkkkkk !!!! UBL is your child ? Damned !!!! RESPECT FOR YOU !!!!! All menus, <---<<< Roxy Edit: I had help. @tannoo did all the LCD work Bob did all the documentation. And @oldmcg made it work with Delta's EEPROM storing , G26 unit , Fuck it's great !!!!!!!!!!!!!!!!!!!!!!

Note : ThinkyHead added my FwRetract revision PR 😄 , if you know how to make an UBL/FW issue , try it now please , and keep the gcode file , and see , if there are some unwanted G10/G11/G10S1 somewhere But with my update , impossible to break FwRetractation even though the slicer make shit , the print will never crash now

ghost commented 6 years ago

I have tried M303 with bed ' STATERELAY and 600w bed ' , i have tried with thermocouple 1 et 2 , with my ' turbo hotends = Volcano + E3V6 + Flexxion holder + 60w cartridge ' , and all works 60 w cartridges 20mm , are sold on REPRAPME , the only 20 mm 60w12v or 80w24v These high power cartridges are made for diamond hotend , and it's the only one that have 20mm , and have the exact size for volcano...

Note : with my cartridge , It's not easy to reach 400 degrees , it takes time , and risk of fire is very long on my config and i'm sure , it's not your chinese 40w hotend that can reach more than 300 degrees lolllllllllllll

Works perfect

Contributing to marlin ,or other sofware is a big donation of time , every line of code generate 1500 mistakes and errors But , in robotics like 3d printer , it's the worst !!!! Upload are long , Heating too , you write line ' one minute ' and to test this line ' 30 min ' , each bad writting cost 30 min You can waste a days , or a night just for a forgotten ' { ' , or bad writting of some conditionnals and more Sometimes , just to understand something in this jungle can cost you 4 night and days , and no written line yet ...

RowanMeara commented 6 years ago

This might be wrong because I've never really looked at this code base before.

I believe your problem occurred because pid_autotune directly sets the PWM values while setting everything else to indicate that the heaters are off (it calls disable_all_heaters when it starts so no outside error checking occurs). Also, pid_autotune has a 2 minute timeout but just returns from the function when that timeout is hit which means that the heaters are not disabled and an error is not thrown.

I believe that the thermal runaway issues could be partially fixed by adding a line to pid_autotune's timeout behavior that throws a temperature error. The downside of this approach is that it only takes effect after two minutes.

Edit: After looking at the code some more, it seems that fixing the sanity checking errors would be difficult because it would require significantly changing the sanity checking in Temperature::ISR (interrupt method). The changes would break the conditional compilation. Another option is essentially to have duplicated error checking code in the pid_autotune but that would increase the binary size and separate the error checking logic.

Tannoo commented 6 years ago

I run my printer near an open can of gasoline... is that an issue?

ghost commented 6 years ago

Oh !!! No temp alarm on M303 😲 .... It's not important because the user is here and close.... but ... if a m303 appears by mistake. ..or anything else ... and no human presence ..... it's dramatic. Tonight i make a test to unconnect my sensors to be sure there's no thermal protection

ghost commented 6 years ago

If you're right .. this must be quickly fixed

RowanMeara commented 6 years ago

I think I found a pretty noninvasive fix so I will probably submit a pull request tomorrow.

AnHardt commented 6 years ago
Steps to reproduce:

Install TH3D115 hex binary firmware (th3dstudio.com) on CR-10
Install Octopi 0.14 and Octoprint 1.3.5
Disable the thermistor
Issue M303 from octoprint

If the problem is reproducible in this order, it's not M303s fault. Min temp error should kill the machine in the moment the sensor is disconnected.

Are you sure this downloaded binary is produced with the appended config?

There is one way to disable min temp errors - setting mintemp to a value lower than the lowest value in the thermistor table.

ghost commented 6 years ago

hex ? Or marlin 1.1.5 ?

ghost commented 6 years ago

@RowanMeara , do you really have identified M303 is not under thermal prot ? but may be , M303 need total freedom to make calculation and disable all thermal protection feature , to never be disturbed when a large bed need time to heat Because when not tuned , impossible to have an idea of the setting of the alarm... and i think if marlin want to make calculation in all situations , the alarm must be disable If you make a PR , what will be your thermal settings to run ALL PRINTERS/Heaters/Buildplate , and don't forget it's not dynamic datas and you will have to make on FIRMWARE for tuning , and another one with the new pid

I think , the only pr to make is to show a warning message about the needed presence of human during this tuning , and it's all

AnHardt commented 6 years ago

Think i got it. Since the introduction of the high temperature thermistors we check for min/max temp errors only when the heater is on. We detect that by checking if the target temp. is > 0. target temp. is not used by M303.

jarrodasmith commented 6 years ago

On Oct 27, 2017, at 6:50 AM, AnHardt notifications@github.com wrote:

Are you sure this downloaded binary is produced with the appended config?

I have no way of knowing without asking Timothy. It came from the source folder of the binary download, but he may only provide that to comply with licensing.

I have never built Marlin from source.

guiseco commented 6 years ago

I did this:

#define HEATER_0_MAXTEMP 275

After that, I ran the autotune:

M303 E0 S2750 C10

Autotune does not respect HEATER_0_MAXTEMP and will attempt to reach 2750 C.

ruggb commented 6 years ago

IMHO, this sounds like a real problem. So why are all the developers defending themselves instead of looking for a solution. It only makes a long thread that gets nothing done. Max temp is defined in the config file. If one enters 2750 instead of 275, or any number > Max, marlin should produce an error. If the temp stays at -14 or for that matter is there in the first place, marlin should error. sounds easy to me, but what do I know?

Tannoo commented 6 years ago

My low temp is set for -15. I don't need an error when the ambient temp is that low.

But, I'm not usually starting a print when it's that cold.

jarrodasmith commented 6 years ago

I really hope your thermistor never fails open because you have effectively defeated an important safety feature.

On Oct 28, 2017, at 12:45 AM, Tannoo notifications@github.com wrote:

My low temp is set for -15. I don't need an error when the ambient temp is that low.

But, I'm not usually starting a print when it's that cold.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

ghost commented 6 years ago

My safety thermal settings are 120 seconds and 10 degrees for bed , and 120 seconds and 4 degree for hotends Under this setting the risk to crash MY PRINTER is too high The problem is the default setting too low , and all users are afraid to set stronger values , For me a serious Safety settings for thermal must be ' SERIOUS ' and not too short To make a fire 120 seconds is really too short , and 120 is risk free for normal printing temp curves in all situations

bobc commented 6 years ago

You should never rely on software for safety. You have heated surfaces, and plastic that burns really well, a recipe for disaster. Commercial plastic products must use flame retardant additives by law, filament used for 3DP does not contain retardants. ( depending on national laws I guess).

The safety of home 3d printers is very poor, and although a known issue is often overlooked. Personally, I always regard printing as a "attendance required" activity. Now I know a lot of folks do long unattended prints and say "its fine", but those are all accidents waiting to happen. Unfortunately people take a binary approach to risk:

Fire services here are concerned about a rise in house fires due to domestic appliances, such as fridges and washing machines. Those are appliances that are supposed to have passed safety regs. Home builds or cheap machines imported from China won't even have been tested against safety standards.

We can add all the features we like to Marlin, but it will never be "safe" to an official standard - it requires hardware support. I would rather people recognize that 3d printing is inherently risky, rather than be complacent and falsely rely on "safety features" in the software.

If you are concerned about your house burning down, do not print unattended. If you are not concerned, you should be!

fiveangle commented 6 years ago

If anything this would make a great clickbait YouTube video title…

Guy starts PID autotune with a defective thermistor. YOU'LL NEVER GUESS WHAT HAPPENS NEXT !!!

thinkyhead commented 6 years ago

obey Max Temp and Min Temp during PID tuning

Very much appreciate the addition! Safety is vital, especially around the heaters. I think up to now this hasn't been looked at because M303 is usually done once and forgotten. You've patched a pretty big hole, and Marlin is better for it!

marcio-ao commented 6 years ago

There is only so much software can do. Has anyone considered using a thermal cutoff fuse in the hotend and/or heated bed?

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.