12V/40W 3D Printer Heater

Hi

I need to heat a ceramic resistor for my 3D printer, so i have to design a circuit to control it with my arduino leonardo. How can i do that if the resistor is 12v/40w? Maybe with an opto. and a mosfet? I would like to do that with PWM module.

Can anyome help me please?

Thanks in advance!

Just a Logic Level Gate, Low Rds N-channel MOSFET to sink current to Gnd. Like AOD514 from Digikey.com. Drive gate thru 200 ohm resistor from Arduino.
40W/12V = 3.3A. With Rds of .012 ohm, the AOI514 will only dissipate 130mW, Idon't think you'll need a heatsink.
Unfortunately AO seems to have stopped making the thru hole parts like AOI508, AOI510, AOI514, AOI516, AOI518.
https://www.digikey.com/product-detail/en/alpha-omega-semiconductor-inc/AOD514/785-1357-1-ND/3060919