delabs News Feed delabs Technologies Search delabs
Contact delabs
Design Service
delabs Technologies 
Search Contact Service

Infrared Optical Proximity Switch

This circuit is used to detect objects by reflected infrared light. It can be built into a cylindrical enclosure just like an inductive proximity switch.

This is also useful as a level detector for colored liquids like oil. This has some immunity to ambient sunlight as it detects ac pulses.

Optical switch with photo sensors

Circuit Operation

The proximity switch can work for a wide range of power, from 8v to 18v DC, D3 protects reverse power supply connections, and U1 regulates the supply to +5v , -5v is derived from U2 555 oscillator which serves dual purpose.

IC 555 is used as an astable oscillator and it flashes the Infra red LED D1 at a high speed, The object close to this LED reflects the light along with the ambient light which may also be sunlight. The infra red diode D2 detector gets the reflected light from LED and some ambient light, The forward voltage drop of D2 will vary with the amount of light falling on it. Ambient light causes a DC component and the pulsing light from D1 causes an AC component.

Optical Transmitter IR

Optical Proximity
                        Switch - Transmitter

The capacitor C6 blocks DC and only transfers AC pulses if any to opamp amplifier U3A whose gain is set by R18, D9 rectifies the pulses to DC and this DC voltage is used by opamp comparator U3B which drives Q1 through Q2 for an open collector output for relays. LED D7 turns on when relay Output is high.

R14 and R13 can be replaced with potentiometer for threshold adjustment if required.
Relay Driver - Electromagnetic


Connect 12v DC supply to +V and GND Ports, Connect a relay coil Between OUT and GND Ports, you can use the relay contacts as you require to turn on a lamp, heater, fan or motor.

If all connections are ok and ICs are working you should see a +5V at U3 pin8 VCC and around -4 to -5 at U3 pin4 VDD

Optical Receiver IR
Optical Proximity Switch
                        - Detector


The Optic switch can be used for both reflecting detection (retro reflective) or obstacle detection. The mechanical construction will decide this, for obstacle detection the diodes D1 and D2 could be put in two different tubes and can be kept far apart 2mts+ and both should be exactly opposite each other, any obstacle like a passing person will be detected. To make a retro reflective proximity switch this circuit is ideal, it can be housed in a cylindrical 30mm by 70mm metal unit with m30 threads and nuts for mounting, both D1 and D2 have to be fitted in the front of this tube on a plastic plug optically insulated from each other yet beside each other.

CD4093BC Quad NAND Schmitt Trigger

IR Led's and Diodes

The types available are various and polarity hard to detect even photo IR transistors can be used. The IR Led can be tested in diode mode of a DMM (battery should be in good condition) it should give around 1.1V drop in proper polarity. An IR detector diode or photo diode can be tested in the same way the drop will be 0.5V at 1 feet from a 60W lamp (no sunlight), closing the IR photo diode with your hand will be an over range on DMM this will happen on proper polarity. the photo diode shows around 10k ohm resistance in daylight and in Mega ohms when covered also the photo diode detects light on reverse bias and used like that.

Proximity Switch -
                        Driver and Supply

This is a Hand Crafted PCB Artwork done by a PCB Vendor  years back, this method may be used even today.

Optical Proximity Switch -

PCB Design -
This Layout may have many jumpers and may need to be cleared of Hairline shorts which has happened after i scanned it, cleaned it and enhanced it using image manipulation software.

This PCB would go into a 30mm Nickel Plated Brass threaded tube, with Epoxy or Teflon ends. These were turned components as quantities made were small. An Optical Proximity Sensor that would fit the same place as the eddy current or Inductive sensors, in existing machines. It could work a longer distance and could detect Non-Metals and even translucent fluids.

You can design your own PCB with any PCB Layout Editor - EDA CAD Circuit Design Software Tools. Laser prints of output works well, but even Ink Jet printouts will work fine for small PCB's like this. Take 3x or 4x prints.