Direct Digital Synthesizer (DDS) (Part 8)

Part 1234567, 8

As seen before, the proposed DDS design has its own limitations. The main restriction is caused by the limited frequency from Arduino: 16 MHz for 5 V supplied platforms such as the UNO, and lower frequencies for 3 V supplied platforms such as the Fio. As a consequence, the higher the requested DDS frequency the harshest signal. Next is an example of  a 8 kHz raw signal, as it is output from the VoutA pin from the MCP4921.

In the previous posts, I used a simple filtering capacitor in order to smooth the signal. In more technical terms, I used a very basic passive 1st order low pas filter. Low pass filters let frequencies which are lower than a predicted frequency threshold go through the filter while blocking the higher frequencies. Following the same principle, one can build high pass filters for removing unwanted low frequencies, or band pass filters and band stop filters which are useful for removing AC line residual.

Starting from this basic description, we can deduce that the frequency threshold (aka cornering frequency) is one of the most critical parameters. An other critical parameter is how steep the corner is ! Next plot illustrates how much filtered frequencies are attenuated depending upon the so called order of the filter: the highest the order the steepest the cornering.

Other parameters are of great importance such as the Gain, Q factor as well as the phase shift which are not covered in this post.

In the present example, I choose an active low-pass Butterworth filter, which has a maximally flat amplitude response in its pass-band region. This filter is implemented in a Sallen-Key configuration as shown in the next illustration:

Although this type of filter as unitary gain, R3 and R4 may be chosen adequately in order to set higher gains (Unitary gain is achieved by removing R3 and using a 0 Ohm resistor for R4). Computing R1, R2, C1 and C2 is not an easy task. However various options are available to the designer: on line calculation and freeware applications. Many publications are also available, mainly from electronic component makers. U1 is any rail-to-rail (input and output) high performances op-amp.

As hobbyists, we probably have many more resistor values in stock compared to capacitors. So that the easiest way to calculate the components values is to start with what you have in hands. I decided to go for a pair of 10 nF capacitors which led to a using two 910 Ohms resistors, so close from 1 kOhm that I decided to go for the simplest! Fair enough, here is the resulting signal:

The yellow plot represents the incoming signal while the blue plot represents the filtered signal. One could make two observations: first is the slight attenuation in signal second is the slight phase delay. Both relate to the behavior of this type of filter and have almost no impact on our final objective which is a clean signal generation. On the other hand we now get a remarkably clean sine wave out of the DDS.


Here are a few links which may be useful to you



Leave a Reply

You must be logged in to post a comment.