Hello,i made a simple circuit.

and this is

Yellow : Q9's Gate sig
Green : PC817 Num1 pin sig
the problem is 'PWM duty is not applied'
1~99 duty = 99 duty (only ON/OFF)
this is my tried
1. change R20 to 330
2. change R25 to 1~10K
3. change R26 to 0~10K
4. chagne D13 removed
5. change R27 to 1~47K
all same result

and this is

Yellow : Q9's Gate sig
Green : PC817 Num1 pin sig
the problem is 'PWM duty is not applied'
1~99 duty = 99 duty (only ON/OFF)
this is my tried
1. change R20 to 330
2. change R25 to 1~10K
3. change R26 to 0~10K
4. chagne D13 removed
5. change R27 to 1~47K
all same result