Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:examples:sensor:ir_passive [2015/12/16 10:38] – created raivo.sellen:examples:sensor:ir_passive [2020/07/20 09:00] (current) – external edit 127.0.0.1
Line 1: Line 1:
-~~PB~~+<pagebreak>
 ====== Passive infrared sensor (PIR) ====== ====== Passive infrared sensor (PIR) ======
  
-//Vajalikud teadmised:  +//Necessary knowledge:  
-[HW] [[et:hardware:homelab:digi]], [HW] [[et:hardware:homelab:combo]], \\ +[HW] [[en:hardware:homelab:digi]], [HW] [[en:hardware:homelab:combo]], \\ 
-[AVR] [[et:avr:io]],  +[AVR] [[en:avr:io]],  
-[LIB] [[et:software:homelab:library:pin]]//+[LIB] [[en:software:homelab:library:pin]]//
  
-===== Teooria =====+===== Theory =====
  
-[{{ :examples:sensor:pir:pir.jpg?200|PIR andur}}] +[{{ :examples:sensor:pir:pir.jpg?200|PIR sensor}}] 
-Passiivne infrapunaandur (inglise keeles //passive infrared sensor//, lühend PIRmõõdab vaateväljas olevate objektidelt eralduvat infrapunakiirgustKõik kehad, mille temperatuur on kõrgem absoluutsest nullist eraldavad soojust, mis avaldub tavaliselt infrapunakiirgusenaInfrapunakiirgust inimese silm küll ei näe, kuid selleks spetsiaalselt ehitatud anduritega on võimalik infrapunakiirgust mõõtaAnduri muudab passiivseks see, et andur ise ei eralda mõõtmiseks kiirgust vaid tegeleb ainult mõõtmisega.+Passive infrared sensor measures infrared (IRradiation from objects in it's field of viewAll objects emit some low level radiationThe hotter something is the more radiation is emittedHuman eye is not capable to see IR radiation, but it's possible to use special cameras and sensors to detect it.  
 +The sensor is called passive because it doesn't emit light to get measurements. The sensor in PIR is actually split into two parts. The reason for that is to measure motion. Two parts of sensor are wired up in a way that they cancel each other out. If one detects more or less IR radiation than the otherthe output will swing high or low 
  
-Enamlevinud kasutus on PIR anduri baasil töötavad elusolendi liikumise tuvastusandurid, mida nimetatakse ka liikumisdetektoriteks (inglise keeles //passive infrared detector//, lühend PID).+PIR sensor is mostly used for detecting living being movement and thus is generally known as passive infrared detector (PID). The sensor is also sensitive enough to even detect IR radiation source movement while the object is already in it's field of view.
  
-PID koosneb tavaliselt kolmest komponendist:  +PID usually consists from three components:  
-  * passiivne infrapunaandur (PIR) +  * passive infrared sensor (PIR) 
-  * optika infrapuna kiirguse koondamiseks andurile +  * lens for directing radiation to the sensor 
-  * juhtelektroonika+  * control circuit
  
-PIR andur on piisavalt tundlik, et tuvastada mitte ainult soojuskiirguse muutust vaid registreerib ka sellele, kui soojusallikas vaateväljas liigub+[{{ :examples:sensor:pir_sensor.jpg?200|PID - motion detector}}]
  
-[{{ :examples:sensor:pir_sensor.jpg?200|PID - liikumisdetektor}}]+===== Practice =====
  
-===== Praktika =====+PID sensors output is usually simple digital signal. If the sensor has detected something then it usually outputs high impulse which stays high for a given time period (the time might be adjustable). This gives the sensor capability to switch a relay or be used as an input for microcontroller. These devices can turn on a light or be used as a part of alarm system.
  
-PID andurite ehk detektorite väljundsignaal on üldjuhul lihtne digitaalsignaal, kus tüüpiliselt väljastab andur soojusallika tuvastamisel kõrge impulsiSelle impulsi alusel on võimalik läbi relee lülitada ruumi valgust või on anduri väljund ühendatud kontrolleriga, mis vastavalt olukorrale lülitab lampe või tekitab alarmi (kui andurit kasutatakse nt vargavastase alarmi osana).+Using the detector with a microcontroller is not much different from reading a regular push button switch. PID can be connected to digital or analog input. Be sure to check the pinout of the detector before connecting it to microcontrollerIt is especially important to not mix up power and ground pins cause failure to do so usually ends up in breaking the detector.
  
-Detektori kasutamine kontrolleriga tähendab sisuliselt, et anduri lugemine ei erine palju tavalise lüliti lugemisestDetektori lugemiseks tuleks see ühendada mõne kontrolleri digitaal- või ka analoogsisendigaDetektori ühendamise puhul on oluline jälgida viikude paigutustNeed võivad detektoritel erineda ja on oluline, et toide oleks detektoril ikka toite viikudega ja signaal signaaliviikudega ühendatud. +On Robotic HomeLab III the detector has to be connected to Combo module encoder input if the sensor requires 5V power or analog/digital input of choice if voltage requirement is 3.3VBe sure to check the sensor voltage rating before connectingIf the 5V encoder input is used then the external power source has to be connected on the Controller module
- +<pagebreak>
-Kodulabor III puhul tuleb detektor ühendada Kombomooduli koodrite sisendisse, kuna detektor vajab töötamiseks 5 V sisendpinget. Detektori kasutamisel koodri sisendis tuleb jälgida, et oleks ühendatud ka Kodulabori väline toiteallikas+
-~~PB~~+
 <code c> <code c>
-// Kodulabori PID anduri (detektorinäidisprogramm+// Robotic HomeLab PID sensor (detectorexample program
 #include <homelab/pin.h> #include <homelab/pin.h>
  
-// Detektori sisendviigu defineerimine +// Detector input pin define 
-// Kodulabor II+// Homelab II
 //pin pir_pin = PIN(F, 0); //pin pir_pin = PIN(F, 0);
-// Kodulabor III+// Homelab III
 pin pir_pin = PIN(C, 4); pin pir_pin = PIN(C, 4);
    
-// Põhiprogramm+// Main program
 int main(void) int main(void)
 { {
-  // LED-i viikude väljundiks seadmine+  // Setting LED pins to output
   pin_setup_output(led_green);   pin_setup_output(led_green);
   pin_setup_output(led_red);   pin_setup_output(led_red);
-  // Detektori signaaliviigu sisendiks seadmine+  // Setting detector pin as input
   pin_setup_input(pir_pin);   pin_setup_input(pir_pin);
    
-  // Lõputu tsükkel+  // Endless loop
   while (1)   while (1)
   {   {
-    // Kui detektor ei ole rakendunud põleb roheline LED +    // If the sensor has not detected anything then the green LED is on 
-    // Kui detektor rakendub, süttib punane+    // If something is detected then the RED led turns on
     if(pin_get_value(pir_pin) == 0)     if(pin_get_value(pir_pin) == 0)
     {     {
en/examples/sensor/ir_passive.1450262326.txt.gz · Last modified: 2020/07/20 09:00 (external edit)
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0