Soundcard spectrum analyzer through regenerative frequency division

Hi,

I'm trying to build a spectrum analyzer for the shortwave spectrum that uses a simple computer soundcard for data acquisition.

Specifically what I'd like to do is compress the mean signal levels from DC to 30MHz to DC to 30 kHz, which my sound card should be able to sample. I have no need to be able to rebuild the signals into an intelligible format. What I hope to do is merely to see at what frequencies transmissions are taking place. With 30Mhz compressed to 30kHz it should be a simple matter of reading the frequency and mentally multiplying it with 1000.

Extensive googling suggested regenerative dividers might do the trick, but if it is too broad a range I'd also be very happy with steps of 3MHz sparated over a 10-way switch. However, I don't quite know how to go about designing something like this. I'm much in need of guidance here, which I'm hoping you will provide me with. I don't even have a proper, specific question I could ask... Help?

--
Nos
Reply to
Ceriel Nosforit
Loading thread data ...

I think you're asking for quite a lot: you want to divide the frequencies but maintain the amplitudes. For the most part, all the methods I know of that divide frequency are grossly nonlinear and do not preserve the amplitudes; they can't even preserve distinct frequencies. I know of one method, but implementing it would be way more difficult than just building a simple digitzer followed by an FPGA with FFT code in it. Another method that's been used is to build a simple version of a swept spectrum analyzer: just feed a ramp to a VCO, VCO output to a mixer, to convert your band of interest (spread over time) to one frequency, where you detect the amplitude. Plot that amplitude versus time, synchronized with the ramp you feed the VCO. There are modules available to take care of much of the hard parts for you. If the sweep is fast enough, you can even use your sound card to digitize the detected amplitude, though it would be nice to not have the sound card AC coupled as it almost certainly is. You could do a software "DC restore" on a retrace blanking level, though.

Cheers, Tom

Reply to
Tom Bruhns

Alas, on the wretched hour of Thu, 22 Feb 2007 09:25:50 -0800 Tom Bruhns thusly proclaimed:

Yes, I suspect sweeping the bands is how regular spectrum analyzers work, but the problem with that is that I can't use a normal audio spectrum analyzer to plot the result. I'd have to write rather complex software to make it work, (unless this is the module you speak of) and I suspect, though I'm clearly no expert, that it would be easier to do it in hardware.

Maintaining the amplitudes is just a matter of retaining them in relation to each other so that when I see a peak on the analyzer I'll know that it is most likely a signal rather than noise. I don't need an absolute value, nor an exact frequency, as long as I don't have to tune the entire shortwave spectrum to find it.

Could you please name a few of the methods you mentioned you knew so I can study them? This is something of a learning project for me, far from mission-critical, so I'd be quite happy with something that merely resembles what I'm trying to achieve. Then, when I have a clue of what it is I'm actually doing, I could try building something that would not be a general embarrasment. :o)

I have a few ideas of what I'd like to be able to eventually achieve with this thing in the long run. It essentially amounts to a Software Defined Radio wherein you can observe the entire shortwave band on your computer monitor, and then click on some part to 'zoom in' on a frequency, choose a demodulator and listen to the transmission. Though I'll likely never reach that far, I'd still like to take the first step.

Thank you very much for your reply.

--
Nos
Reply to
Ceriel Nosforit

What a fascinating question!

The following link may provide some ideas:

formatting link
Frequency compression of wideband signals using a distributed sampling technique

Reading the abstract, it appears you would sample, say every kilohertz, from some base frequency (probably not DC, but maybe 100 kHz) to 30 MHz and store the amplitude of each sample. (VCO stepped by 1kHz) Each sample would allow you to record the peak or average amplitude found within some bandwidth (say 1 kHz). These amplitudes could be easily digitized and stored on a computer.

From there, it is simple to display each sample amplitude as a one hertz ampitude on your sound card (1000:1 compression). By playing with the sampling bandwidths, etc., you can improve resolution. Actually, there is no need to use the sound card since the data can be plotted directly on the computer screen.

This would allow you to incorporate variable zoom, or perform other software analyses on the stored data.

You might encounter problems in detecting short-duration signals that occur between samples.

In any case, you will probably want to employ logarithmic compression of amplitudes so that weak, as well as strong, signals can be displayed simultaneously.

Good luck!

Chuck

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----

