IR Obstacle Detector with 555 38 kHz Burst Transmitter and TSOP1738

A simple IR LED and photodiode pair can detect a nearby object, but sunlight and room lights contain plenty of infrared and easily fool it. Commercial sensors avoid this by modulating the infrared light at a fixed carrier frequency and using a receiver that responds only to that frequency. This project does the same with two NE555 timers and a TSOP1738 receiver module, which contains a photodiode, amplifier, 38 kHz band-pass filter, automatic gain control and demodulator in one package.

The result detects a hand or wall at a useful distance, works under room lighting, and teaches carrier modulation, the same principle used by every TV remote.

Components Required

PartValue / TypeQuantity
Timer ICs U1, U2NE5552
IR receiver U3TSOP1738 (or TSOP38238 / similar 38 kHz module)1
Regulator7805 with 0.33 uF input and 0.1 uF output capacitors1
U1 timingRA 82 kilo-ohm, RB 150 kilo-ohm, C 10 nanofarad, 1N41481 each
U2 timingRA 1 kilo-ohm, RB 15 kilo-ohm + 5 kilo-ohm preset, C 1 nanofarad film1 each
Pin 5 capacitors10 nanofarad2
IR LED driverBC547, 1 kilo-ohm base resistor1 each
IR LED and resistor940 nm IR LED, 100 ohm1 each
TSOP supply filter100 ohm and 4.7 microfarad1 each
Hold circuit1N4148, 10 microfarad, 47 kilo-ohm1 each
OutputBC557, 10 kilo-ohm, LED with 330 ohm, active buzzer1 each
Power9 V battery or adapter1

Circuit Explained Stage by Stage

Stage 1: Why bursts are needed

TSOP-type receivers are designed for remote-control data, which arrives as short bursts of carrier. Their automatic gain control treats a continuous carrier as interference and may reduce sensitivity or suppress it entirely. Vishay datasheets give minimum burst lengths and gap times, so this design switches the 38 kHz carrier on and off in short bursts rather than sending it continuously.

Stage 2: U1 burst gate

U1 is an astable with a 1N4148 across RB, anode at pin 7. During charging the diode bypasses RB, so the high time depends on RA and the low time on RB. Pin 3 of U1 connects to the reset pin (pin 4) of U2, switching the carrier on only while U1's output is high.

High (burst) time  = 0.693 x RA x C = 0.693 x 82 k x 10 nF  = about 0.57 ms (about 22 carrier cycles)
Low (gap) time     = 0.693 x RB x C = 0.693 x 150 k x 10 nF = about 1.04 ms
Burst rate         = about 620 per second

Stage 3: U2 38 kHz carrier

U2 is a standard astable. With RA of 1 kilo-ohm, RB of 15 kilo-ohm plus a 5 kilo-ohm preset, and 1 nanofarad, the frequency can be tuned over a range that includes 38 kHz. Use a film or C0G ceramic capacitor for stability. Pin 3 drives the BC547 through 1 kilo-ohm, and the BC547 sinks current through the IR LED and its 100 ohm resistor from +5 V, giving a peak current of about 35 mA.

f = 1.44 / ((RA + 2 x RB) x C)
RB = 15 k: f = 1.44 / (31 k x 1 nF) = about 46 kHz
RB = 20 k: f = 1.44 / (41 k x 1 nF) = about 35 kHz

Stage 4: Receiver and hold circuit

The TSOP1738 is powered through 100 ohm with 4.7 microfarad across its supply pins, as recommended in the datasheet, to keep supply noise out of its sensitive amplifier. Its output is active low: it goes low during each received burst. A 1N4148 (cathode to the TSOP output) quickly discharges a 10 microfarad capacitor on every burst, while a 47 kilo-ohm resistor recharges it slowly. The capacitor voltage therefore stays low continuously while reflections are received, and drives the BC557 base through 10 kilo-ohm to switch on the LED and buzzer.

FromTo
U1 pin 3U2 pin 4
U2 pin 31 kilo-ohm to BC547 base
+5 V100 ohm, IR LED anode; IR LED cathode to BC547 collector
TSOP output1N4148 cathode; anode to hold node (10 uF to +5 V, 47 k to +5 V)
Hold node10 kilo-ohm to BC557 base; BC557 emitter to +5 V
BC557 collectorBuzzer and LED with 330 ohm to GND

How It Works

The IR LED and the TSOP face the same direction, side by side. With nothing in front, almost no IR returns, the TSOP output stays high, the hold capacitor charges to +5 V and the BC557 is off. When an object comes within range, it reflects some bursts back. The TSOP recognises the 38 kHz bursts, pulses its output low, the hold node drops and the BC557 turns on the alarm. Sunlight and lamp light have no 38 kHz component, so the receiver ignores them.

Assembly and Testing

  1. Build the 7805 supply and confirm 5 V.
  2. Check the TSOP pinout from its datasheet. TSOP17xx, TSOP382xx and VS1838B modules use different pin orders.
  3. Build U2 with its pin 4 tied to +5 V. A phone camera shows the IR LED glowing faintly.
  4. Build U1, then move U2 pin 4 to U1 pin 3.
  5. Build the receiver and hold circuit. Point a TV remote at the TSOP: the LED should flash, proving the receiver works.
  6. Hold a white card 10 cm in front and adjust the preset for maximum detection distance; this is where the carrier is closest to 38 kHz.
  7. Shield the LED and test against different surfaces.

Troubleshooting

  • Always detecting: IR leaks directly into the receiver. Improve shielding and separate the parts by 1 to 2 cm.
  • Never detecting: check the carrier frequency with a multimeter that reads frequency, or retune the preset slowly while holding the card close.
  • Short range: black surfaces reflect little IR. Lower the 100 ohm resistor carefully only if the LED rating allows.
  • Alarm stays on for a moment after the object leaves: that is the hold time constant; reduce the 10 microfarad capacitor to shorten it.

Summary

Two 555 timers produce gated 38 kHz bursts, an IR LED transmits them, and a TSOP1738 detects reflections while rejecting ambient light. A diode and capacitor hold circuit turns the burst-rate output into a steady alarm signal.