Numeric Precision vs. DDS Calculations

Using the full frequency resolution of a direct digital synthesizer chip outstrips the capabilities of floating point numbers. Ed takes a look at what’s needed for high-resolution frequency calibration and measurements.

By Ed Nisley

As you saw in my July article, the filter bandwidths and frequency resolution required to characterize low-frequency quartz resonators far exceeded the capabilities of my bench instruments. I decided to take a look at building a special-purpose resonator tester around a cheap direct digital synthesizer sine-wave source, because DDS generators have

PHOTO 1 A knockoff Arduino Nano controls a generic AD9850 direct digital synthesizer circuit, both plugged into standard 0.1 inch headers, with hand-wiring connections below the proto board. The SMA connector provides a mechanically rugged output from the board; the DDS frequencies don’t require its RF properties.

A knockoff Arduino Nano controls a generic AD9850 direct digital synthesizer circuit, both plugged into standard 0.1 inch headers, with hand-wiring connections below the proto board. The SMA connector provides a mechanically rugged output from the board; the DDS frequencies don’t require its RF properties.

advantages over traditional analog oscillators and frequency counters in computer-controlled measurement systems.

Of course, nothing is ever so simple as it seems. In this article, I’ll explain how numeric precision affects Direct Digital Synthesis (DDS) output frequency calculations, work through the effects of floating-point and fixed-point arithmetic, and show how a carefully tweaked DDS oscillator frequency varies with temperature.

DDS Calculations

You can think of a direct digital synthesizer as a lookup table holding the digitized values of an analog waveform, a counter addressing the table entries in ascending order, and a DAC converting the numbers to analog voltages. The Analog Devices AD8950 DDS chip in Photo 1 has the equivalent of a table with 232 10-bit entries defining a sine wave, a counter clocked at 125 MHz, and a differential output current-mode DAC. The PCB, complete with the DDS and a 125 MHz quartz oscillator, costs under $20 on eBay or Amazon. …

Read the full article in the September 326 issue of Circuit Cellar

Not a Subscriber yet? Become one today:

Or purchase the September 2017 issue at the  CC-Webshop

New Programmable Oscillators for Next-Gen Networking Systems

Cypress Semiconductor recently introduced the CY294X high-performance programmable oscillator family. Delivering superb jitter performance and a wide range of output frequencies for embedded systems, the new oscillators offer performance that exceeds the reference clock requirements of high-speed interface standards including 40/100GbE, SyncE, and IEEE 1588.Cypress CY294X High-Performance Programmable Oscillator

Well-suited for networking applications, the CY294X family delivers RMS jitter performance of 110 fs (12 kHz – 20 MHz offset). The family comes with two evaluation kits (CY3676 and CY3677) and programming software (CyClockWizard 2.1).

The CY294X family is currently sampling in 5 mm × 7 mm LCC, 5 mm × 3.2 mm LCC, and 16-pin QFN packages.

Source: Cypress Semiconductor

Twin-T Oscillator Configuration

Since retiring in 2013, electrical engineer Larry Cicchinelli has provided technical support at an educational radio station. For audio circuit debugging and testing, he uses a DIY battery-powered oscillator/volume unit (VU) meter. Details follow.

Originally, I was only going to build the audio source. When I thought about how I would use the unit, it occurred to me that the device should have a display. I decided to design and build an easy-to-use unit that would combine a calibrated audio source with a level display. Then, I would have a single, battery-powered instrument to do some significant audio circuit testing and debugging.

The front panel of the oscillator/volume unit (VU) meter contains all the necessary controls. (Source: L. Cicchinelli)

The front panel of the oscillator/volume unit (VU) meter contains all the necessary controls. (Source: L. Cicchinelli)

Cicchinelli describes the Twin-T Oscillator:

The oscillator uses the well-known Twin-T configuration with a minor modification to ensure a constant level over a range of power supply voltages. The circuit I implemented maintains its output level over a range of at least 6 to 15 V. Below 6 V, the output begins to distort if you have full output voltage (0 dBu). The modification consists of two antiparallel diodes in the feedback loop. The idea came from a project on The project designer also indicates that the diodes reduce distortion.

Figure 1 shows the oscillator’s schematic. Header H1 and diode D1 enable you to have two power sources. I installed a 9-V battery and snap connector in the enclosure as well as a connector for external power. The diode enables the external source to power the unit if its voltage is greater than the battery. Otherwise the battery will power the unit. The oscillator draws about 4 mA so it does not create a large battery drain.

The standard professional line level is 4 dBu, which is 1.228 VRMS or 3.473 VPP into a 600-Ω load. The circuit values enable you to use R18 to calibrate it, so the maximum output can be set to the 4-dBu level. A 7.7 (3.473/0.45) gain is required to provide 4 dBu at the transformer. Using the resistors shown in Figure 1, R18 varies the gain of U1.2 from about 4.3 to 13.

The Twin-T oscillator’s circuitry

Figure 1: The Twin-T oscillator’s circuitry

You may need to use different resistor values for R18, R19, and R20 to achieve a different maximum level. If you prefer to use 0 dBm (0.775 VRMS into 600 Ω) instead of 4 dBu, you should change R20 to about 5 kΩ to give R18 a range more closely centered on a 4.87 (2.19/0.45) gain. The R20’s value shown in Figure 1 will probably work, but the required gain is too close to the minimum necessary for comfort. Most schematics for a Twin-T oscillator will show the combination of R3 and R4 as a single resistor of value Rx/2. They will also show the combination of C1 and C2 as a single capacitor of value Cx × 2. These values lead to the following formula:


