How to implement Symmetric PWM? - Page 1
Forum section: electronics / beginners

author: belzrebuth
author_rank: Frequent Contributor
timestamp: April 17, 2025, 02:55:22 pm
content: Hi all,I've seen a video of a voltage controlled oscillator for musical purposes (eurorack synthesizer) that shows a symmetric PWM on sawtooth wave and square wave.Here is the video with timestamp:https://youtu.be/J_AsddXS20k?t=190I'm puzzled on how to implement this symmetric PWM given a triangle wave and/or a square wave/saw wave as inputs.I've seen several examples on how to do an assymetric PWM but never something like this.

author: David Hess
author_rank: Super Contributor
timestamp: April 17, 2025, 04:17:55 pm
content: I am not sure how they are generating the unbalanced square wave to start with, but to balance it the output is averaged and fed back into the duty cycle input, enforcing an AC balanced output.

author: belzrebuth
author_rank: Frequent Contributor
timestamp: April 17, 2025, 04:31:10 pm
content: The square wave must have been generated by a comparator of some sort given that this is a saw core oscillator.I guess that the saw wave is compared to an offset? to produce the square wave of the same frequency.I don't quite get your explanation for how this sort of pwm is achieved.You mean that there is a portion of the square wave compared to the first square wave to generate this sort of effect?Perhaps you are suggesting that this is not the output of a comparator and it's some sort of addition of different levels of squares that's at play here?

author: pcprogrammer
author_rank: Super Contributor
timestamp: April 17, 2025, 06:45:17 pm
content: Making such a waveform is easily done with a MCU and a DAC. For the square wave the falling edge is basically split in two with a variable dead time and the positive and negative parts are shortened by half this dead time.. How this is done in an analog circuit I don't know.

author: belzrebuth
author_rank: Frequent Contributor
timestamp: April 17, 2025, 07:01:18 pm
content: For the pulse modulation (not saw yet) I thought about taking the voltage difference of two pulse modulated square waves one being double the frequency of the other.Modulating the width of those two pulses as one normally would gives somewhat of this "horizontal symmetry" effect.This kind of works but still not okay as I only get the effect to the positive half.For the saw I really have no idea, maybe I need to do the pulse first and then kind of translate the results to the saw.I really need an analog circuit for this, no MCUs.edit: Actually I was wrong. What works for the "symmetric" pwm of pulses is to take the output of two comparators with one comparator +ve input being a sawtooth wave and a triangle wave to the +ve terminal of the other comparator. Having a sine wave modulating the DC value at the inverting terminal of said comparators and taking their voltage difference as the overall output gives me the symmetric pwm.Now I need to do this for the saw wave which is trickier part as it seems..

author: incf
author_rank: Frequent Contributor
timestamp: April 18, 2025, 03:02:30 am
content: I've done similar hardware based triangle -> duty cycle controlled PWM generators for commercial products.It's nearly the same process as generating standard asymmetric PWM.Generating the starting triangle wave is trivial. Generating the various multi-step square waveforms also looks pretty trivial to implement with two or more comparators and fixed or variable voltage thresholds (sum the output of the comparators to get the final signal). One can do arbitrary math functions with op-amps to generate the thresholds and get a linear response with respect to some input control signal.