Re: help with my circuit
The 22 ohm resistor limits the charge-up current of the FET input capacitance to provoide a softer motor start, the diode provides a rapid discharge path on turn-off so that the motor turns off as fast as possible.
Note, that beyond the opto-isolator the circuit is mains live, so make sure that the 5V and 15V power supplies are fully isolated, do not use simple lab PSUs to supply these voltages even during the prototype testing, the simplest safe way to do this is the inclusion of very small galvanically isolated low power switch-mode supplies mounted on the PCB such as those made by TRACO, the whole circuit can then be supplied by a single DC PSU input if suitable input voltage switching PSUs for the 5V and 15V are selected. I have not checked the pin connections of your MOSFET driver IC but the circuit is essentially OK provided that the circuit components are adequately rated for 240V mains useage.
Bob.