Capacitive sensor

capacitive sensor not detecting plastic

Hi, @tyenx
Welcome to the forum.

Can you please post a link to data/specs of the sensor?

Tom... :smiley: :+1: :coffee: :australia:

Product Name : Capacitive Proximity Switch;
el : LJC18A3-H-Z/BY;
Wire Type : DC 3 Wire Type (Brown, Black, Blue);
Switch Appearance Type : Cylinder Type
Theory : Capacitance Sensor;
Output Type : PNP NO(Normal Open);
Diameter of Head : 18mm;
Detecting Distance : 1-10mm
Detecting Object : Metal or Nonmetal Material;
Supply Voltage : DC 6-36V;
Current Output : 300mA;
Response Frequency : 100Hz
Operating Temperature : -255°C to +655°C (Non-freezing Condition);
Cable Length : 120cm/47";
External Material : Plastic, Alloy
Net Weight : 85g;
Color : Sier Tone, Yellow, Gray;

Hi,
How have you got it wired?

Can we please have a circuit diagram?
An image of a hand drawn schematic will be fine, include ALL power supplies, component names and pin labels.
What voltage are you powering the sensor with?

Can you please post your test code?
image

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

if(indValue>=10){
Serial.println("Plastic Detected");
Pipe_Pos=Pipe_Servo.read();//Read the last value given to Pipe servo
Gate_Pos=Gate_Servo.read();//Read the last value given to Pipe servo
Serial.println("Motor_PIPE Position");
Serial.println(Pipe_Pos);
Serial.println("Motor_GATE Position");
Serial.println(Gate_Pos);

Serial.println("Motor to Plastic bin");

sensor pin A0

Hi,
Sorry we need all the code.
Forget abut the servo and write code that just gets the signal from the sensor and puts the results on the IDE monitor?
Can we please have a circuit diagram?
We need to see how you connected the sensor?
What model Arduino are you using?

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

To add code please click this link;

Right, you need a different sensor type for detecting plastic.

Or you detect an object by e.g. a light barrier and then use the capacitive sensor to distinguish plastic from other (metal...) objects.

Hi,

Product Name : Capacitive Proximity Switch;
el : LJC18A3-H-Z/BY;
Wire Type : DC 3 Wire Type (Brown, Black, Blue);
Switch Appearance Type : Cylinder Type
Theory : Capacitance Sensor;
Output Type : PNP NO(Normal Open);
Diameter of Head : 18mm;
Detecting Distance : 1-10mm
Detecting Object : Metal or Nonmetal Material;
Supply Voltage : DC 6-36V;
Current Output : 300mA;
Response Frequency : 100Hz
Operating Temperature : -255°C to +655°C (Non-freezing Condition);
Cable Length : 120cm/47";
External Material : Plastic, Alloy
Net Weight : 85g;
Color : Sier Tone, Yellow, Gray;

The key here is "Nonmetal Material"

We need to see how @tyenx has wired and coded for the sensor.
PNP NO output would require a pull down resistor, and depending on what power supply the sensor is using and what Arduino, a potential divider as the pull down.

The sensor pictured in post #1 is not the sensor in post #4.

Tom.... :smiley: :+1: :coffee: :australia:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.