진동 검출 센서 -SW-420
(Vibration Detection Sensor -SW-420)
개요
- 본 제품은 진동 센서 스위치입니다.
- 보드상의 포텐셔미터를 이용하여 진동 감도를 조절할 수 있으며, 진동이 발생시에는 아래와 같이 동작합니다.
- 모듈이 진동을 감지 하지 않을시에는 스위치가 닫혀있는 상태이며, 출력은 LOW를 출력하고 초록색 LED가 점등됩니다.
- 모듈이 진동을 감지하면, 스위치를 순간적으로 오픈하며, 출력은 HIGH로 출력하고, 초록색 LED는 off됩니다.
- 디지털 출력은 아두이노와 같은 마이크로컨트롤러에 바로 연결할 수 있으며, HIGH/LOW로 진동을 검출할 수 있습니다.
- 디지털 출력 레벨은 입력전압과 거의 비슷합니다.
- 알림: 전원을 역극으로 입력시에 칩이 손상됩니다.
특징
- Normally closed type vibration sensor SW-420.
The comparator output, signal clean, good waveform, driving ability is strong, for more than 15 mA.
Has a fixed bolt hole, convenient installation.
Use the LM393 wide voltage comparator.
Model: SW-420
Type: Normally closed
Working voltage: 3.3V to 5V
Output form: Digital switch output (0 and 1)
Size: 32 x 14mm / 1.26" x 0.55"
문서
/* Vibration sensor connected to Arduino pins as follows: Arduino Vibration Sensor D9 DOut GND GND +5V VCC D13 Indication LED */ int ledPin = 13; int EP =9; void setup(){ pinMode(ledPin, OUTPUT); pinMode(EP, INPUT); //set EP input for measurment Serial.begin(9600); //init serial 9600 Serial.println("----------------------Vibration demo------------------------"); } void loop(){ long measurement =TP_init(); delay(50); Serial.print("measurment = "); Serial.println(measurement); if (measurement > 1000){ digitalWrite(ledPin, HIGH); } else{ digitalWrite(ledPin, LOW); } } long TP_init(){ delay(10); long measurement=pulseIn (EP, HIGH); //wait for the pin to get HIGH and returns measurement return measurement; }
연관제품
- 연관제품 1