infrared receiver

Discussion in 'General Electronics Chat' started by sharring, Apr 14, 2006.

  1. sharring

    Thread Starter New Member

    Apr 14, 2006
    4
    0
    I just basically finished up a final project for an embedded systems class, but I want to add remote control capabilities. I need 14 buttons for 14 different commands for the hc11. I have never done this before and am a little lost.

    I have an IR receiver that operates at 38kHz, which is currently connected to PA2 of the microcontroller (generic input capture port) through a simple amplification circuit. I have spent many hours with it (pretty sure I have correct code and setup), but nothing works. I have tried many of my remotes, but I don't know what their carrier frequencies are so I can't tell if they even should work.

    Does anyone know of any remote controls that operate with a carrier frequency of 38kHz?

    Also, I have a HT12D decoder, but I do not know if I need to use it. Can someone tell me when the decoder should be used and when it doesn't need to be used?

    I'm open to any suggestions too.

    thx
     
  2. sharring

    Thread Starter New Member

    Apr 14, 2006
    4
    0
    I figured out what was wrong, and am now getting a signal from my remote. Now I need to figure out how to decode the IR signal from the remote so that I can program the functions for each button. I'm having trouble finding out how to distinguish between the different buttons.

    Any ideas?
     
  3. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Hi,

    Just set up a phototransistor and use an oscilloscope to visualize the pattern of IR pulses associated with each button.
     
  4. sharring

    Thread Starter New Member

    Apr 14, 2006
    4
    0
    I was checking the state of the input port PA2 in a while loop in main, which gave inaccurate results because of the time depedency of the while loop. I ended up checking and recording the pulses using an input-capture ISR, which turned out to yield accurate results each time.

    The input binary number was then converted to a series of decimal numbers which are used to determine which button was pressed.
     
  5. treedog

    Member

    Apr 23, 2006
    15
    0
    38 khz sounds like ultra-sonic freq. am i correct about this? and not ir freq that may be the prob.
     
  6. skypher

    Member

    Apr 16, 2006
    16
    0
    38 kHz is a standard IR frequency.
     
  7. sharring

    Thread Starter New Member

    Apr 14, 2006
    4
    0
    yea, the 38kHz is just the carrier frequency...the only problem was writing working code to decode the signal from the IR receiver...I just had to figure out how to use the input capture correctly
     
Loading...