Jul 20, 2019

KS-20 Filter

My interest in the MS-20 style filter was sparked by videos from Look Mum No Computer, who built a DIY low pass version. This filter makes great basslines, with both strong bottom end which is not reduced at high resonance, and gnarly sound due to a nonlinear resonance path. Clearly I needed such a filter in my system, and the result of that is this module which I tackily named the KS-20.



The Korg MS-20 synthesizer had two filters in series, one high-pass and one low-pass. Internally, these filters are nearly identical, differing only in where the signal is fed to the filter. My KS-20 module contains one such filter core (of the later, OTA-based variant), and a front panel knob to smoothly transition between the two modes of the original MS-20 filters. It blends from a two-pole low pass, via a resonant allpass, to a one-pole resonant high-pass. Using two KS-20 modules in series the original MS-20 configuration can be created.

What sets the MS-20 style filter apart from other classic filter designs is a nonlinear resonance path, created by diodes or in this module LEDs. This nonlinearity is needed to avoid clipping when self-oscillating. More interestingly however, the nonlinear resonance makes the sound of the filter strongly depend on the amplitude of the incoming signal. This is where the drive knob comes in, allowing you to drastically change the character of the filter. At low drive settings, the filter is mostly linear and has a clean resonance. When increasing the drive level, the sound starts to "break up", and there is a sweet spot where the incoming sound and the filter resonance are competing with each other. At even higher drive level, the incoming signal starts to take over and pushes the resonance away, even when the resonance is set to self-oscillation.

This module is strongly based on the schematic published by René Schmitz, and all credit should go to him. In particular the choice to replace the string of diodes with an LED in the resonance feedback path was his. I did verify that this makes no notable difference to the sound. My additions were the variable mode control and drive knob.

The KS-20 is an 8hp eurorack module, using only through-hole components and a single PCB. It draws up to 25mA current per rail.



Circuit description

There are two versions of the MS-20 filter. Initially Korg used the Korg35 module, which contains a few transistors cleverly arranged to from the filter core. Later this was replaced with a design based on Operational Transconductance Amplifiers (OTAs), which is what the KS-20 is also using.

There are two nearly identical filter stages, each using a single OTA. The OTA is configured as integrator-with-negative-feedback, which creates the same transfer function as a single RC filter stage, as shown in the following figure.


First, let's consider the case where the signal is applied to LP_IN, and HP_IN is connected directly to GND. The OTA (U1A) creates a variable current, which is proportional to the voltage at LP_IN multiplied with the control current IABC. This OTA current is integrated by C, and the resulting voltage buffered by the opamp. The resistor R1 creates negative feedback, reducing the output current of the OTA as the output voltage approaches the input voltage. If a voltage step would be applied to LP_IN, this creates an exponential curve at OUT, just like it would charging up the capacitor in the equivalent RC circuit on the right. Hence, with HP_IN grounded, the OTA filter section is just like a single-pole RC low pass filter. The difference is, that the effective value of R can be adjusted with the control current IABC, forming the basis for the voltage control of the filter.

Also just like with the equivalent RC circuit, the OTA filter section can be turned into a high-pass filter by exchanging the input and ground terminal. So, connecting the signal to HP_IN and grounding LP_IN creates a high pass section. In fact, the two inputs can be used at the same time. It should be noted that the HP_IN node must be a low impedance point.

The MS-20 filter consists of two of these sections in series as shown below.


In the low-pass filter, HP_IN is once again grounded and there are two low-pass sections in series, forming a two-pole (12dB/oct) low-pass. Resonance is created through positive feedback of the output to the high-pass input of the first section. Hence, in the resonance feedback loop there is a bandpass filter (one high-pass and one low-pass). This configuration avoids the infamous drop in volume associated with the Moog transistor ladder filter, where the resonance feedback loop goes through the full low-pass fitler which creates negative feedback at low frequencies.

