Skip to main content

Eurorack VCO Module - AS3340

Update 2023-02-18: There's a new version of this design: v2.1

I don't consider this design done; but, I've gotta start writing it down because I'm carrying too much diagnostic info in my head regarding this thing.

One of the early kit's I built was this AI011 VCO. Despite the website saying it uses a Curtis chip (CEM3340) mine came with a clone AS3340A. At the time I didn't know anything about either chip, I just wanted a VCO to build and play with. Overall it is a fine VCO, it sticks to the datasheet's circuit for trimming. I also built four Befaco Even VCOs to use with the polyphonic envelop generator. I was initially on the fence about building my own, but I eventually decided it would be a nice accomplishment to do an entire signal chain from keyboard to output all of my own designs and an oscillator was gonna be necessary.

So I bought some AS3340's from Electric Druid and set about making my own design.

The AS3340 has a triangle, falling sawtooth and pulse output. It has frequency, pulse width, sync inputs. It seems common to add a sine wave generator output with external circuitry, but I felt that would overcomplicate this first design (it also seems like an interesting thing to have as a separate module). 

The data sheet for this is severely abridged as are most of the Alfa chips data sheets. They lean heavily on the original Curtis (CEM) chip data sheets. It's basically impossible to design something with only the Alfa data sheets. This is by far my main criticism of these chips. They work fine, but the documentation sucks. You'll need to find the CEM3340 datasheet for this, but not the 2 page one, you need the full version which offers 6 pages of glorious information. Here's where I found it.

I started this design on the breadboard, as usual.

It's on the left side of that breadboard the center and right side are some LFO designs. I recently bought more breadboards to deal with this congestion, but this is from before they showed up. I knew much of the testing I'd need to do wouldn't matter if I did it on the breadboard. I wanted to make a mostly surface mount design and that meant I just had to get a PCB made and play with that instead. 

I did make a few simulations of the output stage(s): https://tinyurl.com/2ew2cxa8

The biggest difference between my circuit and the datasheet is that I've opted for the 'easier' trimming described in 'Tuning the AS3340' by Rob Hordijk. Also available here. That circuit should result in a single pass tuning, unlike the other VCOs mentioned above that require multiple passes. In that respect it works, if the circuit is correct and other variables controlled, but that proves difficult as we'll see.

So I went forward with the idea and got some v1 PCBs. When I received them I assembled one and started test and immediately found several issues. But before I get into that, here's what it looks like:

 

Testing and Issues

Anyways lets dig into the issues the v1 board has.

Lets start with the easy stuff.

  • When making the front panel drawings I noticed the fine tune pot and PWM pot are not equally spaced from the center line. Also the jacks centers are not equidistant from the sides making front panel layout awkward. I made the whole PCB off center relative to the front panel to mitigate this.
  • I removed R6. R6 was meant to be a pulldown for the buffer input that I've used in other designs but here it interfered with the R7/R8 voltage divider causing lower than expected output.
  • JP1 isn't necessary. I think I added it to help isolate the frequency inputs for testing, but I haven't really used it and I've shorted it on all the PCBs so far.
  • I've changed R10 to 47k (from 50k). I thought I'd need two resistors to get 51k, turns out that's a more standard value than 50k. So now R10 is a 47k and R9 is shorted. I don't know if 51k or 47k is better. I see designs with both. There are other 47k's on the PCB so in an effort to reduce component variety I think 47k is ok.
  • R21 & R23 are 5.1k. Again I didn't look up common sizes on that so 5.1k is just a nearest value I had on hand. I still haven't tested the HF tracking so who knows if they are okay.
  • RZ1 is 18k not 13k. I don't remember exactly why, but I think it was because 13k wouldn't let me fully trim out the voltage difference between TP1 and TP2 as required by the trimming process.
Now the more complicated stuff:

The biggest hurdle I've had with this design is getting a clean square wave from the pulse output. There were multiple intermittent issues I had to solve.

First I discovered after much probing that the -5V supply provided by the LM7609 regulator wasn't smooth with the caps I had on it. For some reason the v1 circuit has an output of cap of 100nF. The data sheet for the 7906 recommends 1uF, so I was off by a factor of 10. As it turns out though, 1uF isn't enough. I experimented with values I have to find that what this really needs is a 10uF on the output. I managed to rework the v1 boards to accommodate that by using some creative soldering on the optional -12 input circuit I had there incase the -5V wasn't useful. Here's the reworks specifically for that cap:
  • JP3 10uF polarized cap from -5 to -12 rail. 
  • JP2 short - by design for the -5V supply.
  • R5 short - hack that ties one side of JP3 to -12V to allows JP3 to be used for the 10uF cap.
In v2 I'll accommodate the 10uF cap and remove the additional -12V stuff and JP2. 

Here's what it looked like before the above fix:

That's almost a full 2V ripple on the -5V (channel 2) and a pretty strong correlation to the bad falling edge on the pulse output. Here's what it looked like after fixing the -5V caps.


That modification fixed that PCB's nasty pulse ring so I thought I had it solved. So I built 3 more: 

And then I found some of them also rang badly even with this modification. 
Weirdly the ringing wasn't present on the output of the chip when probed but instead on the output of the buffer. I don't know if this was the probe impedance or something else. But I went searching the web for answers. I found a few forum posts describing similar issues here's one on Mod Wiggler and another on the LMNC forum. Much of the advice says a high value 'hysteresis' resistor between the PWM and pulse output is needed. I tried several values but was ultimately disappointed, none of them solved the issue. I did notice that the pulse output between the AS3340 and the output buffer was very sensitive to probing as well as just being touched. Ultimately that observation inspired me to just try a cap on the pulse output to ground. That worked. I tried several values but it's a compromise between cleaning up the falling edge of the pulse output and not introducing so much capacitance that the edge takes forever to fall. I landed on 100pF which takes about 10-50us to fall. I put that in parallel across R10 but I only had that value as a through hole cap, so it's not a good permanent circuit.

