Basics and implementation of capacitive proximity sensing
Description: Capacitive proximity sensing has gained significant interest among audiences over the past year. At the end of this article, a list of related articles published at Planet Analog is provided for further reading. A simple proximity sensor is designed to detect an approaching hand and activate an LED. A 0.5 mm² wire, 10 cm long, is selected as the sensor. The schematic of the proximity sensor circuit utilizes the CY8C21434 mixed-signal array from Cypress Semiconductor. The sigma-delta modulator is configured with a resolution of 14 bits, and only two external components, CINT and Rdis, are required. The count value from the sigma-delta modulator is processed through an IIR filter to establish a reference count known as the Baseline. This filter is designed to reject high-frequency noise while tracking slow changes caused by environmental factors such as temperature and humidity. When the difference between the instantaneous count and the baseline exceeds a predefined threshold, the firmware indicates the presence of proximity. The accompanying C code for this process is illustrated in a flowchart. A debug port and PC GUI are employed to display the instantaneous counts, baseline, and difference counts from the sensor. The HYSTERESIS value in the firmware should be adjusted to prevent oscillations in the output due to noise, with a few counts above the noise level being sufficient. This configuration allows the LED to turn ON and OFF in response to hand movements near the sensor. Capacitive proximity sensing offers various applications.
Capacitive proximity sensors operate based on the principle of capacitance variation caused by the presence of an object, typically a human hand. The sensor's design involves a simple circuit that integrates the CY8C21434 mixed-signal array, which is adept at handling analog and digital signals. The choice of a 0.5 mm² wire as the sensing element ensures a compact and efficient design, while the 10 cm length provides an adequate sensing range.
The sigma-delta modulator plays a crucial role in converting the analog signal from the sensor into a digital format. With a resolution of 14 bits, it allows for precise measurements of capacitance changes. The external components, CINT (integrating capacitor) and Rdis (discharge resistor), are essential for the modulator's operation, enabling it to achieve the desired sensitivity and response time.
The IIR filter is a key component in the signal processing chain, where it smooths the instantaneous count readings to create a stable baseline. This baseline serves as a reference point, allowing the system to differentiate between genuine proximity events and transient noise. The firmware processes the filtered counts, and when the difference between the instantaneous and baseline counts exceeds a set threshold, it triggers the LED, providing a visual indication of proximity.
To enhance the reliability of the sensor, the HYSTERESIS value is carefully calibrated. This adjustment prevents false triggering due to noise fluctuations, ensuring that the system only responds to significant changes in capacitance. The implementation of a debug port and a graphical user interface (GUI) facilitates real-time monitoring of the sensor's performance, allowing for adjustments and optimizations during development.
Overall, capacitive proximity sensing technology has diverse applications, ranging from user interface enhancements in consumer electronics to automation systems in industrial settings, making it a versatile solution for modern electronic designs.Capacitive proximity sensing has been a very popular topic with our audience over the past year. For your convenience, at the end of this article, there is a hot-linked list of related articles published at Planet Analog. To read Part 1 of this article, click here. ) Now that we have discussed the theory about the sigma-delta modul ator, let us design a simple proximity sensor that will detect an approaching hand and switch on an LED. A 0. 5 mm2 wire, 10 cm long, is chosen as a sensor. Figure 7 shows the schematic of a proximity sensor circuit built using the CY8C21434 mixed-signal array from Cypress Semiconductor.
The resolution of the sigma-delta modulator is set to 14. CINT and Rdis are the only external components required for the sigma-delta modulator. The count value from the sigma-delta modulator is passed through an IIR filter to form a reference count called Baseline. By selecting the filter response of the IIR filter, high-frequency noise on the instantaneous counts are rejected, but slow changes caused by temperature, humidity, and other factors are tracked.
If the difference between the instantaneous count and the baseline exceeds a threshold, the firmware reports proximity. Figure 9 is the C code for the above flowchart. This is the most important stage of the development. Using the debug port and a PC GUI, display the Instantaneous counts, Baseline and Difference counts from the sensor.
Perform the following steps: 5. The HYSTERISIS value in the firmware should be set in such a way that noise in the system does not create oscillations in the output. A few counts more than the noise level should work fine. We now have a proximity sensor. Watch the LED being turned ON and OFF as you bring your hand near and away from the sensor. Proximity sensing can be used in a number of interesting ways: Ganesh Raaja of Cypress Semiconductor Corp.
received his degree in Electronics and Communication Engineering from Motilal Nehru Government Polytechnic, Pondicherry. His expertise lies in developing with analog circuits, embedded systems, designing PCBs, and working with Assembly and C.
1. Capacitive Sensors, Larry K. Baxter, IEEE Press, ISBN: 0-7803-5351-X (Chapter 2: Equation for capacitance of a Cylinder to a Plane, Chapter 6: Proximity sensor basics) 2. Fundamentals of Physics, J. Walker, E-book (Chapter 26: Capacitance and Dielectrics, Equation for Capacitance of sphere to infinity, Equation for Capacitance of parallel plate capacitance)
The analog display consists of a frequency/voltage converter (IC12) and bar-graph segment drivers IC10 and IC11. More: R34 is the calibration adjustment and is set so that an engine rpm of 5 000 to 7000 rpm lights the first LED...
Three devices in a quad Schmitt Trigger and a Flip-Flop create a simple yet sensitive proximity sensor.
The described circuit utilizes three devices from a quad Schmitt Trigger configuration alongside a Flip-Flop to construct a proximity sensor. The Schmitt Trigger is...
The circuit illustrated is an analog signal generator designed to produce a chirping sound, simulating birds singing. It employs six CD4069 inverters to create three oscillators, with two of them functioning as ultra-low frequency oscillators. The oscillation frequency is in...
For proper operation, the circuit ground must be connected via a small-value, high-voltage-rated capacitor to one side of the mains supply socket. The "Live" side is the right one. This circuit is designed to animate shop windows using a capacitive...
This issue features articles on various measurement and sensor-related embedded design projects. Readers are encouraged to attempt similar projects and share their results. Starting on page 14, Petre Tzvetanov Petrov describes a multilevel audible logical probe design. Petrov notes that...
The time constant of R1C1 determines the low cutoff frequency, while the time constant of R2C2 determines the high cutoff frequency. The pass-band gain, Avpass = R2/R1. For a high-pass filter, Za must be capacitors and Zb resistors. By substituting...
An analog electronic clock that utilizes a trigger signal for operation.
An analog electronic clock typically employs a trigger signal to manage its timekeeping functions. The clock's primary components include a quartz crystal oscillator, which provides a stable frequency reference, and...
This circuit features a simple, highly sensitive capacitive ON/OFF switch pad that changes the state of a latch and activates an LED without requiring physical contact. The pad can be insulated, and a range of 12mm is easily achievable with...
For proper operation, the circuit ground must be connected through a small-value, high-voltage-rated capacitor to one side of the mains supply socket. The "Live" side is the right one. This circuit is designed to animate shop windows using a capacitive...
We use cookies to enhance your experience, analyze traffic, and (if you allow) serve personalized ads.
By clicking Accept All, you agree to our use of cookies.
Learn more