Proximity Sensing


An interesting alternative to mechanical switches is the proximity sensor. The term "proximity" refers to the fact that there is no contact between the medium you're trying to detect (i.e., finger, liquid, metal, etc.) and the actual sensing element. Most likely a plate of glass or plastic separates the two. Although you are likely to touch the separating element, there is no physical contact with the sensor.

Proximity sensing technology enables adaptive controls, alleviates isolation issues, improves overall application robustness, generates almost unlimited design flexibility and fosters new functionalities.

Proximity Sensing Technologies

Table 1 describes some of the common sensing technologies.
Additional options include Hall effect, magnetoresistive, radar, sonar and others.

The two technologies most used today for mechanical switch replacement are optical and capacitive sensing, however, as market interest indicates, capacitive is the most versatile and flexible. This article describes some of the theory behind capacitive detection and shows how this theory can be applied to the human-machine environment.

Common Sensing Technologies
Technology Detection Mode Advantages Disadvantages
Inductive Metal Induced electromagnetic currents
  • Operates in harsh conditions
  • Rapid response time
  • Short range
  • Detects only movement
  • Difficult array setups
  • Ultrasonic Virtually all objects Sound wave echo
  • Long range
  • Measure distance
  • Cost
  • Dead zone
  • No idea of size/shape
  • Photoelectric Solid objects Reflection or absorption of light different to background
  • Medium range
  • Possibility of interference
  • Cost
  • Pb in fog/smoke/nontransparent materials
  • Capacitive Objects capable of absorbing or creating electric charge Permitivity variation to background
  • Simple array construction
  • Detect metal and nonmetal
  • Short range
  • Object properties
  • Table 1

    Capacitor Basics

    A capacitor is a device made up of two electrically conducting materials (called electrodes), each at a different potential, separated by a non-conductive material (insulator). The physical value of a capacitor depends on the dielectric constant of the insulator, the relative permittivity of free air, the area of each electrode and the distance separating the electrodes. This value corresponds to the amount of energy the capacitor is able to hold.

    Applying a voltage to one electrode that is different to that present on the other induces an electric current through the capacitor, which decreases as the charge builds on the electrode. This potential difference creates an electric field between the electrodes.

    Capacitive measurement techniques
    Time constants: Input a step function to an RC network where R is fixed, measure the time the output takes to achieve a given voltage.

    Phase shifts: Input a periodic signal, measure the delay, due to the capacitance, on the output signal.

    Frequency modulation: Design a circuit whose frequency depends on the charge and discharge of a capacitor.

    Amplitude modulation: The amplitude of an ac waveform changes due to an RC network, where R is fixed.

    Below are simplified schematics of how to perform these measurements (Table 2).

    In the real world, the challenge is finding the trade-offs between sensitivity, robustness, noise immunity and cost.

    Measuring RC time constants off a square wave function is without doubt the simplest and least expensive solution. However, the drawbacks are sensitivity, detection frequency/ speed and electromagnetic noise, since you're typically injecting a mono-pulse step function with a given repetition rate for delay averaging purposes.

    Freescale has chosen this technique for a new family of MPR08x proximity sensors based on our S08 microcontroller. It provides the optimal compromise between performance and cost-ideal for keypad, tactile screens and simple button replacement.

    Phase shifts have similar sensitivity issues, but tend to have faster response times. Again, noise may be an issue. This measurement technique can easily be integrated into an MCU but does need some external components.

    Frequency modulation is a good solution for discrete designs, especially when using square/triangular waves. An F-to-V converter then gives information that is easily interpreted by an MCU. The drawback is noise.

    Amplitude modulation is quite design intensive, however it gives the best performance in terms of electromagnetic robustness, since you can easily adapt this technique to sine-waves. The sensitivity is similar to that of frequency modulation.

    Freescale has built a portfolio of products based on a small signal sinusoidal excitation. Due to the virtually perfect sine-wave, the resultant electromagnetic interference spectrum is best in class. This portfolio has been in full production for quite a number of years, demonstrating excellent robustness and performance.

    Real-World Solution

    So if all we need to do is measure capacitance, where's the problem? Since the capacitance changes with the environment, just about anything will influence the measurement-insects or mud, tropical climates or desert dryness, children's toys or even a sack of potatoes. The key to resolving these issues is how you calibrate your sensing system.

    Not only can the external environment impact the measurement, but also the design of the measuring system can play an important part in the sensitivity and dynamic range. Unwanted capacitance (or parasitic capacitance) can be created by the chassis (fixings, metal housings, etc.) or by routing the electrode path close to other signals (ribbon cables, PCB routing, etc.). Although there may be certain applications where you want to detect this, such as tamper proofing or security detection, this is more of an inconvenience than a benefit for the vast majority of uses.

    Two options exist to overcome disturbance issues: either you ensure that the A/D part of the capacitor equation is so small that the result has little or no impact or you shield the measurement channel. We have seen previously that an electric field is created between two points having a different potential, therefore by creating a shield circuit with nearly the same amplitude and phase as the electrode signal ensures that there is little or no potential difference between the two signals, thereby canceling out any electric field. By ensuring sufficiently low shield impedance, the parasitic capacitors that now exist between the shield and the chassis, GND signals, etc., can be charged and discharged without affecting the signal amplitude.

    Applying the Theory: Making Life Easier and Less Power Hungry

    Optimizing the man-machine environment When man and machines work together, there is often a physical limit or exclusion zone that constrains the machine. This limit is often defined as the limit of "inconvenience" for the operator, that is to say a position that the operator would normally have to stretch to reach. The underlying objective of this is to ensure that under no circumstances can the machine get too close to someone without that person making a deliberate choice.

    However, what can be considered "distance of security" in one case, such as a robotic tool, can be interpreted by the operator as being just a little too far to be comfortable.

    Imagine the improved convenience and machine performance if the robot was able to adapt to the operator's position. By detecting the operator's presence at a given distance, the robot could safely adjust its position with respect to the operator.

    Safety measures can also be enhanced in applications where user presence must be validated before operation, such as a lawnmower. If the user slips or loses control of the lawnmower in any way, the mower would stop operating as quickly as possible. Another example is an industrial stamping machine where the user must be detected at a safe distance from the equipment prior to its activation.

    The concept of protecting people can equally be applied to protecting sensitive equipment, such as a camera. If it's dropped, using proximity detection would enable the equipment to detect the absence of a human presence and place itself into a more secure state, such as retracting the lens.

    Automatic door openers
    One of the most common applications for presence detection is the automatic door. Typically, as you approach a door you are detected by an optical sensor, or your weight closes a contact in the floor.

    The electric field sensor can be integrated into the floor and can detect the presence of a person through different substances (wood, tile, carpet, etc.). There are no moving parts and the sensor is impervious to rust and virtually indestructible, making it a suitable replacement technology for the mechanical pressure sensor. The physical nature of the electrode ensures a well defined and limited sensing area, unlike that of an optical solution where you need to define a volume and sensitivity threshold.

    Alternatively, proximity sensors can be embedded in the wall or other object to be activated only by voluntary movement. This also allows the door to be opened without any physical contact.

    Optimizing access control can also lead to benefits in energy consumption. Minimizing the time a doorway remains open ensures the shortest possible exchange between hot or cold outside air with the conditioned air in the building.

    Occupant and presence detection
    If you want to check how many people are on an aircraft, how many seats are left in a cinema or how many beds are occupied in a hospital ward you can either count the number of tickets sold or the number of people present, or you can let the seat or bed, each with proximity sensing technology, detect by itself whether it is occupied or not.

    By using multiple electrodes per seat, not only will a person be detected, but also his/her size and position will be measured. This is particularly useful when employed in conjunction with automotive airbag safety systems.

    Energy consumption in battery powered equipment
    There is general concern about the amount of energy wasted by electronic equipment when not in use. Displays and lights that remain lit and equipment that continues to draw power, even when turned off, are just a couple of examples.

    Rather than setting a certain time limit before extinguishing backlights or putting equipment in standby, why not detect the presence of the user and adapt the energy consumption accordingly?

    Battery powered applications can remain in stand-by mode until a proximity sensor detects the approach of a user's hand. The device then automatically powers up. Then, as the hand moves away, the interface can return to a stand-by low-current mode.

    Ice Detection
    The dielectric properties of water are altered as it changes state from gaseous to liquid to frozen. Therefore, for instance, as water vapor between two electrodes changes to ice, the capacitance value across those two electrodes will vary.

    This phenomenon can be used to detect any ice build up in a freezer, helping prevent the igloo effect, where ice actually acts as an insulator. Under extreme conditions ice build up will prevent the compressor from cooling the freezer sufficiently, resulting in wasted energy and spoiled food.

    Choosing the Right Technology

    When considering which technology to use for which application, here's a very rough guide: the RC technique is best suited to applications expecting a "1" or "0" response. The amplitude modulation allows the user to identify and monitor the "fuzzy" bit between the "1" and the "0," or more accurately, the change in state. Here is a simple table that outlines which technology is best applied to which applications:

    Choosing the Best Technology
    Amplitude Modulation RC Technique
    Liquid level (continuous) Touch panel
    Distance On/Off switches
    Dielectric properties Discrete presence detection
    Excellent EMI performance Liquid absence/presence
    Presence up to 15cm  
    Touch panels in harsh environments  
    Table 3

    Freescale's Solutions

    Freescale has been working with electric field measurement in harsh, security conscious environments for over 10 years, with particular attention to occupant detection in an automotive environment. In addition to the product portfolio, we provide evaluation kits that allow fast and simple experimentation and system construction.

    The portfolio comprises three product ranges:

    • An analog ASSP providing the highest sensitivity
    • An MCU-based solution with IP developed to perform calibration, filtering and other debounce algorithms targeting touch panel solutions
    • A software package for S08 and ColdFire V1 products that customers can integrate with their own application software to enable simple button replacement.

    Additional Applications

    The technology described above can be used to enhance security and automated equipment awareness in the following examples:

    • Replacing the traditional mechanical dead man's switch with proximity sensor technology
    • Allowing a robotic system to detect the presence of a human or animal to modify machine speed and movement accordingly
    • Integrating access control sensing into flooring or walls

    There are many other opportunities to apply electric field proximity sensing technology, including:

    • Hiding light-switches behind the plaster board
    • Placing electrodes behind glass to develop interactive touchscreen applications
    • Liquid volume and level detection
    • Access control and anti-pinch functions

    Datasheet : MC33941.pdf, MC34940.pdf, MPR084.pdf Application notes : AN1985.pdf, AN3456.pdf

    About the Author

    Oliver Jones is a Product Marketing Specialist in the Consumer & Industrial Go-To-Market team in EMEA. Based in Toulouse, France, he's been with Motorola/Freescale for 11 years, occupying Product Engineering, Program Management and Marketing positions for Analog and Sensor Products.

    Return to Top Return to Top