Shop OBEX P1 Docs P2 Docs Learn Events
Strange amplitude when decoding an IR signal — Parallax Forums

Strange amplitude when decoding an IR signal

inakiinaki Posts: 262
edited 2006-10-25 21:59 in General Discussion
I cant understand some behavior I am getting when working with an IR decoder.

I use a SX28 to generate an IR signal that is read from an IR decoder.
The decoder is sensitive to a frequency between 37-40Khz and outputs a high level when the carrier is detected and a low level when no carrier is detected. Low is 0V, while high is 5V.

When I clock the SX, the emitter, with a 4Mhz frequency I can read the codes without problem in the decoder side. In the decoder pins I get a signal with an amplitude of almost 5V, that is, it oscillates between 0 and 5V, which is what I expected. The shape of the signal is also right. The pulses width are calculated using PAUSEUS.

Now I have changed the frequency to 5Mhz for the SX and I get the same signal shape in the decoder. However I get an amplitude of the signal that is about 0.5V only. The result is that the decoder cannot decode the data as it interprets all incoming data as zero.

I understand that changing the master frequency could have an effect on the signal shape, but how is it that it has an effect on the signal amplitude in the receiver ? Can anyone explain this ?

Note: The signal is a standard IR with a 38Khz carrier.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

Comments

  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-10-25 20:12
    It's called detuning, the receiver has a high-Q reception centered around 38.5kHz. If you change the frequency you are pulsing the emmiter you will skew away from the frequency the receiver is designed for and the amplitude seen output from the receiver will be much lower. You need to recalculate the timing of the emitter so you get it back into the 38.5 kHz range. Andy has code taking advantage of this property for the IR pair on the BOE-BOT so he can not only know when there is an obstacle, but it's approximate distance away (detuning causes the detection range to go down).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • inakiinaki Posts: 262
    edited 2006-10-25 21:47
    Thank you Paul.

    I have changed the pulse settings and I get back the correct amplitude.

    By the way, where is the Andy code to take a look ?








    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-10-25 21:59
    It's in Robotics with the BOE-BOT Chapter 8.·Click on the link and it will take you right there.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
Sign In or Register to comment.