As you can see in the nearby photo, the Twin-T Oscillator and VU meter contain separate circuit boards.

The Twin-T oscillator and dual VU meter have separate circuit boards

The Twin-T oscillator and dual VU meter have separate circuit boards

This article first appeared in audioXpress January 2014. audioXpress is one of Circuit Cellar‘s sister publications.


The Future of Temperature-Compensated Crystal Oscillators

Most modern digital and analog electronic devices require a time base to perform their intended function. Found in everything from cell phones to smart munitions, quartz crystal oscillators are widely used in many embedded applications. Quartz resonators’ high Q, excellent temperature performance, and superior long-term aging makes them the clear resonator of choice for many applications. The frequency versus temperature performance of a discrete LC oscillator will be on the order of several hundred parts per million (ppm) per °C, where a crystal oscillator (XO) will have roughly ±30 ppm over the entire industrial temperature range (–40 to +85°C). While being superior to a discrete oscillator, this temperature stability is not nearly sufficient for many modern applications.


Source: John Esterline

The temperature-compensated crystal oscillator (TCXO) employs the use of an open loop compensation circuit to create a correction voltage to reduce the inherent frequency versus temperature characteristic of the crystal. The crystals used in TCXOs have frequency versus temperature characteristics that approximate a third-order polynomial, as seen in the nearby figure.

The early designs for TCXOs employed a network of thermistors and resistors to create a correction voltage. By using thermistors with different slopes and properly selecting the fixed value resistors, the correction voltage can be made to have a shape factor matched to the crystal’s frequency versus temperature performance. The correction voltage is applied to a varactor in the feedback path of the TCXO. This change in capacitance in the feedback path alters the tuning of the oscillator, thus changing the output frequency and compensating it for temperature effects. Thermistor/Resistor network TCXOs can achieve frequency versus temperature stabilities of around ±1 ppm over the industrial temperature range; however, they are limited in their curve-fitting capabilities because of the nature of using discrete thermistors and resistors.

Thermistor/resistor network TCXOs are still found in specialized environments including satellite and other space applications where modern solid-state devices do not have the radiation hardness to survive. Most TCXOs manufactured today utilize an ASIC which contains the oscillator circuit and a third- or fifth-order polynomial voltage generator. The polynomial generator is an analog output voltage but also has digital registers for setting the coefficients of the polynomial. The newest generations of TCXO ASICs can provide temperature performances of ±0.1 ppm over the industrial temperature range. This is a 10-fold improvement over what is obtainable with a traditional thermistor/resistor network TCXOs and also has the advantage of a much smaller footprint (5 mm × 3.2 mm).

Some high-precision applications require frequency versus temperature stabilities better than ±0.1 ppm. To meet these challenging specifications a different methodology is implemented. An oven-controlled crystal oscillator (OCXO) uses a heater circuit and thermal insulation to keep the crystal at an elevated temperature (≈15°C above the upper operating temperature limit). By controlling the crystal’s temperature and keeping it nearly constant, the frequency deviation due to ambient temperature changes is vastly reduced. OCXOs can achieve frequency versus temperature stabilities of ±0.005 ppm. This improved performance comes at the cost of a larger footprint and increased power consumption. The TCXO’s performance limit of ±0.1 ppm is due to several factors. First, the resonators are not perfect. Their frequency versus temperature stability approximates a third-order polynomial; however, higher order effects are present. Secondly, the polynomial generator is nonideal and induces some higher order artifacts, leaving the user with residuals of ±0.1 ppm. A new methodology which uses an artificial neural network (ANN) to create the correction voltage has recently been demonstrated. The ANN is superior in that the neural network is not inherently shape limited like a third-order polynomial. If enough data is presented to the ANN, it can “learn” the crystal’s temperature performance shape and correct for it. This new methodology has been shown to provide ±0.01 ppm frequency versus temperature stability over the industrial range. The ANN algorithm can achieve OCXO temperature performance in a much smaller footprint, and without the need for the power-hungry oven.

The evolution of quartz crystal time bases over the last 70 years has seen the frequency versus temperature stability improve by a factor of several thousand. As our need for more stable oscillators in smaller packages with less power consumption grows, the development of better compensation schemes is paramount. The ANN demonstrates a technology that has much potential. Its ability to adapt and change its shape factor makes it ideal for complex compensation problems.

EsterlinePhotoJohn Esterline is the CEO of Esterline Research and Design, LLC, a Pennsylvania based start-up company. John holds an MEngEE and a BSEE from Pennsylvania State University. His research interests focus on temperature compensation algorithms for the improvement of embedded time bases. John is the inventor on two US patents (US8188800 B2, US8525607 B2), and the inventor of one patent pending (US 13/570,563). Esterline Research and Design, LLC offers consulting services in frequency control, test and automation and other subject matter in addition to its RF testing products.


Circuit Cellar 291 (October 2014) is now available.

Miniature PECL and LVDS Oscillators

PrecisionDevicesThe PDI Model LV5 and PE5 Series of oscillators provide precision timing in a 3.2-mm × 5-mm ceramic hermetically sealed package. The LV5 is a low-voltage differential signaling (LVDS) ocsillator. The PE5 is a PECL oscillator.

These high-performance clock oscillators offer low integrated phase jitter (0.2 pS for the LV5 and 0.3 pS for the PE5). They are available in frequencies up to 200 MHz and feature a –40°C to 85°C industrial temperature range. Stabilities can be held down to ±25 ppm (depending on temperature range).

Contact Precision Devices for pricing.

Precision Devices, Inc.