circuitcellar.com
Magazine Support   Digital Library   Products & Services   Suppliers Directory 
 
 





 

June 2005, Issue 179

Precision Frequency Meter
Cypress PSoC High Integration Challenge 2004 Contest Winner


AUDIO & INPUT PROCESSING

One of the continuous time blocks provides the analog reference voltage (AGND) at half VCC. All analog signals then can be biased to this level.

The frequency meter powers the radio (3 V). The radio audio taps out of the radio after the detector but before the audio amplifier. This ensures that the audio level remains the same regardless of the radio’s volume setting, thus allowing the radio volume to be adjusted as necessary.

My radio is tuned to Radio New Zealand, which is the national public broadcast service. The FM transmission ensures that the audio signal remains at a constant level and minimizes interference (especially from nearby PCs).

The audio input from the radio is AC-coupled, biased to AGND, and fed to a programmable gain amplifier configured to 16 times gain. The amplified signal is output to a pin and fed through a simple external band-pass filter consisting of RC low-pass and high-pass filters with a 1-kHz center frequency (the time pips’ frequency). The filter output is biased to the AGND reference (VCC/2) and fed back to the PSoC to two analog comparators.

The two comparators are set to either side of the AGND reference (0.5  × VCC): the high comparator to 0.562 × VCC and the low comparator to 0.437 × VCC. The two comparator signals are combined via the LUT to produce a signal-present signal that’s high for either a positive or negative level. However, it’s low during periods of silence or zero crossing. This signal is the counter clock’s capture signal. It allows the precise clock count to be determined at the edge of an audio pulse.

The input signal to measure is AC-coupled by a capacitor and then biased to AGND. It’s then fed to two inputs. One is an analog input to an internal PSoC comparator. The other is a digital input. The comparator output is fed to another digital input. This permits two input operation modes: Analog and Digital.