formatting link
The #1 Newsgroup Service in the World! 120,000+ Newsgroups

----= East and West-Coast Server Farms - Total Privacy via Encryption =----

Reply to
chuck

Alas, on the wretched hour of Thu, 22 Feb 2007 15:02:56 -0500 chuck thusly proclaimed:

Well yes... Say I have an A/D converter running at a sampling rate of 60M samples per second I think I should theoretically be able to completely represent the shortwave band and do all sort of mojo with it... in software. That paper was written in '81, but nowadays my 'pooter can calculate FFTs fast enough to probably process the entire band in real-time, and if I get my GFX card to do the presentation I can over-sample and anti-alias it to my screen to show me the entire thing at

60 fps. - All of which I'd get at zero effort if I managed to do the frequency compression in analog. With for example audio compressors I could still do a lot of the mojo, and the device would not be limited to the platform it's written for. I could even use analog devices with it...

But I'm beginning to suspect you're essentially right anyway. From my googling it seems frequency compression has only been done in software, so it might be I'm chasing a red herring here... Then again, this being a learning project it'd just mean I'd be working with more modern tools.

Thank you very much for your reply. I'll begin looking into it immediately.

--
Nos
Reply to
Ceriel Nosforit

The method of "frequency compression" I am thinking of is not practical at the frequencies you're interested in, I'm afraid, and it really is a big task to implement it. I might try to think of an analog of the technique that would work at HF radio frequencies, but I don't hold much hope for that.

There's a grass-roots effort to make a SDR system using the LTC2208, I believe it is. You should search for that. You can leverage the work of a lot of others that way, and contribute to that effort. They may well have both hardware and software already that will do what you want and more.

Cheers, Tom

Reply to
Tom Bruhns

What would you use at the "front end" to sync the scan-rate of the receiver to the sweep rate of the software? Either the radio has to tell the software "I am on this frequency" or the software has to tell the radio "go to this frequency". Many of todays radios provide a nice digital interface, so it shouldn't be hard - but it has to be part of the design.

The rate that the radio can scan and produce a reliable signal will be a limiting factor. That's not news, but has to be considered in the design.

Anyway, I'm thinking a straight audio recording from T0 to Tn time with the receiver frequency under PC control. You could display the frequency range and rate and audio level on the screen real time, and record the info on the hard drive for a later look. It makes a poor man's spectrum analyzer of sorts. And it lets you "play" with the front end to figure out its capabilities for use in a "real" spectrum analyzer design.

Ed

Reply to
ehsjr

Alas, on the wretched hour of Thu, 22 Feb 2007 13:07:58 -0800 Tom Bruhns thusly proclaimed:

It must be the Mercury project of HPSDR... Looks rather interesting, though I wonder if I truly need all those FPGAs. I must study it! =)

Thank you ver much for your replies. :)

--
Nos
Reply to
Ceriel Nosforit

There's no easy way to "compress" the frequency range.

Also using a very fast A/D isnt too practical-- the radio signals vary over a huge amplitude range. You'd need like a 16-bit 60MHz A/D converter, and you can't find those at Radio Shack.

Reply to
Ancient_Hacker

the only way I can think of to do this would be to take snapshots at 100MHz sample rate and play them back at 100kHz rate to your soundcard

you'll get noise at around the sample length so it won't be clean all the way to DC

--

Bye.
   Jasen
Reply to
jasen

AD8307: dc-500MHz, 92 dB dynamic range; $12.63 at Jameco in single quantities.

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----

formatting link
The #1 Newsgroup Service in the World! 120,000+ Newsgroups

----= East and West-Coast Server Farms - Total Privacy via Encryption =----

Reply to
chuck

Response time: 400 nanoseconds

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----

formatting link
The #1 Newsgroup Service in the World! 120,000+ Newsgroups

----= East and West-Coast Server Farms - Total Privacy via Encryption =----

Reply to
chuck

DC

Not unreasonable to build a block of say 30 (or more) bandpass filters. Centre frequencies staggered as felt fit. Add 30 ways of signal scanning, analogue switch I.Cs connecting each channel in turn to Chuck's AD8307. Take the audio output from that. Could even add a single 1V audio tone as channel 0 to provide a zero frequency, spectral reference line. john

--
Posted via a free Usenet account from http://www.teranews.com
Reply to
john jardine

