<p>In the actual Marlin Firmware all supported printer boards are listed within the file "boards.h". This file contains the following entries for the RAMPS 1.4:</p>

<pre>
#define BOARD_RAMPS_13_EFB  33 // RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Bed)
#define BOARD_RAMPS_13_EEB  34 // RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Bed)
#define BOARD_RAMPS_13_EFF  35 // RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Fan)
#define BOARD_RAMPS_13_EEF  36 // RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Fan)
</pre>

<p>The most common version may be the variant . In this case you have to set the value as the following lines show.</p>

<pre>
#ifndef MOTHERBOARD
  #define MOTHERBOARD BOARD_RAMPS_13_EFB
#endif
</pre>

<p>Enable Display</p>

<pre>
#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
</pre>

<p>Ok, it's time to make the adjustments specific to your 3d printer. You might first check the setting for the amount of extruders at around line 58. Most 3d printer rookies may start with one extruder, so the default entry of '1' is quite sufficient.</p>

<p>// This defines the number of extruders</p>

<pre>
#define EXTRUDERS 1
</pre>

<p>At around line 70 you have to set up the thermistors connected to the RAMPS for the extruder and the heatbed. Depending on your hardware configuration you have to change the last value in the defines.</p>

<pre>
#define TEMP_SENSOR_0 -1
#define TEMP_SENSOR_1 -1
#define TEMP_SENSOR_2 0
#define TEMP_SENSOR_BED 0
</pre>

<p>The define for TEMP_SENSOR_0 determins which thermistor type is assembled at the hotend of extruder 1. This termistor has to be connected to the first sensor input (see also wiring schema). The thermistor for the heatbed has to be connected to the second sensor input. The thermistor type is configured with the define line of 'TEMP_SENSOR_BED'. If you use a thermistor of the type EPCOS B57560G104F (100K, Beta = 4036), you write the value '1' into the matching define. In case you have a thermistor with 100k and Beta = 3950, you have to set the value '60' in the corresponding define. So the defines will look e.g.:</p>

<p>For EPCOS (Beta = 4036) on hotend and heatbed:</p>

<pre>
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 -1
#define TEMP_SENSOR_2 0
#define TEMP_SENSOR_BED 1
</pre>

<p>For Beta = 3950 on hotend and heatbed:</p>

<pre>
#define TEMP_SENSOR_0 60
#define TEMP_SENSOR_1 -1
#define TEMP_SENSOR_2 0
#define TEMP_SENSOR_BED 60
</pre>

CC BY-SA 3.0
2017-09-29T22:54:12.010Z
2017-09-29T22:54:12.010Z
Fernando Baltazar
<p>I have a RAMPS 1.4 and an Arduino Mega 2560. The problem is with 100k NTC thermistor. I've tested it with a multimeter, it results in ~122k&Omega;.</p>

<p>I am using Marlin 1.0.2 (latest stable). I am using an MK8 extruder and do not receive temperature readings from the thermo-sensor - no matter how I connect it. However, on <a href="https://github.com/ambrop72/aprinter" rel="noreferrer">APrinter firmware</a> it works flawlessly.</p>

<p>In <em>configuration.h</em>, I have tried most of the options, but found "1" is the best one for me.</p>

<p>Executing <code>m105</code> on Marlin, I get following result: </p>

<pre><code>ok T:0.0 /0.0 B:0.0 /0.0 T0:0.0 /0.0 @:0 B@:0
</code></pre>

<p>On APrinter, the result is different:</p>

<pre><code>ok B:-inf /nan T:25.2076 /nan
</code></pre>

<p>I have not connected bed thermistor yet.</p>

<p><em>pins.h</em></p>

<pre><code>#define TEMP_0_PIN          1  // Extruder / Analog pin numbering
#define TEMP_BED_PIN        0  // Bed / Analog pin numbering
</code></pre>

<p><em>configuration.h</em></p>

<pre><code>#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_BED 1

...

#define MOTHERBOARD BOARD_RAMPS_13_EFB
</code></pre>

<p>After switching back and forth from Marlin to APrinter and back, Marlin stopped woking completely. I had configured the LCD (<a href="http://reprap.org/wiki/RepRapDiscount_Smart_Controller" rel="noreferrer">ReprapDiscount Smart Controller</a>) and all the steppers were working. Right now, it does not even sends self test to Pronterface upon start/connection, or it hangs according to the log. </p>

