<p>I tried, by <strong>instrumenting code</strong>, to know <strong>where/when</strong> the temp bed is modified.</p>

<p>I found that it is called in the <strong>gcode M81</strong> when starting the print.</p>

<p>Wait M81? isn't it M80 to switch on the PSU?</p>

<p>What I did in fact was both <strong>wiring this up side down and mixing M80 with M81</strong>.</p>

<p>But what I didn't know is that M80 and M81 <strong>are not</strong> strictly opposite functions.</p>

<p>Indeed, M81 puts the <code>PS_ON</code> signal to <code>PS_ASLEEP != PS_AWAKE</code> but also <strong>disable all heaters</strong>.
I couldn't see it without serial trace because the extruder temp is set back after the M81, but not the bed temp.</p>

<p>Problem solved.</p>

<p>Hope this can help people in the future to spend less time than me on that simple mistake.</p>

<p><strong>Note:</strong> What remains a mystery, though, is: why was it working before on previous prints and then, suddenly, broke?!!</p>

CC BY-SA 4.0
2020-01-26T20:33:53.807Z
2020-01-26T21:44:26.463Z
2020-01-26T21:44:26.463Z
Guillaume D
<h2>Configuration</h2>

<ul>
<li>Printrun/Pronterface </li>
<li>Slic3r 1.3.0</li>
<li>Windows 10</li>
<li>Arduino Mega + RAMPS 1.4 </li>
<li>Marlin 1.1.9</li>
<li>Prusa i3 -- Hephestos BQ with following modifications:

<ul>
<li>450W PSU (230V to 12V)</li>
<li>heatbed</li>
<li>3D touch</li>
<li>led stripe</li>
<li>ps_on with relay on the PSU</li>
</ul></li>
</ul>

<h2>Issue conditions</h2>

<p>I was printing fine until something happened, do not know what.
What I can tell is I can reach any bed temperature with Pronterface, and for any duration. (my little 450&nbsp;W PSU provides enough power for my needs, like 60, 70 or 80 °C, a bit hard for 85 °C though)</p>

<p>But as soon as start the print (when the temperature is already ready extruder and bed -- and as I always did), the motors move the extruder in the bed center and then I get the following error :</p>

<pre><code>Error:Heating failed, system stopped! Heater_ID: 0
[ERROR] Error:Heating failed, system stopped! Heater_ID: 0

Error:Printer halted. kill() called!
[ERROR] Error:Printer halted. kill() called!
</code></pre>

<p>If I check the temperature with <code>M105 ; temp report</code>, the printer gives me:</p>

<ul>
<li>before I press the "start print" button >> <code>T:245/245 , B:80/80</code></li>
<li>after I press the "start print" button >> <code>T:245/245, B:80/0</code></li>
</ul>

<p><strong><em>so bed temp command is fine.....until I start the print</em></strong></p>

<h2>Temp command set to 0</h2>

<p>What causes the printer to be halted is a huge temp difference between command and sensor.
In the provided <a href="https://raw.githubusercontent.com/guidugast/Share/3dprinting.stackexchange.com/questions/11851/low_temp_test.gcode" rel="nofollow noreferrer">G-code</a>, the bed temp was lowered to 30 °C, which helps :</p>

