Line 46: Line 46:
  
 
[[File:0PIR sensor.jpg|none]]
 
[[File:0PIR sensor.jpg|none]]
 +
{[DISQUS}}

Revision as of 10:37, 16 April 2016

In this tutorial we will see something interesting sensor which tells your presence in the room, automatic door in elevator and shopping malls, automatic lighting system, washroom amenities. Let's see in this tutorial how this sensor basically works?

Basics

This in expensive sensor allow you to sense the motion and it detects the presence of human being or heat emitting body in its proximity. These are named as Pyroelectric sensor or Passive Infrared (PIR) sensor. Pyroelectricity means heat which generates the electricity. PIR sensors are passive sensor, which means they are not generates infrared energy but they detect the heat energy which is given by other heat emitted body in the form of radiation. The sensor is split into two halves, one detects more or less infrared and turned out into high or low signal. Along with Infrared sensor it consist bunch of other circuit. See below images for reference.

PIR Sensor naming.png

The plastic window is covered on infrared sensor have multiple facets molded into it to focus the infrared energy onto the sensor. These each individual facets are called Fresnel lens.

Let us know about 3 important settings for PIR sensor in detail.

  • Re-triggering setting
  • Sensitivity adjustment
  • Delay time adjust

Re-triggering setting

As you can see the Re-triggering section has three SMD pads. PIR sensor has to to connect one of the state to work. Few PIR sensor modules comes with through hole male pin headers and it is shorted with one of the states either it is in non re-triggering mode or re-triggering mode. We could see the two status High(H) and Low(L) on board. In our case it is default connected to H. The 'L' mode setting behaves erratic, when we move in front of sensor output pin goes high and low again. This is called 'non re-triggering mode'. In 'H' mode setting when we move in infrared proximity the output pin of the sensor will go high. This is called 'Non re-triggering mode' In 'H' mode setting when we move in infrared proximity the output pin of the sensor will go high. This is called 'Re-triggering mode'. This mode of setting is widely used setting.

Sensitivity adjustment

The potentiometer is provided for sensitivity adjustment. Here adjustment of the sensitivity is completely depends on you that how much sensitivity do you want. In case if we increase the potentiometer the sensitivity of the sensor become very sensitive. In this case sensor would detect the motion for movement of our fingers. In case if we dcrease the potentiometer the sensitivity of the sensor become less. In this case sensor would detect the motion for waving my both hand in its proximity.

Delay time adjust

The 'delay time' determines the how much time the output pin of the sensor will keep it high when motion has been detect. The range od the delay time of the sensor become few seconds to few minutes. In our case it become 2 seconds to 200 seconds. Note : For first time of testing the PIR sensor keep delay time less .

PIR Testing

We can able to test the PIR without interfacing with Atmega128. For this we required set of batteries,LED,470E resistor and few wires. See the below image for rig up the circuit.

PIR basic interface bb.png

The above LED will glow when motion is detected and it will turn off when there is no motion.

HookUp

PIR sensor with Atmega128.png


Code

Demo

</div>

0PIR sensor.jpg

{[DISQUS}}