Voltage Controlled Sallen/Key Filter using JFETs - distortion not wanted! - Page 1
Forum section: electronics / projects

author: DrGonzoDK
author_rank: Regular Contributor
timestamp: July 09, 2017, 06:28:58 pm
content: So - first of all, this is my first post! I'm not an electrical engineer (most often, I'm on the software side of things), but, well, it's been an interest, and I couldn't put off registering on this great forum any more!Anyway - I am working on some <analog> audio effects for music, and while twiddling knobs is fun, voltage control is even funner! So, I have been working on a voltage controlled -12db/octave Sallen/Key lowpass filter, which uses JFETs as voltage controlled resistors in the RC loop.Initially, I just passed a straight DC control voltage into the JFET gate, but quickly found out that this causedCRAZYdistortion! Obviously, the impedance of a JFET in ohmic mode is controlled by the gate to source voltage, not just the "absolute" gate voltage!So - I figured that the best way to get past this problem was to couple the input signal (audio) onto the DC control voltage, so I did this. The result is much better, but it isn't really optimal. The coupling capacitor (C1/C4 in the drawing) shouldn't be too big or the filter will react too slowly to control voltage changes - and if it's too small, it doesn't do the job properly either (same distortion effect as with straight DC control voltage, i.e. without input coupling)The basic circuit layout is the following -Am I going off in a totally wrong direction on this VCF design? Or are there some neat tricks to make sure that the gate/source voltage stays constant thus allowing for actual "proper" filter cutoff (and resonance) control?Thanks in advance!!!!!Best regards from David!

author: Kleinstein
author_rank: Super Contributor
timestamp: July 09, 2017, 06:41:54 pm
content: JFETs work as a variable resistor only for relatively small voltages, like some 100 mV or so. With higher voltage they get increasingly nonlinear. The control range is also somewhat limited. With two fets there is also a problem getting them to work in parallel - usually there is quite a lot of tolerance in the gate voltage needed to operate them.The more practical way is likely using kind of analog multipliers and a different filter topology. An other option would be using something like an LM13700 trans-conductance amplifier.I would normally avoid using voltage control and would more tend towards digital control, with analog control only for a very small range if needed.

author: DrGonzoDK
author_rank: Regular Contributor
timestamp: July 09, 2017, 07:09:36 pm
content: The "control bit" of it is quite okay - although it, of course, is not wholly linear. My main problem is the aforementioned issue. The filter works great - when the input amplitude is low (due to the smaller effect on the gate->source voltage).Unfortunately, analog control is a bit of a must - since it integrates with other analog "control voltage" gear in an audio context. Conceivably, I could use some type of digital control - but it seems that most of the digipots I see are either 7 or 8 bit (surely there must be some 10-bit parts?) - and, of course, is most practical with a microcontroller or similar (most of them use serial protocols of course).So I suppose that I should be looking into other topologies?At this point, I was considering deamplifying the signal into the filter by a factor of, say, 4 or 5, then reamplifying it. The smaller input amplitude means that the filter cutoff frequency is affected inaudibly - but I'm a bit scared of the noise in that situation. Sounding dirty is okay, but not /that/ dirty

author: DrGonzoDK
author_rank: Regular Contributor
timestamp: July 09, 2017, 08:52:45 pm
content: So, just for random info, I tried playing around and substituting regular old NPNs for the nJFET - and I've actually got something working. Allowing the input signal to flow into the collector, the control voltage through the base works fine for controlling the cutoff:(And yeah, it works both in simulation and in practice! I follow old Bob Pease's dictum of SPICE lying to you, all the time)Unfortunately, it doesn't work well for controlling the Q - it's way too easy to push it into hard rail-to-rail self-oscillation, so I will have to look for an alternative for this.

author: mikerj
author_rank: Super Contributor
timestamp: July 09, 2017, 09:33:52 pm
content: What tuning range are you trying to achieve? You may want to look at varicap diodes (which can be normal rectifier diodes or LEDs).

author: CopperCone
author_rank: Super Contributor
timestamp: July 09, 2017, 10:31:29 pm
content: http://www.vishay.com/docs/70293/70293.pdf

