|
Arduino Nano R3 |
x 1 | |
|
Rotary potentiometer (generic) |
x 1 | |
|
Buzzer |
x 1 | |
|
LED |
x 1 | |
|
Two Aluminum plates |
x 1 |
![]() |
arduino IDEArduino
|
|
![]() |
Soldering Iron Kit |
DIY simple Capacitive Proximity sensor
A capacitive proximity sensor is a type of sensor used to detect the presence of an object without physical contact. It works based on the principle of capacitance, which is the ability of an object to store an electrical charge. There are several types of such sensors on the market and each of them is intended for a specific purpose.
This time I will present you an extremely simple way to make such a sensor yourself, which is inexpensive and highly adjustable
We only need a few components to make the sensor:
- Two thin metal (in my case aluminum) plates
- Potentiometer for setting the sensitivity
- LED and Buzzer for sigmalization, or a relay module to turning on and off a device.
- And Arduino Nano Microcontroller board with appropriate software
This project is sponsored by PCBWay. They has all the services you need to create your project at the best price, whether is a scool project, or complex professional project. On PCBWay you can share your experiences, or get inspiration for your next project. They also provide completed Surface mount SMT PCB assemblY service at a best price, and ISO9001 quality control. Visit pcbway.com for more services.
The two plates are glued to an insulating substrate next to each other in the form of a so-called open capacitor, with a certain minimum distance between them. In fact, this is a capacitor with a capacity of 3 to 5 Picofarads in air. If we approach the plates with an object that has a dielectric constant different from that of the air, the capacitance will change, which is detected by the microcontroller and its output gives a suitable signal, or activates some device.
Now let's not go into the explanation of the term dielectric constant, just to give you an example of its value for some materials. For Water, dielectric constant is 80, glass from 4 to 12, PVC 4, for wood about 3, the human body about 40, and dry air has exactly 1 dielectric constant.
It can be seen from the above that the sensor will be most sensitive to water, than human body, etc...
The microcontroller code is relatively simple thanks to the wonderful "Capacitor" library that accurately measures the capacitance of an unknown capacitor without the use of external components. Now I'll show you what it looks like just using this library and a serial plotter from the Arduino IDE. The relatively constant line represents the capacitance of the open capacitor plus that of the coaxial cable that runs from the plates to the microcontroller. In this case it is about thirty picofarads
As the hand gets closer to the plates, the capacitance decreases which is clearly seen on the serial plotter. The same applies to water.
For this purpose I wrote an extremely simple code. As we can notice, we first measure the capacitance of the open capacitor plus coaxial cable system, and the value generated by the position of the potentiometer, which we have to adjust to be the closest to the above mentioned capacitance. If we bring an object with a higher dielectric constant close to the plates, the capacitance decreases and when it becomes lower than the previously set constant value of the potentiometer, an alarm is triggered or some device is turned on via a relay module.
Now I will demonstrate the features of the complete sensor device. After turning on the device, with the help of the potentiometer, we need to set the sensor activation threshold in a way that we set it in the position closest to the self-activation of the alarm. Then the sensor is most sensitive. Next I will test the functionality by bringing my hand closer to the metal plates.
The reaction of the sensor is instantaneous when we bring our hand closer to a certain distance.
If we approach, for example, wood or plastic, the sensor does not react at all. This property can be used very effectively to protect against injuries, for example when working with wood with a circular saw.
While processing the wood, the saw is in operation. If, due to carelessness or some other reason, we bring our hand close to the saw, the sensor activates a special mechanism that instantly stops the rotation of the saw and thus protects us from injury. This can also be used in many other production processes where the cooperation of robotic machines and people is needed, or work on a press, etc.
As I mentioned before, this sensor is sensitive to water so it can be used very effectively to prevent unwanted water from leaking out of the container during a certain process.
Another application is, for example, the signaling of a damaged plumbing installation or faucet that causes water to leak onto the floor.
Then a special case where the floor is metal, which makes it very difficult to detect water. With the potentiometer, we adjust the threshold at the very place where the sensor will stand. Now the sensor will not react to the metal at all, but only to the presence of water.
And so we can use this sensor in many other places such as touch switches, material level control, and counting. Now I will explain to you a practical example of an application in industry, let's say detecting irregularities on a bottle filling line.
If for some previous reason the bottle moving along the line is not filled This can be easily detected with this sensor because it does not react to the glass but only to the liquid inside of the bottle. If the sensor does not give a signal, it means that the bottle is empty and needs to be removed at a later stage.
And finally a short conclusion. This is an extremely useful and adaptable sensor and the eight examples above can be used in countless other places. Also, This sensor have several advantages including high reliability, long lifespan, and resistance to environmental factors like dirt, moisture, and vibration. It is desirable for a practical performance, instead of a thin plastic film as in my case, the plates should be sealed in epoxy resin, whereby practically the sensor will be perfectly protected from any mechanical and atmospheric influences.
#include <Capacitor.h> Capacitor cap1(7,A2); void setup() { Serial.begin(9600); pinMode(5, OUTPUT); } void loop() { Serial.println(cap1.Measure()); int sensorValue = analogRead(A0) / 8; delay(10); if (cap1.Measure() < sensorValue) { digitalWrite(5, HIGH); tone(10,500); delay(500); } else { digitalWrite(5, LOW); noTone(10); } }

DIY simple Capacitive Proximity sensor

Raspberry Pi 5 7 Inch Touch Screen IPS 1024x600 HD LCD HDMI-compatible Display for RPI 4B 3B+ OPI 5 AIDA64 PC Secondary Screen(Without Speaker)
BUY NOW
ESP32-S3 4.3inch Capacitive Touch Display Development Board, 800×480, 5-point Touch, 32-bit LX7 Dual-core Processor
BUY NOW
Raspberry Pi 5 7 Inch Touch Screen IPS 1024x600 HD LCD HDMI-compatible Display for RPI 4B 3B+ OPI 5 AIDA64 PC Secondary Screen(Without Speaker)
BUY NOW- Comments(0)
- Likes(0)

- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by Mirko Pavleski
-
Tug of War Arduino Game on WS2812 Led strip A Tug of War is a classic team-based game where two opposing teams compete to pull a rope in opposi...
-
DIY ESP32 Bioresonance Rife Machine with ZAPPER function Rife machine therapy is an alternative treatment developed by Dr. Royal Raymond Rife in the 1930s. H...
-
Arduino VFO Project with a Large LCD Display A Variable Frequency Oscillator (VFO) is an electronic oscillator whose output frequency can be adj...
-
Exploring the Tesla Coil Driver Board, Full Review & Test Results Some time ago I presented you a video in which I analyzed a super cheap Tesla Coil driver that cost...
-
Arduino Eatrthquake alarm and protection system with D7S seismic Sensor Earthquakes are extremely common events around the world. On average, there are fifty earthquakes a...
-
Review and Comparison of Three Inexpensive Metal Detector Kits A metal detector is a device used to detect the presence of metal objects in the ground or other ma...
-
Arduino 3D Printed self Balancing Cube Self-balancing devices are electronic devices that use sensors and motors to keep themselves balanc...
-
Arduino flame detector with alarms and automatic fire extinguishing A flame detector is an electronic device designed to sense the presence of flames or fire. There ar...
-
OpenWebRX - Simplest Rasprberry Pi + RTLSDR Web SDR Radio Software-Defined Radio is a radio communication system where components that have traditionally bee...
-
Colorful Arduino Tetris Game - WS2812B LED Matrix Tutorial Tetris is a puzzle video game created in 1985 by Alexey Pajitnov. Players manipulate falling geomet...
-
Ultra cheap Ultrasonic levitation Device - functionality and testing Ultrasonic levitation is phenomenon where objects are suspended in mid-air using the power of sound ...
-
DIY -Spirit PI- ESP32 + Smartphone Sensitive Metal Detector Pulse Induction (PI) metal detector operates on a principle based on sending short pulses of electr...
-
ESP32 Analog style VU meter with GC9A01 Round Dispalys + Peak Meters A typical VU meter measures audio signals and displays them with a visual indicator. In the classic...
-
Arduino two weel self Balancing Robot Self Balancing Robot is device that can balance itself from falling to the ground. Its function is ...
-
ELECROW CrowPanel ESP32 4.2” E-paper Wi-Fi Info-Dispaly Project An e-paper display (also known as an electronic paper display or E Ink display) is a type of screen...
-
ESP32 Fluid simulation on 16x16 Led Matrix Fluid simulation is a way of replicating the movement and behavior of liquids and gases in differen...
-
Simple GU50 VTTC Tesla Coil with MOT (25+cm Spark) Vacuum Tube Tesla Coils are a common choice for homebuilders for several practical reasons. At Soli...
-
Hourglass ESP8266 Code A hourglass, also known as an sand clock, is a device used to measure the passage of time. It consi...
-
Tug of War Arduino Game on WS2812 Led strip A Tug of War is a classic team-based game where two opposing teams compete to pull a rope in opposi...
-
DIY ESP32 Bioresonance Rife Machine with ZAPPER function Rife machine therapy is an alternative treatment developed by Dr. Royal Raymond Rife in the 1930s. H...
-
Arduino VFO Project with a Large LCD Display A Variable Frequency Oscillator (VFO) is an electronic oscillator whose output frequency can be adj...
-
Exploring the Tesla Coil Driver Board, Full Review & Test Results Some time ago I presented you a video in which I analyzed a super cheap Tesla Coil driver that cost...
-
Arduino Eatrthquake alarm and protection system with D7S seismic Sensor Earthquakes are extremely common events around the world. On average, there are fifty earthquakes a...
-
Review and Comparison of Three Inexpensive Metal Detector Kits A metal detector is a device used to detect the presence of metal objects in the ground or other ma...
-
Arduino 3D Printed self Balancing Cube Self-balancing devices are electronic devices that use sensors and motors to keep themselves balanc...
-
Arduino flame detector with alarms and automatic fire extinguishing A flame detector is an electronic device designed to sense the presence of flames or fire. There ar...
-
OpenWebRX - Simplest Rasprberry Pi + RTLSDR Web SDR Radio Software-Defined Radio is a radio communication system where components that have traditionally bee...
-
Colorful Arduino Tetris Game - WS2812B LED Matrix Tutorial Tetris is a puzzle video game created in 1985 by Alexey Pajitnov. Players manipulate falling geomet...
-
Ultra cheap Ultrasonic levitation Device - functionality and testing Ultrasonic levitation is phenomenon where objects are suspended in mid-air using the power of sound ...
-
DIY -Spirit PI- ESP32 + Smartphone Sensitive Metal Detector Pulse Induction (PI) metal detector operates on a principle based on sending short pulses of electr...
-
-
Commodore 64 1541-II 1581 Floppy Disk Drive C64 Power Supply Unit USB-C 5V 12V DIN connector 5.25
164 1 3 -
Easy to print simple stacking organizer with drawers
87 0 0 -
-
-
-
Modifying a Hotplate to a Reflow Solder Station
1137 1 6 -
MPL3115A2 Barometric Pressure, Altitude, and Temperature Sensor
638 0 1 -
-
Nintendo 64DD Replacement Shell
495 0 2 -
V2 Commodore AMIGA USB-C Power Sink Delivery High Efficiency Supply Triple Output 5V ±12V OLED display ATARI compatible shark 100W
1442 4 3