| Author |
Message |
laltmann
Joined: Jan 31, 2011 Posts: 3 Location: Los Angeles
|
Posted: Mon Jan 31, 2011 7:01 pm Post subject:
VCO: Triangle wave glitch |
 |
|
Hi, first-time poster here.
I've been playing with a VCO based on the Yusynth design (tho I replaced the analog tracking and sawtooth generation with a dsPIC) and I've run into a bit of an issue with the saw-to-triangle stage. As you can see in the image, the top peak of the wave distorts a bit, dipping down and back up before following the proper path down. (The second waveform is the output of U7B, between the diodes.)
The dip is the same size regardless of frequency (around 50 us), so it has a much bigger impact on wave shape in the upper register. The glitch occurs exactly at the transition point in the sawtooth wave. I've tried changing the values of the resistors around U7B and U7C (thinking it was a resistor value issue, I didn't have 1%s so I matched by hand), as well as C12, but couldn't get it to go away. Also tried using matched diodes for D3 and D4 and adjusting the T4 trimmer, to no effect.
Anyone seen anything like this before? The circuit is on a breadboard, so it could be something related to the parasitic capacitance, but I didn't want to try soldering things down until I was sure it wasn't something else
Thanks!
| Description: |
|
| Filesize: |
1.03 MB |
| Viewed: |
312 Time(s) |
| This image has been reduced to fit the page. Click on it to enlarge. |

|
|
|
|
Back to top
|
|
 |
dstrength
Joined: May 23, 2010 Posts: 17 Location: Mobile, Alabama, USA
|
Posted: Thu Feb 03, 2011 12:34 pm Post subject:
|
 |
|
So you're using a PIC for the exponential conversion and sawtooth generation? That sounds very interesting. I'd love to see a schematic and code for that. Are you generating the wave directly or driving an anlog ramp core of some sort?
As far as the triangle glitch...how does your Sine wave look? Does it have the same glitch?
Perhaps Yves can comment, but I believe the glitches associated with the peaks of the waves are related to the ramp core reset.
I've buit four of these VCO's to date and they all have some type of glitch at the reset..in the saw, tri, and sine waves, especially at hi frequencies. You'll notivce the one's on Yves site also show some reset artifcats. But, it's never as bad as the trace you've shown.
Does saw wave have a clean reset? Are you doing some type of smoothing to the PIC output that is affecting this? |
|
|
Back to top
|
|
 |
laltmann
Joined: Jan 31, 2011 Posts: 3 Location: Los Angeles
|
Posted: Thu Feb 03, 2011 2:17 pm Post subject:
|
 |
|
I'm generating the ramp digitally, the dsPIC33F has a pair of 16-bit DACs built in. I'd be happy to provide the code once I polish / comment it up a bit
I was having quite a bit of trouble getting the analog expo converter to work properly. Some friends and I etched a few VCO PCBs but they didn't come out particularly well, and for reasons still unknown we couldn't make any of them track accurately. I'm stronger with digital systems than analog (tho I think that expo converter circuit is finally starting to make sense!), so the PIC was the obvious next step for me. Also planning to add MIDI tracking and a VC bitcrusher on the ramp for some interesting sound options.
The glitch does propagate thru to the sine. The ramp transition is pretty clean. There's inherently a bit of HF ringing since the DACs have a built-in reconstruction filter, but I don't think this is the cause. I'm running the DACs at 100kHz Fs, which puts the built-in filter Fc around 45kHz I think. I actually tried putting another (analog) LPF in the mix w/ Fc around 20kHz but it didn't appear to worsen the effect. It's worth a bit more investigation though.
I'm thinking it may be a slight biasing issue of some sort. It's almost as if the ramp-tri circuit is "lagging" a few usec behind where it should be, which makes me wonder what changing the DC offset of the ramp would do. Right now the signal path is:
PIC DAC (2Vpp, w/ DC offset) --> DC blocking filter (active) w/ gain, to give 10Vpp --> Ramp/tri converter.
Should have time this weekend to play with this more, I'll try adding a bias trimmer after the DC filter and see if it has any effect. |
|
|
Back to top
|
|
 |
dstrength
Joined: May 23, 2010 Posts: 17 Location: Mobile, Alabama, USA
|
Posted: Thu Feb 03, 2011 3:44 pm Post subject:
|
 |
|
I think for the most part, these glitches are inaudible. There are methods for reducing the transition/reset glitches in ramp core waveshapers...but it becomes a design trade-off / diminishing return issue.
Take a look at Ray Wilson's (musicfromouterspace) VCO and waveshapers. He uses a capictor tied to the negative rail to compensate for the glitch. But again, comparing his waveshape circuit to Yves'...I prefer the simpler one.
I look forward to seeing your PIC design. Most of the DCO designs I've seen perform the waveshaping with tables...or they drive an analog ramp core (like the Juno DCO). Do you notice any aliasing in the ramp wave at high frequency? |
|
|
Back to top
|
|
 |
laltmann
Joined: Jan 31, 2011 Posts: 3 Location: Los Angeles
|
Posted: Sun Feb 06, 2011 4:33 pm Post subject:
|
 |
|
Got it sorted out: The DC-blocking filter was slowing down the ramp transition a bit too much. Lowered the cutoff frequency and the glitch went away! Got the whole thing soldered down now too Pics attached.
There's a bit of aliasing in the high frequencies. Well, it's not so much aliasing as jitter really -- by the nature of the way the wave is generated (amplitude step per sample plus register overflow). The number of samples per wave period will alternate between two values, "averaging out" to the correct frequency. It's not too pronounced thanks to the high sampling rate of the DAC, but it is audible at higher frequencies. I'm still investigating the tradeoffs between this effect and pitch accuracy, I'll post the PIC code when I get a result I'm happy with.
| Description: |
|
| Filesize: |
1.16 MB |
| Viewed: |
278 Time(s) |
| This image has been reduced to fit the page. Click on it to enlarge. |

|
| Description: |
| Beastly protoboard version o_O |
|
| Filesize: |
1.08 MB |
| Viewed: |
261 Time(s) |
| This image has been reduced to fit the page. Click on it to enlarge. |

|
|
|
|
Back to top
|
|
 |
dstrength
Joined: May 23, 2010 Posts: 17 Location: Mobile, Alabama, USA
|
Posted: Mon Feb 07, 2011 8:34 am Post subject:
|
 |
|
Hey looks great! I look forward to hearing some samples and checking out the PIC code.
If you haven't allready seen Tom Willtshire's page you should check it out. He's done a lot of work with PIC16's (ADSR's and LFOs) , has done quite a bit of research into DCO's, and is just as helpful as Yve's when it come to sharing his knowledge and work:
http://www.electricdruid.com/forums.html?page=info |
|
|
Back to top
|
|
 |
|