author: T3sl4co1l
author_rank: Super Contributor
timestamp: July 10, 2017, 02:35:15 am
content: Quote from: Kleinstein on July 09, 2017, 06:41:54 pmIndeed, the two are related: if you only need a small control range, like 1:2, then the drain voltage range is quite wide. If you want large ratios, like 1:10 or more, the drain voltage must be severely restricted.The underlying mechanism is that the drain current saturates (that is, it enters the "linear" or "FET saturation" region) at the voltage Vgs - Vpo. When Vgs is nearly zero, you have nearly the full pinch-off voltage available. The higher and higher resistance you try to reach, however, the closer Vgs must be to pinch-off, and therefore the less drain voltage range is available.I would suggest investigating OTA filter circuits instead. A two pole filter with 1:100 or more range is easily implemented with a single LM13700.Tim

author: David Hess
author_rank: Super Contributor
timestamp: July 10, 2017, 04:20:24 am
content: There are ways to use pairs of JFETs to make two terminal variable resistors but I suggest instead using a filter topology like state variable which uses inverting operational amplifiers so one side of the JFETs can be grounded. Then it becomes much easier to linearize the JFETs.

author: DrGonzoDK
author_rank: Regular Contributor
timestamp: July 10, 2017, 04:32:25 am
content: Quote from: mikerj on July 09, 2017, 09:33:52 pmVaricaps would allow for controlling the filter cutoff - but not the Q! Ideally, both would be voltage controlled.So varicaps only get me as far as the current NPN thing - and be potentially somewhat more demanding in terms of matching parts even though i've got some very nice shottkys....

author: ludzinc
author_rank: Unknown
timestamp: July 10, 2017, 04:40:31 am
content: OTA Filter?What's that?

author: DrGonzoDK
author_rank: Regular Contributor
timestamp: July 10, 2017, 05:18:28 am
content: Quote from: ludzinc on July 10, 2017, 04:40:31 amI would assume a filter using an operational transconductance amplifier which can act as essentielly a voltage controlled resistor in an RC configuration.

author: DrGonzoDK
author_rank: Regular Contributor
timestamp: July 10, 2017, 05:31:11 am
content: I've been avoiding the OTA's since my "local dealer" takes an arm and a leg for them. Maybe it's time to order off Digikey... *sigh*

author: DrGonzoDK
author_rank: Regular Contributor
timestamp: July 10, 2017, 10:10:34 am
content: Quote from: David Hess on July 10, 2017, 04:20:24 amMost voltage-controlled SVF's i've seen use transconductance amplifiers - and in this case, I don't care about highpass or bandpass, just the lowpass! But it's an interesting idea though.I really do need to order OTA's...

author: David Hess
author_rank: Super Contributor
timestamp: July 10, 2017, 10:37:48 am
content: Quote from: DrGonzoDK on July 10, 2017, 10:10:34 amOTA's work in the same state variable active filter topology because the cutoff frequency can be adjusted with two tracking gain stages. As you point out though, availability is a problem.

author: DrGonzoDK
author_rank: Regular Contributor
timestamp: July 10, 2017, 10:53:24 am
content: Quote from: David Hess on July 10, 2017, 10:37:48 amLet me put it this way. The local guys charge about 13USD for a CA3060 which is, yes, an array of OTA's, but with a bandwidth of like 100 KHz. Now, they're fleecing their customers on that, but still relevant.The only alternative, I suppose, is to look at the work of, say, Robert Moog and his early 1960s discrete transistor ladder filters - but they're complicated like a moogerfooger. Apparently, in the 1980s synthesizer industry, there was a battle between the discrete (or later, integrated) ladder-style filters of the US, and OTA filters of the Japanese.So I'm sure there's a whole thing going on there still, with the filter styles :-P

author: DrGonzoDK
author_rank: Regular Contributor
timestamp: July 10, 2017, 10:56:53 am
content: Quote from: DrGonzoDK on July 10, 2017, 10:53:24 amSpeaking of the Moog filters, they are littered with a strange thing -What the hell do the two arrows pointing towards the operational amplifier mean? They use a quad part and the other ones are "normal" if you will.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: July 10, 2017, 11:10:02 am
content: Quote from: DrGonzoDK on July 10, 2017, 10:53:24 amWell there's your problem, you don't go designing new things with obsolete, discontinued boutique parts.LM13700 is new production (...for now..), and under a buck IIRC.There's one or two transistor array (monolithic and matched) parts out there as well, also important for discrete synth apps. Unfortunately they're not cheap, even when they are available.All this stuff got sucked inside ICs, then quickly replaced with far more powerful digital circuitry, decades ago. Analog builds are not cheap, these days.Think of it this way: if you're going to spend hundreds of hours soldering something together (or even just a few hours repairing), the $20 brokered part fee is a drop in the bucket.Quote from: DrGonzoDK on July 10, 2017, 10:56:53 amThey flipped the symbol, for whatever reason. Pin 4 is VCC, pin 11 is VEE. The VCC symbol points up and VEE points down. It's not a very good way to draw it, as you've noticed... oh well.Tim

