# Material Sensor

#### kingofjong

##### Member
Hello

I was wondering is their a sensor that can sense different materials?
For example a sensor that can tell the difference between plastic, glass, stone, metal, and etc.

Thanks

Yes.

#### dknguyen

##### Well-Known Member
Not one as general, as compact, as simple, or as cheap as I imagine you are looking for.

#### gophert

##### Active Member
Not one as general, as compact, as simple, or as cheap as I imagine you are looking for.
Cheap and compact? The OP said absolutely nothing about cheap or compact. Price of this type of sensor, from my point of view, depends on where in the world he wants the sensor. Humans are likely the best sensors for differentiating all of those materials and pay is under $1/hr in some countries. Do you have something cheaper? Better, even more expensive and less compact? #### dknguyen ##### Well-Known Member Cheap and compact? The OP said absolutely nothing about cheap or compact. Price of this type of sensor, from my point of view, depends on where in the world he wants the sensor. Humans are likely the best sensors for differentiating all of those materials and pay is under$1/hr in some countries. Do you have something cheaper? Better, even more expensive and less compact?
Vague general questions warrant vague general answers. With the way the OP wrote their post, I can't help but assume that what they have in mind is a single-element tricorder like sensor.

#### gophert

##### Active Member
Vague general questions warrant vague general answers. With the way the OP wrote their post, I can't help but assume that what they have in mind is a single-element tricorder like sensor.
I would never assume a tricorder would be cheap. I don't think anyone else would either.

#### dknguyen

##### Well-Known Member
I would never assume a tricorder would be cheap. I don't think anyone else would either.
That's why you don't ask for the tricorder, just the sensor it uses so you can build your own

#### rjenkinsgb

##### Active Member
These are about as near as you can get to a "tricorder" in a handheld unit at present:
https://www.consumerphysics.com/

I got one through their Kickstarter project. It does work quite well, but with some materials (eg.. transparent / translucent plastics) any pigment seems to be picked up rather than the base material.

It's not in the same class as a mass spectrometer; but not the same price or size either..

#### kingofjong

##### Member
I am thinking about attaching the sensor to an Arduino or a microcontroller. Is there any material sensors that you attach to an Arduino?

#### dknguyen

##### Well-Known Member
I am thinking about attaching the sensor to an Arduino or a microcontroller. Is there any material sensors that you attach to an Arduino?
No. Detecting different kinds of materials that are so varied would require a system of sensors and is highly dependent on what physical shape or form those materials are going to be in. What are you trying to do?

#### kingofjong

##### Member
I am trying to do recognize different objects using sensors.

#### dknguyen

##### Well-Known Member
I am trying to do recognize different objects using sensors.
That provides us no information. WHY are you trying to recognize different objects? What are you using it for?

#### kingofjong

##### Member
This is for a self project. I am trying to recognize the objects by identifying the materials that make it up. hence I was wondering if there is a sensor that senses materials and if it can be interfaced with the Arduino. For example a capacitive sensor can detect glass, plastic, wood, and more. But I can't find any tutorials on how to interface it with the Arduino. Only tutorials on google show how to interface capacitive touch sensor.

#### dknguyen

##### Well-Known Member
If this is just a general exercise, then you will have to narrow your focus a bit. The reason what you are using it for is important is because the shape and form of the material matters quite a bit. Whether the shape or form is predictable or unpredictable, whether it's thin or thick, whether you can or can't make physical contact with it, whether you can take a small sample of it, etc.

You will need more than one sensor to cover your bases and if you've narrowed your focus to capacitive sensors for non-conductive materials then that's a good start. I'll try and find something for you later this weekend.

Last edited:

#### dknguyen

##### Well-Known Member
So this is the reason I was asking you what you were wanting to use it for. For the capacitive sensor to properly identify the material, it needs to know how far it is away from the material and the thickness of the material placed between it (or it needs to know how far apart the opposing elements are and the material needs to completely fill in the gap between the elements).

The target also has to be big enough to eclipse the sensor but that's probably not as big of an issue as the thickness issue above. Physical form of what you are expecting to test matters.

http://www.lionprecision.com/tech-library/technotes/cap-0020-sensor-theory.html

#### dknguyen

##### Well-Known Member
Have you seen this:
https://playground.arduino.cc/Main/CapacitiveSensor?from=Main.CapSense

If you want to build one "from scratch" though then look at this:

Start out with a circuit that can measure just a regular capacitor. You can always replace the capacitor later with actual sensing platess. The main thing you need from the Arduino is an input capture pin to determine how long the cap takes to discharge. Find arduino code to set up an input capture.

The signal conditioning circuitry that you need is:
1. a pin to charge up the capacitor (either directly from the pin itself or the pin can control a transistor that connects the capacitor to the power supply. If driving directly from the pin, then pin needs to be able to go high impedance so it can disconnect from the capacitor for measurement.
2. a comparator that measures the voltage across the parallel capacitor-resistor and sends a signal to a second input capture pin when the voltage falls too low. Do you know enough for a circuit like this? Or do I need to draw one out for you? It's pretty simple.

Last edited: