@sivi1234
I noodled up a quick test of this circuit:
to see how well an IRLZ44 would switch with 3V3 logic.
It did well enough for the current you will be switching as it only got warm to the touch. Scope traces, yellow PWM from controller, blue drain of FET.
I recommend you use a thermocouple instead of a thermistor for a sensor. The thermocouples are a lot easier to find than a suitable thermistor and if you use one in a stainless steel sheath like in the picture you can epoxy one into a hole drilled into a brass bolt and attach to the hole in your cooling fin.
I'll include the MicroPython code I used to test to although you'll probably use C++. As you can see, it's pretty simple.
from machine import ADC, Pin, PWM
from time import sleep
Duty_Full_Scale = 65536
CHT = PWM(Pin(14), freq=2000, duty_u16=int(Duty_Full_Scale*0.5)) #50% duty cycle,PMW(A7),Pico pin 19
POT = ADC(Pin(26)) # create ADC object on ADC pin (GPIO26, ADC0)
while True:
x = POT.read_u16() # read value, 0-65535 across voltage range 0.0v - 3.3v
print(x)
CHT.duty_u16(x) # set the duty cycle of PWM channel A7, range 0-65535
sleep(2)
You would use code like this to map the PWM duty cycle onto your gauge. I would just map the points that have lines on your gauge plus points halfway between the lines and assume it's linear. It's not but that gauge is so course you won't be able to read the error.
from machine import Pin, SPI
import math
import struct
from time import sleep
data = bytearray(4) # for 32-bit read from MAX31855
CS = Pin(17, Pin.OUT) # SPI chip sellect, chip pin #22
CS.on() # set /CS High
# CHT_sensor is an ungrounded K-type thermocouple inside a SS probe
CHT_sensor = SPI(0, baudrate=992063, polarity=0, phase=0, bits=8, sck=18, mosi=19, miso=16) #chip pin #24, #25, #21
while True:
CS.off() # set /CS Low for read
CHT_sensor.readinto(data) # read 32 bits into the buffer
CS.on() # #set /CS High
sleep(2)
print(data)
hot, cold = struct.unpack(">hh", data)
cold >>= 4
hot >>= 2
C_hot = hot * 0.25
F_hot = C_hot * 9 / 5 + 32
C_cold = cold * 0.0625
F_cold = C_cold * 9 / 5 + 32
print(C_hot, F_hot, C_cold, F_cold)
The code to read the MAX31855 thermocouple amplifier is simple as well as you don't have to do any setup of the chip, just read it whenever you want an update.
After you map your gauge, you would then write a function to convert measured temperature to PWM duty cycle. We can help you with that when you get there.
This is all just a suggestion and you can obviously do it however you want but it is a hardware version of all the handwaving done here that demonstrates the concept.