Smoothing effects of DAC quantization?

Discussion in 'General Electronics Chat' started by autorelease, Feb 23, 2009.

  1. autorelease

    Thread Starter Active Member

    Jan 26, 2009
    39
    0
    How can I smooth the output of a digital-to-analog converter and minimize the 'jagged' effects of quantization? I have attached a graph of my current results and the effect I'm looking for.

    Would a low-pass filter do the job? How would I go about determining the values for the resistor and capacitor?
     
  2. nanovate

    Distinguished Member

    May 7, 2007
    665
    1
    Yes a LP filter will help. Sizing of the filter depends on fast you need the DAC to respond.
     
  3. silvrstring

    Active Member

    Mar 27, 2008
    159
    0
    What is the highest frequency you expect to sample?
    Let's say it's 20kHz. Then try sampling at 80kHz~100kHz.

    You want your LPF to let the 20kHz and below thru, but block the jagged edges of your sampling freq.

    R = 1/(2pi*20000Hz*C)

    Pick a capacitor value. Say 10nf.

    1/(2pi*20000Hz*.00000001f) = R = 796 ohms.
     
  4. autorelease

    Thread Starter Active Member

    Jan 26, 2009
    39
    0
    I suppose I'll have to determine the best values experimentally and test everything with my scope.

    An digital input of 0 results in an output of roughly 60mV and an input of 1023 (maximum) results in an output of about 2.36V. Thus, the ΔV for each step is roughly 2.246mV.

    I update the DAC value roughly every 2.5 microseconds at most, giving a maximum potential update frequency of 400 kHz. (The DAC's maximum sampling frequency is 667 kHz.) In reality, I might update step the value by 1 unit every 10-100 microseconds or so.

    From what I have read, passive RC lowpass filters aren't that effective at frequencies higher than 100kHz, and I'd be better off with an RLC filter. Is this correct?
     
  5. autorelease

    Thread Starter Active Member

    Jan 26, 2009
    39
    0
    I've been trying various values for R, L, and C, and getting some decent results. However, there are times when I want my output to be discontinuous (i.e. turn off the filter.)

    I'm thinking about inserting a 4066 bilateral switch between the filter output and the first terminal of the capacitor (which is connected to ground). When the switch is closed, the filter is on and the output is filtered. When the switch is open, no current flows through the capacitor and the output is unfiltered.
     
Loading...