Oddwired:
Im looking at the tsop4838 ir receiver modules and I want to use them in a laser circuit however I can't find a laser that is both safe and capable of working with the sensor so I want to build one of the detectors out of discreet components and tailor it to work with a red or green laser pen.
From the documentation it appears a photodiode is connected to an amplifier (which I assume is a transimpedance op amp circuit) then a band pass filter and then a demodulator.
Would this just be a matter of a few simple op amp circuits or would it get more complex than that and can anyone explain why there is a demodulator in the circuit? I can't see which signal is being demodulated as i thought the circuit just passed through whether the signal was high or not and whatever microcontroller the tsop was attatched to did all the demodulating?
What's the point of using a red and green laser? Is that for encoding something?
Normal IR communications consist of pulses of IR at 38 or 40 khz. The IR is pulsed at 40 khz so that only that frequency is recognized and ambient light "noise" is ignored.
The data stream usually consists of pulses of IR with three different timings:
The header
A Mark
A Space
TYPICALLY (although not always), a space is 500 or 600 milliseconds of IR pulses at 40 khz, a Mark is twice that and a header is twice as long as a mark (that is, typically a header is 2400 ms, a Mark is 1200 and a Space is 600).
The long header pulse carries no information... it just allows the IR receiver AGC to set itself to the IR intensity.
Then, the actual data is sent, a "1" bit is a Mark-Space and a "0" bit is a Space-Space.
Now, at 40 khz, each IR cycle is 25 microseconds (T=1/F). So, to send out a 2400 millisecond header, you need to send 2400 / 25 = 96 pulses of 40 khz. So it follows that you send 48 pulses for a mark (1200 ms) and 24 for a space (600 ms).
The attached sketch (image sketch, not Arduino sketch! ) should clarify it.
Check out this link also for more info: Understanding Sony IR remote codes, LIRC files, and the Arduino library