dds low pass filter

Discussion in 'General Electronics Chat' started by marcdavidson, Oct 19, 2009.

  1. marcdavidson

    Thread Starter New Member

    Oct 18, 2009
    6
    0
    I intend to use an AD9851 DDS to generate square waves from 0Hz to 100kHz for a stepper motor controller. I would like some information on low pass filters for this low-frequency application. The data sheet calls for a 7th order elliptic low pass filter. Is this necessary? If so, how do I make one? Can I get by with a simpler design?
    Thanks
     
  2. Papabravo

    Expert

    Feb 24, 2006
    10,136
    1,786
    Analog filters come in two major flavors: passive and active. Passive filters are built with passive components like resistors, capacitors, and inductors. They are often designed from tables for a frequency of 1 radian/sec or 0.159 Hz and then scaled up to the frequency of interest.

    Active filters use operational amplifiers, and passive components, with sections cascaded together to get the desired response. The Sallen-Key filter is a basic building block which you can google for millions of hits.

    As for the 7th order elliptical filter being necessary it is hard to say without knowing more about your application but you should be able to try it both ways. I think that 100 kHz is a very optimistic value for running a stepper motor. I would be surprised if you can achieve 5 kHz. as a stepping rate unless you have some quite extraordinary motors or some secret method known only to yourself.
     
  3. marcdavidson

    Thread Starter New Member

    Oct 18, 2009
    6
    0
    Thanks much. I'll try a simple passive filter to start with. I'm assuming that the purpose of the filter is to eliminate distortion. Is that right?
    There are lots of stepper controllers that have step rates over 75000 steps per second. These step rates are especially common with microstepping.
     
  4. Papabravo

    Expert

    Feb 24, 2006
    10,136
    1,786
    It has never been my impression that the purpose of a filter was to eliminate distortion. It just limits the range of frequencies that it will pass. Since they are by and large linear devices a sine wave in gives you a sine wave out.

    With respect to stepper motors and microstepping you are correct that it takes many more microsteps to make a revolution than if you go by halfsteps. So regardless of how many microsteps there are per step you are still limited to about 5000 full steps per second. The maximum rotational speed is still limited by the available torque which unfortuneately decreases with increasing shaft speed.
     
  5. marcdavidson

    Thread Starter New Member

    Oct 18, 2009
    6
    0
    I guess "distortion" is the wrong term. But, since the frequency is set by the tuning word, why would there be any need for a filter? In other words, the user has full control over the output frequency, right?
     
  6. Papabravo

    Expert

    Feb 24, 2006
    10,136
    1,786
    Yes. I have one question though. Is the output of the DDS device a sine wave or is it something else? Passing a square wave through a filter will have the effect of rounding the edges by removing the high frequency content, in effect makeing the square wave output into something that looks superficially like a sine wave.
     
  7. marcdavidson

    Thread Starter New Member

    Oct 18, 2009
    6
    0
    It's a sine wave. After the filtering, the sine wave is then passed through the chip's comparator to make the square wave.
     
  8. Papabravo

    Expert

    Feb 24, 2006
    10,136
    1,786
    So it would seem to me that the only possible reason for a low pass filter on the sinewave output is to remove ANY harmonic artifacts (aka spurs) from the output which might be present as a result of the presumed zero order hold. That's a fancy name for saying that if the output actually looks like a sequence of stairsteps at some resolution, the filter will smooth them out.

    If you have access to a spectrum analyzer it would be interesting to know the harmonic content of the dds output before the filter. There may be clues to this in the datasheet.
     
  9. marcdavidson

    Thread Starter New Member

    Oct 18, 2009
    6
    0
    Thanks. I can certainly make a 7th order elliptic low-pass filter (the data sheet has a schematic), even though this may be overkill for the frequencies that I'm generating. I was a little concerned that if I experimented with anything short of what is called for, including no filter at all, I could damage the chip. It seems to me, from what you're saying, that the worst will be that I'll have a poor quality output signal.
     
  10. Papabravo

    Expert

    Feb 24, 2006
    10,136
    1,786
    The damage you may be worried about is the reflected power from a mismatch. You are barely into the RF region at 100 kHz. A typical dds operates at very low power levels so even if there were some reflected power it should not be a concern. If you are at all worried then terminate the output in a suitable resistor like 50 Ohms and experiment away.
     
  11. marcdavidson

    Thread Starter New Member

    Oct 18, 2009
    6
    0
    Thanks for all the advice. I'll give it a try.
     
Loading...