I created a custom symbol to simplify the work. Of course, you can build it with native components. I believe this type of circuit is available in many SPICE tutorials on YouTube or websites. Here is an example of using the custom symbol on my GitHub.
Basic-PWM.qsch (3.9 KB)
