 |
|
 |
| Parallax Forums > Public Forums > Propeller Chip > Squarewave Output / Signal Modulation | Forum Quick Jump
|
|  Areal Person Registered Member

       Date Joined Nov 2006 Total Posts : 197 | Posted 4/1/2008 9:52 AM (GMT -8) |   |
Hello,
I’m new to electronics (Ha, Ha…Still). I need some simple/basic, help/advise.
I’ve built a nice sine wave oscillator circuit and I want to modulate it in with intelligence.
I would like to use my propeller to generate a square wave which represents
binary information (0 & 1’s). I will then select some modulation method (ASK, FSK etc.)
and apply the signal to my carrier wave.
QUESTION:
1)
Do I need to convert the propeller output square wave to the same wave type as my carrier before I modulate it onto the carrier (using a DAC)? Or will it automatically convert when I merge the two signals ?
2) In order to generate an intelligent square wave on my Propeller do I just toggle a pin correctly based on my binary output requirements & timing? Or is there something more I need to do to get the correct square wave ?
Thanks,
-Areal
I have a tree growing out of my head, but
what do you expect ? I'm a programmer. | | Back to Top | | |
 |  stevenmess2004 Registered Member
        Date Joined Dec 2007 Total Posts : 1035 | Posted 4/2/2008 12:06 AM (GMT -8) |   | 1. Your signal does not need to be the same wave type. However, you may want to perform some signal conditioning to get rid of high frequency components that may be present (by using a lowpass filter). You will need a modulator though...
2. If you just want a square wave than you can either toggle the pin or you can use one of the timers. If you want to output data you could either write your own routine, use one of the existing drivers like fullDuplexSerial or you could use one of the video units so you have lots of options. | | Back to Top | | |
 |  Areal Person Registered Member

       Date Joined Nov 2006 Total Posts : 197 | Posted 4/2/2008 7:53 AM (GMT -8) |   |
stevenmess2004 said... You will need a modulator though...
I have two oscillators, one is running at 8MHz (my carrier wave) the other is running at 5MHz (This one
is my information wave)
I'm using the Propeller to drive a transistors base which switches the 5MHz collector signal through a low-pass filter into the
8MHz carrier wave that is free-balling of the emitter.
QUESTION:
It's my understanding that this will create FSK modulation. Is this correct ?
I have a tree growing out of my head, but
what do you expect ? I'm a programmer. | | Back to Top | | |
 |  Graham Stabler Registered Member

       Date Joined Jul 2006 Total Posts : 1730 | Posted 4/2/2008 8:23 AM (GMT -8) |   | FSK is switching between two frequencies, so if you were sending morse code you would send one frequency for the gaps and the other for the dots and dashes. So you could have one carrier that you can shift the frequency of or two that you switch between.
I can't see how what you are suggesting is going to do that, to be honest I don't understand most of what you have said.
Graham | | Back to Top | | |
  |  Graham Stabler Registered Member

       Date Joined Jul 2006 Total Posts : 1730 | Posted 4/2/2008 9:23 AM (GMT -8) |   | I said:
"So you could have one carrier that you can shift the frequency of"
I think you need to read up on modulation schemes for FM, FSK is essentially FM with only two levels for modulation signal.
One thing is for sure is that you can't just bung two signals into a transistor randomly and expect it to somehow work.
Graham | | Back to Top | | |
 |  Areal Person Registered Member

       Date Joined Nov 2006 Total Posts : 197 | Posted 4/2/2008 10:21 AM (GMT -8) |   |
