Tutorials


PIR Motion Detector


Presented schematic shows how to build simple PIR motion detector sensor. PIR sensors allow you to sense motion, almost always used to detect whether a human has moved in or out of the sensors range. They are small, inexpensive, low-power, easy to use and don't wear out. For that reason they are commonly found in appliances and gadgets used in homes or businesses. They are often referred to as PIR, "Passive Infrared", "Pyroelectric", or "IR motion" sensors. PIRs are basically made of a pyroelectric sensor (which you can see above as the round metal can with a rectangular crystal in the center), which can detect levels of infrared radiation. Everything emits some low level radiation, and the hotter something is, the more radiation is emitted. The sensor in a motion detector is actually split in two halves. The reason for that is that we are looking to detect motion (change) not average IR levels. The two halves are wired up so that they cancel each other out. If one half sees more or less IR radiation than the other, the output will swing high or low.


How to Use IR Sensor


IR Transmitter will always transmit IR light (Infrared), it is not visible to human eyes. Since the transmitter and receiver is being arrange side by side, theoretically, the receiver should not receive any or in most cases, it will receive small amount of infrared emitted by the IR transmitter. The working concept of IR receiver is similar to transistor or LDR (Light Dependent Resistor). Just imagine this. Referring to above diagram, the IR Receiver is like a transistor with the ‘base’ controlled by the IR light received. When there is no IR light receive, the ‘collector’ of transistor does not allow current to sink to ‘emitter’ further to ground of circuit. It is like very high resistance from ‘collector’ to ‘emitter’, blocking current going to ground. In this case, the voltage at SENSOR1 node will be high, near to 5V.
When the IR receiver receives more IR light, it changes the resistance at ‘collector’ and allow more current to sink to ground, and this is similar to low resistance at the lower part of the circuit. So if you know the voltage divider formula, I guess you understand what will happen, the voltage at SENSOR1 will drop.
We utilize this voltage changes to IR light to “know” whether there is obstacle or not. Because when there is obstacle, IR light get  reflected to IR receiver further changes the voltage, monitoring the voltage changes will get you an obstacle detection sensor