author: DrGonzoDK
author_rank: Regular Contributor
timestamp: July 10, 2017, 11:16:46 am
content: Quote from: T3sl4co1l on July 10, 2017, 11:10:02 amThe obsolete part is because it's literally the only transconductance amplifier they have. Kind of sad. They've literally got 300 different opamps, including some very nice ADI and LTC parts. But no OTAs that aren't in a metal can or an array from the early 1980s.So I just placed an order for a flock of LM13700s elsewhere. No way around it at this point, I suppose :-PAnd alright. Makes sense with the diagram. Stupid schematic capture software, that one.And you're absolutely right about the "state of Analog". The funny thing is, there /is/ a real market for it in music. Musicians and producers absolutely love analog technology. I mean, a large Japanese manufacturer recently created new, low-voltage triode and pentode vacuum tubes (using VFD technology as a baseline). They are positively selling like hotcakes even though you have to get approved and sign an NDA to use them.Now, tubes aren't my thing - thank god :-P

author: David Hess
author_rank: Super Contributor
timestamp: July 10, 2017, 04:43:56 pm
content: I was going to suggest the LM13700 but T3sl4co1l beat me to it. They are still produce and inexpensive.Gilbert multipliers can be used for the variable gain elements but I am not sure how well and I doubt they would be cheaper than the available LM13700. It has been a while since I have looked but there should be plenty of examples available online of the LM13700 being used in variable filters.Linear Technology makes the LT1228 operational transconductance amplifier for video applications but again, I do not know how suitable it would be for audio. The LT1228 datasheet even has an example of a variable cutoff frequency state variable filter which operates from 100kHz to 1.6MHz and could be changed to operate over the same range at audio frequencies by changing the two capacitors.What about using switched capacitor filters for variable cutoff frequency operation? The clock signal could be generated by either digital or analog means.

author: DrGonzoDK
author_rank: Regular Contributor
timestamp: July 10, 2017, 05:04:10 pm
content: Quote from: David Hess on July 10, 2017, 04:43:56 pmI suppose you could - and still call it analog (though it is discrete-time but continuous amplitude). There is precedent (bucket brigade devices i.e. Linear sampled analog delay lines being similar in principle). The clock could be generated by a simple voltage controlled oscillator which is simpler to implement - both discrete, with a 555 or some comparators...I've ordered some LM13700s, too. Unfortunately, There are many fewer ressources on OTAs than opamps. Time to dig out the theory books I suppose!!

author: JPortici
author_rank: Super Contributor
timestamp: July 10, 2017, 07:24:28 pm
content: I want an OPAMP with a division sign toojokes aside, there aren't many resources on OTAs but the 13700 datasheet is a goldmine. Also,openmusiclabs, which should also check out for a lot of goodieshttp://www.openmusiclabs.com/files/otadist.pdfan rene schmitz websitehttp://www.schmitzbits.de/At one point i designed a VCA with a discrete differential amplifier where i controlled the gain by controlling the emitter current of the LTP.. followed by an opamp o go back to single ended. Turns out i accidentaly made a CA3080 Type OTA

author: DrGonzoDK
author_rank: Regular Contributor
timestamp: July 10, 2017, 07:51:56 pm
content: Quote from: JPortici on July 10, 2017, 07:24:28 pmMy minusses always look wrong, hence the dots!I found this interesting document -https://www.ece.uic.edu/~vahe/spring2016/ece412/OTA-structures2.pdfwhich details OTA filters of constant and varying Q. Might be a good start!I will look at your links - thanks!!

