Pitfalls of Filtering Pulsed Signals

Waveform Woes

Filtering pulsed signals can be a tricky prospect. Using a recent customer problem as an example, Robert highlights various alternative approaches and describes the key concepts involved. Simulation results are provided to help readers understand what’s going on.

By Robert Lacoste

Welcome back to the Darker Side. A couple of months ago, one of our customers was having trouble with its project and called us for help. As is often the case, the problem was more a misunderstanding of the underlying concepts than any kind of hardware or software issues. We helped him, but because the same issue could jeopardize your own projects I thought it would be a nice topic for this column.

The Project

What is it about? Of course, I won’t be able share the details of our customer’s project, but I will describe a close example. Let’s imagine you need to build an ultrasonic ranging system. Just as bats do, you want to transmit short bursts of ultrasound, then listen for echoes. As you probably know, the time between transmission and reception divided by twice the speed of sound will give you the distance of the obstacle.

Moreover, the shift in frequency between transmitted and received bursts will give you the relative speed of this obstacle, thanks to the so-called Doppler shift. Ok, but how will you design such a ranging device? First, you’ll need to generate and transmit bursts of sine waves—also called tone bursts—with the proper ultrasonic frequency, say 40 kHz. That’s easy to do even with a pair of trusty NE555 chips or NAND gates, or maybe with a microcontroller if you prefer dealing code rather than a soldering iron. These bursts will need to be as short as possible—maybe 1 ms or so—because this will improve the distance resolution.

The transmit side is easy, but the receiver will be a little more complex. In real life, the received signal will have a very low amplitude and probably plenty of added noise. This is especially true if you consider that the Doppler shift could be significant, meaning with fast-moving objects. In that case you will not know the exact frequency of the burst you should detect.

Figure 1
Shown here is a basic ultrasonic meter. A narrow band-pass filter, tuned to the received frequency, allows you to reduce perturbations and noise. But does this work?

One possible architecture to avoid this problem, while minimizing noise, could be the one illustrated on Figure 1. First, do a spectrum analysis of the received signal. Because this signal contains noise plus the received ultrasonic echo, its frequency spectrum will show a peak at the frequency of the received ultrasonic carrier. Therefore, you can measure this actual reception frequency. Assume it is 40.5 kHz due to Doppler shift. You can use this information to tune a very selective band-pass filter, which will isolate the received ultrasonic burst from any other noise. Why not a 40.5 kHz +/-100 Hz filter? You will then recover a clean version of the received pulse and measure the time difference between transmission and reception with a detector and a time counter. Brilliant idea, isn’t it? If you agree, then please read on. This was the concept used by our customer, and unfortunately it doesn’t work! At least not as described. In this article I will explain why, using some easy to understand simulations and as little math as possible. So, don’t’ be afraid. Come with me to the Darker Side of pulsed signals.

Digital Version

Before going into the explanation, I need to present you an alternative version of this intended receiver. Because you are a reader of Circuit Cellar, you know that developing such a design would be far easier using digital signal processing than trying to build analog spectrum analyzers and precisely tuned filters. The digital equivalent of this receiver is illustrated on Figure 2. Just compare it with the former, you will find the same concepts.

Figure 2
Here’s a digital version of the same concept shown in Figure 1. All the yellow functions can be executed on a digital processor (fast microcontroller, digital signal processor, FPGA or anything else).

Here the received signal is preamplified and directly digitized with a properly selected analog-to-digital converter (ADC). Its frequency spectrum can then be calculated with a Fourier Transform, using the well-known Fast Fourier Transform (FFT) algorithm, for example. The frequency peak can then be searched into this spectrum. Then a narrow band-pass filter can be created and tuned to this frequency and the filtered signal can be calculated. …

Read the full article in the August 337 issue of Circuit Cellar

Don’t miss out on upcoming issues of Circuit Cellar. Subscribe today!

Note: We’ve made the October 2017 issue of Circuit Cellar available as a free sample issue. In it, you’ll find a rich variety of the kinds of articles and information that exemplify a typical issue of the current magazine.

LF Resonator Filter

Frequency Measurements

In Ed’s November article he described how an Arduino-based tester automatically measures a resonator’s frequency response to produce data defining its electrical parameters. Here, he examines the results of those measurements and delves into variable series capacitance as measurement aid.

By Ed Nisley

Quartz resonators—also known as “crystals”—normally set the frequency of a clock oscillator circuit to a precise value, but they can also become filters passing analog signals. Because resonators have an extremely high Q, the filters have a very narrow bandwidth and require precise center-frequency tuning. The Arduino-based tester I described in my November 2017 article (Circuit Cellar 328) automatically measures a resonator’s frequency response to produce the data defining its electrical parameters for use as either an ordinary oscillator or a filter isolating the 60 kHz WWVB signal from the surrounding RF clutter.

In this article, I’ll describe the results of those measurements, explain a tester modification to measure the resonator’s response with a variable series capacitance, then show what a resonator filter does to the 60 kHz WWVB preamplifier’s response.

Resonator Frequencies

Over the course of a few months, I bought two lots of 25 quartz tuning fork resonators from eBay, measured all 50 resonators, then converted the data into the histograms in Figure 1. The blue bars show the series resonant frequencies form a reasonably smooth distribution around 59996.1 Hz, 4 Hz below the nominal 60 kHz. A 24 pF series capacitance shifted the resonances upward by 1.7 Hz to produce a similar distribution of the red bars around 59997.8 Hz, showing the resonators behave as expected.

FIGURE 1
The blue bars summarize the series
resonant frequencies of fifty tuning
fork resonators. Inserting a 24-pF
series capacitor shifts the resonant
frequencies upward by about 1.7 Hz.

In contrast, refer to the magnetic sensitivity histograms of the Hall effect sensors in my May 2015 article (Circuit Cellar 298). Those eBay parts apparently came from production-line reject bins, because I got only the parts with responses far from their nominal value. My experience suggests you should not expect cheap electronic parts bought from eBay to meet their specifications and you must measure what you get.

The resonator responses cluster below 60.000 kHz, because they’re intended to be built into oscillator circuits with specific values of external capacitances to set the final frequency. For example, most digital oscillators use a Pierce topology with the resonator connected as a feedback element for a CMOS inverter biased into its linear range and a capacitor from each resonator lead to ground. Those oscillators operate near the resonator’s parallel resonance frequency, with the final frequency pulled slightly higher by the load capacitors. …

Read the full article in the January 330 issue of Circuit Cellar

Don’t miss out on upcoming issues of Circuit Cellar. Subscribe today!
Note: We’ve made the October 2017 issue of Circuit Cellar available as a free sample issue. In it, you’ll find a rich variety of the kinds of articles and information that exemplify a typical issue of the current magazine.