Squarewave Output / Signal Modulation
Areal Person
Posts: 197
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.
·
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.
Comments
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.
·· 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.
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
I thought thats what "shifted" ment
The two frequencies are completly seperate ? but syncronized by some kind of clock at modulation / demodulation ?
If so that may be where my problem is, currently there's always an 8MHz signal at my transistors emitter pin,
the 5MHz signal flows through the transistor (from the collector to emitter) when a small current is applied to it's base.
This has the effect of blending (I thought it was shifting) the signal, I was gonna try bandpass filters to demod it.
Thanks,
-Areal
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I have a tree growing out of my head, but
what do you expect ? I'm a programmer.
"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
@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
Am I missing something?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
And here I am trying to work with discreet components.
OMG I love my propeller !
QUESTION:
Could I then then add a class-C amplifier, configure a second propeller as a Superhet Recever
and have an RF solution ?
Thanks Beau,
-Areal
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I have a tree growing out of my head, but
what do you expect ? I'm a programmer.
and have an RF solution ?"
That could be tricky, but not impossible.... Why not just measure the incoming pulse width?
125nS - 8MHz - 5 Clocks @80MHz <- Returned clock numbers are halved, since you would likely be looking at the top half or bottom half of the signal
200nS - 5MHz - 8 Clocks @80MHz <- Returned clock numbers are halved, since you would likely be looking at the top half or bottom half of the signal
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
I think it will work, however, I'm not sure about the PLL, VCO, charge pumps
and all that stuff yet.
It's going to be short range, 30-40 ft.
It's also a learning project for me. There are still unknowns because of my skill level
But ! I'm learning and making progress !
Thanks again,
-Areal
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I have a tree growing out of my head, but
what do you expect ? I'm a programmer.
"WOW ! I can do that ?" - You can even get fancier and use MFSK (Multi Frequency Shift Keying)... Each frequency represents a symbol similar to QPSK(Quad Phase Shift Keying) , OPSK (Octal...), 16PSK, etc.
My favorite at the moment that I have been fiddling with in my brain uses a combination of PSK and·Quadrature (I/Q) to nearly quadruple the Throughput on a low-bandwidth signal line.
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
·
FM frequencies might be too high.... Receiving FM is a little tough (4 Cogs though maybe) ... No, what I was saying, since FSK frequencies are generally pretty low, you could configure a counter or counters, to detect how long the incoming pulse duration ·is ; be it HIGH or LOW.·· At 8MHz the period is 125nS, which means that the time spent LOW is 62.5nS and the time spent HIGH is also 62.5nS.· For a Propeller running at 80MHz it would return a "count" of 5 or an incoming 8MHz signal, and a count of 8 for a 5MHz signal.
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
CORRECTION (Sorry):
Get the phase with Arctan(I/O) then differentiate to demodulate FM, of course low-pass filter in the end. You might use finite-difference as an approximation to differentiation - take the phase difference at each sample interval.
Regards, David
Post Edited (Drone) : 4/3/2008 8:52:23 AM GMT
"What about if we added a mixer with the LO produced by the propeller."· ... I think that an "external" local oscillator is going to drown out and swamp the signal of interest...· Better results would be with a direct conversion style radio.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Or do you just mean sampling the signal at RF instead of down converting to an IF first?
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
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, David
Post Edited (Drone) : 4/3/2008 5:46:51 AM GMT