@Graham
Well, the design is based of this schematic, it works, and only uses one transistor with TTL input for the FSK input signal.
These two signals do seem to be merged together through the inverter that's driving the crystal.
It looks to me that your answer may be incorrect.
Unless you can correctly explain what the inverter is doing here ?
Thanks,
-Areal
I have a tree growing out of my head, but
what do you expect ? I'm a programmer. Post Edited (Areal Person) : 4/2/2008 6:32:44 PM GMT | | Back to Top | | |
      |  stevenmess2004 Registered Member
        Date Joined Dec 2007 Total Posts : 1035 | Posted 4/2/2008 4:14 PM (GMT -8) |   | | Beau, I think that you are saying that the propeller can be used as an FM receiver just by using the counters (plus maybe an antenna and filter and amp). Is this correct? | | Back to Top | | |
  |  stevenmess2004 Registered Member
        Date Joined Dec 2007 Total Posts : 1035 | Posted 4/2/2008 5:17 PM (GMT -8) |   | | What about if we added a mixer with the LO produced by the propeller. Than if we shift the output up so that it doesn't go negative (or rectify it) we should be able to use the counters to read the frequency using the pos edge detector mode. If we set the Intermediate stage to around 10MHz and sample for 1/50kHz=20us. We would get 200 counts for 10MHz. The smallest increment we would be able to recoginize is 50kHz. Don't think that this is going to be very useful as its not really very accurate and requires a pretty large bandwidth. (unless we put in a frequency multiplier but that could be a fair bit of work). | | Back to Top | | |
  |  stevenmess2004 Registered Member
        Date Joined Dec 2007 Total Posts : 1035 | Posted 4/2/2008 5:26 PM (GMT -8) |   | | Of course if you only wanted low data rates you could make the sample window wider if you had 1/2kHz=500us=0.5ms then you could measure a frequency change of 2kHz. So if you had one tone at 0kHz and the other at 6 or 8kHz than you might be able to get something to work but it will be a very low data rate (<2kbite/s). | | Back to Top | | |
 |  stevenmess2004 Registered Member
        Date Joined Dec 2007 Total Posts : 1035 | Posted 4/2/2008 5:28 PM (GMT -8) |   | | Drone, could you do it with a fixed point and the builtin trig tables? But what are you going to use to sample it? Even if you can sample at 10MHz for a 2.5MHz intermediate frequency you aren't going to have much processing time. | | Back to Top | | |
  |  stevenmess2004 Registered Member
        Date Joined Dec 2007 Total Posts : 1035 | Posted 4/2/2008 5:47 PM (GMT -8) |   | But don't direct conversion radios still need a mixer and a local oscillator? This is a bit out of my knowledge so I'm quite possible wrong but that is the impression I got from the wikipedia article.
Or do you just mean sampling the signal at RF instead of down converting to an IF first? | | Back to Top | | |
 |  Beau Schwabe (Parallax) IC Layout Engineer

       Date Joined Aug 2004 Total Posts : 3523 | Posted 4/2/2008 5:54 PM (GMT -8) |   | |
All,
I don't mean to Hi-Jack this thread, but I thought that this might help with the current direction of this topic:
------------------------------------ E-mail Start -----------------------------
I’ve looked around and done a bit more digging, and this is about the simplest implementation that I could find.
It uses a 4066, which is a QUAD bilateral switch, and two NE5532’s which are nothing more than Dual Op Amps. You could get away with using only one NE5532... I think in this design, two are used for different gain options.
Imagine the attached image with 4 lines leaving the 4066 rather than the 2 lines in the block representation. The output corresponding to Q-0 Deg and Q-180 Deg would go to one Op Amp ... the inverting vs. the non-inverting input respectively. Same goes for the output corresponding to Q-90 Deg and Q-270 Deg going to the other Op Amp.
Since this radio is designed to work with a soundcard on a computer, with a maximum sample rate of 44kHz,... after heterodyning the X4 input frequency going to the 4066, and combining it with the actual received "signal", the maximum audio frequency with this arrangement would be 11kHz or ¼ of the sample rate. In this case dictated by the PC sound card.
The 4066 itself can handle about 40MHz ON/OFF switching per bilateral switch. Since you have two bilateral switches working together for each pole, and there are two poles, the maximum tunable input frequency would be about 80MHz The diagram indicates this at 70MHz being conservative.
Simple Algorithm:
Phase-0 …. If HIGH add to accumulator 1 ; else subtract
Phase-90 …If HIGH add to accumulator 2 ; else subtract
Phase-180 ..If LOW add to accumulator 1 ; else subtract
Phase-270 ..If LOW add to accumulator 2 ; else subtract
------------------------------------ E-mail Finish -----------------------------
Note: The signal strength is equal to Sqrt(accumulator 1^2 + accumulator 2^2) ... yes, it's the Pythagorean theorem .... a^2 + b^2 = c^2 Beau Schwabe
IC Layout Engineer Parallax, Inc.
Post Edited (Beau Schwabe (Parallax)) : 4/3/2008 2:02:45 AM GMT
Image Attachment :
 SDR.JPG 86KB (image/pjpeg)This image has been viewed 54 time(s). | | | |