After that fix it looks like this:

With the falling edge fixed I felt I could finally get to the real issue I'd observed which was that it seemed like my circuit wasn't in tune after installing it in the main rack. I'd plug the thing in and play a note and it would be way off. Including notes I'd tuned it to in calibration. I'll keep this brief: The circuit was fine, the other modules I made had issues. The MIDI to CV design has an issue where it's sensitive to output impedance and the tuner I made doesn't work well above about 500Hz. So that sucked to find out. 

When I had removed those there was another issue, my 12V rail was at 11.25V. As it turns out I didn't verify that or didn't think it would matter but this circuit is super sensitive to input voltage and CV voltages. That was a face palm moment. I dug up the data sheet for the Mean Well RT65B and I can see that the 11.25V is in spec (barely) but they also have a diagram and a note that 10% load on the 5V rail is needed. Forums also confirm that the supply needs a load on the 5V rail. The trim pot for the 5V rail effects the other rails. I've ordered some load resistors to put on the supplies but for the time being just trimmed them higher so that I get a proper 12V rail. 

With all of that fixed the oscillators worked a bit better. They're still a little bit off in the 1V tracking but I think that's still a minor voltage difference between the bench and the rack supplies. I need to get both more consistent to really sort this out. That said v2 will place the trim pots on the other side of the PCB so I can calibrate them in situ.

2022-08-28 - Testing Notes:

Did a bunch of testing with a frequency counter. 

Completely recalibrated all four DUTs with frequency counter and mV scale for temp adjust step 1.

The tracking from 0v to 5V looked pretty good using a bench supply for CV and multimeter with mV accuracy. Frequency counter struggled a bit at some frequencies, so I compared it against an oscilloscope at lower frequencies.

  Procedure was:

  1.    Powered on for 1hr or more to warm up.
  2.    Readjusted temp1 w/ mV range on multimeter, drifts a bit, got it under a mV.
  3.    Short J4 and get 1046.5 with ref pitch trim pot.
  4.    Set Fine Tune knob to center.
  5.    Set Freq knob to 0, full CCW.
  6.    Input CV 5.000V±0.001
  7.    Use Re-find C6 trim pot to get 1046.5, this was trickier than with F4 shorted.
  8.    Input CV 0.000V±0.001
  9.    Use scale adjust trim pot to get 32.70±0.01 Hz 
  10.    Check tracking.
Some tracking test results:

CV DUT1 DUT2 DUT3 DUT4 Ideal (Hz)
0V 32.7 32.7 32.7 32.7 32.7
1V 65.45 64.9 66.0 66.0 65.41
2V 130.9 130.2 130.7 130.6 130.81
3V 261.9 260.8 261.8 261.4 261.63
4V 523.3 521.6 523.4 522.5 523.25
5V 1047 1045 1049 1046 1046.5

I think I'm okay with that tracking. It's usable if the power supply is okay.

2022-09-04 - Testing Notes

Today I decided to test the warmup time on the circuit. I measured the AI011 and my circuit. Here's the results:

 

In each plot there are two lines, I used two different frequency counters. In both circuits the time to stability is about 4 minutes. This is too small of a sample set to make a broad assumption, but I'm happy that the two are fairly comparable. The setup for that was:
  1. Room temperature devices (off overnight).
  2. 5V CV input and I briefly (20 seconds or so) turned them on to get them close to 1000Hz with the knobs 
  3. Turned them off a few minutes.
  4. Turned on and recorded data for 10+ minutes.
I also took a measurement of the effect of the PWM input knob on the pulse frequency. For this I used the already warmed up DUT2 from the above test and varied the PWM (in 5% increments) across the whole range, measuring the duty and frequency.


That's way more variance than I expected, roughly 1% over the whole PWM range. I'm not sure how to check that against the spec. I can't really find a value in the data sheet to compare to. I'm not sure what (if anything) to do about that, I'm just recording the result. Here's the actual data. Perhaps this is what the hysteresis resistor is for?

There's a circuit for VCO vs PWM stability on the Alfa website I found when designing v1 but I can't get it to work in simulation and decided to leave it out.

Testing still to do:
  • Double check output voltages and adjust gain resistors.
  • Buy and try higher precision resistors R30, R2
    • Most design and the data sheet show higher precision resistors that I used, they're hard to find though.
  • I haven't messed with high freq. track adjustment at all yet.
  • Fine tune knob has a little too much influence on tune, several semi tones... reduce?
    • Increase R3 or reduce range of RFINE_TUNE1
  • Try 5.6k on R21,R23 to reduce component count.
  • I've got three different caps for CF1/CF2 on different PCBs.
    • I need to choose one type but I'm not sure how to decide yet.

12V Current: 18mA
-12V Current: 13mA
5V Current: None

Schematic: vco_as3340_v1.pdf

Thoughts for v2
  • This list isn't complete, I need to use the v1 more and get through the rest of the testing.
  • Add precision resistor footprints. I can't buy them but might as well prepare for if I find them.
  • Fix -5V regulator output capacitance.
  • Add 100pF cap in parallel with R10.
  • Remove JP1
  • Remove R6
  • Remove R9
  • Remove alternate supply (-12V paths for VEE) 
  • Add a resistor for the 'hysteresis' mentioned in forums.
  • Fix resistor values from experimentation.

Comments