[sci.electronics] Audio Spectrum Analyzer

charlie@oakhill.UUCP (Charlie Thompson) (05/02/89)

 I agree with T.B., the DSP56001 from Motorola will do a 1024 point
complex FFT in < 4 milliseconds.  You can call the Motorola 
bulletin board "Dr. BuB" at 512 891-DSP1 and download an
FFT for the 56001.  I have used this FFT to create a real-time
spectrum analyzer using a Blackman-Harris window and a log
magnitude output display routine.  The program will be operational
at the ICASSP conference in Glasgow, if you're in the area drop by
and take a look. 
 
For good resolution at lower frequencies I believe that a log
scale DFT might be a better approach.  This would give a constant
number of frequency bins per decade as opposed to the linear
frequency scale output from the FFT.  While the DFT is an
N-squared job as opposed to the Nlog(N) of the FFT it would
take a fairly large FFT (with round off errors abounding) to
get the equivalent low end resolution of a brute force N-squared 
log scale DFT. 
 
Has anybody out there done any log scale DFT's? 
 
-Charlie Thompson
 Motorola DSP Operation
 Austin, TX  
 
 NBITS

aic@mentor.cc.purdue.edu (George A. Basar) (09/07/89)

  Occasionally, I work with bands running sound.  One of the nicer
pieces of equipment to own is an audio spectrum analyzer, along with a pink
noise source.
  I'd like to build one of these beasties(the SA, not the pink noise source)
to interface with a PC (C64 to be precise).  I've had a few ideas on how
to go about this but I would appreciate any pointers to information on this
subject.
  Ultimately, it should be 31-band, starting at 20Hz and ending at 20KHz,
something like a sweepable notch filter connected to an A/D converter.
  Any help/comments is/are appreciated.
  Thanks in advance

					George A. Basar

seningen@oakhill.UUCP (Michael Seningen) (09/07/89)

use a super-hetrodyne principle


                                 
source ----X-----[fixed notch filter]---A/D---C64
           |  
           | 
           ------[Voltage Controlled Osc]---|
                                            |
                                            |
	[ramp voltager generator]-----------|

the idea is that the fixed notch filter can be much more
accurate than a sweeping filter.

multiply the source out to a higher freq, filter it out,
then shift the source by a small ammount more (ie up the freq of VCO output.

You can use an oscope with the ramp voltage as x and
notch filter output as Y -- this will give you a description of your input waveform.

I learned this in a Signals course which covered fourier and laplace transforms.  A good book with some practical circuits might have this circuit and would also give the math background as well.

Mike (dusting off the cobwebs) Seningen

jgk@cbnewsc.ATT.COM (joseph.g.klinger) (09/08/89)

In article <3906@mentor.cc.purdue.edu> aic@mentor.cc.purdue.edu (George A. Basar) writes:
>  Occasionally, I work with bands running sound.  One of the nicer
>pieces of equipment to own is an audio spectrum analyzer, along with a pink
>noise source.
>  I'd like to build one of these beasties(the SA, not the pink noise source)
>to interface with a PC (C64 to be precise).  I've had a few ideas on how

>  Ultimately, it should be 31-band, starting at 20Hz and ending at 20KHz,
>something like a sweepable notch filter connected to an A/D converter.

I built one of those Gold-Line 10 band spectrum analyzers many years back,
it was simply ten parallel notch band filters with a little bit of 
logic to drive a half dozen LEDs per channel.
That's probably the most direct (and conservative) approach to take.
I don't think you can find the I/O bandwidth on a C64 to support 
16 bit (or 12 bit for that matter) A/D at 44 kHz.

One idea, that might save time without too much expense, is to get one of 
those BSR spectrum analyzer/equalizers from DAK ($100 ?).  And use only
the notch filters, case, and power supply.  Using their filter output (TTL ?)
should save a lot of the work.  I would think that the interface logic 
would be strait forward enough.

If you went with the A/D method, you would also have to write an FFT
program, I found one for the C64 (in basic) on a BBS but it is sloooooow.

Joe Klinger
att!iexist!jgk

Disclaimer - yes

peg@psuecl.bitnet (09/08/89)

In article <3906@mentor.cc.purdue.edu>, aic@mentor.cc.purdue.edu (George A. Basar) writes:
>   I'd like to build one of these beasties(the SA, not the pink noise source)
> to interface with a PC (C64 to be precise).  I've had a few ideas on how
> to go about this but I would appreciate any pointers to information on this
> subject.


Hey!

The sweepable notch filter sounds like a good idea--the fellow at
Motorola should be thanked for that one--but I have another.

It is my understanding that a lot of the commercial spectrum analyzers
(especially the lower cost ones) are using switched-capacitor filter
IC's.  These are really nifty IC's that give excellent filter
performance and are easy to use.  Examples are the MF 4 and MF 10.

These IC's are tuned by inputting a digital clock at a multiple of
the desired center frequency.  Typically, the clock is at 50 or 100
times fc.  For audio, this would mean a clock of 2kHz to 200kHz.
You would want to watch your signal routing, but you could probably
keep the clock out of your audio signals.

The big advantage I see of this approach is:  by using a
programmable divider IC, you could keep your CPU fairly free.
You could load a new divisor, say, 60 times a second.  That seems
like you could be doing other things (especially if you had an
Amiga computer!!!! :-).  Of course, if you want really fast
display update, this might not matter....  But most SA's I've
seen have a peak hold type display.

Well, I hope that idea might help you.  I've been wanting to
do this project for a while, but never find time....  Good
luck!

Paul

P.S.  The MF4 + 10 I have are by Texas Instr.

ray@ole.UUCP (Ray Berry) (09/09/89)

>The sweepable notch filter sounds like a good idea--the fellow at
>Motorola should be thanked for that one--but I have another.

   This is a nice idea.  Perhaps the LO could be log swept.  If you could
generate a quadrature LO, you could use a pair of mixers and a pair of 
LPF's to get your 'notch' at baseband (by computing analytic magnitude).
If the LPF's were SCF's, perhaps you could even devise a means to make the 
cutoff freq track the LO such that the LP's had constant Q and approximated 
something like 1/3 octave bandwidth regardless of the LO frequency.

>It is my understanding that a lot of the commercial spectrum analyzers
>(especially the lower cost ones) are using switched-capacitor filter
>IC's.  These are really nifty IC's that give excellent filter
>performance and are easy to use.  Examples are the MF 4 and MF 10.

   Reticon makes these in a 1/3 octave flavor, 3 to a package.  Each
such chip will cover 1 octave total in 3 bands- with a single clock input
to the chip.  Dividing the clock by two (1 octave) produces the clock for
the next chip down the chain.  Dual 1/2 octave chips are also available,
as are single 1 octave devices.

>...  The big advantage I see of this approach is:  by using a
>programmable divider IC, you could keep your CPU fairly free.
>You could load a new divisor, say, 60 times a second.  That seems

   These filters have a lot of "state" info in them.  I.E., you can't
instantly change their output by banging the clock frequency around. 
You have to wait some (non-trivial) number of clock periods for the 
output to stabilize after changing the clock freq.
-- 
Ray Berry  kb7ht  uucp: ...ole!ray CIS: 73407,3152 /* "inquire within" */
Seattle Silicon Corp. 3075 112th Ave NE. Bellevue WA 98004 (206) 828-4422