For the high-pass version of the MS-20 filter, the LP_IN point is grounded and the signal is fed to HP_IN. Hence, only the second section is used for a single-pole (6dB/oct) high-pass, and the first section is only there for creating resonance.

Build documentation

I offer PCBs and front panels for this module for sale. All documentation required to build this module is available on github.

48 comments:

  1. Hey kassu,
    Quick question, are there any replacements for the transistors (BC557C)? Mouser doesn't stock them.

    Thank you!

    ReplyDelete
    Replies
    1. Hi! Any of BC556 through BC559 should work just fine! Also a 2N3906 can be used, but it has reversed pinout so should be rotated 180 degrees. It's always good to double check the pinout and compare with the B, C, E (Base, Collector, Emitter) markings on the PCB.

      Delete
    2. The marking in the silkscreen is conflicting with the statement in the build document. “Square pad = emitter”.

      Delete
    3. Thanks for pointing that out! The silk screen is correct, I will update the documentation.

      Delete
  2. Hi, do you matched capacitor (C1 and C2) in each stage?

    Thank you!

    ReplyDelete
    Replies
    1. I did not match them, which may slightly affect the frequency response but I suspect it is not a big deal in this filter.

      Delete
  3. Great site full of helpful tips! Thank you for all your hard work and sharing this knowledge!

    ReplyDelete
  4. Hi, i had one question. Why is the NE5532 opamp used instead of the regular TL072? And is the TL072 a possible substitute for the NE5532?

    ReplyDelete
    Replies
    1. Hi! U2 is used as non-inverting buffers, which means the input can see voltages almost up to the supply rails. The TL072 has a property that it's output inverts when the input is driven beyond a certain point. This doesn't damage the TL072 (as long as not too much current can flow into the input), but in this specific case the opamps are in a feedback loop, and the feedback loop locks up when the TL072 inverts.

      So the answer is that the TL072 will work most of the time, but the filter may lock up if driven hard and/or at high resonance. You can get it out of lock by turning down the resonance and drive completely, but in practice this is not very convenient. Hence, I recommend to use an NE5532 or some other opamp that doesn't have this inversion issue (it may be mentioned in the opamp datasheet as "polarity reversing").

      Delete
  5. Hey, any idea why filter is locked up evwen when using a NE5532?
    kind regards. Manuel

    ReplyDelete
    Replies
    1. Hi! Is it working when you lower the drive and resonance?

      Delete
  6. Why you used ne5532 as follower? Could i use jfet
    stage or stage with emitter follower?

    Thank you!

    ReplyDelete
    Replies
    1. Yes, a discrete follower should also work, in fact that is how the original MS-20 filter does it.

      Delete
  7. regarding the potentiometers, are they all linear or some are log ?

    ReplyDelete
  8. I was wondering about the same. In the Eric Schmitz schematic the resonance pot is log...

    ReplyDelete
  9. I use linear pots in this version. R14 modifies the response curve of the resonance pot to make it quasi-logarithmic. If you choose to use a log pot for resonance, leave out R14.

    ReplyDelete
    Replies
    1. Thanks. I’ll start ordering them now.

      Happy new year!

      Delete
  10. Hi kassu, thanks for your amazing filter design. I am currently trying to build one using your schematics, but ran into a problem. Upon connection, the LEDs start to burn through caused by a very high voltage. When i measure between U4B and R4, I can see a voltage of around 10.5V! Same for U4A, and interestingly also on the outputs of the NE5532 Opamps (sometimes it's -10.5V). Do you have any idea what could cause this?

    ReplyDelete
    Replies
    1. ah well turns out i twisted around +/-12V. i'm surprised the opamps didnt catch fire...

      Delete
  11. Are the pots linear or log for this module?

    ReplyDelete
    Replies
    1. Thanks! I just finished putting together 2 VCO 3340 modules, an ASR, and I'm almost done with the KS-20. Can't wait to hear it!

      Delete
  12. Hi! I finished building a pair of ks20. I want to use it as a general stereo hpf on my live set up (on the master out of my console). The issue i've is when I turn fully anticlockwise the frequency pot, I don't have a dry signal, but a filtered signal. Is this normal ? (I don't wire 1v/oct and cv in)

    ReplyDelete
    Replies
    1. PS : when I turn fully clockwise the pot, it's the same

      Delete
  13. Hi! If I wanted to turn the MS-20 design into a band pass filter, could I connect the output of U2A to the HP_in point and have R5 run to ground instead? Then to set the Q width, offset the voltage input to R6 and R7?

    ReplyDelete
    Replies
    1. Yes, you could make a band pass like that, I'm not sure how the resonance will turn out though. You could vary the width of the pass band by changing the ratio R6/R7 (for example with a potentiometer in addition to the two resistors, connect the wiper to the IABC current source and the other legs to R6 and R6, respectively)

      Delete
  14. Hi!
    Thank you very much for the information
    very clear everything!
    Do you think this design could work with voltage of 9 volts and put in a pedal? if I use a reference voltage of 4.5 volts?
    greetings from Mexico

    ReplyDelete
    Replies
    1. Hi! The filter will work, but the resonance will sound a bit different. This is because of the nonlinear resonance path, which is a big part of this filters characteristics. You need enough amplitude for the nonlinearity to kick in.

      You can probably get similar results as the original sounds by adjusting the resistor R13 to a bit lower value. You should also try replacing the green LEDs with red ones, since they have a bit lower forward voltage. Finally a rail-to-rail opamp for U3 would help to increase the possible signal range a bit, perhaps something like the TLV2372 (haven't tested this opamp myself)

      Delete
  15. Hi,
    clever idea with the smooth blend between LPF and HPF. I used your schematic to build a small PCB to try this out.
    Works fine so far, but I do not get any resonance. I noticed that the signal going out of the first filter (Pin 12 of the 13700) and the resonance output on Pin1, U3 are inverted. Is that supposed to be so in a positive resonance loop? Or did I do something wrong on my pcb?

    ReplyDelete
    Replies
    1. Hi, I found it! I did indeed have an error on my pcb: The second OTA is used non-inverted, but I made it identical the the first one, inverting... my bad!

      Delete
  16. Hi,
    Thank you for the top quality PCB and documentation. I still can't speak for the sound.

    Is there enough space on the PCB to use 1/4W resistors? 1/8W are hard to find (same question for ASR and VCO 3340)

    ReplyDelete
    Replies
    1. Hi!

      - KS-20, ASR, Ladder filter and VCO 3340 are designed for 1/8W, but 1/4W can be used if you put them vertically.
      - Slope and Quantizer are designed to fit either 1/8W or 1/4W normally

      Best,
      Caspar

      Delete
  17. The KS-20 PCB arrived and I did build between the years.

    I put a 220R instead of the 220k behind the cutof RV so I had first a very small range in cutoff RV.

    With a 220k now in place I am not 100% sure if all works as it should. So maybe you can give me some hints? I have no experience with this filter type...

    - Doing a filtersweep in LP mode seems right.

    - HP also seems right (wave is inverted but as I understand it is by design

    - turning up resonance does not change anything when cutoff is very high, thats expected I guess. It does not dimm the sound as in other filters

    So far I think all is right.

    - I am not sure about the "Drive". Here it seems to blend between pure resonance and filtered signal, meaning at zero resonace having the drive fully CCW I get no output, fully CW I get the filtered signal. With reso I blend between both. I cant find the spot where it is amplitude dependant

    - how important are the LEDs? I ordered 3 kinds (all green). What is the key attribute to look for? Maybe I ordered some too modern ones?

    - Which strategy to calibrate the V/Oct behaiviour?

    - Is it possible to add some CV resonance control?


    I needed to "modify" the PCB a bit so it fits in my 3d printed modular, hope that drilling at 2 RV mount holes did not fubar something... Have a look here, I wanted to use the RVs I had here and ordered some parts wrongly so excuse the big resistors.

    https://photos.app.goo.gl/7dKgZ94mP2Hdqx2Q6

    BTW: These small resistors are fiddely, I think I would prefer SMTs, did you plan to do such a version?

    ReplyDelete
    Replies
    1. Sorry for not getting back to you earlier. To answer your questions:

      - The Drive knob changes the signal between completely off (only resonance left) to strong overdrive, where the input signal basically overpowers the resonance, so the sound doesn't depend on the resonance setting anymore. The behavior in between depends on the input - especially with a sawtooth as input the nonlinearity of the resonance is clear. With a square wave input on the other hand the nonlinearity has no effect at all, since a saturated square wave is still a square wave.

      - I think any LEDs will do, also other colors will give similar sound, just at a slightly different drive level

      - To calibrate V/Oct, take a CV keyboard or some other source that can output exact steps of 1 V. Start with some key, and tune the modules frequency knob to get somewhere around for example 200 Hz. Measure the frequency you get, let's call it x. Then go up one octave on the keyboard (or 1 V), and record the new frequency, we'll call it y. Ideally, we would find y = 2*x, but in reality it will be off. Then adjust the trimmer by a half turn or so (remember in which direction), and redo the measurement: measure agian the lower octave and the higher octave, and check if you get closer to y = 2*x. If yes, turn more in the same direction; if not turn the trimmer in the opposite direction. Continue until you get it right within a few Hz. Important to note that every time you adjust the trimmer both octaves will change, and it doesn't matter what exact frequency you get. As long as you in the end get a factor two between them.

      - Resonance CV requires a VCA, it could for example be done with a vactrol circuit instead of the potentiometer. But it is not quite trivial.

      - The holes look like they should be fine, they only touch the ground plane

      - I don't think I'll do a separate SMT version, as many people prefer throughhole part. I'm trying to use normal size resistors in new designs if it fits, but sometimes the small resistors are a nice compromise since it all fits on a single PCB, and having 2 PCBs increases the build time and complexity again with the extra connectors.

      Delete
    2. Thanks, I also had no time to dive deeper. I will take your notes into account. Need to test more.

      Best,
      Carsten

      Delete
  18. Should the pots all be the described value, or can I also substitute for B10K's in places?

    ReplyDelete
    Replies
    1. Hi,

      10k will work, but it will make the inputs quite low impedance so they will load down the source you connect to it a bit more.

      Best,
      Caspar

      Delete
    2. what if i use a b100k in place of the b10k freq pot? Just ran out of 10k pots that fit the pcb :(

      Delete
    3. Yes, 100k for frequency will be fine! It will have a slightly different response curve (how frequency changes with knob position), but you will hardly notice the difference.

      Delete
  19. Terrific Blog, thank you! If I want to use this circuit as a stand-alone filter, with a cutoff pot and no CV input, do I still need the "exponential converter" circuit (less the CV legs), or can the circuit feeding IABC be further simplified? Thanks in advance.

    ReplyDelete
    Replies
    1. Hi! You can simplify the current source, but to get a nice filter response you probably still want to have an exponential response to the knob position. Probably keeping the exponential converter is the easiest way to do this.

      Delete
    2. The filter sounds incredible, thank you! I am putting two of these together for a stereo application. Can the single exponential converter be used to drive both filters via 4 IABC lines? Would the 10k or other nearby resistors need to change?

      Delete
    3. Hi! Yes, that should work. You probably want to reduce R23 to 220k, so the total current doubles and you end up with the same current per OTA.

      Delete
    4. Got it - thanks again!

      Delete
  20. Hello, do the LEDs color change something? i only have red and transparent ones available right now

    ReplyDelete
  21. also i still an electronic noob, sorry if the qiestion is stupid

    ReplyDelete
  22. Hi Kassu
    Amazing documentation, would you by any chance have the schematic in Eagle format that you'd be happy to share? I'd like to incorporate your filter design in with some other blocks I have in mind (LFO, fuzz etc).....

    ReplyDelete