5
\$\begingroup\$

I want to detect objects crossing a line. I decided to use one IR led (with a 555 circuit to generate a 38khz signal) and one 38khz receiver (TSOP1738). But after testing it on a breadboard I found out that TSOP1738 has gain attenuation, if it receives a 38Khz signal for a "long" period it will turn the internal amp gain down. I want to use 38khz signal to avoid interference with possible ambient IR lights.

How can I solve this problem?

\$\endgroup\$
  • \$\begingroup\$ What is the problem? Are you not happy with the automatic gain control the TSOP1738 provides? \$\endgroup\$ – Ryan Jensen Jan 14 '16 at 20:26
  • \$\begingroup\$ From the datasheet, it looks like your 38 kHz signal is intended to be amplitude-modulated by a lower frequency. Are you doing this? \$\endgroup\$ – Ryan Jensen Jan 14 '16 at 20:29
  • \$\begingroup\$ @JensenR30 Yes I don't want the gain attenuation of TSOP1738, I want to generate a simple continuous 38khz signal by a 555 timer and receive it by TSOP1738 to find out when the line is crossed. If I amplitude-modulate the signal things get a bit more complicated. \$\endgroup\$ – ahmadx87 Jan 15 '16 at 11:59
  • \$\begingroup\$ It wouldn't be much more complicated. You would need one more 555 and an AND gate (or a single transistor). \$\endgroup\$ – Ryan Jensen Jan 16 '16 at 14:43
  • \$\begingroup\$ @JensenR30 In addition to that the receiver should output a constant voltage, not a square signal so that I can read it by the micro or a shift register. \$\endgroup\$ – ahmadx87 Jan 17 '16 at 18:24
3
\$\begingroup\$

If I understand your intention with this project correctly, you want to emit an infrared beam in a continuous manner. Whenever the receiver does not detect the IR-beam you will interpret this as "object detected". Did I get it right?

The IR receiver module TSOP1738 is optimized for reception of a On-Off Key modulated IR signal with 38kHz carrier frequency. This does not mean the 38kHz can be continuously enabled, but only in bursts. After each burst the 38kHz pulses shall be off for a while to prevent the AGC (automatic gain control) in the receiver from saturation. The datasheet recommends each burst to be at least 10 pulses long, but also more pulses may be used per burst. In our case with 38kHz it means 1/38kHz= app 26.3us per pulse, then minimum 10 x 26.3us => minimum 263us/burst. The component test pattern described in the datasheet figure 8 uses app. 23 pulses per burst (600us). Of course this on-off keying also means the IR-receiver output will show a pulse train, rather than a conscious signal. An beam interrupt may be detected when the output has been low longer than the selected burst-cycle time. The decoding of this pulse train could then be done in many different ways: watchdog circuit, timer functions in a microcontroller, Retriggerable Monostable Multivibrator etc.

Some more details about dimensioning of burst timing: Burst-off time shall be equally long as the burst-on time. If we add the burst-on time with the burst-off time we can call that the burst cycle. Depending of the shortest time you expect the beam to be interrupted, you can decide how short your burst cycles can be at the shortest. To be on the safe side (Nyquist–Shannon sampling theorem), make sure to make the burst-cycles shorter than the shortest possible beam interrupt you expect. For example, if you want to be able to detect beam interrupts as short as 1ms, then the bursts cycles must be shorter than 1ms, with <500us burst-on time and <500us burst-off time. I hope this helps.

\$\endgroup\$
  • \$\begingroup\$ Yes you've got it right, That's exactly what I want to do. Thanks for your answer. You're solution will work but I don't want to increase the load of the micro-controller, I may have to use 20 of these detectors and read them via a PISO shift-register so I think I should look for a hardware solution. \$\endgroup\$ – ahmadx87 Jan 15 '16 at 12:05
  • \$\begingroup\$ Maybe there are cheaper and simpler ways to solve the decoding than using 20 IR detectors? One idea would be to use a Retriggerable Monostable Multivibrator. For example SN74LS123 from Texas Instruments: ti.com/lit/ds/symlink/sn74ls123.pdf \$\endgroup\$ – boink Jan 15 '16 at 13:15
  • \$\begingroup\$ Actually these 20 detectors detect people walking through an aisle, detectors are spaced each 50cm. \$\endgroup\$ – ahmadx87 Jan 15 '16 at 14:08
1
\$\begingroup\$

I would recommend to use IR Receiver for Light Barrier like TSSP4038 or TSSP58038 ( or TSSP4056 for 56kHz).

These look exactly the same as the TSOP1738 but they are designed to receive continuous IR signal. Datasheet says the range is up to 25m with direct beam, 2m with reflected beam. Recommended IR LED is TSAL6200.

\$\endgroup\$
  • \$\begingroup\$ Old thread, I know. But +1 to using a TSSP4038 receiver. It is one of very few fixed-gain receivers capable of detecting a continuous (unmodulated) 38 kHz signal, such as emitted from a simple 555 oscillator circuit. Replaces older TSOP4038, but useful info at: vishay.com/docs/81926/tsop4038.pdf \$\endgroup\$ – erco Feb 25 '18 at 21:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.