Electronic – Using a MOSFET as a relay in mains-powered circuits

mosfetpowermosfetrelaysolid-state-relay

I am currently planning a small project where I use a Raspberry Pi as a smart home server to switch loads (mainly door openers & lights).

The usual way would be to use a mechanical relay with ratings of 16A & min 230V. I also considered using a solid state relay.

I then had the idea to use a p-channel MOSFET. They are widely available and can switch the required currents & voltages (after consulting the datasheet for electrical specifications and providing proper heat dissipation, of course).

I especially appreciate the absence of the huge currents introduced by the relay coil and the higher switching speed that would make this circuit usable for dimming applications.

Is it possible to use MOSFETs in this kind of application or is its function limited or even forbidden by (German) regulations or the laws of physics?

I would really appreciate your opinion/help on this.

Here is the device I am planning to use : IXTH16P60P

Best Answer

Yes it is possible.

However, for mains voltage they're almost never used because it is just impractical as you need much more than just "a MOSFET" to be able to switch a mains powered device.

A MOSFET can only switch DC so for mains AC you also need a bridge rectifier.

MOSFETs tend to be more sensitive to voltage spikes which are often present on mains voltage lines. So chances are that your MOSFET will break sooner than you like.

For mains voltage switching most often a relay is used, either electro-mechanical or solid state. The advantage there is that the control signal can be isolated from mains voltage which is a huge safety advantage.

For non-isolated applications mostly TRIACs are used. These are also used in mains voltage dimmers.

I also especially appreciate the absence of the huge currents introduced by the relay coil..

In a proper design, this current isn't huge and should not be an issue. All the "wifi sockets" you can buy these days use a relay and the current isn't an issue.

and the higher switching speed that would make this circuit able for dimming applications.

Yes but no, you don't need such a high switching speed for dimming, OK higher than a relay can offer but a TRIAC can do dimming as well. High speed switching (you're probably thinking of PWM) isn't easy to do on mains voltage. It can be done but is complex, high voltage and best left to experienced engineers.