# Trying to control temperature of hotend using PWM signal and MOSFET

I have a 40 W, 12 V resistance heater in the hotend. It also has a 100 kΩ thermistor built in. I am using an Arduino to read the temperature on the LCD. This is working fine.

I want to use this temperature using a MOSFET and the PWM signal that is generated by the ARDUINO. So I connected the PWM signal to the Gate of the MOSFET and connected the 12 V, 3 A supply to the drain of the MOSFET. And connected the Resistance heater of the 3D printer to the source and ground.

But the problem that I am facing is that the Current is flowing from drain and the source even without the gate signal to the MOSFET.

I am not able to control the current to the resistance heater.

Mosfet: IRFZ44N and the AC to DC adapter is 12 V, 3 A. PWM signal is max 2 V.

The MOSFET is damaged. If the gate is at $$0V$$, no current should be able to flow.
You're trying to use an N-channel MOSFET as a high-side switch. This is a bad idea, because it would require more than $$12V$$ at the gate to turn the MOSFET on properly. It would be better to set this up as a low-side switch so that the microcontroller can drive the gate directly. The MOSFET should go between the load and ground, not between the load and $$+12V$$.
The fact that you connected it like this is the very reason the MOSFET has been damaged. When the MOSFET is OFF, there is $$0V$$ across the heater. When the microcontroller starts to turn the MOSFET ON (by applying $$5V$$ to the gate, thus increasing $$V_{GS}$$ to above $$V_{th}$$), current starts to flow through the load and the voltage across the load increases. This in turn decreases $$V_{GS}$$, causing the MOSFET to turn off. You will end up with approximately $$3V$$ across the load and $$V_{GS}=2V$$. You've got $$9V$$ being dropped across your MOSFET and with a current of approximately $$800mA$$, the $$7W$$ of heat produced will quickly kill the MOSFET.