Plot spectrum

I have recorded IR signal from remote and I want to find out what is frequency of that signal.How to do that???

IR remote signals are usually pulses made up of square waves, so you won’t see a “frequency”, but rather a complex spectrum of frequencies. See here for more information: https://learn.adafruit.com/ir-sensor/ir-remote-signals

I want to find carrier frequency.

What does your spectrum plot look like? See here for how to attach an image file: https://forum.audacityteam.org/t/how-to-attach-files-to-forum-posts/24026/1 (I’d suggest either jpg or png format)

http://postimg.org/image/q0dgscdud/
http://postimg.org/image/qr66y4g7p/

http://postimg.org/image/7zlr6d3hr/

http://postimg.org/image/5jjxsilf3/

spectrum_2.jpg
So what we are seeing here are peaks for the pulses and harmonics of those pulses. We don’t see the carrier frequency.

What frequency do you expect the carrier frequency to be? About 35 to 40 kHz? Is your recording equipment capable of recording such high frequencies?
What does the waveform look like if you zoom in really close on a single pulse? Does it look anything like this? (I’m guessing not)

http://postimg.org/image/rs6e5aeph/
http://postimg.org/image/hjdwzgqnp/

ir_2.jpg
Ooh, that’s not a bad waveform :slight_smile: Much clearer than I was expecting.

First, to clarify one point. We cannot measure the frequency of the infrared light (that’s likely to be over 300 GHz for an IR LED). That information is not in the recording. What we are looking at is the frequency of the infrared pulses - the rate at which the infrared light switches on and off.

It looks to me that your IR remote does not have one constant carrier frequency. See how there is a pulse at around 4.9730 that is about half the frequency of the other pulses.
It does however appear to have a constant pulse width (and at about 4.9730 there are two pulse joined together).

What you can do, and I think this is the closest to what you are trying to determine, is to calculate the width of a “single” pulse. Some pulses and some gaps look like they are probably exact multiples of that “single pulse” width.

“Frequency” is defined as 1/wavelength, so “in effect”, if you calculate the length of a single pulse on/off cycle, then the carrier frequency can be said to be 1/length of that pulse cycle. That’s not “exactly” true, because it is not a continuous carrier frequency - a “double width” pulse pushes the waveform out of line (out of “phase”) from a continuous frequency.

What we need to measure is this width:
one-cycle.png
Because it’s so small, we will get a better measurement if we measure 10 of them, then take the average.
For the most accurate measurement, we should measure in “samples”. Your sample rate is 44100 hz, so each sample period is 1/44100th second.

In the Selection Toolbar (http://manual.audacityteam.org/o/man/selection_toolbar.html), change the middle time boxes from “End” to “Length”. Click on the down arrow on the right hand end of one of the time boxes and select “Samples” for the units.

Now select 10 complete pulse cycles like this:
10cycles.png
Read the length of the selection from the Selection Toolbar. I’m guessing that it’s about 550 samples.
To get the length of one cycle in “samples”, divide by 10.
To get the length of one cycle in seconds, divide that answer by 44100.
To get the frequency in Hz, divide 1 by the length of one cycle in seconds.

I’m guessing that the answer will be around 800 Hz, which is very surprising for an IR remote. I’m not an expert in this field but what I find on the Internet suggests that the expected frequency should be around 30000 to 60000 Hz. Perhaps you’ve not recorded the IR remote :confused: