Design of Home protection System

Design of Home Protection System


Problem Statement- Design a Home protection system to for indicating various parameters like temperature, door open /closed, internal apparatus on, which will give alert by indicator, display and sounding alarm if exceed the set point. Also make provision to store few current records in the serial memory for analysis.

Answer

Step 1-Design of Power Supply


The microcontroller selected is PIC 18F4550 which works on the frequency of oscillator ranging from 0 to 20 MHz and requires power supply of ± 5 or ±12 V. A simple circuit design for +5 V is shown in Fig. 

power-supply


Fig. Design of  +5V Power Supply  

Step 2-Design of Clock Circuit


The Quartz crystal is connected to OSC1 and OSC2 pin in order to synchronize the operation of all components connected with internal and external means. The values for C1 and C2 are selected according to the crystal frequency for stabilizing the oscillator pulses. In general with quartz crystal 22-33 µF is preferred.

Step 3-Design of Reset Circuit


The RC high pass filter with C=0.1µF along with 20 kΩ register is connected to MCLR pin. When high pulse appear on it, resets the contents of inter registers and SFRS to initial value.

PIC has 33 I/O lines which can be configured as input and out using TRISX register.

Step 4-General Block Diagram


The general block diagram of any security system without in build ADC is shown in Fig. Some of the modern processor like PIC has the in-build ADC and require only signal conditioning circuit. The sample signal conditioning circuit s shown in Fig.7.23 The signal conditioning circuit for any analog signal varies from signal to signal. For any low level signals an Instrumentation amplifier is best choice. 

General-block-diagram



    •    Fig. General Block Diagram

Step 5-Signal Conditioning Circuit

signal-conditioning-ckt



Fig. Signal Conditioning Circuit using Operation Amplifiers 

R1=R3=2.2K, R2 = 220, R4 = RTD, OPAMP LM324

Step 6-Algorithm


  1. Initialize the PIC ports, LCD etc.
  2. Provide set points for various controlling actions
  3. Accept the signals (Analog or digital) on ADC pins.
  4. Check the set conditions
  5. If not met or exceed get the indication by beep, display on LCD, and making devices on and Off
  6. Store the current records
  7. If everything is set right, continues from step 3.

Step 7-Flow chart


The general flow chart for the above problem statement is shown in Fig.

flow-chart


Fig. Flow Chart 

Step 8-Interfacing Diagram


The complete interfacing Diagram for Home Protection System is shown below

home-protection-system


Fig. Interfacing Diagram for Home Protection system using PIC18Fxxxx 

References


  • WikiNote Foundation

Last modified: Tuesday, 17 September 2019, 2:58 PM