Proximity Sensor En: 두 판 사이의 차이

아두위키 : Arduwiki
(새 문서: d)
 
잔글편집 요약 없음
 
(같은 사용자의 중간 판 4개는 보이지 않습니다)
1번째 줄: 1번째 줄:
d
{{#seo:|title=Arduwiki : Arduino Proximity Sensor Guide|title_mode=append|keywords=Arduino, Information Science, Maker Learning, Performance Assessment, Proximity Sensor, Arduino Project, Capstone Project, Arduino Example Code|description=This introduces how to control a Proximity Sensor with Arduino (basic information, circuit, example code). It can be used in Information Science and Maker classes.}}
 
 
[[파일:금속근접센서.jpg|가운데|class=coders100]]
 
Inductive proximity sensors detect the presence or distance of metallic objects in a non-contact method. They are mainly used in automation equipment, robotics, and various industrial applications. And inductive proximity sensors operate based on the principle of detecting metallic objects using a magnetic field.
 
 
== '''Specifications''' ==
 
*'''Model Number''': LJ12A3-4-Z/BX
*'''Sensor Type''': Inductive Proximity Sensor
*'''Detection Distance''': 4mm
*'''Output Type''': NPN NO (Normally Open)
*'''Power Voltage''': DC 6-36V
*'''Sensing Size''': M12
*'''Cable Length''': Approximately 1.2m
*'''Operating Temperature Range''': -25°C to +70°C
*'''Response Time''': ≤2.5ms
 
 
== '''Features''' ==
 
*'''Non-contact Detection''': Can detect without contact with objects, resulting in no wear and a longer lifespan.
*'''High Durability''': Designed for use in various industrial environments.
*'''Easy Installation''': M12-sized cylindrical design makes installation easy.
*'''Metal Object Detection''': Can detect various metal objects such as iron, aluminum, and copper.
*'''Non-metal Object Detection Not Possible''': Inductive proximity sensors use a magnetic field to detect metal objects, so they cannot detect non-metal objects like plastic, wood, or glass. For detecting non-metal objects, other types of sensors such as capacitive proximity sensors should be used.
 
 
== '''Usage Examples''' ==
This is an example that displays the status on the serial monitor based on the detection of the metal proximity sensor and blinks the built-in LED on the Arduino.
 
The metal proximity sensor itself also has an LED that lights up when metal is detected.
 
 
=== Circuit Configuration ===
'''1.''' Connect the brown wire to the 5V pin of the Arduino.
 
'''2.''' Connect the blue wire of the sensor to the GND pin of the Arduino.
 
'''3.''' Connect the black wire of the sensor to a digital input pin of the Arduino (in this example, D2).
 
[[파일:금속근접센서 회로.jpg|가운데|class=coders100]]
 
=== Code ===
<syntaxhighlight lang="c++" line="1">
const int sensorPin = 2; // Connect the sensor's signal pin to D2.
const int ledPin = 13;  // Built-in LED Pin
 
void setup() {
  pinMode(sensorPin, INPUT_PULLUP); // Activate INPUT_PullUP Resistor
  pinMode(ledPin, OUTPUT);
  Serial.begin(9600);
}
 
void loop() {
  int sensorValue = digitalRead(sensorPin);
  Serial.println(sensorValue);
 
  if (sensorValue == LOW) {
    digitalWrite(ledPin, HIGH); // Turn on LED when object is detected
  } else {
    digitalWrite(ledPin, LOW); // Turn off LED when object is not detected
  }
 
  delay(100); // Wait for 0.1 second
}
</syntaxhighlight>
 
 
=== Execution Result ===
The LED lights up when a metallic object approaches within 4mm, while it does not react to non-metallic objects.
<div class="coders70">
<youtube> O3Qg4rYkYps </youtube>
</div>
 
 
 
=== Serial Monitor ===
When no metallic object is detected, the output is 1, and when detected, the output is 0.
[[파일:금속근접센서 시리얼모니터.jpg|가운데|class=coders100]]
 
== '''Application Areas''' ==
*'''Automated Equipment''': Detects the position or presence of objects to perform automated tasks.
*'''Robotics''': Used for position detection and obstacle avoidance systems in robots.
*'''Industrial Machinery''': Used to detect and control the operating status of machines.
*'''Logistics Systems''': Detects and controls the flow of objects in logistics conveyor systems.
 
 
== '''Purchase Link''' ==
[https://gongzipsa.com/shop/1716983580 GONGZIPSA]

2024년 8월 9일 (금) 15:35 기준 최신판


Inductive proximity sensors detect the presence or distance of metallic objects in a non-contact method. They are mainly used in automation equipment, robotics, and various industrial applications. And inductive proximity sensors operate based on the principle of detecting metallic objects using a magnetic field.


Specifications

  • Model Number: LJ12A3-4-Z/BX
  • Sensor Type: Inductive Proximity Sensor
  • Detection Distance: 4mm
  • Output Type: NPN NO (Normally Open)
  • Power Voltage: DC 6-36V
  • Sensing Size: M12
  • Cable Length: Approximately 1.2m
  • Operating Temperature Range: -25°C to +70°C
  • Response Time: ≤2.5ms


Features

  • Non-contact Detection: Can detect without contact with objects, resulting in no wear and a longer lifespan.
  • High Durability: Designed for use in various industrial environments.
  • Easy Installation: M12-sized cylindrical design makes installation easy.
  • Metal Object Detection: Can detect various metal objects such as iron, aluminum, and copper.
  • Non-metal Object Detection Not Possible: Inductive proximity sensors use a magnetic field to detect metal objects, so they cannot detect non-metal objects like plastic, wood, or glass. For detecting non-metal objects, other types of sensors such as capacitive proximity sensors should be used.


Usage Examples

This is an example that displays the status on the serial monitor based on the detection of the metal proximity sensor and blinks the built-in LED on the Arduino.

The metal proximity sensor itself also has an LED that lights up when metal is detected.


Circuit Configuration

1. Connect the brown wire to the 5V pin of the Arduino.

2. Connect the blue wire of the sensor to the GND pin of the Arduino.

3. Connect the black wire of the sensor to a digital input pin of the Arduino (in this example, D2).

Code

const int sensorPin = 2; // Connect the sensor's signal pin to D2.
const int ledPin = 13;   // Built-in LED Pin

void setup() {
  pinMode(sensorPin, INPUT_PULLUP); // Activate INPUT_PullUP Resistor
  pinMode(ledPin, OUTPUT);
  Serial.begin(9600);
}

void loop() {
  int sensorValue = digitalRead(sensorPin);
  Serial.println(sensorValue);

  if (sensorValue == LOW) {
    digitalWrite(ledPin, HIGH); // Turn on LED when object is detected
  } else {
    digitalWrite(ledPin, LOW); // Turn off LED when object is not detected
  }

  delay(100); // Wait for 0.1 second
}


Execution Result

The LED lights up when a metallic object approaches within 4mm, while it does not react to non-metallic objects.


Serial Monitor

When no metallic object is detected, the output is 1, and when detected, the output is 0.

Application Areas

  • Automated Equipment: Detects the position or presence of objects to perform automated tasks.
  • Robotics: Used for position detection and obstacle avoidance systems in robots.
  • Industrial Machinery: Used to detect and control the operating status of machines.
  • Logistics Systems: Detects and controls the flow of objects in logistics conveyor systems.


Purchase Link

GONGZIPSA