4MM Inductive Metal Proximity Sensor
Description¶
Metal Proximity Sensor, which is also called non-contact proximity switch, it is composed of generator and shaping amplifier oscillator vibration in the switch after induction head, and produces an alternating magnetic field when the metal body detected.
This Inductive Proximity Sensor has high sensitivity, fast frequency response, high repeat positioning accuracy and also stability and reliable, it can detects metal components in 0~4mm distance, and is widely used in modern industry, such as machinery, metallurgy, transportation, electric power, military industry and so on.
Model:SPM0409IP
Specification¶
- Working Voltage:DC 6~36V;
- Probe Demension: 12mm diameter;
- Sensoring Distance: 0~4mm
- Output signal: Low
Usage¶
1.Hardware Connection
2.Copy the below code to you new skecth,then upload it.
const int ledpin=5;
const int Sensor = 4;
void setup()
{
pinMode(ledpin,OUTPUT);
pinMode(Sensor,INPUT);
}
void loop()
{
if(digitalRead(Sensor))
{
digitalWrite(ledpin,LOW);
}
else{
digitalWrite(ledpin,HIGH);
}
}
3.The LED will light up when a metal gets closed to the metal proximity sensor(0-4mm).