Help with pid auto tune!

Hallo everybody, I have compiled this code which basically is copy -paste from the examples available with the libs.
What it does is reading a thermocouple, spinning a fan, and trying to PID control a heating element.
All these are in a hot air station wand that i’m trying to control.
The problem is I can’t find any decent PID values. Tried the autotune library but i get values like P: 0.5 I:0 D:0 which are completely wrong. Could you please help me to find what am I doing wrong?
Thanks!

#include "Adafruit_MAX31855.h"
#include <PID_v1.h>
#define RelayPin 11
#include <PID_AutoTune_v0.h>

byte ATuneModeRemember=2;
double input=80, output=0, setpoint=180;
double kp=2,ki=0.5,kd=2;
double kpmodel=1.5, taup=100, theta[50];
double outputStart=5;
double aTuneStep=50, aTuneNoise=1, aTuneStartValue=100;
unsigned int aTuneLookBack=20;
boolean tuning = true;
unsigned long  modelTime, serialTime;

int motor = 9;
int potenciometer = A7;

int thermoDO = 2;
int thermoCS = 4;
int thermoCLK = 6;
int WindowSize = 2000;
unsigned long windowStartTime;

PID myPID(&input, &output, &setpoint,kp,ki,kd, DIRECT);
PID_ATune aTune(&input, &output);

Adafruit_MAX31855 thermocouple(thermoCLK, thermoCS, thermoDO);
  boolean useSimulation = false;
  
void setup() {
  pinMode(9,OUTPUT);
  pinMode(A7,INPUT);
   pinMode(RelayPin, OUTPUT);  
 
  myPID.SetOutputLimits(0, WindowSize);
 
  


  if(tuning)
  {
    tuning=false;
    changeAutoTune();
    tuning=true;
  }
  
  serialTime = 0;
  Serial.begin(9600);
  
   windowStartTime = millis();
 
    pinMode(9,OUTPUT);
  pinMode(A7,INPUT);
   pinMode(RelayPin, OUTPUT); 
  
  Serial.println("MAX31855 test");
  // wait for MAX chip to stabilize
  delay(500);
   


  //turn the PID on
  myPID.SetMode(AUTOMATIC);
  
}

void loop() 
{
  unsigned long now = millis();
  
   if(!useSimulation)
  { //pull the input in from the real world
     input = thermocouple.readCelsius();
  }
  
  if(tuning)
  {
    byte val = (aTune.Runtime());
    if (val!=0)
    {
      tuning = false;
    }
    if(!tuning)
    { //we're done, set the tuning parameters
      kp = aTune.GetKp();
      ki = aTune.GetKi();
      kd = aTune.GetKd();
      myPID.SetTunings(kp,ki,kd);
      AutoTuneHelper(false);
    }
  }
  else myPID.Compute();
  
  if(useSimulation)
  {
    theta[30]=output;
    if(now>=modelTime)
    {
      modelTime +=100; 
      DoModel();
    }
  }
 else
  {
      if(millis() - windowStartTime>WindowSize)
  { //time to shift the Relay Window
    windowStartTime += WindowSize;
  }
  if(output > millis() - windowStartTime) digitalWrite(RelayPin,HIGH);
  else digitalWrite(RelayPin,LOW);
  }
  
  
  //send-receive with processing if it's time
  if(millis()>serialTime)
  {
    SerialReceive();
    SerialSend();
    serialTime+=500;
  }

  // basic readout test, just print the current temp
   //Serial.print("Internal Temp = ");
   //Serial.println(thermocouple.readInternal());

   double c = thermocouple.readCelsius();
   if (isnan(c)) {
     //Serial.println("Something wrong with thermocouple!");
   } else {
    // Serial.print("C = "); 
     //Serial.println(c);
   }
   //Serial.print("F = ");
   //Serial.println(thermocouple.readFarenheit());
 
   delay(1000);
  
   

   /************************************************
   * turn the output pin on/off based on pid output
   ************************************************/
  
   int value = analogRead(potenciometer);//read input value: range between (0,1023)
  int motor_speed = value/4;//PWM can only ouput 255 different values
  
  analogWrite(motor,motor_speed);
  
  //Serial.println(motor_speed);//for testing purposes
   
}

void changeAutoTune()
{
 if(!tuning)
  {
    //Set the output to the desired starting frequency.
    output=aTuneStartValue;
    aTune.SetNoiseBand(aTuneNoise);
    aTune.SetOutputStep(aTuneStep);
    aTune.SetLookbackSec((int)aTuneLookBack);
    AutoTuneHelper(true);
    tuning = true;
  }
  else
  { //cancel autotune
    aTune.Cancel();
    tuning = false;
    AutoTuneHelper(false);
  }
}

void AutoTuneHelper(boolean start)
{
  if(start)
    ATuneModeRemember = myPID.GetMode();
  else
    myPID.SetMode(ATuneModeRemember);
}


void SerialSend()
{
  Serial.print("setpoint: ");Serial.print(setpoint); Serial.print(" ");
  Serial.print("input: ");Serial.print(input); Serial.print(" ");
  Serial.print("output: ");Serial.print(output); Serial.print(" ");
  //Serial.print(aTune.Runtime());
  if(tuning){
    Serial.println("tuning mode");
  } else {
    Serial.print("kp: ");Serial.print(myPID.GetKp());Serial.print(" ");
    Serial.print("ki: ");Serial.print(myPID.GetKi());Serial.print(" ");
    Serial.print("kd: ");Serial.print(myPID.GetKd());Serial.println();
  }
}

void SerialReceive()
{
  if(Serial.available())
  {
   char b = Serial.read(); 
   Serial.flush(); 
   if((b=='1' && !tuning) || (b!='1' && tuning))changeAutoTune();
  }
}

void DoModel()
{
  //cycle the dead time
  for(byte i=0;i<49;i++)
  {
    theta[i] = theta[i+1];
  }
  //compute the input
  input = (kpmodel / taup) *(theta[0]-outputStart) + input*(1-1/taup) + ((float)random(-10,10))/100;
}