Wireless burglar alarm using 2051 design

Publisher:紫色小猫Latest update time:2011-01-27 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
This website introduces the production of the host in the wireless anti-theft alarm system to netizens. It uses the AT89C2051 microcontroller as the central processing chip, making the system's function expansion more convenient. If you need to change a certain setting of the entire system, you only need to change the corresponding software. It is very helpful for learning microcontrollers.

1. Hardware Design

The circuit schematic is shown in the figure below. It is mainly composed of wireless reception, data decoding, data processing, alarm circuit, output display, power-off alarm and power supply circuit. The receiving frequency of the whole machine is 315M. The data decoding adopts the PT2272 special decoding chip which is widely used on the market, with good reliability and stability. The task of data processing is completed by the single-chip microcomputer, which is used to distinguish the alarm signal, and accept various operation instructions at the same time to complete the corresponding operations. When the alarm signal is received, on the one hand, it drives the alarm circuit to emit a loud police car alarm sound, and on the other hand, it outputs specific address information to determine which channel sent the alarm signal. The power-off alarm function monitors the power supply status in real time. When the city power is cut off, it can emit a beeping alarm sound to remind the user that the external power supply has been cut off. If it is caused by sabotage by lawbreakers, prevention can be taken in advance.

2. Software Design

The software design of this alarm is relatively simple. Interested netizens can develop corresponding functions according to their actual needs. The basic programs are listed here for reference by netizens in need.

ORG 0000H ;

CLR P1.6 ;
CLR P1.2 ;
ACALL DYS ;
SETB P1.6
ACALL YS ;
SETB P1.2 ;
CLR P1.3 ;
CLR P1.6 ;
ACALL DYS ;
SETB P1.6 ;
ACALL YS ;
SETB P1.3;
CLR P1.4;
CLR P1.6;
ACALL DYS;
SETB P1.6;
ACALL YS;
SETB P1.4;
CLR P1.5
; CLR P1.6;
ACALL DYS;
SETB P1.6;
ACALL YS ; ;
MOV P1, #0FFH ;
MOV P3, #0FFH ;
AGARN: MOV R6, #34H ;
JB P3.6, TINDIAN ; Check if there is a power outageJNB
P3.0, AGARN ;Whether there is a valid wireless signal input
ACALL DYS ;
JNB P3.0, AGARN ;
MOV A, P3 ;Read the wireless signal value
ANL A, #3CH ;0011,1100
CJNE A,#20H, XH ;20H=00(10, 00)00 B
;Disarm procedure
CLR P3.1 ;
CLR P1.6 ;Disarm success response
CLR P1.4 ;Indicator light
CLR P1.5 ;
SETB P3.7 ;
ACALL YS ;
SETB P1.6 ;
AJMP AGARN ;

XH: CJNE A,#30H, ONE ; Determine whether it is an arming signal
SETB P3.1 ;
CLR P1.6 ; Arming success response
SETB P1.4 ; Indicator light
SETB P1.5 ;
SETB P3.7 ;
ACALL YS ;
SETB P1.6 ;
AJMP AGARN ;
ONE: JNB P3.1, AGARN ;
CJNE A,#4H, TWO ;1H=00(00,01)00B
MOV P1, #0FBH ;
AJMP BJ ;
TWO: CJNE A,#8H, THREE ;2H= 00 (00,10)00B
MOV P1, #0F7H ;
AJMP BJ ;
THREE: CJNE A,#0CH, FOUR ;3H=00(00,11)00B
MOV P1, #0EFH ;
AJMP BJ ;
FOUR: CJNE A,#10H , FIVE ;00(01,00)00B
MOV P1, #0DFH ;
AJMP BJ ;
FIVE: NOP ;
NOP ;
NOP ;
AJMP AGARN ;
BJ: CLR P3.7 ; Start alarm signal
ACALL YS ; Delay 34 seconds
JB P3.0, AGARN ;
DJNZ R6, BJ ;
SETB P3.7 ; Turn off alarm signal
AJMP AGARN ;

TINDIAN: MOV P1, #0FFH ; Power-off program
CLR P1. 6 ;
CLR P1.5 ;
ACALL YS ;
SETB P1.6 ;
SETB P1.5 ;
ACALL YS ;
CLR P1.6 ;
CLR P1.5 ;
ACALL YS ;
SETB P1.6 ;
SETB P1.5 ;
ACALL YS ;
AJMP AGARN ;
DYS: MOV R0, #14H ;
L1: MOV R1, #0F1H ;
L2: NOP ;
NOP ;
NOP ;
DJNZ R1, L2 ;
DJNZ R0, L1 ;
RET
YS: MOV R0, 0FFH;
L3: MOV R1, 0F1H;
L4: NOP;
NOP;
NOP;
DJNZ R1, L4;
DJNZ R0, L3;
RET;
END;

This wireless alarm host is applicable to any wireless probe with a transmission frequency of 315M and PT2262 encoding, such as wireless human detectors, wireless door magnetic sensors, wireless microwave detectors, etc. Due to the different actual usage environments, the required host settings are also different. Netizens can write different software according to their own needs to achieve different functions, which will not be described in detail here.

Reference address:Wireless burglar alarm using 2051 design

Previous article:Wireless burglar alarm using 2051 design
Next article:100W amplifier circuit with bandwidth from DC to 100kHz

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号