Post Go back to editing

A -1701 FM MPX Demodulator

     This is a just-for-fun project, for which no claims are made that it's optimal.  I just drew it up in half an hour a few months ago, and then tweaked the thing until it worked.

     The incoming composite signal is filtered into its three components:  the mono audio, the suppressed-carrier difference signal, and the 19 KHz pilot tone.  The latter needs doubling in frequency to 38 KHz in order to restore the suppressed carrier and demodulate the L-R signal.   Here it's done by phase-locking a local VCO to the pilot, producing a stable, constant-amplitude replica.  In many phase-locked loop (PLL) applications like this, a divide-by-two counter within the loop makes the VCO run at double frequency.  Here a simple squarer and DC block doubles the frequency after the PLL instead.

     The remaining circuit synchronously demodulates the L-R audio to build the L and R channels.  The ADAU1701MINIZ's pot adjusts stereo separation:  fully CCW is mono (L+R), midpoint is stereo, and fully CW is L-R.

     I pulled the composite signal from the FM detector in this transistor radio to feed the eval board's A-D input, then listened in stereo at the board's headphone jack.  It was that simple!  Many years ago I experimented with a LM1800 MPX demodulator IC, which works pretty much the same way as this DSP implementation.  Both do a good job, which I attribute to the PLL as it provides a stable carrier with which to demodulate the L-R info.  There's nothing like synchronous demodulation, which also should be in every AM radio more sophisticated than a crystal set (but unfortunately finds itself only in high-end shortwave radios).

MPX-Demod.dspproj.zip
  • Bob, this is again genius but it also reminds me of last year when I took the entire resources of a -1701 to generate a SPDIF output, in the sense that there's another IC that does that   I think I would save the -1701 instructions and use it to set the frequency of an FM RX chip instead.

    That PLL module is clever and useful for lots of other applications though.  -1701 forever!

  • Brilliant work, as usual, Bob. You really are enjoying designing in the digital domain!!

  • Bob, thanks for once again showing us creative and crazy ways to use the SigmaStudio tools.   I also enjoyed your posts on the Poor Engineer's Distortion Analyzer and Voice Activity Detector for the ADAU1701.  Keep them coming!

    -JT

  • Hi, Bob,

    You linked me to this a week or so ago, at which time I was not aware that you were using the ADAU1701.  Could you answer a couple of questions?  1) How fast are you running the 1701?;  2) Do you have any idea how close you are to running out of resources on the part?

    I am working on a very similar application, albeit not for FM Stereo.  I figure on running the 1701 at 192kHz, and am terrified that I'll run out of steam.  My circuit is a bit less complex (fewer parts) than yours, but I figure at 192kHz I'll be gobbling up resources at 4X.

    The 1701 compiler output does not give a nice accounting of which menu parts use how much overhead; I have another posting about that situation.  Many thanks; nice design, that PLL is genius.

  • Hi Jim,

    This project runs at 192 K, & fits with a few instructions to spare.   Out of curiosity I tried to run it at 96 K (using only the lower subcarrier sideband) but it sounded terrible.

    Bob

  • hi Bob,

    did you try RDS demod.

    yes, 19 KHz signal extraction and make it as 2X and  3X to let L+R and L-R

    since this more of analog signal via FM and things will not make so much error. It will appear to be work.

    Have you tried to 4x and demod RDS signal which is very small bandwidth ?

    ( is it possible to put this flow in to Scilab such that we can do lot more fun projects)

  •     Hello Jim,

         Thanks so much for bringing the SSB trial to my attention, I had no clue.  Probably my experiment with SSB demod at 96 K would have worked with a 40 KHz analog LP filter ahead of the DSP to prevent aliasing.  I didn't bother to experiment further because there was enough room at 192 K.  One other detail -- the PLL would benefit from lag-lead feedback as shown in the example at https://ez.analog.com/message/173545#173545.  This makes the loop more stable.  I had known this all along, but the first time I had made a software PLL with a ADAU1701, when I added the lag-lead the DSP's audio output became full-volume white noise -- despite the fact that the PLL was completely separate from the audio path.  The result was I became allergic to this arrangement, thus have not tried it again until the cited post.  In that example the lag-lead definitely helped.



         Best regards,


         Bob

  • Thanks for that Bob; I'll remain hopeful.  Are you aware that the FCC has granted a temporary test period for broadcasters to experiment with transmitting only the lower multiplex sideband?  If you jack up the LSB level, it appears to be 100% compatible with analog and digital stereo demods in existing receivers.  The idea, of course, is to reduce the effects of multipath distortion on the FM baseband.  Additionally, if receivers were designed to ignore anything above 38kHz (USB), noise might go down too.  Don't know where you are, but hook a spectrum analyzer to your radio's baseband output and see if anyone in your area is doing this. In the greater L.A. market there are two or three.  Both the Orban 'Optimod' and the Telos 'Omnia' newer FM processor/generators enable this mode with a switch.

  •      Hello Csound,

         Sorry I missed your post in this stream.  I have not tried receiving RDS,  It does appear possible to phase-lock a 57 KHz local oscillator to the pilot tone in order to demodulate the RDS bit stream for decoding by an external microcontroller or similar.  I'm not sure if the ADAU1701 has enough horsepower at 192K to do both stereo and RDS, but it may with sufficiently clever programming.  Often code savings can be wrung out of first-pass designs like the one above, especially when driven by necessity.  It helps to know how many instructions the various algorithms use (see ADAU1701 Instruction Usage Table).

         I'm a bit too old-fashioned to appreciate MATLAB, Scilab, GNU Octave, Wolfram or any other advanced math system.  Anything that won't fit into a spreadsheet is likely over my head anyway.

         Best regards,

         Bob

  •     Hi once more,

        We're snowbound here in NJ which makes me feel a little kinship with the folks at ADI in Norwood, MA.  Thus there's time here to try RDS demodulation.  I have no idea how to decode the resulting bit-stream or even if the stuff pictured below is actually RDS, but it does pass the sniff test (if nothing else, it goes away with the radio OFF).  Since the base-band source is the same portable radio shown above, it was a challenge to get enough signal to work with.  Thus the project includes many gains which hopefully would not be needed with a real FM detector output.  Also had to add hysteresis to the bit comparator.  Burnt my fingers on the soldering iron with all the mods this thing needed (ha, ha). It all fits in the -1701 along with the MPX demod (had to delete the separation adjustment though)!  It seems these SigmaDSP chips can do anything except generate power like Dinotopia's sunstones (maybe ADI is working on that...).  BTW -- the only FM station here that's strong enough for me to work with plays young-people rock.  I'm starting to like it.

        Best regards,

        Bob

    MPX-RDS-Demod.dspproj.zip