# Ender 3 V4.2.7 change thermocouple input pin

**URL:** https://marlin.crc.id.au/forum/t/ender-3-v4-2-7-change-thermocouple-input-pin/2086
**Category:** General Discussion
**Created:** [4 March 2024 11:39 UTC](https://marlin.crc.id.au/forum/t/ender-3-v4-2-7-change-thermocouple-input-pin/2086 "2024-03-04T11:39:58Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![fakner](https://marlin.crc.id.au/forum/letter_avatar_proxy/v4/letter/f/3be4f8/32.png) [@fakner](https://marlin.crc.id.au/forum/u/fakner)
#### Post date: [4 March 2024 11:39 UTC](https://marlin.crc.id.au/forum/t/ender-3-v4-2-7-change-thermocouple-input-pin/2086/1 "2024-03-04T11:39:58Z")

</div>

Dear all,

I need your help! Hopefully this is the right place to ask for. If not please move it to the right thread.

Basically I want to change the input used for the Hotend thermocouple on my board 4.2.7. I´m using the Marlin-2.0.x version and managed to manipulate the software and successfully flash it to the board. But I couldn’t achieve my main goal.  
Because of a short, the original input for the Hotend thermocouple Pin 25 (PC 5) is shorted to GND.  
I´m not using the board level applicator and therefore I want to use Pin 27 (PB 1) for it. I changed the assignment of the variable **TEMP\_0\_PIN** to PB 1 in row 142 under Marlin-\>src-\>pins-\>stm32f1-\>pins\_CREALITY\_V4.h . But I still get the max\_temp\_error. Connected through pronterface the terminal says:  
Error:MAXTEMP triggered, system stopped! Heater\_ID: E0  
echo:Err: MAXTEMP  
Error:Printer halted. kill() called!

With that messages thrown I guess that the max\_temp\_error is thrown at several places. Probably in line 2354:  
LOOP\_L\_N(e, COUNT(temp\_dir)) {  
const raw\_adc\_t r = temp\_hotend[e].getraw();  
const bool neg = temp\_dir[e] \< 0, pos = temp\_dir[e] \> 0;  
if ((neg && r \< temp\_range[e].raw\_max) || (pos && r \> temp\_range[e].raw\_max))  
max\_temp\_error((heater\_id\_t)e);

But I´m unable to understand and find out how the variable “e” is assigned to the specific input pin.

I´m extremely happy about your help.

Kind regardsm Lukas
