Marcel Birthelmer wrote: > My plan is/was to take a raw 1MHz signal (obviously > processed for the ADC stage), and do the frequency tuning, detecting, > and low-pass filtering by means of digital transformations. While this is in theory possible, it's going to be tough given the speeds required. You will need to sample at around 3MHz at least. Do you really have the processing capability to do meaningful things at around 300nS per sample? Even if you can manage to get enough processing power by using a FPGA, amplifying the broadband antenna signal to A/D input levels won't be easy. These signals are tiny. This is done economically in normal radios by using resonant amplifiers. With resonance you can get a much better signal to noise ratio but at a narrow band. This is what made heterodyne radios so common. Most of the gain comes from the IF amp, which runs at a fixed known frequency. Your amp is completely before any tuning and has to amplify all frequencies in the AM band, from about 550KHz to 1.7MHz. Look at the gains required and do some signal to noise ratio calculations. Another problem will be the very large dynamic range of amplitudes coming from the antenna for valid signals. You can only amplify to the point where the strongest signal causes the result to clip. Once that clips, parts of the other stations are lost and no amount of clever filtering can recover the lost information. Even if you adjust the input amp gain so that the peaks just cover the A/D range, the signal from weak stations will be many dB down. If the amp isn't nearly perfect and has some cross modulation distortion, you will get phantom "stations" all over the band. > So > basically instead of using the LO, the idea would be to convolve the > incoming signal with a band pass filter. Yikes! That's certainly not how I'd go about it. Remember, you only have around 300nS to spend per sample. That won't allow a lot of filter kernel points. > I understand that this is not the way radios are commonly built, but > it's mainly a learning exercise anyway. One of the many fun projects I've had in the back of my mind for a while (that's the problem with fun projects, there are always more important projects ahead of them) is to make a WWVB receiver and NTP server with a dsPIC. At 60KHz carrier, the electronics are just a bit past the audio range and the sample and processing rates should be something a dsPIC can handle. I'm thinking a resonant ferrite antenna tuned to 60KHz with a amp that rolls off either side of 60KHz but is not highly tuned or resonant. This goes into the A/D and the rest is software. Demodulation is done by multiplying the incoming signal by a internally generated sine and cosine at 60KHz. These are easily low pass filtered, essentially giving a very narrow reception band around 60KHz. After the filters, the signals are squared and added. The result is proportional to received power. This is the square of a normal AM demodulated signal, but should be fine for discriminating between the digital high and low carrier levels. If you wanted true AM demodulation, you'd have to take the square root of the result and high pass filter to remove DC. The process I described sounds tractable in a FPGA since it can be pipelined. The two sine and cosine multiplies can be concurrent, and the results passed to the next pipeline stage, then the filter, squaring, adding, and square root (think lookup table), and high pass filter after that can each be a separate pipeline stage if necessary and can therefore each take the 300nS you have per sample. For a real radio you probably want to insert a AGC stage somewhere. You want to keep the input to the square root nicely bounded. ******************************************************************** Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products (978) 742-9014. Gold level PIC consultants since 2000. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist