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.
Previous article:Wireless burglar alarm using 2051 design
Next article:100W amplifier circuit with bandwidth from DC to 100kHz
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Lee Kun-hee, chairman of South Korea's Samsung, has passed away. How do you evaluate his life?
- RTT & Renesas high performance CPK-RA6M4 development board review - SPI driven OLED
- 【TGF4042 signal generator】+6th issue pwm modulation
- Free benefits: One-click download of premium sensor data without points required!
- Building a GDB remote debugging environment under TMS320DM8168
- Microwave Engineering
- How does ultra-wideband work?
- Can PCB boards be replaced? Everything you want to know is here!
- 99 out of 100 PCB people will make mistakes in these areas (Part 1)
- MSP430 ADC analog-to-digital routines