MUFF WIGGLER Forum Index
 FAQ & Terms of UseFAQ & Terms Of Use   Wiggler RadioMW Radio   Muff Wiggler TwitterTwitter   Support the site @ PatreonPatreon 
 SearchSearch   RegisterSign up   Log inLog in 
WIGGLING 'LITE' IN GUEST MODE

In phase tri generator from ramp/saw core…
MUFF WIGGLER Forum Index -> Music Tech DIY  
Author In phase tri generator from ramp/saw core…
thor.lucas
Hi,

So I'm building a VCO. It's a ramp/saw core. Currently it generates ramp, square, tri, and sine waves. However, I noticed one fatal flaw.

I was using ray's method of generating tris by rectifying ramp and saw, mixing them, then scaling. However, this generates out of phase tris and thus sines. This is not good for my module because it relies on waveshaping by mixing those four waves.

If you're wondering why this is considered out of phase, imagine this:

In one rotation, saw starts at -5V and goes up to 5V. Square starts at -5V and goes up to 5V. The sine and tri waves should start at 0, go negative at 1/4, go back to 0 at 1/2. then +5V at 3/4, and back to zero. This would be in phase.

With ray's method, the tris and sine start at +5V, go down to -5V at 1/2, and back to +5V at 1.

What sort of saw to tri generator stays in phase?

Thanks
guest
there are a few ways of doing this, but they are all more complicated than the simple fulwave rectifier. you need breakpoints at +/-2.5V, so something like an odd harmonic wavefolder would work, but would round off the edges. otherwise you can cascade 2 fullwave rectifiers, and then invert one half of the cycles. the easier option, though, to get the phase relationship you want, is to shift the phase of the triangle wave. this can be done with a single comparator and and summing amp:

http://electronotes.netfirms.com/EN87Part.PDF

this is often referred to as a saw animator.
thor.lucas
guest wrote:
there are a few ways of doing this, but they are all more complicated than the simple fulwave rectifier. you need breakpoints at +/-2.5V, so something like an odd harmonic wavefolder would work, but would round off the edges. otherwise you can cascade 2 fullwave rectifiers, and then invert one half of the cycles. the easier option, though, to get the phase relationship you want, is to shift the phase of the triangle wave. this can be done with a single comparator and and summing amp:

http://electronotes.netfirms.com/EN87Part.PDF

this is often referred to as a saw animator.


So somebody suggested this on reddit and I tried it. However, it produces massive glitches that I can't seem to filter out no matter how hard I try (simulated on ngspice). Maybe the TL072 does not have a high enough slew rate for this application?
thor.lucas
I've been looking around for ridiculously high slew rate comparators that function in a +-12V range in order to mitigate this glitch to such a high frequency that it can be filtered with ease… can't seem to find one. If anybody could help…

Seems the TL072 slew rate is too slow for this. I might try OP275 but I think the solution would be a true comparator. I think using a regular audio op amp isn't good because the open loop gain is also not high enough. When the voltage starts getting close to the threshold, the pulse starts bending a little which also doesn't help with the glitch. I need something that will go from -10V to 10V very quickly and stay at 10V.
cygmu
thor.lucas wrote:

So somebody suggested this on reddit and I tried it.


*waves* hello!

Quote:

However, it produces massive glitches that I can't seem to filter out no matter how hard I try (simulated on ngspice).


Hmmm, that's interesting: I always found that this idea was more glitchy in practice than in any sim I could create. One thing you could try is adding a bit of hysteresis to the comparator, so that it doesn't oscillate at the crossover point. That was always a real-life need for me but not something that came up in simulations.

There will be glitches, but they should not be much different from what you always get with saw-to-tri conversions; the only thing is that you have more of them here: once when the input saw resets, and also when the phase shifter resets.

The oldest trick in the book for smoothing out those glitches is to make the final op amp in the chain be one with a low slew rate so that it can't keep up with the glitch.
thor.lucas
cygmu wrote:

The oldest trick in the book for smoothing out those glitches is to make the final op amp in the chain be one with a low slew rate so that it can't keep up with the glitch.


Wow.... After spending hours trying various combinations of high order butterworth filters and making that glitch as small as possible by using high slew rate op amps… I just might try that. Any op amps you can recommend?
guest
you can also try feeding back a bit of the glitch in opposite polarity to cancel it out.
cygmu
I am not speaking from much experience here, but I seem to recall reading that a 741 did the trick here. It certainly slews very slowly smile Probably not ideal for producing a sawtooth, but for the triangle and sine stages it might just work.
nrrrd
One method I've thought of trying, and have working in simulation is:

1. Use an inverting opamp to create an inverted version of the saw
2. Feed the original saw into a 40106 schmitt trigger inverter to get pulse 1
3. Feed the output of the inverter into another inverter to get pulse 2
4. Use pulse 1 to drive switch 1 on a 4066 quad switch
5. Use pulse 2 to drive switch 2 on the 4066
6. Feed the saw into switch1 of the 4066
7. Feed the inverted saw into switch2
8. Mix the two switch outputs

For step 2 you might have to add some dc offset to get the pulse width equal, especially if your wave crosses the zero line.
thor.lucas
nrrrd wrote:
One method I've thought of trying, and have working in simulation is:

1. Use an inverting opamp to create an inverted version of the saw
2. Feed the original saw into a 40106 schmitt trigger inverter to get pulse 1
3. Feed the output of the inverter into another inverter to get pulse 2
4. Use pulse 1 to drive switch 1 on a 4066 quad switch
5. Use pulse 2 to drive switch 2 on the 4066
6. Feed the saw into switch1 of the 4066
7. Feed the inverted saw into switch2
8. Mix the two switch outputs

For step 2 you might have to add some dc offset to get the pulse width equal, especially if your wave crosses the zero line.


Interesting idea, but it wouldn't work well for Eurorack since the CD40106 has a maximum supply of 20V, and we operate on +-12V (24V).
MUFF WIGGLER Forum Index -> Music Tech DIY  
Page 1 of 1
Powered by phpBB © phpBB Group