[mircemk] shows how to create a simple non-contact proximity sensor using little more than an Arduino Nano board, and a convenient software library intended to measure the value of capacitors.
The basic idea is that it’s possible to measure a capacitor’s capacitance using two microcontroller pins and the right software, so by using a few materials to create an open-style capacitor, one can monitor it for changes and detect when anything approaches enough to alter its values past a given threshold, creating a proximity sensor.
The sensor shown here is essentially two plates mounted side-by-side, attached to an Arduino Nano using the Capacitor library which uses just two pins, one digital and one analog.
As configured, [mircemk]’s sensor measures roughly thirty picofarads, and that value decreases when approached by something with a dielectric constant that is different enough from the air surrounding the sensor. The sensor ignores wood and plastic, but an approaching hand is easily detected. The sensor also detects liquid water with similar ease, either in the form of pooled liquid, or filled bottles.
We’ve also seen a spring elegantly used as a hidden touch sensor that works through an enclosure’s wall by using similar principles, so the next time you need a proximity or touch-sensitive sensor in a project, reaching for the junk box might get you where you need to go. Watch [mircemk]’s sensor in action in the video, just below the page break.
Continue reading “A DIY Proximity Sensor, Using Just Scrap Parts And Software”