Only the paper can read the sensor not the plastic.. Do we need to double our sensor to detect the plastic and paper? Or can capacitive sensor detect both apart? Can also ask what code should we use to execute this project..
Do you think that maybe it would be a good idea to provide more information on your project?
The more information you can provide, the more likely you are to get suggestions that will ultimately make your project a success.
You will not detect "paper or plastic" with one or two sensors, unless the sensor(s) is a human. No code needed.
Stating the obvious, for something to be detectable, it has to have a property that makes it detectable.
Ferrous metals, for example.
I can't think of anything about paper or plastic that distinguishes them apart from how you would tell them apart.
Paper tears, it's absorbent, it's lightweight, it burns, it's organic. Dropping oil on paper certainly leaves a distinguishing mark that looks more transparent.
You need to think about how you tell them apart.
If this is a classroom assignment, the instructor may be trying to teach the students to actually think, rather than posting on a forum asking for the solution.
-
Paper conducts electricity when wet, plastic does not.
-
How big are these ?
Another line of thought, without answers, is think about how rubbish is sorted in recycling centres.
If you come up with a solution, you might be rich one day.
A sensor is one thing, getting it to work reliably is something else.
technically you can use a camera and an image classification model, but that would require either a: computer running at all times to take the load off the microcontroller for image classification (you could use pyserial to detect when a certain serial input is given, then it runs the image classification and returns the result back to the microcontroller) or a microcontroller with more processing power like an esp32 or raspberry pi
it doesn't count as a sensor per se but it should work
Paper and plastic are separated without the use of any sensors. The one I saw used air currents that blew the paper over a wall while the plastic fell through.
Probably need to divide by 100 at some point, so that idea is out.
Apply a static charge to all the items. The ones that retain a stronger charge are probably plastic of some kind. Now there's a new complexity: what kind of paper, and what kind of plastic? Is plasticized paper categorized as paper or plastic?
That's the point. Many papers are polymer coated or laminated. It's not easy to distinguish paper from plastic.
I have noticed this year that nearly all the advertisements that come in the mail are now printed on plastic rather than paper. The demise of paper printing and use is becoming more expensive than using plastic.