[sdiy] S&H problem -- Help??
Grant Richter
grichter at asapnet.net
Sun Jun 15 19:28:19 CEST 2003
> I have this nasty little problem with the S&H on my
> midi-2-cv convertor. It's kinda hard to describe,
> especially without a schematic, but I'll try: I use a
> DAC with a opamp buffer on the output which drives a
> CD4051 1-to-8 mux. The 4051 attaches the DAC to a cap
> to ground followed by a TL071 unity gain buffer. The
> sequence is this: first the uP sets the DAC. Then the
> mux is set to the channel to update. Then the 4051 is
> enabled for a short time, then disabled.
Why would you want to do that?????
That's a joke, everybody makes the same mistakes the first time, including
me.
In typical through hole electronics, every pin has a parasitic ~10 pf cap to
ground and adjacent pins, and anywhere you don't want it to be. Then there
is capacitive coupling inside the mux chip itself. This causes "charge
pumping" as the fast moving digital edges, push or pull electrons in the
wrong way into your probably too small S&H caps.
Sample and hold is a misnomer, it should be "sample and then go into a high
impedance state where anything can and will mess with the tiny charge on the
cap".
Take a look at the schematic at bottom of page:
http://paia.com/midi2cv.htm
John Simonton may be an autodidact, but he is a very practical designer.
You want to toggle the data lines to the mux as little as possible to avoid
charge pumping. You want the DAC to have the lowest possible output
impedance without ringing. If you need a resistor in series with the DAC to
suppress oscillation, then replace with an op-amp that better tolerates
capacitive loading (sometimes a "dumb" op-amp is better). The 75-125 ohms of
the mux switch should already be enough for stability.
Keep the mux enabled as much as possible, INH should be used briefly to
prevent glitching the previous cap in the scan, like this:
Inhibit, set address, set DAC, enable and keep enabled until you briefly
switch channels to next cap in scan. Remember, if it's not charging, then
it's drooping.
Keep switching glitches within a few microseconds of channel changing so all
garbage appears as one transient event on the front edge. The ear better
accepts instablity on the attack transient, most acoustic systems exhibit
it.
Use the biggest cap you can for the S&H, settling times are 10 x RC time
constant to settle to 0.1%, that's why you want the lowest DAC output
impedance, the switch resistance then becomes your R in RC.
More information about the Synth-diy
mailing list