Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Thanks for the replys, so still i'm wondering is there any way to control 240 ac load by PIC else than Relay ?
An optocoupler with an aditional traic will do
Check the data sheet of the MOC3020
Robert-Jan
Two back to back MOSFETs That along with an opto-coupler (or anything to allow them to switch properly) is a solid state relay which you can also buy as a single IC.
Be careful though, some solid state relays are made for DC only and in this case are a single MOSFET with an optocoupler.
TRIACs are the semiconductor switch that block current in both directions. You only need to apply a single pulse (though a continuous one is okay too) and the triac turns on. Unlike a MOSFET you can't turn it off. It only turns off when the current in it reaches zero (like the zero-crossing in an AC current) at which point you must apply a pulse again to turn it on for the next half cycle. As you can see, it doesn't work too well with DC since you can neve turn it off unless you have something else in series with the triac to cut the current.
A triac itself is really two anti-parallel thyristors- a thyristor being a switch that can block AC in both directions but can only turn it on in one direction. It has the same "can't turn off" properlty. Two anti-parallel thyristors make a triac allow switching of AC current in the same way two back-to-back MOSFETs also allow for back-back switching. With the MOSFETs though you can turn it off whenever you like. THey are more complicated though (and expensive especially for higher currents) due to the circuitry needed to switch the MOSFETs since their source connections are floating.
There are also triac driver ICs that exist that can detect the zero cross for you and only switch on the MOSFET at that point for minimal noise as well as other drivers that allow you to switch at any point in the triac cycle. If you measure the AC signal and "turn it on" at the right time you can achieve what is analgous to PWM for DC. But since you are replacing a relay, you need to know none of this.
Some reading:
https://en.wikipedia.org/wiki/Thyristor
https://en.wikipedia.org/wiki/TRIAC