Jump to content
43oh

oPossum

Members
  • Content Count

    925
  • Joined

  • Last visited

  • Days Won

    103

Reputation Activity

  1. Like
    oPossum got a reaction from zborgerd in [ ENDED ] June 2011 - 43oh Project of the Month Contest   
    To measure the CIR carrier frequency, each individual pulse of IR must be detected. Common IR demodulator modules can not do this - they respond to a burst of IR, not each pulse.
     
    There are parts made for this specific application such as the Vishay TSOP98200 and TSOP98260. Unfortunately these parts are difficult to obtain.
     
    There are general purpose IR detectors like the Fairchild QSE159 and Osram SFH5140, but they require 5 volts.
     
    A photodiode and a transimpedance amplifier works well, but requires careful construction (not a breadboard) to work well.
     
    I used an ordinary IR LED as a detector. Here is a video showing how it works...
     


     
    Here is the code...
     

    #include "msp430g2211.h" main(void) { volatile unsigned d; unsigned n, p; P1DIR = 0xDA; // Setup I/O P1REN = 0x25; // Pullup on P1.0 - counter input P1OUT = 0x07; // Ground on P1.3 - IR LED ground P1SEL = 0x11; // Enable external counter input TACTL = 0x0024; // Continuous count up, no prescale p = 0; // Reset previous count for(; { n = TAR; // Get current count if(n != p) { // Compare to previous P1OUT |= 0x40; // Turn on green LED if count has changed } else { P1OUT &= ~0x40; // Turn off green LED if count is the same } p = n; // Set previous count to current count d = 10; // Wait a while do { --d; } while(d); // } }
     
    Measuring the carrier frequency requires counting pulses in a specific time period. Next post will show how that is done.
×
×
  • Create New...