Fast analog sw. as VC resistor
brad sanders
radioactive at geocities.com
Wed Jan 8 16:44:35 CET 1997
>sawtooth). I found an LM339 yesterday and played around with it at 100 KHz.
>This thing doesn't work as well as I had hoped. The output resistance is
>pretty obviously non-linear, even at 10 KHz.
It'll never really be linear at the endpoints.
More importantly, 'tho, why do you need all this for an env gen? Does
the circuit use all three pot leads? I mean, most ADSR gens I've seen
use one divider for the sustain (which in this context is really just
a "reference voltage" that could come from anything - an opamp or a
DAC, no pot needed), but the other three are just two terminal
resistors. That should only take one switch, one resistor, and a
comparator. And, since these aren't exactly "linear" anyway, do the
nonlinearities hurt anything?
I'm not trying to be argumentetive here, but just pointing out some
design issues I'm unclear on. Is the idea to build a VC ADSR gen - or
to build the perfect VC pot? ADSR is pretty easy - VC pot might be a
bit harder.
The LM339 has a response time of about 1uS. At 100KHz clock, this
amounts to 1% of your total "t." Thus, across the middle you might be
able to make this appear as an offset - but at the endpoints, it's
going to cause a noticeable curve. Reduce the clock to 10KHz and this
becomes less prominent.
That 1uS is optomistic. Since the output is OC, risetime is entirely
determined by R and the input C of the CMOS part attached. If you want
to make this thing really slam home, use a 470 Ohm resistor instead of
the 3.3K you mentioned.
>> It also might help to have a little positive feedback (like a resistor in
>> the 560K to 1M range between the output and +in) on the comparator to speed
>> it up.
This'll help with hysteresis, but it won't really help risetime.
Change the pullup resistor and you'll improve risetime. Probably a
bigger limitation, 'tho, is the CMOS switch. Something better, like a
DG series, would help much here. Switching time is important, but so
is glitch energy - and CMOS switches like the 4066 tend to have a LOT
of glitch energy. This also adds nonlinearities.
>> A slightly better general purpose op-amp - like a TL084 or LF412 should be
>> able to handle stuff up to at least 50 or 100kHz no problem - right?
Well, a TL084 has what - 13MHz GBP? Remember a comparator is
essentially an opamp run open loop, so GBP becomes meaningless: what's
important is the open loop pole - and on a TL084 this lies, I believe,
somewhere around 3.5KHz!
Try it: stick a TL084 on a breadboard, connect a 10K resistor on both
inputs and pull'em high and low - and watch the ristime. Even a cheap
comparator looks better. You can buy more speed by closing the loop,
but then you lose sensitivity and increase the odds of setting up an
"in between" state that just drives digital logic (and nearby radios)
nuts. Use positive feedback to add some hysteresis and it helps this,
but also increases RF output on transitions and can make things
TOTALLY unstable if you're not careful.
>> I would think that the higher the frequency the better - because it would
>> be easier to filter out - yes?
Yes, but what's HF? I mean, in an env gen we're talking about 1mS
absolute minimum period, right?
Another question, just for the heck of it: does this HAVE to be VC? I
mean, if the idea is a small preset synth and you need multiple
controls, you can get a Maxim chip with 8 8bit Iout DACs in a package.
You CAN use a micro to set it, but all you really need is a shift
register. To control many, use the same shift reg with an extra
control bit to enable another device. One of these chips costs 5
bucks: that's less than a buck a control. Five bucks to control two
ADSR gens. Not too shabby, and it's easy to lay out one 20 pin chip.
> http://radioactive.home.ml.org <-------------------------------
More information about the Synth-diy
mailing list