Shop OBEX P1 Docs P2 Docs Learn Events
adjustable IR-carrier-frequency filtering — Parallax Forums

adjustable IR-carrier-frequency filtering

StefanL38StefanL38 Posts: 2,292
edited 2011-10-08 16:45 in Propeller 1
Hi,
I would like to use an IR-receiver to record IR-remote signals.
I know there are pre-assembled modules for different carrier-frequencies(30kHz, 33, 36, 36.7 38, 40, 44, 56 kHz.)

Now my circuit should work with all these carrier-frequencies. The problem is the single carrierpulses are
very short (About 1 microsecond. Simply sampling an output-pin would require a sampling frequency of
1 / 0,33 microseconds = 3MHz! This is really high and the sampled data would be really large.

So I'm thinking about a circuit which can be adjusted in its carrier-frequency-response.
But I have only vaque ideas how this could be done.

I guess first step would be to detect the actual carrier-frequency itself. I guess this is not a big problem.
Then another part of the code would have to configure counters to response with a high-signal as long as the carrierfrequency is detected. And responsing with a low signal when no carrier-signal is detected.

Another approach might be to create an adjustable analog voltage or a frequency that is feed into
a carrier-frequency filtering circuit to obtain the carrier-on/off-sequence.

Any ideas how this can be done with a propeller-chip are greatly appreciated.

A third approach would be to have pre-assembled IR-decoders for each frequency. But as there are 8 common used frequencies this would be a lot effort and I would like to avoid this effort. Maybe if the external circuitry needs a lot of components this still might be the better solution.

keep the questions coming
best regards

Stefan

P.S. got I fourth idea.
If I would use a monoflop that is strechting the signaltime up to 10 microseconds then I could sample at
200kHz = every 5 microseconds. Which would reduce the sampled data a lot.

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-10-08 09:41
    You could try using the Goertzel algorithm to demodulate the IR:

    That way, there'd be less data to save than if you stored the entire waveform.

    -Phil
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-10-08 09:54
    Being binary, "recording" the entire stream isn't necessary - just "record" the times of the active periods and then deduce the idle periods: if it's not active then it's idle, if it's not 0 then it's 1.
  • StefanL38StefanL38 Posts: 2,292
    edited 2011-10-08 12:40
    @PJ: Yes this is a good idea.

    MY next try will be the following:
    first determing the actual carrier-frequency

    Setting up a counter for counting external pulses.
    Comparing actual counted pulses with the ones of the last loop
    if bigger ==> pulse occurred. if equal no new pulse since last loop.

    Start a new sampling cycle after 60-90% of the period of the carrier-frequency.
    The start can be synchronised through a waitpeq so a deviation between real carrier-frequency and the calulated one
    doesn't matter.
    I guess this will make sure to catch each pulse even if the pulse is very short while only each 1/56000 = 17.86 microseconds a
    bit is used. Meaning at 0.2 seconds recording time only 1400 bytes are used to represent the pulsetrain.

    Playing back will be done at carrier-frequency.

    The exact value how long to sample inside of one sampling cycle depends on how long it takes to do a WRLONG to HUB-RAM
    which must be finished withing the same sampling-cycle.

    best regards

    Stefan
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2011-10-08 14:29
    Something to ponder.... With some initial fundamental tests on minimal IR transmission bursts I have done. The current IR detectors can resolve an IR carrier within 3 pulses of the carrier itself. (sometimes 2, but more reliably with only 3). Meaning at 40kHz (25us period) the IR detectors only need about 75us to determine if the IR signal is present.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2011-10-08 16:45
    Strictly speaking though, the carrier frequency for IR works similar to carrier frequencies for RF in that to get maximum noise rejection etc you need what is essentially a tuned circuit or band-pass filter. Carriers for IR were implemented to block out interference from strong lower frequency sources and while you could just implement a simple high-pass filter by using an AC coupled amplifier with suitable value capacitor you could/might get interference from other carriers.

    If this is not the case that you will have other carriers at the same time and you want your receiver to pick up any carrier then by all means implement your own high-pass amp/filter driven from an IR photo-diode. You don't need to measure the carrier but simply feed it into an equivalent "diode detector" circuit where basically it is half-wave rectified and filtered. BTW, an NPN with a pull-up on the collector and cap from collector ground will be sufficient for this. If you want to be able to measure the carrier frequency too I would either keep the demodulated signal and have an extra input before the detector to measure the carrier or else no detector and demodulate totally in software.
Sign In or Register to comment.