Hook that array of filters up to a PIC or AVR to do the grunt work and stuff the data back to the PC over serial -- its got the A/D converter built in, so you just need the filters, analog switches, and an integrator/peak detector (i.e. you listen to each band for a short period of time, looking for a peak or summing the levels during that time, then you sample). The A/D is a lot slower than any stand alone A/D chip, but you are just sampling the levels, not the entire spectrum. At max resolution the Atmega168 can do 15k samples per second.. for 30 bands, thats 5000 scans per second max -- more than adequate.

If you really wanted to go all out -- put a peak detector on each filter, and have the controller clear the detector after it samples -- that will get you continuous monitoring of each band during the scan -- you wont miss anything while checking other bands.

Run the uplink to the PC at 2 bytes per sample + a few bytes overhead for framing = 64 bytes.. on 115kbps serial (11 kbytes/sec) will get you some where around 170 scans per second -- again more than adequate :) (or drop the sample resolution to 8 bits and double your scan rate)

Reply to
John Barrett

Alas, on the wretched hour of Sat, 24 Feb 2007 00:10:07 +0000 John Barrett thusly proclaimed:

Oh my, I thought the conversation had died. Glad to be proven wrong!

I've studied the HPSDR project, but it seems their hardware will be vey expensive. As such, the comparatively dirt-cheap AD8307 looks very interesting. I do however get the impression that it doesn't sample the entire bandwith simultaneously, so it couldn't work as an SDR on its lonesome. Might have to still use the LTC2208 for that, but no reason to be in a hurry.

Rather than downsample the output of the chip I'd rather connect it to one of the high-speed ports on my computer and then have it sort through it all. That way I'd be dealing with a minimum of hardware and consequently a minimum of complexity. I'll have to start studying the issue in more detail.

Thank you all very much for your replies! Glad to see sucha response.

Sincerely,

--
Nos
Reply to
Ceriel Nosforit

You don't want a regenerative frequency divider; you won't get enough frequency division nor (because it is really an oscillator) any useful amplitude information. It is a bit like the timebase of an oscilloscope synchronising on a higher frequency signal. Not what you want. Logic circuit dividers and phase locked loops with frequency multipliers in the loop all lack important features - and all need a sweep frequency to tune them because they only divide one frequency at a time.

I agree with others that compressing the 30MHz to 30kHz for your soundcard and software to analyse with a FFT or whatever is a difficult way of getting the desired result. You would need to sample at huge speed and good accuracy, feed it into some dual-ported (or interleaved access) memory external to the PC (because it has to be at greater speed than you could reasonably feed into a PC via standard interfaces), then squirt it out to the PC at a much slower speed (or something else at least as difficult). In other words the hardware you will need, just to make the signal nice for the PC, will be much more than if you had done a whole spectrum analyzer without the PC.

One relatively small modification to your design goal could make life a lot easier: feed the soundcard with a time-domain representation of the spectrum, not a frequency-domain one. So you would have a tiny amount of hardware to do part of what a conventional spectrum analyzer might do (ramp wave to control a VCO, VCO output to product detector/balanced modulator, with low pass filter and fast-responding AC detector, feeding the soundcard input). Simple oscilloscope-for-soundcard software will then be able to display the spectrum easily, or you could sample the waveform a certain number of milliseconds into the ramp to get the amplitude at a given frequency. The ramp to control the frequency could even come from a soundcard's output if you like, so you can sweep it slowly some times to get better resolution (otherwise, to cover 30MHz at maybe 10Hz you're doing an average of 300kHz per millisecond which is way too much). If you were sampling and converting 30MHz down to 30kHz you'd still have the problem that you can miss signals if you scan too quickly/not have enough samples.

What do you want to do with the results? Do you want to be able to distinguish stations 10kHz apart? Do you want to see the whole 30MHz spectrum at once, or zoom in to parts of it? Do you mind waiting a few seconds before you see the spectrum? How low in frequency do you really need to go? Of course if you only need to see the spectrum 30kHz at a time (e.g. 31.03MHz to 31.06MHz) there are easy-ish methods that still use FFT software on the PC, but shift the frequency axis along.

Mark A

Reply to
Mark Aitchison

The datasheet I see is a logarithmic amplifier, not a A/D.

Reply to
Ancient_Hacker

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.