<ul>
<li>running the test faster</li>
<li>this shows that the problem is still going on (bed temp command to 0 °C)</li>
<li>I can "print" (move the nozzle without error but the PETG won't stick to the bed) and I don't get temp error.</li>
</ul>

<p>See the full log <a href="https://raw.githubusercontent.com/guidugast/Share/3dprinting.stackexchange.com/questions/11851/low_temp_test.log" rel="nofollow noreferrer">here</a>.</p>

<p><strong><em>So, what does cause the bed temp command to get to 0?</em></strong></p>

<h2>Not from G-CODE</h2>

<p>I checked in the G-code, and there is no <code>M140 *0</code> nor <code>M190 *0</code> until the end of the G-code, and I'm sure the problem is not comming from the slice/G-code because I ran some previously successfully run G-code/config and they fail the same.</p>

<h2>Not COM related</h2>

<p>I ran the same gcode on sd card (to see if the USB was involved), but the behavior is the same: as soon as the bed temp is reached and print started, the bed temp command is set to 0 (I can see command on LCD screen).</p>

<h2>Hardware related?</h2>

<p>I did not change the firmware, and print were going fine, before the printer was doing this, so I guess the root cause is Hardware.</p>

<h2>Firmware involved</h2>

<p>Because of the "0 °C command", the firmware react to something but I could not understand what is happening here.</p>

<p>when checking the firmware code, the only reasons why bed temp is set to 0 when print is running without asking for it would be </p>

<ul>
<li><code>gcode_M140()</code>/<code>gcode_M190()</code>: it could be bad interpretation of ascii command.</li>
<li><code>_lcd_preheat()</code> ?</li>
<li><code>PID_autotune()</code> : PID algo error?</li>
<li><code>ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED</code> : maybe but it would also put the extruder temp command to 0</li>
</ul>

<p>nothing that would really explain this...</p>

<p>Any hints?</p>

<marlin><heated-bed><troubleshooting><firmware><hardware>
Bed temperature command going to 0 °C with no obvious reason when print is started
Guillaume D
# Bed temperature command going to 0 °C with no obvious reason when print is started

(Asked by: username_0 on 2020-01-24)

Configuration

Printrun/Pronterface 
Slic3r 1.3.0
Windows 10
Arduino Mega + RAMPS 1.4 
Marlin 1.1.9
Prusa i3 -- Hephestos BQ with following modifications:


450W PSU (230V to 12V)
heatbed
3D touch
led stripe
ps_on with relay on the PSU


Issue conditions
I was printing fine until something happened, do not know what.
What I can tell is I can reach any bed temperature with Pronterface, and for any duration. (my little 450 W PSU provides enough power for my needs, like 60, 70 or 80 °C, a bit hard for 85 °C though)
But as soon as start the print (when the temperature is already ready extruder and bed -- and as I always did), the motors move the extruder in the bed center and then I get the following error :
Error:Heating failed, system stopped! Heater_ID: 0
[ERROR] Error:Heating failed, system stopped! Heater_ID: 0

Error:Printer halted. kill() called!
[ERROR] Error:Printer halted. kill() called!

If I check the temperature with M105 ; temp report, the printer gives me:

before I press the "start print" button >> T:245/245 , B:80/80
after I press the "start print" button >> T:245/245, B:80/0

so bed temp command is fine.....until I start the print
Temp command set to 0
What causes the printer to be halted is a huge temp difference between command and sensor.
In the provided G-code, the bed temp was lowered to 30 °C, which helps :

running the test faster
this shows that the problem is still going on (bed temp command to 0 °C)
I can "print" (move the nozzle without error but the PETG won't stick to the bed) and I don't get temp error.

See the full log here.
So, what does cause the bed temp command to get to 0?
Not from G-CODE
I checked in the G-code, and there is no M140 *0 nor M190 *0 until the end of the G-code, and I'm sure the problem is not comming from the slice/G-code because I ran some previously successfully run G-code/config and they fail the same.
Not COM related
I ran the same gcode on sd card (to see if the USB was involved), but the behavior is the same: as soon as the bed temp is reached and print started, the bed temp command is set to 0 (I can see command on LCD screen).
Hardware related?
I did not change the firmware, and print were going fine, before the printer was doing this, so I guess the root cause is Hardware.
Firmware involved
Because of the "0 °C command", the firmware react to something but I could not understand what is happening here.
when checking the firmware code, the only reasons why bed temp is set to 0 when print is running without asking for it would be 

gcode_M140()/gcode_M190(): it could be bad interpretation of ascii command.
_lcd_preheat() ?
PID_autotune() : PID algo error?
ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED : maybe but it would also put the extruder temp command to 0

nothing that would really explain this...
Any hints?

**Tags:** marlin, heated-bed, troubleshooting, firmware, hardware

---

## 1 answers

### Answer by username_0 on 2020-01-26. Score: 1 | Accepted answer

I tried, by **instrumenting code**, to know **where/when** the temp bed is modified.

I found that it is called in the **gcode M81** when starting the print.

Wait M81? isn't it M80 to switch on the PSU?

What I did in fact was both **wiring this up side down and mixing M80 with M81**.

But what I didn't know is that M80 and M81 **are not** strictly opposite functions.

Indeed, M81 puts the `PS_ON` signal to `PS_ASLEEP != PS_AWAKE` but also **disable all heaters**.
I couldn't see it without serial trace because the extruder temp is set back after the M81, but not the bed temp.

Problem solved.

Hope this can help people in the future to spend less time than me on that simple mistake.

**Note:** What remains a mystery, though, is: why was it working before on previous prints and then, suddenly, broke?!!


---

