DSP Help

Thread Starter

Vanush

Joined Apr 19, 2008
46
Im trying to build a IR remote control to switch of televisions. If you don't know already, the codes are pulse width modulated on/off times using a 38khz carrier wave. I've got the hardware and know the method, but Im having issues getting the on/off times from my remote.

Im using a sound card oscilloscope, which is a probe connceted to the signal output by my IR receiver. I'm using MATLAB to get the on/off times. The problem is that it doesn't work.

As you know, sound cards have a sampling frequency of 44.1Khz and most IR remote controls operate around 38Khz. So obviously I will experience some aliasing. Is there any way to recover the correct on/off times ?
 

kubeek

Joined Sep 20, 2005
5,795
What about using a proper receiver circuit and demodulating the signal first? Then you will see nice squares with correct on/off times. For example this.
 

retched

Joined Dec 5, 2009
5,207
I have to agree with kubeek.

If you use the proper receiver, it will only display the on/off times and pull the 38kHz signal out.

That would be the best route.

Also, there are a couple of circuits on this forum that have done that, AND you may want to look up the TV-B-GONE. It is an open-source tv-remote that has thousands of tv on-off codes.

Look at the clones as well.
 

Thread Starter

Vanush

Joined Apr 19, 2008
46
I'm not sure what the difference is between the standard IR receiver that I am using an the 'proper' receiver - is it just that the proper receiver will get rid of the 38khz signal?
 

R!f@@

Joined Apr 2, 2009
9,918
The actual Information is taken by getting rid of the carrier.
The difference may be tht ur's does not demodulate properly
 

kubeek

Joined Sep 20, 2005
5,795
I'm not sure what the difference is between the standard IR receiver that I am using an the 'proper' receiver - is it just that the proper receiver will get rid of the 38khz signal?
Yes, simply said, data sent through the transmitter will appear on the receiver the way they were sent.
 

DonQ

Joined May 6, 2009
321
The other option is to use a regular old oscilloscope with a basic, linear IR receiver diode. Assuming your IR receiver is adequate (anything faster than CdS), you should be able to easily see the multi-kHz modulation, divided up into batches of on-off periods.

The problem is that you are trying to sample a frequency that is far beyond audio with an audio card. The sample frequency of even a cheap digital scope is many times the 44kHz of the sound card. Any analog scope would be able to see it also. Audio sampling, and Matlab are overkill, but with inadequate tools.

I made an extended range remote for my camera using both a BitScope and a Fluke 95. Both showed the needed info easily. Now I have a remote that works further away than I ever want to be from my camera.
 

Thread Starter

Vanush

Joined Apr 19, 2008
46
I got it working - in windows you can set the sampling the frequency of your sound card to 96khz. I can easily get the on off times, and in fact, was able to turn off a television using the correct times garnered from MATLAB using a carrier wave frequency I found off the net, but I have another problem. (All this at the cost of a $30 'oscilloprobe' that has a male 3.5mm jack!)

Say I want to replicate an arbitrary remote, i need to know the carrier frequency. Since my normal IR receiver has a Band pass filter centered on 38khz - (the spectrum from the remote has already been filtered) - i dont think there's a way to recover the frequency of the original carrier wave?
 

Markd77

Joined Sep 7, 2009
2,806
You could probably just guess and then try transmitting to see which has the best range. It's probably 36, 38, or 40KHz.
Most recievers have a fairly wide tolerance so you might find that they all work, but one is better.
I used my PICKIT2 and that worked perfectly as a logic tracer.
 

Audioguru

Joined Dec 20, 2007
11,248
IR remote controls transmit data, not PWM. The data must be sent as bursts so that the IR receiver stays at a high gain. Continuous 38kHz IR causes the IR receiver to reduce its gain thinking that it is interference from a compact fluorescent light bulb that operates and blinks at 38kHz.
 
Top