I'm trying to design an isolated LED driver using this IC. The problem is that when I turn on the driver the MOSFET heats up too quickly and it fails if it stays on for a few seconds. I have attached a moderately sized heat sink suitable for To-220 package to the MOSFET. I have tried changing the gate resistors and even shorted them because I thought the gate was not turned on fully but the result is still the same. I don't have a temperature sensor but the heat sink heats up to extremely hot to touch in just a couple of seconds (~5 seconds). Obviously the MOSFET shouldn't dissipate this much energy when I'm running a 15W LED. What could be the reason for this?
Designing switched power supplies is not easy. (Not for beginners)
Well, a power transister becomes hot out of two possible reasons:
The current that flows when it switches through multiplied with the voltage that remains between Drain and Source. You can connect an oscilloscope and measure the remaining voltage between drain and source when it is switched through and calulate the current by measuring the the voltage at the resistors RS1 - RS5. Form that you calulate the power that the transistor is consuming. If this power is 1 Watt you already feel the transistor is warm. If it exceeds 3 Watt it will become so hot that you cannot touch it anymore with your finger if there is no cooler.
The other reason for extreme heat (and that is more probable) is that the signal at the gate is not sufficient square. If the voltage rises and falls too slowly you will have a lot of loss in the transistor.
So to answer your question you must provide the oscilloscope signals measured between gate and source and between drain and source and at RS1 - RS5.
If the signal at the gate is OK I suppose that your transformator is not well designed.
Generally the information you give is very basic. What voltage is DCPOS ? What are you connecting at the output? Does the transistor also become so hot when the output is without load?
Gate resistors are very high. And the 100k across G-S is very high, too.
That resistors ( R5 || [R3+R4] ) and the input capacitance of the MOSFET form a low-pass filter having a cutoff frequency of f=1/(2 pi 340R 1.2nF) = 390kHz. This can seem high enough, but it can be low enough to smooth the sharp edges of the gate drive signal which can cause the MOSFET to overheat due to insufficient driving.
Remove R3(10R) gate resistor, put a 0R. R4 can be between 1R and 4R7. R5 can be in 1k-10k range.
Another possible reason is the ringing across D-S caused by switched primary inductor. There is a snubber formed by D3-R6-R7-C5 but they may not be sufficient. Note that the snubbers in a Flyback should be designed carefully.
If i may weigh in, there are some circuits controlling massive amounts of power and hardly getting warm at all. The trick is either on or off, and not too much time in the transistion period. Some devices benifit from dampers across the device (diodes, caps,) but often its a case of adequate drive: on or off, nothing between.