DSP Help

Discussion in 'The Projects Forum' started by Vanush, Oct 16, 2010.

  1. Vanush

    Thread Starter Active Member

    Apr 19, 2008
    46
    0
    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 ?
     
  2. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    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.
     
  3. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    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.
     
  4. Vanush

    Thread Starter Active Member

    Apr 19, 2008
    46
    0
    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?
     
  5. R!f@@

    AAC Fanatic!

    Apr 2, 2009
    8,754
    760
    The actual Information is taken by getting rid of the carrier.
    The difference may be tht ur's does not demodulate properly
     
  6. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    Yes, simply said, data sent through the transmitter will appear on the receiver the way they were sent.
     
  7. DonQ

    Active Member

    May 6, 2009
    320
    11
    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.
     
  8. Vanush

    Thread Starter Active Member

    Apr 19, 2008
    46
    0
    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?
     
  9. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    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.
     
  10. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    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.
     
  11. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
Loading...