Kompakti PIR-liiketunnistin helppoon havaitsemiseen pienissä projekteissa.
SKU: OT2047-B81 Tuotenumero: NB111 EAN: 4765791479546 Sijainti: B08.01
Vaihtoehto
PIR-anturi HC-SR501 liiketunnistin
€ 2,00
Katso tämä vaihtoehto
Näin kytket Mini PIR pyroelektrinen infrapuna-liiketunnistin:n Arduino UNOon tai ESP32:een, mukana esimerkkisketsi, jonka voit ladata heti.
Tämä projekti havaitsee liikettä Mini PIR -anturilla ja ohjaa Arduinoon sisäänrakennettua LEDiä. Kun liikettä havaitaan, LED syttyy ja ilmoitus tulostetaan Serial Monitoriin. Anna anturille lyhyt lämpenemisaika virran kytkemisen jälkeen, jotta se ehtii vakiintua.
/*
* ==================================================================
* Generated by Codey.online — https://www.codey.online
* ==================================================================
* Project : Mini PIR Motion Detector
* Board : Arduino UNO (arduino:avr:uno)
* Parts : Mini PIR
* Libraries : none (built-in)
*
* Codey Online is an AI-powered browser IDE for Arduino and ESP32.
* Describe your project and Codey writes the code, draws the wiring
* diagram and uploads it to your board, straight from the browser.
* This code is free to use, modify and share, without warranty.
* ==================================================================
*/
// Pin definitions
const int pirPin = 2;
const int ledPin = 13;
void setup() {
pinMode(pirPin, INPUT);
pinMode(ledPin, OUTPUT);
Serial.begin(115200);
Serial.println(F("Mini PIR Sensor Initializing..."));
Serial.println(F("Waiting 5 seconds for sensor to settle..."));
delay(5000);
Serial.println(F("Ready! Monitoring for motion..."));
}
void loop() {
int motionDetected = digitalRead(pirPin);
if (motionDetected == HIGH) {
digitalWrite(ledPin, HIGH);
Serial.println(F("Motion detected!"));
} else {
digitalWrite(ledPin, LOW);
Serial.println(F("Scanning... No motion."));
}
delay(300);
}
Wiring diagram and example code generated by Codey.online — https://www.codey.online
Tämä projekti havaitsee ihmisen liikkeen Mini PIR -liiketunnistimella. Kun liikettä havaitaan, ESP32 sytyttää onboard LEDin (GPIO 2) ja kirjaa viestin Serial Monitoriin. Anturin syöttäminen 3.3V:lla varmistaa turvalliset signaalitasot ESP32:n tulolle.
/*
* ==================================================================
* Generated by Codey.online — https://www.codey.online
* ==================================================================
* Project : Mini PIR Motion Detector with ESP32
* Board : ESP32 DEVKIT V1 (esp32:esp32:esp32doit-devkit-v1)
* Parts : Mini PIR
* Libraries : none (built-in)
*
* Codey Online is an AI-powered browser IDE for Arduino and ESP32.
* Describe your project and Codey writes the code, draws the wiring
* diagram and uploads it to your board, straight from the browser.
* This code is free to use, modify and share, without warranty.
* ==================================================================
*/
// Mini PIR Motion Detection with ESP32
const int PIR_PIN = 13; // Connected to Mini PIR OUT
const int LED_PIN = 2; // ESP32 onboard LED
int lastState = LOW;
void setup() {
Serial.begin(115200);
pinMode(PIR_PIN, INPUT);
pinMode(LED_PIN, OUTPUT);
digitalWrite(LED_PIN, LOW);
Serial.println("PIR Sensor Initializing... Please wait 10-30s for sensor warm-up.");
}
void loop() {
int currentState = digitalRead(PIR_PIN);
if (currentState != lastState) {
lastState = currentState;
if (currentState == HIGH) {
digitalWrite(LED_PIN, HIGH);
Serial.println("Motion detected!");
} else {
digitalWrite(LED_PIN, LOW);
Serial.println("Motion ended.");
}
}
delay(50);
}
Wiring diagram and example code generated by Codey.online — https://www.codey.online
Tavallisen PIR-anturin pikkuveli, jonka pään halkaisija on vain 1,1cm
Pinnejä:
- Vin (merkitty "+" ja/tai "U1")
- Out (keskimmäinen pinni)
- GND/ground/min (merkitty "-" ja/tai "C1")
Mitat
Pituus: 2,8cm
Leveys: 1,4cm
Korkeus: 1,4cm
| Leveys | 1,4 cm |
|---|---|
| Käyttölämpötila | -20°C - +60°C |
| Tulojännite | DC 2.7-12V |
| Lähtöjännite | High 3.3 V /Low 0V |
| Pituus | 2,8 cm |
| Halkaisija | 1,1 cm |
| Korkeus | 1,4cm |
| PCB:n mitat | 10mm*8mm |
| Lepopiiri | <100uA |
| Tunnistusetäisyys | 3 m |
| Viiveaika | noin 2 sekuntia (± 30% poikkeama) |
| Kokonaismitat | 12mm*27mm |
| Anturin kulma | <100° |
| Linssityyppi | Pieni |
Lähetys on todella heikko, kaksi metriä
Huippu.......
Toimii hyvin, mutta joskus havaitsee olemattoman liikkeen
Toimii hyvin. Kohtalainen tunnistusalue, joten hyvä projektiin mutta vähemmän hyvä oikeaan ratkaisuun.
Etkö ole tyytyväinen? Sinulla on 30 päivää aikaa vastaanotosta palauttaa tuote.
Kaikki palautuksista
Mini PIR pyroelektrinen infrapuna-liiketunnistin