Go Down

Topic: IR leds and 38KHz receivers as a optoencoder or similiar (Read 2 times) previous topic - next topic


here we are again: i have an IR led (940nm) working quite well (i could see it with my phone) from an arduino IO pin. I also bought a vishay IR 38KHz receiver, precisely a TSOP38338SS1V (this one http://www.vishay.com/docs/81744/tsop381.pdf ). i know this one acts as a filter, de-modulator and stuff, but i just want it to send HIGH if any IR signal is detected or LOW if not, on another IO pin of the same arduino. any suggestion? thanks in advance!


The IR beam must be modulated at 38Khz and must be sending a PCM-style signal -- it will reject a continuous 38Khz signal (see page 5 of your datasheet). I don't think it will be possible to have the IR receiver send a continuous high signal.


nice.. so, shall i use another device in order to achieve what has been written above? if so, which one?


   As the previous poster has said, all you need to do is switch the IR Led on and off at 38Khz. There are examples for doing this using an Arduino Timer if you search for 'Arduino 38Khz'. I would suggest that you drive the IR LED using a transistor rather than directly from an Arduino pin, this will allow you to drive it with a higher current, again you can probably find examples of this in the search results.

   You could also drive the IR Led from a 555 Timer, the 555 timer would generate the 38Khz signal and then all you need to do on your Arduino is use the 555 Timer 'reset' pin to control when the Timer is active or not.

   As the previous poster mentioned, most IR Receivers will reject a constant 38Khz signal after a short period, my own set up for an RC Car Lap Timer rejects the 38Khz pulse after about 2 Seconds, in my application this is not a problem as I am only interested in detecting the initial presence of the car in the detection zone.

   If your application requires you to test for the continued presence of an IR Signal, you might get away with generating a dummy signal, you may not be interested in the contents of the signal, but it will be enough to keep the receiver happy.

   Based on my own experience a valid signal still requires a gap in the signal transmission during which the output of the IR Receiver will return to the high state so this approach is not suitable for very high speed beam breaking type applications as the beam may be broken during a transmission gap with no means for you to detect it.

   If your application can work with gaps longer than a few ms, you should be ok. If you just need to detect reflection, transmission or beam breaking over short distances you can use a normal IR (not demodulated) Detector.

   If you describe what you are aiming for as an end result we guide you in the right direction.

   Duane B



hi! firstly, thanks a lot for the interest. secondly, all i have to do is a sensor that check whenever a person passes between an IR led and the receiver, using only one arduino and keeping the RX and TX pins free. any advice?

Go Up