PDA

View Full Version : Newbe - RF Sound Modulation



Areal Person
08-30-2007, 07:28 AM
Hi, (I'm a newbe at this)

I'm trying to modulate my voice onto the carrier frequency I've generated
using the FrequencySynth object. (I'm in the FM range).

I have two things as follows.

1) The simple propeller setup using the FrequencySynth object on a single pin. (I'm using a good cellphone ant.) (works good)
2) a simple Condenser microphone circuit that uses a LM386N Audio Amp IC. (works good)
ˇˇˇ it is using a 9vdc battery.

QUESTIONS:

How can I SAFLEY get the signal onto the carrer frequency ?

Can I just plug in the output of theˇLM386Nˇthat is currently going to my headphones? (I don't think so, as it is over 3.5vdc) ?
Can I use a 3.3vdc zener diode as a clamp ?

I don't know what I'm doing and I dont want to damage my Propeller starter Kit.

Thanks for the help,
-Areal

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I have a tree growing out of my head, but

what do you expect ? I'm a programmer.

Beau Schwabe (Parallax)
08-30-2007, 08:07 AM
Areal,

If you look at the microphone to VGA object, you won't even need a LM386.
Use the value returned from the sigma delta ADC in the microphone to VGA object to bump up or bump down the PHSx register that you are using to generate the carrier frequency with to FM modulate your voice.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe (mailto:bschwabe@parallax.com)

IC Layout Engineer
Parallax, Inc.

Areal Person
08-30-2007, 08:27 AM
OMG,

I know, I love my propeller.

Ha, Ha.. Silly me, I dident even know it had a microphone on it :)
Ua.. Hey, If I stand on my head and spin round and round could I get a free scope ? :)

Take it from me!
-Areal Person

Thats really nice!

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I have a tree growing out of my head, but

what do you expect ? I'm a programmer.

Post Edited (Areal Person) : 8/30/2007 1:32:14 AM GMT

Areal Person
08-30-2007, 09:23 AM
Ok, Ok, Yep :)

Ua... And my next question, after reviewing the code objects is...

hOW do you do that :)

Now I'm taking a real deep lmao :)

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I have a tree growing out of my head, but

what do you expect ? I'm a programmer.

Post Edited (Areal Person) : 8/30/2007 2:28:44 AM GMT

Mike Green
08-30-2007, 11:16 AM
"hOW do you do that :)"

The Wikipedia is a great source for basic electronics information. Google for "wiki sigma delta" and see what you get!

There already is a logic analyzer that runs on the Propeller that Paul Baker put together (http://forums.parallax.com/showthread.php?p=606048). Someone did a frequency domain display. The built-in ADC capability isn't fast enough to handle anything beyond the audio range, but a high speed external ADC would enable you to make an oscilloscope.

Beau Schwabe (Parallax)
08-30-2007, 01:12 PM
Mike,

I think he means how do you combine the microphone and a synthesized frequency in order to modulate it via the Propeller.
http://forums.parallax.com/images/smilies/smilewinkgrin.gif


Areal,

I had originally suggested looking at the microphone to VGA, but it turns out (for me anyway) it was easier to get my head around the
microphone to headset ... pun intended.

Anyway, here is something to get you started....

Note: I used 900kHz to test, because 1MHz (1000kHz) is already allocated as one of the local radio stations.

I should point out that the modulation scheme used here is Phase Modulation and not Frequency Modulation. In order to do Frequency Modulation
it would be necessary to re-calculate on the fly the CTRB values and guarantee that it does not drift from your Carrier frequency. With Phase Modulation,
the time domain of the frequency is altered, but the frequency remains the same providing it's allowed to complete a cycle.

The drawback to Phase modulation, is that you are limited to the frequency in which you can modulate a signal and still have decent audio quality.
The lower frequencies are much better than the higher ones in terms of audio quality.

Frequency Modulation is very doable, and would allow very good quality audio at higher frequencies as well as lower frequencies, but it is a bit more complicated.
Perhaps someone else will take the challenge.

Both Phase Modulation or Frequency Modulation should be audible on a standard radio receiver

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe (mailto:bschwabe@parallax.com)

IC Layout Engineer
Parallax, Inc.

Post Edited (Beau Schwabe (Parallax)) : 8/30/2007 6:51:42 AM GMT

m.r.b.
08-30-2007, 06:53 PM
FM modulation is not overly tricky... I was the first 'play' I had, when I started with the propeller a few weeks ago... Had to be done??!!??

The problem that I had with high quality (wide audio bandwidth) FM, was that SPIN is an interpreted language, (and runs a LOT slower than assembly..)
... As a result, if you use SPIN AT ALL ... anywhere in your modulation path... the update rate is low [audio bandwidth is low] .. so it sounds rubbish.

You really need to use assembly to get fast enough modulation updates, to accomodate DECENT audio bandwidth (Nyquist's rule ... Fsample => 2*Max freq.)
{for FM broadcast spec audio @ 15Khz (* 2)= 30Khz or faster!!}




... By the way .... this should be possible, but I haven't tried it yet...

If you have 2* sigma-delta ADC, for left and right channnels, and swap the modulating source for freq. synth. between the two at 38Khz
(so the modulation chops between Left and Right @38Khz) ... and addition alternatively add / subtract a small amount of modulation at 19Khz (pilot)
.... You should get stereo!!! Albiet rough and ready!!!

I did get as far as a mono 'broadcast' with the stereo 'pilot' tone (which lit the stereo light on my HiFi) .. But this was not TRUE stereo!!

Regards M.R.B.

Beau Schwabe (Parallax)
08-30-2007, 08:39 PM
m.r.b.,


You said...
If you have 2* sigma-delta ADC, for left and right channnels, and swap the modulating source for freq. synth. between the two at 38Khz (so the modulation chops between Left and Right @38Khz) ... and addition alternatively add / subtract a small amount of modulation at 19Khz (pilot) .... You should get stereo!!! Albiet rough and ready!!!

That's correct... the problem with "add / subtract a small amount of modulation at 19Khz" or what ever frequency, is that it's not always going to return to center or average Zero.ˇ As a result, the carrier frequency may drift without some way of regulating it.

Really, you could still transmit in stereo, only the Left and Right would be Mono if you only used 1 Sigma-delta ADC and alternated which path (Left or Right) you updated at 38kHz.

"I did get as far as a mono 'broadcast' with the stereo 'pilot' tone (which lit the stereo light on my HiFi) .. But this was not TRUE stereo!!"

Yes, you can also "fake" out the stereo pilot light by only using the Frequency Synthesizer object... Set one CTR to your carrier frequency and set the other CTR to 19kHz.ˇ Assign BOTH CTR's to the same pin.

Here is an informative link as far as how FM radio is organized: http://www.st-andrews.ac.uk/~jcgl/Scots_Guide/RadCom/part21/page1.html



▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe (mailto:bschwabe@parallax.com)

IC Layout Engineer
Parallax, Inc.

Post Edited (Beau Schwabe (Parallax)) : 8/30/2007 3:43:24 PM GMT

Areal Person
08-30-2007, 09:40 PM
I just wanted to say, Thank you !

Thanks Beau for all the details, and everyone else for your help.

I really enjoy working with my propeller chip because eventhough
I'm a newbe and dont know much about electronics, I can learn and be
succussfull because the support here is the best !

Now, I'm gonna go study everything.

Thank you,
-Areal Person




▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I have a tree growing out of my head, but

what do you expect ? I'm a programmer.