author: T3sl4co1l
author_rank: Super Contributor
timestamp: July 10, 2017, 07:52:13 pm
content: I did that (discrete amp) but for a different purpose: error amplifier with combined sample-and-hold.What?Consider this: if you build an error amp with an OTA, then you have a compensation capacitor from output to -input. Consider also, if the -input voltage is constant, and the error amp has stabilized, then the voltage on that capacitor is simply the voltage needed to correct the error. You could turn the error amp off, and let that voltage float.So when I designed an autotune circuit for my Theremin, that's what I did!Input on the left comes from a DC coupled frequency mixer. When the frequency difference is nonzero, the "DC" level is actually audio (sine wave tone). When the difference is near zero, the "DC" level corresponds to the phase shift (it's a type 1 phase detector). When the circuit is energized (button pressed), bias current supplies the diff pair and top load (mirror), gain is high, and the VAS is active. When open, the VAS and CCS load go open circuit, and the gain node's voltage just floats there. Eventually, the 0.01 compensation capacitor leaks down, and the button needs to be pressed again (as it turns out, about every couple of minutes, which isn't as good as it should be; I'm still not sure why). The MOSFET follower (not JFET, just because of the voltage range; the added noise isn't important at this voltage scale) ensures minimum leakage for the output.Oh -- and Theremin being a synth instrument, this is doubly on topic.Tim

author: DrGonzoDK
author_rank: Regular Contributor
timestamp: July 11, 2017, 09:39:31 am
content: Quote from: T3sl4co1l on July 10, 2017, 07:52:13 pmThe OTA thing seems to be what a lot of classic (i.e. late 70s/early 80s) analog synthesizer builders did. For instance, while looking through this rather thin data sheet from Curtis ElectroMusic (the so called CEM chips, which competed against Solid State Music in the 80s), there is mention of several 2-pole stages being cascaded with buffers inbetween; and the filter slope profile being selectable from butterworth through chebyshev by the ratio of capacitors,http://curtiselectromusic.com/uploads/CEM_3385_Prelim.pdf...which is exactly a feature of voltage-controlled OTA low-pass resonant filters. Of course, you can do a similar thing with Sallen/Key filters by varying the ratio of the two non-inverting input resistors... But it leads me to believe that the CEM and SSM chips used simple OTAs based around diff pair BJTs in their integrated chips...EDIT: Of course, they also say it right in the document. "All transconductors"... Stupid me!I suppose that it would, in fact, be fruitful to look through the data sheets of old Solid State Music and Curtis Electromusic VCF parts?

author: DrGonzoDK
author_rank: Regular Contributor
timestamp: July 12, 2017, 11:39:25 am
content: Well, well... the lovely parcel man was just here with 7 LM13700s - so now, i believe, it's OTA time.I'll probably update with a new post on this new-fangled resonant OTA filter stuff, as a project.

author: LaserSteve
author_rank: Super Contributor
timestamp: July 12, 2017, 03:37:08 pm
content: Here, have a dose of Thomas Henry's really good synth DIY...http://www.birthofasynth.com/Thomas_Henry/Pages/VCF-1.htmlSteve

author: mikeg
author_rank: Newbie
timestamp: July 12, 2017, 05:11:20 pm
content: I would look at using optical parts. Like an optical compressor. Easier to do. The control voltage drives the LED light source which changes the resistance of the photo resistor.

