Published:2013/8/29 1:19:00 Author:lynne | Keyword: PIC12F675 Microcontroller Based Security Alarm Circuit | From:SeekIC
The output of the PIR sensor module (PIR1) is monitored through GP5 (pin 2) of PIC12F675. PIC12F675 is an 8-Pin Flash-Based 8-Bit CMOS Microcontroller. Note that,here the PIC12F675 microcontroller uses the internal clock oscillator at 4.0 MHz. When the motion is sensed, this output is high at about 3.3 V . You could still use this voltage as a valid logic high for IC1 by changing the code , but It is preferred to use this voltage to drive the base of a BC547 transistor (T1) so that at the collector we will have the full swing of the logic voltages.
When power supply is turned on by the on/off switch (S1), IC1 monitors the voltage at the collector of the transistor after a delay of about 60 seconds. This initial delay is introduced deliberately to avoid false triggerings, because the PIR sensor requires an initial stabilization time of about 10 to 60 seconds in order to function properly. A red LED (LED1) is connected to port GP0 of IC1 (pin7) with a current limiting resistor (R3) in series. The LED blinks at a slow rate during this delay time.
After this delay, IC1 starts monitoring the voltage at the collector of T1. The LED blinking pattern is now changed to indicate the “standby” mode. In standby mode, T1 is cut off, and the collector output is at logic high (+5 V). When a “valid” motion is sensed, the high output from the PIR sensor module saturates the transistor and the voltage at the collector drops down to logic low. Consequently, of port GP1 (pin 6) of IC1 goes high to switch on the 5V DPDT relay (RL1) through transistor T2. This output will remain High, as long as the motion exists, and this active condition is indicated by a steady-glow of LED1. DPDT Switching contacts of RL1 can be connected to powerful external lamps and/or alarms.
Reprinted Url Of This Article:
http://www.seekic.com/circuit_diagram/Control_Circuit/Alarm_Control/PIC12F675_Microcontroller_Based_Security_Alarm_Circuit.html
Print this Page | Comments | Reading(3)
Code: