Saturday, June 14, 2025

Debugging VCO Pitch unstability continued 3

Aaaaand testing continues. NB: Most measurements are now with the VCO connected to power ground.

Reducing pw to 25% to see if it affects the noise

The noise clearly follows the DCO even when pw changes, meaning it is highly likely that a lot of the noise comes from the pulse wave generation. It is a bit delayed/rounded off though.

Turning up DCO at mixer VCO to see if noise increases

It doesn't look like it affects the noise notably

Turning up square sub oscillators 1 and 2 


It's a bit hard to tell, but it looks like the noise drops whenever the pulse wave drops, even if the output from the waveform mixer has the sub oscillator cancelling out every second drop.
With a longer sample time however, we can see that it looks like the noise rises to a higher level when the mixed signal rises too. Not quite sure how to interpret it but it does seem like the sub oscillator has some effect on the noise.

Removing the mixer pcb

Noise is highly visible even if no waveforms reach the output

Trying to measure noise on the pitch CV 

It's a bit hard to measure the noise. There are huge spikes during SPI traffic, but this is probably due to crosstalk within the Logic Pro. 

Measuring again without SPI probes (those are needed at the moment for stable 50MHz SPI)

Much better, the SPI noise is mostly gone. As a side note, the CVs become unstable as the DAC sees wrong values, for example the VCA CVs for the DCOs (probably):


Comparing DCO output and Pitch CV (with SPI probes on):

Markers 0, 1, 2, 3 are at the start of the DCO edges. It is possible to see that the noise in the pitch CV follows (albeit slightly delayed) the same pattern.

Removing the SPI probes

The stepepd noise becomes more visible. It is clearly there still (though - is it there or is it on the ground of the Logic Pro? Nobody knows!

Zooming in on the CV noise

The CV noise seems to jump up and down approximately 10mV. If run through a 39k resistor, it will have the same effect as 100k/39k = 2.56*10mV =26mV would have on a 100k input (e.g. a 1V/oct input). One octave is 1200 cents, so this should result in a noise of about 31cents pole to pole. This matches well with what we see.

Still, I am not sure exactly WHERE the noise is

Moving VCO GND back to the mainboard. 

Connecting the ground of the Logic Pro to the GND on the VCO, measuring pitch CV at input to mainboard to measure more accurately what the VCO sees. Presumably, since the pitch CV summer is ground referenced, the difference between the CV and GND at this point is what the VCO sees - whether it is the CV or the GND that carries the noise. The 10mV difference is still there.

Controlling that the probes measures a silent GND

The CV probe and probe GND is now connected where the GND is tapped for the CV board. Strangely, we still see the DCO. This may be crosstalk in the Logic Pro though.

Disconnecting the output probe

This is weird, we can still slightly see the DCO but definitely not as clearly

Disconnect probes from the filter (!)

I've had probes connected to the JP6 filter the whole time (whoops). Disconnecting them changed nothing though, or not for the better at least.

Disconnecting the SPI probes again

Smaller variation but still periodic noise.

Reconnecting SPI, tapping GND and CV from same probe pair 

Did the noise go away? It's hard to tell. It does look less noisy though. We're up against the limits of what the Logic Pro can measure but it looks like using the ground probe from the same pair is a good idea.

I'd say the ground measurements are inconclusive. There is definitely noise there but I can't figure out where it gets into the measurements.

Using CV generated by my modular


The CV generated externally looks clean. It has a lot of noise, but it doesn't seem to be periodical

Using CV from modular to control VCO

Now, this was surprising! This is the worst noise so far, +/-40 cents. Perhaps the VCO VC and VCO GND both contain parts of the same noise, but of inverse phase, so it partially cancels out? 

Revert to normal but disconnect linear FM

Back to the 'normal' noise again (20 cents this time, but remember that we moved the VCO ground)

Connecting both waveshapers and VCO to power ground 


 This is also a bit interesting. The max noise is not reduced (sttill around 20/20), but there is a second signal bleeding through, modulating the noise at 7-8 times the DCO (between 2330 and 2660Hz). Also, at the negative going poles there are half the peaks. What is going on here, is this some sort of self modulation? 

 

Conclusion

We're really not that much closer to a solution here. 

Star ground from power may not be helping as other parts of the circuit will reference the noisy ground and that may even result in a higher noise since none of it cancels out. 

The noise seems to mostly follow the pulse wave, though something else may also affect it

I am inconclusive as to where the noise propagates. The one thing I haven't checked is the power lines

Noise and crosstalk on probes seem to mess with the result (and especially disconnecting the SPI probes has a great effect) though I don't think this affects the frequency modulating noise, just the measurements of noise on a signal/gnd line. The frequency modulation is still the best way to see what the VCO actually experiences.

Next

The most important thing left to try is rebuilding the comparator parts of the waveshaper, remove the original waveshapers and see if the noise is still there. If it is, we can try to isolate the noise, and if we manage to do that, try to improve it.  

Thursday, June 12, 2025

Debugging VCO Pitch unstability continued 2

Testing continues. First up:

Disconnecting all waveshaper outputs:

Disconnecting pulse, saw, saw inv, sine, triangle, sub square 1 and 2, sub saw 1 and 2. No difference in noise

Replacing trimmers with resistors (to disconnect trimmer wires, as trimmers are on the mainboard):

 

No difference. At this point, the wires still connected are +12V/GND/-12V, -5V, In center, symmetry, DCO in, PW CV and Pulse VCA CV.

Stopping the sub oscillator

First, trying to stop the sub oscillator by pulling pin 7 of IC8 to GND


 

That didn't work at all! Instead, the noise quadrupled, probably because the output of the op amp pollutes GND.

Next, by pulling pin 8 of IC8 to GND

Not really any big change there.

While still pulling pin 8 to GND, reducing PW to 0

This DOES have some effect, though we still see spikes for each period. Not sure where they're from

Combining stopped sub oscillator and pw at max

At this point both the sub oscillator and pulse wave outputs are stopped. There still is noise, but less. The spikes are gone, not sure why.

The comparator op amps (IC8B, IC1D) are still running, this is probably where the noise is coming from.

I did also try to reduce the amplitude of the DCO by running it trough a buffered 33k/100k resistor divivder. That way, I could make sure the PW would be completely disabled. Not a big change there either.

Tapping ground directly from power input, not via mainboard. Sub osc and pulse waves are running

 

This is interesting. The noise is halved. It should be quite apparent by now that this is most likely caused by noise on the GND line. Let's reconnect the full waveshaper board but without GND

With waveshaper board A fully connected but GND routed back to power input:

This is good, the noise isn't increased by reconnecting all pins

With waveshaper board A and B fully connected but GND routed back to power input:

Maybe a bit surprising, but the noise level doesn't change when reintroducing waveshaper B, as long as the GND goes back to the power input. This is very nice.

Double check how things normally are - reconnect GND back to mainboard


Sooo, the noise is back up past 10 cents, approximately +5 cents on both sides. In my first measurements the noise was around +/-20 cents, but then the VCO was running at 7k. Here it runs at 15k. Also, at some point I started synching DCO 1 and 2. Still, a bit confusing.

Plugging waveshaper straight into the main board with VCAs in place. Moving VCO off board

Again, noise is much lower, but this time the noise is back to being sort of a triangle shape. I THINK i still kept hard sync on, so this is a bit confusing. The period is still 333Hz, same as the DCO

Increasing the sample rate and VCO frequency for a better view:

The shape stays the same. Weirdly enough, the plot of the DCO is missing the bottom half, what is going on?

Part 3 wrapped up

I am still not able to completely figure out if the noise is caused by the op amp creating the clock pulse for the waveshaper, the pulse wave generator or the flip flop for the sub oscillator, though the last one seems a bit more unlikely as the noise follows the pulse, not the sub oscillator

Disconnecting all outputs from the waveshaper didn't make a great deal of change, whereas moving the GND did. I can only assume this means that the noise, at least partially, travels through the ground plane. On a side node, version 2.2 of the waveshaper used the LM311 in the sub oscillator circuit. This generated a lot of noise that affected the VCO (perhaps not from the LM311 itself but from the spike generation circuit after it? who knows. From my (unpublished) 'Testing the voice card' post:

 

If the noise is in the ground plane, it affects more than the VCO - VCA levels, filter FM and cutoff etc. But noise on these are probably less audible.

 

More to test (hey, we're up for a post number 4!)

- x Set pw to 25% and see how the noise reacts. At this point the sub oscillator should still have pw 50% so we may be able to see a difference? 

- x Connect both VCO and Waveshaper grounds to power gnd, effectively making it star ground

- x Try to measure noise on the ground plane

- Look for info on how op amp comparators may pollute the ground plane.

- Breadboard the offending parts of the waveshaper (pulse and clock generators) to see if we get the same result

- x Remove the mixer PCB and tap VCO directly

- x Enable DCO output in mixer but measure VCO at its output, is the noise even worse? 

- x Measure noise on CV 

- x Measure noise on CV without measuring SPI with same probe. 

- x Measure noise on CV relative to GND on VCO! Move GND back to Voice card 

- x Ground CV/Connect to voltage from modular synth 

- x Disconnect Lin FM input from VCO

 

Wednesday, June 11, 2025

Debugging VCO Pitch unstability continued

With PW set to zero

This mostly removes the noise. Not completely, but quite a lot better

With triangle DCO

The frequency seems to vary with the triangle wave as well
 
But when increasing the resolution and VCO frequency, we see that it is not a complete triangle, it seems to drop abruptly at the top of each DCO cycle.

Square wave is rounded

 

An observation - the frequency square wave is rounded, almost like it is low pass filtered.

Removing waveform mixer VCA

The square wave has its VCA on the waveshaper board so it is still visible  

Setting DCO to triangle, waveform mixer VCA is still removed

The triangle wave now never reaches the waveform mixer, but the square wave still breaks through. The frequency variations are almost exactly the same as what we saw when the triangle wave WAS connected, see "with triangle DCO, high resolution" above. Perhaps the triangle does in fact NOT affect the CVO.

Setting DCO to square, PW to 0. Waveform mixer VCA is still removed

 

There is still a small variation, but it is less than we saw before. However, there IS a slight up and down squarish effect here. Could it be coming from the input to the sub oscillator flip flop?

Also, there are significant spikes at the period marks. It could be that a PW of 0 is not quite turned off OR it could be from the sub oscillator circuit.

Moving waveshaper off board with jumper cables

The noise is the same as previously, distance doesn't matter

 Single DCO set to triangle

Square still breaks through

Pulse output from waveshaper board disconnected 

This is very interesting, almost not understandable. The pulse output is disconnected so the pulse wave does not reach the mainboard. But still we see the frequency noise! We also see the clicks on DCO period start.

Disconnecting the DCO input

Disconnecting the DCO from the waveshaper makes everyhing go away. Not surprising but a nice check. 

Recap

So, what we see this time is that 

- The noise is most likely only caused by the pulse wave (?), or at least not as much by triangle etc.
- The noise is present even when the pulse wave is disconnected from the mainboard
- There are heavy spikes at the start of each cycle

Theories

- The noise may originate from two sources: The saw-to-clock-pulse converter around  IC6 (LM311), and the pulse wave generator around IC1
- The noise does not travel (exclusively at least) through the pulse pin. 

Next up

- Disconnecting other waveform pins
- Disconnecting sub oscillator pins
- Disconnecting trimmer pots, replace with resistors
- Stopping the sub oscillator, with and without pw at 0
- Halving the DCO input to completely stop PW output
- Moving GND pin for the waveshaper to not return to the mainboard
- Check if flipflop stops
- Reconnect everything and move GND only.
- Move VCO offboard and do stuff suggested in the previous post. 

Tuesday, June 10, 2025

Debugging VCO Pitch unstability

After making the frequency analyzer script, I've started a thorough checking of the VCO frequency. It's very clear that something is not quite right, something is modulating the CV (e.g. some kind of noise on the pitch CV input, or perhaps ground).

I initially thought that the linear and exponential FM inputs could be the culprits, so I removed IC9. Here is what that looked like:

The frequency very clearly oscillates around 653Hz. However, don't get fooled by the sinusoid or triangle looking shape - the frequency variations are bipolar, they go in both positive and negative direction. If the noise was indeed a single sine wave, it would not bounce up and down. (Now, this may actually be wrong, see later in the post).

That probably means that we're dealing with more than one noise source, that sometimes cancel out and sometimes doesn't. Almost looks like two oscillators slightly detuned, right? 

Increasing the VCO frequency gives us a better view of what is going on:

With a 7.3kHz wave we get a better approximation of the noise. We get several samples at the same frequency (the small peaks are probably due to the sample rate in logic2 being too low), then it drops and stays low for some time, before going up again. It doesn't take too much imagination to see that the noise may be a square wave of some sort.

If one looks closer at the timeline, the pulses appear to be around 0.003s apart, meaning the noise has a frequency of around 333Hz. 

Now, where on the board can we find two square wave sources, slightly detuned? I got a feeling, let's have a look at the output of the DCOs!


 Oh yeah! The DCO is currently running at 330Hz! 

Lets double check. What happens if we halve the DCO frequency?


 

Ok, the issue isn't as pronounced now, it's dropped from +/-20cents to +/-10 cents - but the period has changed to 0.006s, the noise frequency is now 167Hz. I think it's pretty clear that this it DCO related.
 

Chasing the source

Clearly, the source is related to the DCOs, but what exactly? Is it 
- the DCOs themselves
- the sub oscillator circuit (that made audible noise in the previous waveshaper version!)
- the square wave generator
- the output from the waveshaper 
- the output from the waveform mixer

Here are some things I've tried:

Changing the waveform of the DCOs from square to saw:

There is still considerable noise, but the square wave pattern is gone. 

Disconnecting the waveshaper PCB: 

Now the noise is nearly gone! most fluctuations is reduced from 20 to 2 cents, which is probably an acceptable level. Also, putting back the IC9 FM source switch didn't change anything, which is hardly surprising since the FM sources are gone...

Reintroducing the waveshaper, but removing the DCO inputs:

Still looking good. Again, not surprising but at least it tells us that the waveshaper board by itself doesn't cause the noise.

Reintroducing the DCO inputs, one at the time:

 

DCO A

DCO B

Now, these confuse me. With a single DCO we still get a sine-like behaviour. Looking at DCO A, the VCO frequency (662Hz) is very close to twice the DCO frequency (330Hz), so two and two cycles are probably getting modulated by each top/bottom of the DCO wave, and as the frequencies are not exactly the same, the time at top/bottom moves around, creating the sine/triangle effect?

The DCO B plot is completely bonkers, bot sure what is going on there. The difference in cents is still 10 though. 

 

More to test

- Remove the waveform mixer. If the noise is coming from the waveshaper itself it shouldn't matter (though, as changing the DCO waveform DID matter, I suspect that this doesn't change anything).

- Short the suboscillator flip flop input to ground to stop it. Will tell us if the sub oscillator is the source. NB: Test with a single waveshaper.

- Change the pulse width of the DCO pulse wave, if possible disabling the pulse wave altogether. This is also best tested with a single waveshaper, just disconnect the second DCO input. NB: Test with different waveforms selected, not just pulse. 

 

Now, after these tests we should have a fairly clear view of what the noise source is. Next up is figuring out how the noise enters the VCO. A few things to try:

- Move the VCO off board and connect the pitch input to ground close to the PSU

- Move the VCO off board and connect the ground input to ground close to the PSU  

- Try to measure GND and pitch CV at the VCO input relative to GND at the PSU 

 

A note on noise amplitude

The frequency analyzer predicts the noise amplitude using the ratio cents to volts. In a 1V/octave, 1V corresponds to 1200 cents. The change is linear (well, if the VCO tracking is tuned properly), so 20 cents means 16.7mV.  

The VCO circuit is currently 1V/oct if using a 100k resistor at the input. This is true for the exponential FM input, but for the pitch CV we're using a 39k input. In this case, 1V is 2.56 octaves or approximately 3000 cents. 20 cents will then be as little as 6.7mV!

On the other hand, if the noise is coming through the ground plane, who knows what the amplitude will be.