author: DrGonzoDK
author_rank: Regular Contributor
timestamp: July 12, 2017, 07:16:57 pm
content: Quote from: mikeg on July 12, 2017, 05:11:20 pmThat's a really good idea. Also since photoresistors generally decrease their resistance with increasing luminous flux, and an increase of control voltage increases the cutoff frequency (at least, that's what people would expect).There is a question of linearity - or should i say, exponentiality (i'd generally want it to be somewhat stable with 1V increase corresponding to a doubling frequency); but it's an interesting idea nonetheless. However, it'd require quite a few optically coupled parts.I like the originality of it though. :-D

author: DrGonzoDK
author_rank: Regular Contributor
timestamp: July 12, 2017, 07:28:29 pm
content: Quote from: LaserSteve on July 12, 2017, 03:37:08 pmI'm having quite a lot of fun with the LM13700's.With a circuit equivalent to the attachment (drew the schematic up really quickly in LTspice, it's kinda ugly...), there is voltage control going on (by varying the voltage at V4 to vary the current into input 1. Obviously the resistor can also vary this, but keeping that constant...) of the simple R/C filter. Both in the real world, and LTspice. ;-)So the OTA route is quite obviously a very beneficial one. Here, it's just a single OTA being used as a simple voltage controlled resistor feeding into a capacitor. It'll sure come in handy elsewhere...I still need to get the diode biasing right to improve the linearity and such. But what a fascinating little circuit ^^

author: T3sl4co1l
author_rank: Super Contributor
timestamp: July 12, 2017, 08:49:09 pm
content: Quote from: DrGonzoDK on July 12, 2017, 07:16:57 pmFWIW, photoresistors are quite nicely resistive. Compare to photoFETs, which are worse than JFETs (the linear range is quite narrow indeed, no matter what the illumination level). The light response is notoriously quirky though: it has multiple time constants, or diffusion effects, and possibly dependency from illumination level (i.e., the time constants themselves change with intensity). So, using them for a precision filter or VCO might not be such a great idea.(They're also not RoHS, though that doesn't seem to have impacted the supply and availability much.)Tim

author: DrGonzoDK
author_rank: Regular Contributor
timestamp: July 13, 2017, 10:43:51 am
content: Quote from: T3sl4co1l on July 12, 2017, 08:49:09 pmIt's a fun idea, and it has precedent. Old-school wah wah guitar pedals (basically, a low-pass, all-pass or band-pass filter) used optocouplers to determine the cutoff. Obviously, your foot is not really /that/ much of a precision controller, but it could probably work just fine.There's also precedent as the original replier wrote - optocoupled compressors and limiters were all the rage in studios in the 70s because of a smoother response than FET VCA-based compressors. Obviously, they did /not/ use LEDs but other lamp types (such as incandescent) which respond somewhat slower to current. But still...

author: DrGonzoDK
author_rank: Regular Contributor
timestamp: July 13, 2017, 08:27:03 pm
content: So - I finally got down to bodging together a simple LM13700 test today (non-resonant -6db/oct. low pass filter) and, i'm pleased to report, it worksIt's being fed from a single lab power supply; the negative voltage rail is being generated on the left breadboard using 4 parallel LM7660's (I've found that even with very large output capacitors, the voltage stability is much, much better when they are parallelled...) - both some National-branded and TI-branded parts. I prefer the National Semiconductor logo ;-). The control voltage is being generated using the ground and negative rail to the trim potmeter, and then buffered by a (not shown) unity gain buffer, then fed through a single 3k8 resistor and into pin 1 (Iabc) of the half LM13700.For some reason, I hadn't put in the styroflex bypass caps on the LM13700 when I took this photo - but they're there ;-)All in all, this is great. Currently working on a proper two-pole resonant filter, as well as getting the control voltage scaling "just right". I gotta say i love the operational transconductance amplifier. It's an underappreciated circuit element - just look at the absolutely tiny amount of content on Youtube on it (yep, looking at you, Dave ;-)).

author: floobydust
author_rank: Super Contributor
timestamp: July 14, 2017, 02:42:27 am
content: For all those wanting to build an analog synth, the main IC's have risen from the ashesThe obsolete SSM2044 4-pole VCF, used in Korg, E-Mu, PPG, Kawai etc. synths is re-issued bySound Semiconductoras theSSI2144. Price was very good for a rail.Curtis Electromusicis also remaking theCEM3320 4-pole VCFand CEM3340 VCO.I think only a good VCA is left needed but Sound Semiconductor is working on a reissue of the SSM 2164/V2164 as theSSI2264Quad VCA.Just mentioning it because these analog functions are very hard to design, they made it into IC's, then went obsolete and it's almost lost art

author: DrGonzoDK
author_rank: Regular Contributor
timestamp: July 14, 2017, 05:11:50 am
content: Quote from: floobydust on July 14, 2017, 02:42:27 amI've had CEM and SSM-based synthesizers, but sonically, these filters don't beat the Moog ladder filter or the Roland Jupiter/Juno filters - so that is why I'm taking the trouble.I do find it fantastic that these old parts are being reissued, though. The world needs more analog ICs

author: DrGonzoDK
author_rank: Regular Contributor
timestamp: July 24, 2017, 09:45:02 am
content: So - while doing this project, I chanced upon some old early 1970's diagram of non-OTA using, modified Sallen/Key filter designs. They did mention you have to be "imaginative" to acheive it, but if you aren't that concerned about linearity (which I'm not) and more concerned with that ephemeral "sound" - of the resonance especially, reverse biased NPN's do the trick. Essentially, they are configured as current-controlled resistors.I'm still iterating on this design (hence the horrible OA input and output hi-pass sections), but it sure does acheive what was needed - voltage control of cutoff. And without a large degree of distortion.To add even more nonlinearity, one could throw antiparallel diodes in the feedback path. All in all, an interesting topology which is straight outta normal Sallen/Key territory (see the attached diagram).I'll get around to implementing it in a non-bredboard form probably today. Might post some audio examples. Also, I'm thinking of controlling the feedback resistance with a photoresistor, since that bit doesn't seem as amenable to voltage control. But, VC of resonance is a lesser concern :-)