I have replaced my capacitor, and from the multimeter diode D2 seems good. It still can't work now, so the problem should be on the MOSFET. However, I can't get IRF840 from my local shop. The only one with 500V voltage is IRFP450 (
). Is this a good replacement for IRF840?
I just compared datasheets for the IRF840 and IRFP450. They look like they have very similar specs. Should be okay to substitute.
Also - I just took a closer look at the photos in your OP. Something looks funny on the bottom side under capacitor C1. Are you positive there is not a solder bridge shorting across C1? It sure looks like there could be one.
Look into it later when the dust is clearing off the crater.
Before we go swapping the MOSFET out, can you post a trace of the voltage at the Drain of the MOSFET?
The IRFP450 is really similar, the only real difference is the packaging, and the Rds, which is lower (= superior). You can go ahead with that one, and I have to say, I like that part after going through the data sheets. I've been looking for a better version of the IRF840 for a while, and this one might be worth some tests.
The only real question I have is that I would like a nice clean turn on, meaning that at Vgs = 5V, we have a low Rds. I don't see this in the data sheets. I think it needs a test.
One thing: it is physically a bigger part and it won't fit right on the board without some trickery.
I have substituted the broken IRF840 with IRFP450 using flying wire, and it worked! The voltage is around 250V at the startup, and will stay at ~185V when stabilized (with load). I can hear the crackling sound and nothing is hot. I think this one could be a good substitute for IRF840.