askvity

How to Make an Infrared Proximity Sensor?

Published in Electronics Projects 5 mins read

Here's a step-by-step guide on how to build a simple infrared (IR) proximity sensor, based on commonly available components. This sensor works by emitting an IR signal and detecting its reflection off an object.

Components Required:

  • BC547 Transistors (x2): These NPN transistors act as switches to amplify the signal.
  • IR LED (Infrared Light Emitting Diode): Emits the infrared light.
  • IR Photodiode: Detects the reflected infrared light. Be mindful of the polarity; the shorter lead is the cathode.
  • Resistors:
    • 100 Ohm resistor (brown, black, brown, gold): Current limiting for the IR LED.
    • 47k Ohm resistor (yellow, violet, orange, gold): Biasing resistor for the transistor connected to the photodiode.
  • Green LED: Indicates object detection.
  • Connecting Wires: For connecting the components.
  • Breadboard (optional): For prototyping the circuit.
  • 9V Battery: Power source.
  • 9V Battery Clip: To connect the battery.

Circuit Diagram & Steps:

While a specific circuit diagram isn't directly provided, the following instructions outline how to assemble the circuit, building on the components and steps listed in the reference:

  1. IR LED Connection: Connect the 100 Ohm resistor in series with the IR LED. The other end of the resistor connects to the positive supply voltage (+9V). The cathode (shorter lead) of the IR LED goes to the collector of one BC547 transistor (Transistor 1).

  2. Photodiode Connection: Connect the IR photodiode to the base of another BC547 transistor (Transistor 2). The cathode (shorter lead) of the photodiode connects to the base of Transistor 2. Also connect a 47k Ohm resistor from the base of Transistor 2 to ground (negative supply voltage). This resistor pulls down the base voltage when no IR light is detected.

  3. Transistor 2 Configuration: The emitter of Transistor 2 is connected directly to ground (negative supply voltage). The collector of Transistor 2 connects to the green LED.

  4. Green LED Connection: Connect the anode (longer lead) of the green LED to the positive supply voltage (+9V) through a suitable current limiting resistor (e.g., 220 Ohm - red, red, brown, gold - not explicitly mentioned in the provided steps but crucial for protecting the LED). The cathode (shorter lead) of the green LED is connected to the collector of Transistor 2.

  5. Transistor 1 Configuration: The emitter of Transistor 1 is connected to ground (negative supply voltage). The base of Transistor 1 is connected to the collector of Transistor 2.

  6. Power Supply: Connect the positive lead of the 9V battery to the positive rail of your breadboard (or directly to the circuit). Connect the negative lead of the battery to the negative rail of your breadboard (or directly to the circuit).

How it Works:

  • The IR LED constantly emits infrared light.
  • When an object is near the sensor, the infrared light reflects off the object and is detected by the IR photodiode.
  • The IR photodiode allows current to flow depending on the intensity of the detected IR light. This current flows into the base of Transistor 2, causing it to switch ON.
  • When Transistor 2 switches ON, its collector voltage drops, pulling down the base voltage of Transistor 1 and switching it OFF. This allows current to flow through the green LED (via a current limiting resistor to protect the LED), causing it to illuminate, indicating object detection.

Troubleshooting:

  • Green LED always ON: Check the wiring of the photodiode and the 47k Ohm resistor. Ensure that the photodiode is correctly oriented. A short circuit somewhere in the circuit may also cause this.
  • Green LED never ON: Check the wiring of the IR LED and its resistor. Ensure the IR LED is functioning. Also, make sure the photodiode is facing the IR LED and that the transistors are correctly wired. Ensure the resistor values are correct. The battery may be dead.
  • Poor detection range: Adjust the position of the IR LED and photodiode to optimize reflection. Try different resistor values for the IR LED (to adjust the IR output) and the photodiode (to adjust sensitivity). The 47k resistor may need adjustment depending on the photodiode's sensitivity.

Important Considerations:

  • The detection range depends on the intensity of the IR LED, the sensitivity of the photodiode, and the reflective properties of the object.
  • Ambient infrared light (e.g., from sunlight or incandescent bulbs) can interfere with the sensor's performance.
  • The circuit may need adjustments depending on the specific components used. The resistor values mentioned above are typical, but experimentation may be required for optimal performance.
  • This is a basic proximity sensor. More sophisticated sensors use signal processing and filtering to improve accuracy and range.

Related Articles