Proximity IR Switch




Introduction: Proximity IR Switch

A switch activated by distance. This example shows the activation of an LED strip.

An understanding of electronics (and soldering if using a veroboard) is required to complete this project. A multimeter would be helpful for testing.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Parts You Will Need

  1. A power supply from AC to 12V DC
  2. A voltage regulator LM7805,LM78L05,LD50V or equivalent
  3. 2x Capacitors 10 Microfarad and 100 Nanofarad
  4. 3x Resistors R1 4700 Ohm, R2 680 Ohm, R3 100 Ohm
  5. TCRT5000 IR Phototransistor
  6. An NPN transistor 2N2222
  7. A piece of veroboard to make the circuit
  8. 12V LED Strip

Step 2: Assembly & Testing

Put it together as per the schematic.

Start with the power supply and voltage regulator, test it to make sure you got it right and you have an output of 5V

Assemble the TCRT5000 next, test to see that you have an output of some voltage (around 1.2V) between the resistor R1 (4700Ohm) and the collector of the TCRT5000. It should drop significantly when IR light is reflected onto the sensor.

Assemble the Transistor connecting the Emitter to ground and the collector to the -ve of the LED strip. Connect +12V to the +ve of the LED strip.

When the TCRT5000 is "open" the LED strip should light up. Put a flat (ideally reflective) surface close to the TCRT5000 and it should turn off.

Step 3: Hacks and Further Modifications

The trigger range of the sensor can be changed by modifying R1 and R2, increasing the resistance (to a certain limit) can increase the trigger range. I tried 20,000Ohm for R1 and 1000Ohm R2 and I got a 3cm range trigger.

Using a mirror as the reflective surface increased the range further.

Should you wish to trigger a motor or a relay look-up adding a diode onto the transistor to avoid damaging it.

Step 4: Results

I held my circuit board in place with a plastic bracket I 3D Printed and some hot glue. Any non conductive material will work however I am attaching my work should anyone want to use it.

Also adding a PCB layout of the circuit should you want to etch you own.

1 Person Made This Project!


  • Backyard Contest

    Backyard Contest
  • Silly Hats Speed Challenge

    Silly Hats Speed Challenge
  • Arduino Contest 2020

    Arduino Contest 2020

5 Discussions


3 years ago

can anyone help me with the theoretical working of this project ?


5 years ago on Introduction

Neat, just the other day I was thinking about making one of these.


5 years ago

I made robots with this technology too. Now I'll made an alarm system, thank you for posting. Awesome instructable!


5 years ago on Introduction

This looks great! I love doing things like this. I made a robot a few years back that avoided obsticle using a proximity sensor.