| | Back to Top | | |
 |  Drone Registered Member

       Date Joined Mar 2007 Total Posts : 359 | Posted 4/2/2008 6:26 PM (GMT -8) |   | I'm sure something's possible with fixed point tables. I'm no expert here - certainly not in Prop assembly and my gut feeling is you're going to need to do a lot of this in assembler.
Beau's showing us a classic Tayloe Quadrature Sampling Detector (QSD) Software Defined Radio (SDR). There are quirks and traps with this kind of IQ demodulator. The example schematic he shows us for example is highly dependent on antenna impedance. The op-amps after the QSD are arranged such that the gain of the SDR will vary directly with antenna impedance. This can be fixed by using differential amplifiers. Whatever op-amps you use, they should be low-noise op-amps. On the order of several nV/rtHz or better.
Beau, you do need both op-amps. In a typical SDR like shown, one passes in-phase (I) baseband, the other pases quadrature (Q) baseband to the stereo PC sound card line-in for DSP demodulation in the PC.
Because there is no input pre-amplifier or isolation, the bandwidth of the QSD varies with antenna impedance too. You also need an input filter, the output of the 4X quadrature local oscillator that feeds the QSD is rich in harmonics and the QSD will respond to odd-order harmonics. The 4066 bi-lateral switch peters out at pretty low frequencies. Some say it is stressed at 10MHz. The 74CBT3253 is a better choice. I have seen bi-lateral switches before that can go to around 1GHz, but can't remember where at the moment.
A nice introduction to SDR and DSP is presented in the QEX papers by Youngblood freely available for download at the following link:
"Software Defined Radio for the Masses", 4-Part QEX Article by Youngblood
www.arrl.org/tis/info/sdr.html
There are other ways to get quadrature, take a look at this thread in the comp.dsp NNTP group:
www.dsprelated.com/showmessage/38252/1.php
If you can do AM modulation instead of FM, then AM demodulating a quadrature signal (IQ) is simply SQRT(I^2+Q^2). If the modulation index and frequency is very low, you "may" get away with generating I and Q in the propeller by delaying the sample stream by 90 degrees in a FIFO. I've never tried this before, but for low modulation index it "may" work (gotta think about that a bit more).
Isn't there a PLL associated with the Prop crystal oscillator chain? Maybe something can be done with that? Just tossing out the idea; really haven't given it any thought.
Rgds, DavidPost Edited (Drone) : 4/3/2008 5:46:51 AM GMT | | Back to Top | | |
 |  stevenmess2004 Registered Member
        Date Joined Dec 2007 Total Posts : 1035 | Posted 4/2/2008 6:30 PM (GMT -8) |   | | There are a total of 17 PLLs in the prop. 2 in each cog and 1 for the main system clock. | | Back to Top | | |
| Forum Information | Currently it is Saturday, November 21, 2009 11:34 AM (GMT -8) There are a total of 393,858 posts in 55,536 threads. In the last 3 days there were 84 new threads and 709 reply posts. View Active Threads
| | Who's Online | This forum has 17692 registered members. Please welcome our newest member, old guy. 58 Guest(s), 14 Registered Member(s) are currently online. Details Siri, keith_kw, Jay Kickliter, Mike Green, Bob Lawrence (VE1RLL), Alsowolfman, Dogg, dMajo, hover1, ErNa, Harley, Tubular, Leon, MicroDirk |
Forum powered by dotNetBB v2.42EC SP2.02 dotNetBB © 2000-2009 |
|
|