Remote control response alarm device made with single chip microcomputer

Publisher:温暖阳光Latest update time:2012-02-04 Source: 电子工程师 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The remote control response alarm device introduced in this article can monitor the alarm object within a range of 150 meters, and is suitable for anti-theft alarms in various occasions. For some alarm systems without response methods, it can also be used as a supplement to their missing functions. The device uses an encoder, decoder and PIC microcontroller to process the monitoring and alarm information sent and received, making the monitoring accurate and highly anti-interference, and reducing the number of components and the power consumption of the whole machine.

1 System functions and features

The functions and features of the remote control response alarm device are as follows:

The remote control buttons can be used to test the access status with the host, and the host can be set to respond immediately, respond at a fixed time, or sound the alarm.

By pressing the remote control buttons, you can observe the real-time and continuous changes of the alarm status of the three channels, and accurately judge the environmental conditions of the alarm object.

Flexible function expansion. It can be easily expanded into an intelligent anti-theft system through software programming and adding alarm channels.

2 Hardware Circuit and Principle

The device consists of two circuits: a remote controller and a host.

1) Remote control circuit. The remote control circuit is shown in Figure 1. PT2265 is an encoding chip, which contains oscillators, key input scanning sampling programmers and waveform output circuits. 455kHz crystals are connected to both ends of OSC1 and OSC2 to form an oscillation circuit. The key value is input by AN1 and AN2. PT2265 only allows one key value to be input. If the key is not released, other key operations are invalid. The output of its OUT pin is sent to T630 for transmission through the encoded carrier signal. T630 is a radio-specific transmission module that integrates pulse modulation, oscillation and transmission functions. It works in the 150kHz long-wave frequency band and has strong anti-interference ability.

The response and alarm signals sent by the host are received by the radio-specific receiving module T631 paired with T630. T631 integrates wireless receiving, demodulation and other circuits, and its output signal is sent to the input terminal IN of PT2275. PT2275 is a decoding circuit paired with PT2265, and uses a 32768Hz crystal oscillator connected between OSC1 and OSC2 to form an oscillation circuit. The host signal sent by T631 is decoded and sent to the output terminal for LED to display the response signal and real-time alarm status of the corresponding channel, and the 555 audio oscillation circuit is started to drive HTD to sound. The light-emitting diodes LED1~LED3 are respectively used to display the alarm status of A~C channels, and LED4 is used to display the response signal and alarm flashing.

2) Host circuit. The host circuit is shown in Figure 2. The radio receiving integrated module T631 receives the remote control signal and inputs it into the decoder PT2275. One channel is decoded by PT2275 and sent to the I/O ports RB4 and RB5 of the PIC microcontroller. The key value is processed by the software program to determine the operating status; the other channel is sent to BG1 to drive LED1 display for debugging. RA0~RA2 are input ports, connected to three different sensor circuits A, B, and C, corresponding to the LED1~LED3 display channels on the remote control. When there is an alarm signal in any channel, the corresponding pin of the RA input port is set to a high level, and the PIC microcontroller processes it as an alarm signal. At the same time, it is determined whether to sound the alarm or respond at a time according to the operating status set by the remote control. The real-time status signal of the RA port is sent to the PT2265 encoder by output RB0~RB2 for encoding, and then sent to T630 for transmission.

In the alarm sensing circuit, the A circuit is an inductive alarm circuit. There is a distributed capacitor CX between the induction plate TK and the ground, which together with BG2, L, C4, and C5 form a capacitive three-point oscillator. During normal operation, the oscillation voltage is sent to BG3 through D3 to make it conductive, making the level of point A low. When a human body approaches the induction plate, the distributed capacitor CX increases until BG2 stops oscillating, making D3 have no output, BG3 is cut off, and outputs a high-level signal to point A.

Road B is a vibration alarm sensor circuit, which consists of 4 inverters of CD4069. Under normal circumstances, U7A and U7B output high level, and U7C and U7D output low level. When encountering vibration, the vibration sensor is turned on, so that C8 inputs a negative pulse to U7C, then the input end of U7C is high level, making the output low, and after inversion by U7D, a high level alarm signal is output to point B. When SK is not vibrated, it is closed, C10 discharges, and U7D outputs a low level, restoring the alarm standby state. Road C is a mercury switch sensor circuit. When the alarm object falls or has a large displacement, the mercury switch will be turned on, generating a high level alarm signal to point C. RB7 is an audio output port. When there is an alarm signal and it is set to sound the alarm, RB7 changes from the original low level to an intermittent high level output, and the TWH68 boost block drives the high-loudness horn to sound the horn.

[page]

3 Software Design

The software design flow chart of the PIC microcontroller of the host part is shown in Figure 3. After the program starts, the input and output direction of the I/O port, the count value of the RTCC, etc. need to be initialized. The delay of 15s is to start the system after the owner leaves. The program first scans the decoding input key status, and the key value input of the RB4 and RB5 ports sets the flag register. In the alarm process, it is determined whether to sound the horn when encountering an alarm based on the flag register status. In addition, the program sets the horn to sound only when two alarms occur at the same time to prevent interference and false sounding and noise. In the timing 10s response process, the RA port is inspected 5 times every 1s, and a response display signal is sent once in 10s. This program makes full use of the function of the built-in timer RTCC of the PIC microcontroller. By setting the count value to achieve a hardware delay of 65ms, under the premise of meeting the delay required for the RB port output display, it can be guaranteed that the program monitors the RA port once in 0.2s, without having to wait until the 10s software timing ends. This is also the advantage of the built-in integrated functional components of the PIC microcontroller.


In the program design, the communication state of the normal response between the remote control and the host: the host initially works in the timed response and alarm whistle mode, that is, after the host starts for 15 seconds, it sends a response signal every 10 seconds, and the host whistles when an alarm occurs. The timed response state is convenient for measuring the distance at any time. Every time the remote control presses AN1 or AN2, the host sends a response signal after receiving it, making the remote control LED4 light up. If AN1 is pressed once for 1 second each time, it switches between the on/off timed mode; if AN2 is pressed once for 1 second each time, it switches between the on/off alarm whistle mode. When an alarm occurs, the corresponding channels of LED1~LED3 on the remote control flash and emit a "beep, beep" sound.

4 Conclusion

The device is small in size, low in power consumption, reliable in operation, and easy to operate. It is particularly suitable for installation in warehouses, offices, residences, motor vehicles, and other alarm situations where control and response information are required.

In addition, for some occasions with high alarm requirements, this device has greater expansion flexibility: select encoders and decoders with more keys and PIC microcontrollers with more I/O ports, use software programming to increase the number of alarm channels, and arrange a certain number of control outputs in the host system. In this way, the device can expand the control function based on the original function, and control the actuators at specific points by making the host automatically respond or operating with a remote control as needed, such as the switch of electrical, doors and windows and automatic dialing of telephones.

References

1 Chen Xiaomu. Principle and Application of PIC16C5X Microcontroller. Fuzhou Gaoqi Electronics Co., Ltd., 1996

2 Du Zhong, Zhang Weina. Characteristics and application of encoder PT2265 and decoder PT2275. Electronic Technology, 1995

Reference address:Remote control response alarm device made with single chip microcomputer

Previous article:Application of PIC16F877 microcontroller in power supply system for intelligent station
Next article:Application of PIC microcontroller in central air conditioner controller

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号