Triac Control
Hi Kybert,
This resistor is used to limit the max current allowed in the high side of the optocoupler and it is, in the case of the MOC3041, 1 A.
The max current will be present when the AC wave is at the peak, it is 1.41 times the RMS value, if in this point the opto conducts, the current will be aprox. (240 x 1.41) / R, so R must be at least 338 ohms, a safer value would be between 10 to 20% higher, for 15% : 390 ohm.
BUT, your circuit is using a MOC3041, a Zero Cross driver, it means that inside the optocoupler there is a ZC detector that will only fire the triac when the voltage between MT! and MT2 be zero or very near to zero, in this point the gate current will start increasing up to the point when the triac starts conducting, this collapses the difference of voltage between MT1 and MT2 near to zero, and the high side of the opto will not have more work to do up to the next half cycle.
Due to the possibility of an inductive load, at ZC voltage point there is some lag current that may cause damage to the gate if it is not protected by a limiting resistor. This is the reason because a resistor is included in a ZC driver circuit.
Using a phase control opto ( the same but without the ZCD), it is possible to fire the triac in any point of the AC wave from 0° to 180°, and in this case the resistor is mandatory.
Instead of using an opto and a triac, you may use a solid state relay, which is the same, but in a plastic block with screws for high and low sides, and the resistor included! . It has a higher price of course and there are Phase control and Zero Cross types.
Regards.