<p><em>Pronterface output</em></p>

<pre><code>Connecting...
start
Printer is now online.
echo:Marlin1.0.2
echo: Last Updated: Jul 25 2016 17:12:39 | Author: (Rustam Rahimgulov, default config)
Compiled: Jul 25 2016
echo: Free Memory: 3971  PlannerBufferBytes: 1232
echo:Hardcoded Default Settings Loaded
echo:Steps per unit:
echo:  M92 X80.00 Y80.00 Z4000.00 E836.00
echo:Maximum feedrates (mm/s):
echo:  M203 X500.00 Y500.00 Z2.00 E25.00
echo:Maximum Acceleration (mm/s2):
echo:  M201 X9000 Y9000 Z100 E10000
echo:Acceleration: S=acceleration, T=retract acceleration
echo:  M204 S300.00 T3000.00
echo:Advanced variables: S=Min feedrate (mm/s), T=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum XY jerk (mm/s),  Z=maximum Z jerk (mm/s),  E=maximum E jerk (mm/s)
echo:  M205 S0.00 T0.00 B20000 X20.00 Z0.40 E5.00
echo:Home offset (mm):
echo:  M206 X0.00 Y0.00 Z0.00
echo:PID settings:
echo:   M301 P22.20 I1.08 D114.00
start
echo:Marlin1.0.2
ec  (nothing more here, output just ends)
</code></pre>

