Proximity sensors use fields, beams, or changes in ambient conditions to allow sensing of objects within a usable range. A key feature that makes proximity sensors valuable in so many applications is that physical contact is not needed. As a result, electrical interference, mechanical vibration, and other forms of noise can be present without degrading the detection signals and endangering the reliability of sensor results.
Several techniques can be employed, including electric fields, RF, magnetism, capacitance, inductance, sonic energy, and light. This article examines infrared (IR) proximity sensor solutions using reflection, changes in ambient conditions, and beam interruption. These sensors are used in industrial, consumer, and other applications for sensing movement, position, proximity, ambient light, speed, and direction.
A photo interrupter is a photo sensor that integrates an optical receiver and emitter in a single package. Rotating machines will typically use a photo interrupter as a proximity detector. An emitter, typically infrared, sends a beam of light to a receiver that merely detects the presence of the IR light. Solid tachometer slotted wheels can be formed with as many teeth as needed to get the resolution desired at a specific rotational speed.
The timing wheel acts as a shaft encoder, allowing an embedded micro to determine the speed and acceleration of a rotating shaft. Using two of them 90° out of phase creates a quadrature encoder that also allows you to determine the direction of rotation. Photo-interrupted proximity sensors can also be used as a limit position sensor for linear actuators and rotational actuators. The addition of a home or reference sensor lets a timing wheel-based shaft encoder to become an incremental position sensor; by counting pulses you get a stepped position indicator.
Photo-interrupted proximity sensors are available with two main types of outputs: transistor outputs and logic outputs. Transistor outputs are typically NPN and Darlington. Logic outputs including NPN and PNP, open collector, with and without pull-up resistors and buffered or inverted logic.
When choosing a standard, off the shelf, slotted type proximity detector from one of nearly a dozen manufacturers, you may want the slot size to be as narrow as possible to eliminate stray or ambient sources of IR from bleeding through. For example, the Omron EE-SX1107 features a narrow slot (1 mm), in a surface-mount 4-pin package. Its 20 V output transistor can sink 20 mA continuous current.
Many applications will not have problems with regard to IR bleed-through, either because the proximity detector is enclosed, or because the signal strength from the emitter is so powerful that noise will most likely not affect its performance.
By using high-power emitters with small divergence angles, very large sensing gaps can be achieved without having to use more-expensive laser-diode-based emitters. Take, for example, the two-part OPB100Z from Optek/TT Electronics group. This optical emitter and sensor pair uses a high-power IR emitter drawing 100 mA of current (Figure 1). The two parts allow you to set the gap distance (up to 36 in. according to the TT data sheet), and the 30 V transistor-based output can sink up to 50 mA of current. Note: These parts can also be used in photo-reflective designs as well.
Figure 1: The two-part matched high-power emitter and detector use snap-in mountings and can sense interruptions or reflected signal paths with up to 36 in. distances.
Photo-reflectors or reflective type sensors are side-by-side emitter-sensor devices that detect reflected beams from a surface. Reflective sensing does not force proximity between slots. The size and reflective properties of the items in proximity will determine if the trigger logic gets tripped. Because of this, detection gets less precise. For example, depending on what we are wearing, automatic flush valves using IR proximity reflection techniques may not sense us at all if its sensitivity is too low or may trigger a false positive if its sensitivity is too great.
For fixed applications where the overall reflectivity of the items to be sensed and the distance are somewhat fixed, this technique works very well. Take, for example, the ease of use of activating a paper towel dispenser by simply placing our hands under it.
Fortunately, we can control sensitivity through the use of modulation techniques and intensity variation. When the emitter is modulated, detection signal levels can be compared during on times and off times to detect ambient levels. This lets the power to the emitter increase or decrease until the desired sensitivity is achieved. Duty cycle can be varied as well.
Several integrated flat-plane IR proximity detectors are ready to serve these purposes. For example, the OSRAM SFH 7741 is a small (3.6 mm²) flat-plane, eye-safe, opto-hybrid that senses objects within a 30 mm distance using variable drive currents (from 10 to 60 ma) in pulsed mode (Figure 2). It sequences every 90 ms to sample and set the output.
Figure 2: Small, flat-plane, eye safe, IR reflective proximity detectors integrate variable drive pulsed emitters with detectors for noise immunity.
Some interesting parts from Sharp Microelectronics are worth noting. Look at the Sharp GP2AP002S00F, said to be the industry’s smallest: 4 x 2 x 1.2 mm (Figure 3). This part definitely takes aim at small low-power handheld devices like phones, games, music players, and tablets. If these applications get you to thinking that a touchscreen would do that by itself, you are right. But Sharp has figured out that adding a proximity sensor saves power overall because it prevents a lot of false triggers that having a touchscreen alone would present. These include not waking the processor, updating the display, and driving the backlight. Taken together, that can save a lot of energy.
Figure 3: Through integration of the ambient light sensor (used for detecting ambient brightness) and the proximity sensor (right, the sensor alone is at upper left), the Sharp GP2AP002A00F takes up 8 percent less mounting area than the area required for separate mounting.
Proximity detection as a peripheral function
While transistor outputs and logic levels are useful, serial bus interfaces allow proximity detectors to act as peripherals to an embedded microcontroller (MCU). By transferring logic functions to the proximity detector chip, the processor can merely program the settings, power down, and read status at intervals or via interrupts.
A part following this approach comes from AMS-TAOS with its TSL26711 Digital Proximity Detector. The very small, 2 x 2 mm, 6-pin package holds the programmable current sink emitter without any need for a current limiting resistor (Figure 4). The number of pulses in a pulse train sequence is also programmable, as is the upper and lower threshold levels for interrupt generation. Also on chip is a programmable interval timer (from 2.72 ms to around 8 s). This can be a wakeup pulse to the processor. All modes, settings, and status can be accessed through the on chip IIC port supporting up to 400 kHz communication rates.
Figure 4: Instead of just an emitter and detector, an entire IR Proximity Detector digital subsystem is encapsulated into a small footprint with interrupt and IIC interface.
Vishay also makes an IIC-based proximity peripheral chip, the VCNL3020 fully integrated proximity sensor IC. It is larger than the AMS-TAOS part taking up 4.9 x 2.4 mm on a PCB, but has a very low profile (0.83 mm height).
The Vishay part uses a 16-bit architecture with increased resolution for cross-talk immunity (Figure 5). A very nice feature is its programmable emitter current range from 10 to 200 mA in 10 mA steps. This allows sweep detection for up to 200 mm distances. Less current for close ups is nice, too.
Figure 5: With a height of only 0.83 mm, this 16-bit part features programmable emitter currents from 10 to 200 mA in 10 mA steps.
To address the increasingly broad range of proximity sensing applications IR-based detectors now offer increased functionality, small size, low cost, low power, and high part integration. When used with touchscreen devices, they can also save energy overall by eliminating false triggers that would otherwise wake up a processor and power up a display and backlight. Hotenda has established an extensive portfolio of IR proximity sensor devices. All parts, datasheets, tutorials, and development kits mentioned here are available online on the Hotenda website.