Audio and low-frequency circuit systems often require a signal source with a pure spectrum. DDS (direct-digital-synthesis) devices often perform the signal generation by using these specialized integrated circuits. A DDS device uses a DAC but often with no more than 16-bit resolution, limiting the SNR (signal-to-noise ratio).
You can perform the same task with a microcontroller programmed as a DDS and use an external high-resolution DAC. To achieve 18 to 24 bits of resolution requires a large memory table containing the cosine function for any values of phase progression.
An alternative approach lets you use a standard microcontroller with a small memory and still implement an effective synthesizer. You can design a circuit to produce a sine wave using a scalable digital oscillator built with adder and multiplier block functions in a simple structure.
Figure 1 shows a microcontroller driving an audio DAC. To develop your code to generate a sine wave, the circuit in Figure 2 comprises two integrators with an analog feedback loop equivalent to that of an ideal resonator.
Parameter F defines the frequency and ranges from 0 to –0.2, and Parameter A sets the amplitude of the output signal with a single initial pulse at start-up. The following equation derives the frequency of generated signals:
where T denotes the time for computing an entire sequence to obtain output data.
The firmware for implementing this system is relatively straightforward. It requires just a few additions and one multiplication. Thus, you can use a slow microcontroller. Remember, though, that the precision of every operation must be adequate to warrant a complete signal reconstruction. Processing data with 8 or 16 bits isn’t sufficient. You must write your firmware to emulate a greater number of bits, which requires accurate code implementation.
If you properly develop your code, then you should generate the DAC output codes that produce a sine wave (Figure 3). Remember that Parameter F is nonlinear with respect to the output frequency. If you need a directly proportional rate, you can square the value of F before applying it to the input. You’ll find it useful when you need to make an easy frequency setting.
You can use just about any microcontroller to implement the oscillator, together with a high-performance DAC. You can achieve an output SNR greater than 110 dB. Many audio DACs operating in monophonic mode have 20- to 24-bit resolution at a 192-kHz sampling rate. They also offer a dynamic range of 120 dB or more.
Information is shared by www.irvs.info
No comments:
Post a Comment