EveryCircuit
Contact
Reviews
Home
trollis
modified 5 years ago

Better Sine to PWM to sine

2
6
167
02:32:18
So basically one can generate a pwm by feeding the signal you want to process into one of the inputs of an op-amp and a sawtooth wave with a higher frequency into the other input. To convert it back you just need a low-pass filter. I didn’t calculate any values so it could probably work better than this.
published 5 years ago
PrathikP
5 years ago
Your SPWM generation is wrong
PrathikP
5 years ago
Take a look at this https://everycircuit.com/circuit/5215584365838336
trollis
5 years ago
@PrathikP All right! I can’t follow links in the mobile app, but I assume you’re linking to your SPWM circuit :) Thanks for the feedback! I’ll study it so I’ll get it right, lol. However, I do get a similar sine output in this circuit, is that just by chance and specific to that frequency? I mean is it functional at all or does it just seem like it kind of works? haha
BillyT
5 years ago
Try http://everycircuit.com/circuit/5215584365838336
PrathikP
5 years ago
Thankyou Billy, I forgot to remove the s in https. So trollis, the thing is that your SPWM must have a positive pwm half and a negative pwm half. In your previous circuit, the pwm always had a +15 to -15 V output, which isn't going to work. In this circuit, your pwm only has a positive output, which also doesn't work. When you want the positive part of the sine wave, you need a 0 to +V PWM and to get the negative half, you need a 0 to -V pwm. Then add the two outputs and filter it using an LC filter with a cutoff frequency of (ideally) 50Hz (but in reality you'd rather set it to something like 500Hz). Use a carrier frequency of 10KHz or higher
trollis
5 years ago
Thank you!

EveryCircuit is an easy to use, highly interactive circuit simulator and schematic capture tool. Real-time circuit simulation, interactivity, and dynamic visualization make it a must have application for professionals and academia. EveryCircuit user community has collaboratively created the largest searchable library of circuit designs. EveryCircuit app runs online in popular browsers and on mobile phones and tablets, enabling you to capture design ideas and learn electronics on the go.

Copyright © 2026 by MuseMaze, Inc.     Terms of use     Privacy policy