How to add a carrier frequency

This section is now closed.
Forum rules
Audacity 1.2.x is now obsolete. Please use the current Audacity 2.1.x version.
steve
Site Admin
Posts: 80679
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: How to add a carrier frequency

Post by steve » Sun Sep 20, 2009 8:53 pm

onlinetimc wrote:I'll have a look at it on the scope monday and see what the soundcard does with it.
That'll be interesting. Do you have a digital camera or any other means of posting a picture of it?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

onlinetimc
Posts: 6
Joined: Wed Sep 16, 2009 7:22 pm
Operating System: Please select

Re: How to add a carrier frequency

Post by onlinetimc » Mon Sep 21, 2009 10:07 am

Here you are:
Signals.gif
Clean Source Signal & Carriers
Signals.gif (75.11 KiB) Viewed 1359 times
As you can see from the close up (lower images), the generated waveforms (upper images) aren't much different anyway (96000Hz samples).

Waveforms:
SquareResults.gif
Square 19kHz Carrier
SquareResults.gif (91.46 KiB) Viewed 1358 times
SineResults.gif
Sine 19kHz Carrier
SineResults.gif (93.04 KiB) Viewed 1359 times
I've put the cursors over 10 periods, and we get 1.88kHz (so 18.8kHz) which is close. Perhaps the sine carrier is marginally cleaner, but not much in it (so few samples per period in the generated signal, plus smoothing I expect from the soundcard).

I should have brought the original remote with me, then I could have sampled it on the scope (unfortunately the case is clip together so I will have to do it indirectly) & I suppose ultimately I can also sample the gernerated transmitted signal and see how they compare.

Anyway, the main thing is I have an automated way to generate the signal (yet to combine it to a single command but easy to record a whole remote and process it). I don't know why but I found the Nyquist manual impossible to read, I guess because I don't know the terminology at all so couldn't see what different commands did etc.

I may well switch to using an RS232 Tx/Rx eventually but it is nice to see the raw signals and prove it can work (I had no idea what standard the remote used, but looks like a fairly standard protocol http://www.sbprojects.com/knowledge/ir/xsat.htm). Just need to add video-in to my pc, complete the full command mapping and I will be able to remotely login to pc and set recordings remotely. Add in some IR controlled power sockets and you have basics for home automation...just need Pierce Brosnan voice samples now...ala Simpsons.

steve
Site Admin
Posts: 80679
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: How to add a carrier frequency

Post by steve » Mon Sep 21, 2009 4:40 pm

That's great, thanks for taking the time with the photos - it's always interesting to see how theory and practice compare. In this case the practice seems to work surprisingly well.
Re. Pierce Brosnan voice samples, you could now buy a huge quantity of IR diodes, connect them up to a big power amp, launch it into space and take over every TV in the Western Hemisphere while sitting in a comfy leather chair, stroking a white cat.

Re. the Nyquist manual being hard to follow - yes it is.
The section about Nyquist on the main Audacity site gives a good introduction which is much easier to follow http://audacityteam.org/help/nyquist
Also, the XLISP manual covers most of the functions (apart from sound related functions, which are specific to Nyquist) and has examples. The examples make it much easier to understand. http://audacity-forum.de/download/edgar ... reface.htm

Also, looking at Nyquist plug-ins (using a text editor) can be very instructive, especially where the author has taken the time to add lots of comments to the code.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

onlinetimc
Posts: 6
Joined: Wed Sep 16, 2009 7:22 pm
Operating System: Please select

Re: How to add a carrier frequency

Post by onlinetimc » Tue Sep 22, 2009 9:07 am

Just to complete the picture, I've managed to capture the original remote and the generated signals.
GenuineSignalCapture.gif
Genuine Signal Capture
GenuineSignalCapture.gif (66.39 KiB) Viewed 1348 times
GeneratedSignalCapture.gif
Generated Signal Capture
GeneratedSignalCapture.gif (69.97 KiB) Viewed 1348 times
Note the generated signal was much weaker so the IR sensitive diode for capture was only a few mm from the IR LEDs (so the signal was slightly unbalanced). However the signal does work well over a longer distance with the genuine receiver/other pc. The genuine signal carrier is 37.88kHz and the generated one is 36.9kHz, which fortunately appears to be close enough.

I've also just tested a IR Rx module which filters out the carrier and you get the very same signal before we add our carrier so any receiver (which tend to use these modules) will only see the data if it has suitable carrier (this avoids things like lights etc adding noise).

Re.World Domination: Perhaps I can get Nintendo to sponsor the launch, I can promise to provide a "Wii Sensor Bar in the sky (TM)" for everyone.

steve
Site Admin
Posts: 80679
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: How to add a carrier frequency

Post by steve » Tue Sep 22, 2009 5:01 pm

onlinetimc wrote:Note the generated signal was much weaker
A simple op-amp circuit would probably sort that out by boosting the signal a little. You should be able to find a circuit that can be adapted in many op-amp project books. R.A. Penfold comes to mind.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Locked