<p>It sounds like the pin configuration in the firmware you flashed doesn't match your hardware. Heaters should never be on by default and M140 S0 should always turn off current to the bed. What you describe sounds like the firmware is sending power to a pin that it believes is something other than what it is, either because the bed is on a fan pin (like D9) or because the firmware thinks D8 is something other than the heated bed. </p>

<p>If it worked before, your original firmware was configured to match how your board was wired, specifically which pins were mapped to what hardware. If you're confident that the new firmware pin configuration is correct, you can ignore this theory. Otherwise you should nail down which D8/D9/D10 pin maps to what hardware and resolve the mismatch.</p>

<p>On RAMPS, pins 8, 9 and 10 are typically used to control fans, hotends and heated beds and you define this behavior in configuration.h. If you flashed from source you should review configuration.h and ensure it matches your hardware. This likely means setting the <code>MOTHERBOARD</code> to the value that matches how pins 8/9/10 are wired. See this section (or something similar) in <code>configuration.h</code> to get started:</p>

<pre><code>// The following define selects which electronics board you have.
// Please choose the name from boards.h that matches your setup
#ifndef MOTHERBOARD
  #define MOTHERBOARD BOARD_RAMPS_14_EFB
#endif
</code></pre>

CC BY-SA 3.0
2017-05-04T12:15:13.570Z
Thanks, but this isn't the problem. I actually loaded a blank sketch (the blink sketch actually) to the Arduino and that specific pin was still on, so it seems to me that I somehow shorted the RAMPS board at about the same time I loaded the new firmware. I spent some more time troubleshooting and because it would always switch on when I plug it in, I also now managed to short out the heated bed, so I'm replacing both the bed and the board this weekend. Hopefully there is not some still undiscovered root cause
neelsg
CC BY-SA 3.0
2017-05-02T21:02:22.997Z
2017-05-02T21:38:04.977Z
2017-05-02T21:38:04.977Z
John Lewin
<p>This was actually a coincidental situation where I somehow damaged the RAMPS board around the same time I reloaded the firmware. Replaced the board and it works correctly now</p>

CC BY-SA 3.0
2017-05-16T10:49:53.863Z
2017-05-16T10:49:53.863Z
neelsg
<p>After I updated the firmware on my Prusa i3, the Bed won't switch off anymore. It worked perfectly before the update, but now, the moment I power up my printer, the LED on the bed turns on and it starts heating up. The manual control in Repetier Host doesn't turn if off or on and I even tried g-codes <code>M140 S0</code> as well as <code>M0</code>, but it does not switch it off.</p>

<p><strong>Edit:</strong>
I have an Arduino Mega2560 with a RAMPS shield. The Marlin firmware came pre-configured from the store I bought the kit from.</p>

CC BY-SA 3.0
2017-05-01T12:27:20.860Z
What electronics do you have, and is your configuration of Marlin appropriate to the electronics?
Tom van der Zanden
CC BY-SA 3.0
2017-05-01T12:57:08.563Z
@TomvanderZanden I edited my question to include info on the electronics
neelsg
<prusa-i3><heated-bed><marlin>
Bed won't switch off after Marlin firmware update
neelsg
# Bed won't switch off after Marlin firmware update

(Asked by: username_0 on 2017-05-01)

After I updated the firmware on my Prusa i3, the Bed won't switch off anymore. It worked perfectly before the update, but now, the moment I power up my printer, the LED on the bed turns on and it starts heating up. The manual control in Repetier Host doesn't turn if off or on and I even tried g-codes `M140 S0` as well as `M0`, but it does not switch it off.

**Edit:**
I have an Arduino Mega2560 with a RAMPS shield. The Marlin firmware came pre-configured from the store I bought the kit from.

**Tags:** prusa-i3, heated-bed, marlin
> **Comments:**
> **username_1**: What electronics do you have, and is your configuration of Marlin appropriate to the electronics?  
> **username_0**: @TomvanderZanden I edited my question to include info on the electronics  

---

## 2 answers

### Answer by username_0 on 2017-05-16. Score: 2 | Accepted answer

This was actually a coincidental situation where I somehow damaged the RAMPS board around the same time I reloaded the firmware. Replaced the board and it works correctly now


---

### Answer by username_2 on 2017-05-02. Score: 2

It sounds like the pin configuration in the firmware you flashed doesn't match your hardware. Heaters should never be on by default and M140 S0 should always turn off current to the bed. What you describe sounds like the firmware is sending power to a pin that it believes is something other than what it is, either because the bed is on a fan pin (like D9) or because the firmware thinks D8 is something other than the heated bed. 
If it worked before, your original firmware was configured to match how your board was wired, specifically which pins were mapped to what hardware. If you're confident that the new firmware pin configuration is correct, you can ignore this theory. Otherwise you should nail down which D8/D9/D10 pin maps to what hardware and resolve the mismatch.
On RAMPS, pins 8, 9 and 10 are typically used to control fans, hotends and heated beds and you define this behavior in configuration.h. If you flashed from source you should review configuration.h and ensure it matches your hardware. This likely means setting the MOTHERBOARD to the value that matches how pins 8/9/10 are wired. See this section (or something similar) in configuration.h to get started:
// The following define selects which electronics board you have.
// Please choose the name from boards.h that matches your setup
#ifndef MOTHERBOARD
  #define MOTHERBOARD BOARD_RAMPS_14_EFB
#endif

> **Comments:**
> **username_0**: Thanks, but this isn't the problem. I actually loaded a blank sketch (the blink sketch actually) to the Arduino and that specific pin was still on, so it seems to me that I somehow shorted the RAMPS board at about the same time I loaded the new firmware. I spent some more time troubleshooting and because it would always switch on when I plug it in, I also now managed to short out the heated bed, so I'm replacing both the bed and the board this weekend. Hopefully there is not some still undiscovered root cause  

---

