Detecting plastic and glass using capacitive sensor

I want to detect plastic and glass by capacitive sensor based on the dielectric strength of plastic and glass. After detection of material , a counter must count the glass and plastic separately and giving some value it and should display on screen. I need wire diagram for connecting capacitive sensor and also arduino code for it .

Thanks in advance

Glass and plastics being non-conductive makes them very hard to detect - you'll have to develop a very sensitive sensor, and make sure no other environmental factors (like a person being near the sensor) changing the field more than the object you try to detect.

The Theremin shows off nicely how sensitive capacitive sensors can be to conductive objects like your hands - now try to play using glass or plastic objects (while keeping your hands far far away) to get a feel for how well you can detect the presence of those materials.

jamipj: I need wire diagram for connecting capacitive sensor and also arduino code for it .

This should get you started.

To measure the dielectric constant you need samples of precise geometry sandwiched between parallel plates
without any gap. So unless you are trying to tell the difference between sheets of identical thickness this
idea doesn’t wash - otherwise you are measuring a complex function of sample thickness, shape and
dielectric constant.

The reason capacitive touch sensors can work at all is because water’s dielectric constant is way higher
than most materials (80 or so), making the detection much easier.