CC BY-SA 3.0
2016-07-24T21:16:51.627Z
What happens if you manually request temperatures with `M105`? What is  "aprintr firmware"?
Tom van der Zanden
CC BY-SA 3.0
2016-07-25T08:21:49.623Z
a) As far as I've encountered 100K thermistors, they usually give closely around 100K resisivity at room temperature. b) when you're talking about configuration.h, you mean in Marlin? Have you made sure that your Marlin is in working condition otherwise and has not been flawed during transfer?
kamuro
CC BY-SA 3.0
2016-07-25T11:50:28.853Z
@kamuro It's the first time I am working with arduino, but as I know arduino ide using **avrdude** on linux to upload firmware to the chip and then it reads it to verify that the *hex* file was written correctly into the memory. Lately however, it seemed not to upload firmware properly, I've conducted loopback test and everything was ok. How would I make sure firmware is intact on the chip?
hrust
CC BY-SA 3.0
2016-07-25T12:21:02.083Z
@kamuro 122k is a fairly normal reading. The 100K figure is quoted at 25C, 122k corresponds to around 20-22C.
Tom van der Zanden
CC BY-SA 3.0
2016-07-25T12:21:45.053Z
Do you have the thermistor plugged into the right socket? Perhaps aprintr is reading the temperature from a different pin than Marlin is configured to.
Tom van der Zanden
CC BY-SA 3.0
2016-07-25T12:23:11.867Z
@TomvanderZanden I've tested thermistor both in t0 and t1 pins, and **APrinter** firmware is able to distinguish them and obtain data, however is not the case for **Marlin**. Currently exturder thermistor is connected to `t0` and bed to `t1`.
hrust
CC BY-SA 3.0
2016-07-25T12:39:41.910Z
I meant that you should check whether the pin that marlin is configured to read the temperature from (in pins_ramps_14.h) corresponds to the physical pin your thermistor is plugged in to.
Tom van der Zanden
CC BY-SA 3.0
2016-07-25T12:48:39.030Z
@TomvanderZanden How would I check it physically? In **pins.h** these are analogue pins 0 and 1
hrust
CC BY-SA 3.0
2016-07-25T13:03:35.800Z
On RAMPS, the thermistors are on analog pins 13/14/15. If pins.h has 0 and 1 set then that is *incorrect*. Make sure that you have the right board configured in Marlin.
Tom van der Zanden
CC BY-SA 3.0
2016-07-25T13:43:17.397Z
@TomvanderZanden There are so many redefinitions of the `temp_0_pin` that it's very hard to trace if it's correct or not. I can find lines that assign analogue pins 13 and 15 to *bed* and *extruder* sensors.
hrust
CC BY-SA 3.0
2016-07-25T14:24:48.130Z
@Tom: good to know, I also looked up curves now, I didn't know the values change that rapidly. Well, it seems my home had pretty on spot 25°C when I tried my thermistors, then ;) **Gemma**: seems you know more about the arduino IDE than I do. I would've just tested if a display works and serial G-code commands are executed properly. Did you make sure that the board in Marlin is correclty set to RAMPS 1.4 (that's motherboard identifyer 33).
kamuro
CC BY-SA 3.0
2016-07-25T14:35:43.673Z
@kamuro I hope stating `MOTHERBOARD BOARD_RAMPS_13_EFB` in **configuration.h** one time in the beginning is sufficient to inform code that I'm using RAMPS 1.4
hrust
CC BY-SA 3.0
2017-10-30T11:38:38.983Z
Marlin's latest stable version is 1.1.6: https://github.com/MarlinFirmware/Marlin/releases
amra
<marlin><reprap><thermistor>
Marlin temperature sensor problem
hrust
# Marlin temperature sensor problem

(Asked by: username_0 on 2016-07-24)

I have a RAMPS 1.4 and an Arduino Mega 2560. The problem is with 100k NTC thermistor. I've tested it with a multimeter, it results in ~122kΩ.
I am using Marlin 1.0.2 (latest stable). I am using an MK8 extruder and do not receive temperature readings from the thermo-sensor - no matter how I connect it. However, on APrinter firmware it works flawlessly.
In configuration.h, I have tried most of the options, but found "1" is the best one for me.
Executing m105 on Marlin, I get following result: 
ok T:0.0 /0.0 B:0.0 /0.0 T0:0.0 /0.0 @:0 B@:0

On APrinter, the result is different:
ok B:-inf /nan T:25.2076 /nan

I have not connected bed thermistor yet.
pins.h
#define TEMP_0_PIN          1  // Extruder / Analog pin numbering
#define TEMP_BED_PIN        0  // Bed / Analog pin numbering

configuration.h
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_BED 1

...

#define MOTHERBOARD BOARD_RAMPS_13_EFB

After switching back and forth from Marlin to APrinter and back, Marlin stopped woking completely. I had configured the LCD (ReprapDiscount Smart Controller) and all the steppers were working. Right now, it does not even sends self test to Pronterface upon start/connection, or it hangs according to the log. 
Pronterface output
Connecting...
start
Printer is now online.
echo:Marlin1.0.2
echo: Last Updated: Jul 25 2016 17:12:39 | Author: (Rustam Rahimgulov, default config)
Compiled: Jul 25 2016
echo: Free Memory: 3971  PlannerBufferBytes: 1232
echo:Hardcoded Default Settings Loaded
echo:Steps per unit:
echo:  M92 X80.00 Y80.00 Z4000.00 E836.00
echo:Maximum feedrates (mm/s):
echo:  M203 X500.00 Y500.00 Z2.00 E25.00
echo:Maximum Acceleration (mm/s2):
echo:  M201 X9000 Y9000 Z100 E10000
echo:Acceleration: S=acceleration, T=retract acceleration
echo:  M204 S300.00 T3000.00
echo:Advanced variables: S=Min feedrate (mm/s), T=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum XY jerk (mm/s),  Z=maximum Z jerk (mm/s),  E=maximum E jerk (mm/s)
echo:  M205 S0.00 T0.00 B20000 X20.00 Z0.40 E5.00
echo:Home offset (mm):
echo:  M206 X0.00 Y0.00 Z0.00
echo:PID settings:
echo:   M301 P22.20 I1.08 D114.00
start
echo:Marlin1.0.2
ec  (nothing more here, output just ends)

**Tags:** marlin, reprap, thermistor
> **Comments:**
> **username_1**: What happens if you manually request temperatures with `M105`? What is  "aprintr firmware"?  
> **username_2**: a) As far as I've encountered 100K thermistors, they usually give closely around 100K resisivity at room temperature. b) when you're talking about configuration.h, you mean in Marlin? Have you made sure that your Marlin is in working condition otherwise and has not been flawed during transfer?  
> **username_0**: @kamuro It's the first time I am working with arduino, but as I know arduino ide using **avrdude** on linux to upload firmware to the chip and then it reads it to verify that the *hex* file was written correctly into the memory. Lately however, it seemed not to upload firmware properly, I've conducted loopback test and everything was ok. How would I make sure firmware is intact on the chip?  
> **username_1**: @kamuro 122k is a fairly normal reading. The 100K figure is quoted at 25C, 122k corresponds to around 20-22C.  
> **username_1**: Do you have the thermistor plugged into the right socket? Perhaps aprintr is reading the temperature from a different pin than Marlin is configured to.  
> **username_0**: @TomvanderZanden I've tested thermistor both in t0 and t1 pins, and **APrinter** firmware is able to distinguish them and obtain data, however is not the case for **Marlin**. Currently exturder thermistor is connected to `t0` and bed to `t1`.  
> **username_1**: I meant that you should check whether the pin that marlin is configured to read the temperature from (in pins_ramps_14.h) corresponds to the physical pin your thermistor is plugged in to.  
> **username_0**: @TomvanderZanden How would I check it physically? In **pins.h** these are analogue pins 0 and 1  
> **username_1**: On RAMPS, the thermistors are on analog pins 13/14/15. If pins.h has 0 and 1 set then that is *incorrect*. Make sure that you have the right board configured in Marlin.  
> **username_0**: @TomvanderZanden There are so many redefinitions of the `temp_0_pin` that it's very hard to trace if it's correct or not. I can find lines that assign analogue pins 13 and 15 to *bed* and *extruder* sensors.  
> **username_2**: @Tom: good to know, I also looked up curves now, I didn't know the values change that rapidly. Well, it seems my home had pretty on spot 25°C when I tried my thermistors, then ;) **Gemma**: seems you know more about the arduino IDE than I do. I would've just tested if a display works and serial G-code commands are executed properly. Did you make sure that the board in Marlin is correclty set to RAMPS 1.4 (that's motherboard identifyer 33).  
> **username_0**: @kamuro I hope stating `MOTHERBOARD BOARD_RAMPS_13_EFB` in **configuration.h** one time in the beginning is sufficient to inform code that I'm using RAMPS 1.4  
> **username_3**: Marlin's latest stable version is 1.1.6: https://github.com/MarlinFirmware/Marlin/releases  

---

## 1 answers

### Answer by username_4 on 2017-09-29. Score: 1

In the actual Marlin Firmware all supported printer boards are listed within the file "boards.h". This file contains the following entries for the RAMPS 1.4:

#define BOARD_RAMPS_13_EFB  33 // RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Bed)
#define BOARD_RAMPS_13_EEB  34 // RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Bed)
#define BOARD_RAMPS_13_EFF  35 // RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Fan)
#define BOARD_RAMPS_13_EEF  36 // RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Fan)

The most common version may be the variant . In this case you have to set the value as the following lines show.

#ifndef MOTHERBOARD
  #define MOTHERBOARD BOARD_RAMPS_13_EFB
#endif

Enable Display

#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

Ok, it's time to make the adjustments specific to your 3d printer. You might first check the setting for the amount of extruders at around line 58. Most 3d printer rookies may start with one extruder, so the default entry of '1' is quite sufficient.
// This defines the number of extruders

#define EXTRUDERS 1

At around line 70 you have to set up the thermistors connected to the RAMPS for the extruder and the heatbed. Depending on your hardware configuration you have to change the last value in the defines.

#define TEMP_SENSOR_0 -1
#define TEMP_SENSOR_1 -1
#define TEMP_SENSOR_2 0
#define TEMP_SENSOR_BED 0

The define for TEMP_SENSOR_0 determins which thermistor type is assembled at the hotend of extruder 1. This termistor has to be connected to the first sensor input (see also wiring schema). The thermistor for the heatbed has to be connected to the second sensor input. The thermistor type is configured with the define line of 'TEMP_SENSOR_BED'. If you use a thermistor of the type EPCOS B57560G104F (100K, Beta = 4036), you write the value '1' into the matching define. In case you have a thermistor with 100k and Beta = 3950, you have to set the value '60' in the corresponding define. So the defines will look e.g.:
For EPCOS (Beta = 4036) on hotend and heatbed:

#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 -1
#define TEMP_SENSOR_2 0
#define TEMP_SENSOR_BED 1

For Beta = 3950 on hotend and heatbed:

#define TEMP_SENSOR_0 60
#define TEMP_SENSOR_1 -1
#define TEMP_SENSOR_2 0
#define TEMP_SENSOR_BED 60


---

