Design of a two-way remote control door switch system based on voice alarm

This article refers to the address: http://

introduction

The remote keyless entry (RKE) solution has become a standard part of the car configuration and is an integral part of the car. The remote door switch system (RKE) is important for improving the anti-theft and control of the car. Most RKE systems have car theft, alarm functions, and access control for cars and trunks, some of which also include remote start-ups and car-looking functions. The one-way RKE system designed in the past consists of a control end and an execution end. The biggest inconvenience of this kind of system is that only the user sends information to the door, and the door can't feed back the information to the user, which makes the user unable to know the condition of the car and bring hidden danger to the safety of the car. In addition, since the system is powered by a battery, how to minimize power consumption is also a big problem. In order to solve these two problems, this paper designs a two-way RKE system based on Nordic's nRF401 transceiver. At the same time, the voice chip and its corresponding filter amplifier circuit are used to realize the system automatic voice alarm through the built-in speaker.

The system mainly implements two functions: when the user sends the corresponding command, the car automatically performs the locking and unlocking functions, and when the user exceeds the sending and receiving range, the main transceiver can automatically send the warning message, and the user is notified by voice. Safe range. The wireless transceiver function of the data is realized by the nRF401 chip; the voice alarm function of the system adopts the ISD4004 series chip.

nRF401 function introduction

The nRF401 is the latest single-chip RF transceiver from Nordic VLSI, Norway, designed for operation in the 433MHz ISM (industrial, scientific and medical) frequency band. It is currently the most integrated wireless data transmission product. The chip integrates high-frequency transmission, high-frequency reception, PLL synthesis, FSK modulation, FSK demodulation, dual-channel switching and other functions, with excellent performance, low power consumption, easy to use and so on. The nRF401 has few external components, only about 10. It only includes a 4MHz reference crystal (which can be shared with the MCU), a PLL loop filter and a VCO inductor. The transceiver antenna is integrated and there is no debugging component, which brings great convenience to development and production. Its internal structure is shown in Figure 1.

The nRF401 is available in a 20-pin SSOIC package. The internal circuitry can be divided into transmit circuitry, receive circuitry, mode and low-power control logic. The data to be transmitted is input through the DIN terminal (pin 9). The RF power amplifier has an output power of up to +10 dBm. The receiving circuit includes: a low noise amplifier, a mixer, an FSK demodulator, a filter, and the like. In the receiving circuit, the low noise amplifier amplifies the input RF signal with a receiving sensitivity of -105 dBm. The mixer adopts a 1-stage mixing structure. The output signal of the mixer is filtered by the IF filter and sent to the FSK demodulator for demodulation. The demodulated digital signal is output at the DOUT terminal (pin 10).

ISD4004 series voice chip function introduction

The ISD4004 uses CMOS technology and includes an oscillator, smoothing filter, auto squelch, audio amplifier, and multi-level flash memory array. The chip is nonvolatile and can save up to 100 data without power. Years, recording time is long, there are 8, 10, 12, 16 minutes of various chips, repeat recording can be 100,000 times. The chip design is based on the fact that all operations must be controlled by the microcontroller, connected to the processor via the SPI bus, and the peripheral circuitry is simple.

The ISD4004 voice chip can not only complete the recording process but also complete the playback process. The voice alarm discussed in this article mainly refers to the playback circuit of the host computer that is carried by the user, and does not include the recording circuit. In practical applications, the recording part stores the recorded content in the voice chip in advance, and assigns a specific broadcast address. When the alarm is needed, only the first address of the broadcast needs to be read, and then the alarm information is automatically played by the voice chip through the speaker. Come out and realize instant alarm.

System hardware overall design

The two-way RKE system consists of two parts: the upper computer and the lower computer. The upper computer is carried by the user, and can be understood as a remote control key with an alarm function, and the lower computer is installed in the door for opening the door. The entire two-way RKE system is constructed as shown in Figure 2.

The system is mainly divided into two parts: the wireless transceiver part and the playback part. The core controller adopts the MCU AT89C52 produced by ATMEL, which establishes contact with the RF module through the asynchronous serial port. The 12-pin of the RF transceiver chip nRF401 is channel selection: CS = "0" for channel #1 (433.9 MHz), CS ="1" for channel #2 (434.33 MHz); 18 pin for power switch:
PWR UP = "1" is the operating mode, PWR UP = "0" is the standby mode; 19 is the transmission permission: TXEN = "1" for the transmit mode; TXEN = "0" for the receive mode. They can be connected to the I/O ports P1.2, P1.3 and P1.4 of the MCU respectively for the selection of the working state of these control bits, while the data input bits DIN and data output bits can be asynchronous strings with the MCU respectively. The line port TXD is connected to the RXD, so that the MCU can control the transceiver timing of the RF chip.

Since the chip used is the ISD4004, the power supply voltage is 3V, and the required power supply voltage of the MCU is 5V. Therefore, the interconnection between them requires a certain level conversion circuit. The P1.6 of the MCU is connected to the chip select pin /SS of the ISD4004 through the level conversion circuit to control whether the ISD4004 is strobed. The P1.7 is connected to the serial input pin MOSI of the ISD4004 through the level conversion circuit, and is read from this pin. The address of the playback; P3.2 and P3.3 are respectively connected to the serial clock pin SCLK of the ISD4004 and the interrupt pin /INT through the level conversion circuit; the AMCAP is the automatic mute terminal, and is grounded through a capacitor during use; the ISD4004 chipset The required connection is also the audio signal output pin AUDOUT. This pin is connected to the speaker through a filter amplifying circuit. The principle of the sounding circuit is shown in Figure 4. Since the four pins of the single chip are connected to the voice chip, it is required. The level conversion circuits shown in the figure are four (only one is drawn here).

System software design

letter of agreement

The two-way RKE is mainly composed of a host computer and a lower computer. To implement the lock/unlock function and the safety alarm function, wireless data communication between the upper computer and the lower computer must be completed. All parts of the entire system serve the purpose of wireless data transmission. Therefore, in the software design of the entire system, the transmission of wireless data is the most important part. The wireless transmission is performed in the form of data frames, and the format of the data frame is as shown in Table 1.

The preamble is mainly used to prevent the useful data from being interfered; the car ID is mainly used to mark the information of a specific car for correct identification. If the ID does not match, the data frame is ignored; the information code is used to indicate the user's operation. These operations include locking, unlocking, displaying alarms, and more. When the user sends the corresponding command, the lock and unlock are respectively performed, and when the user exceeds the sending and receiving range, the main transceiver can automatically send the warning message; the checksum is used to verify whether the received data is correct, when it is incorrect , need to resend the data frame.

System software process design

Since the entire RKE system is a two-way system, the communication between the data terminal and the main transceiver is duplex, so the data transmission direction is constantly changing during the actual system operation. To this end, in order to achieve coordinated communication between the two parties, it is necessary to design a more suitable transmission and reception sequence. The upper computer transceiver flow chart is shown in Figure 4. After the system is powered on, the host computer is in the standby state. When it is detected that the host computer emits a button command, it indicates that the user wants to perform a certain operation, and sends the operation information to the speaker, and informs the user of the operation to be performed by means of sound, and the host computer turns on the transmitter. Send the corresponding information code (such as unlocking, locking, etc.), and at other times the host computer is in the receiving state. If the address code sent by the lower computer is not received, the host computer can judge that the user is transmitting and receiving at this time. Outside the range, the alarm information stored in the host computer will be pre-stored in the playback address through P1.7, and the speaker will send a voice signal to alert the user. If the host computer does not receive the ACK sent by the lower computer (correct response signal), then the upper device asks the user to press the button again, knowing that the ACK command is received, and then the lower computer performs the corresponding operation.

After the system is powered on, the lower computer first initializes, then opens the receiver to determine whether there is a user issuing a command on the button. If no button command is detected, the lower computer turns on the transmitter and continuously sends the address code to the upper computer. To determine whether the two parties are within the communication range to prompt the user. When the button command is detected, the lower computer first checks the operation information code sent by the host computer. If the check is incorrect, the user is required to press the button again; if the check is correct, the ACK command is sent to confirm that the user's operation is Effective. In this way, the two-way communication between the upper computer and the lower computer can be effectively realized, so that the bidirectional RKE system can work stably, and the flow chart of the lower computer receiving and sending is shown in FIG. 5.

Conclusion

The two-way RKE system consisting of radio frequency chip nRF401, AT89C52 MCU and voice chip ISD4004 can more intuitively let the user express the executed commands in a way of voice, making the system convenient and practical. At the same time, the chips selected in the system are all low-power, which is very important for the battery-powered host computer. In addition, the size of the selected chip is very small, the interface between the MCU and the nRF401 and the ISD4004 is very simple, does not require too many peripheral circuits, which is beneficial to the integration of the system to some extent, user-friendly Carry. On the basis of this system, if a pressure sensor is added to the door, this can greatly prevent the car from being artificially damaged and further improve the safety of the car. In addition, the system can also be applied to other occasions, such as digital voice communication, wireless remote control security door, smart wireless meter reading, etc., which can be greatly promoted. â– 

references:

1. Nordic VLSI ASA Inc. 315/433 MHz Single Chip RF Transceiver nRF401 [Z]. 2001.1.

2. ISD/WINBOND. ISD4004 SERIES Products Datasheets, 2008.8

3. Huang Zhiwei,Zhu Weihua,Chen He.Design of Wireless Serial Interface Circuit[J].Electrical Measurement & Instrumentation,2001(7):30-33.

These series Meter Boxes are manufactured from Fiber-glass Reinforced Polyester (both SMC and DMC are available) and one-time forming after high temperature and high voltage. The boxes have advantages of fireproof, corrosion-proof, insulative, anti-aging, compression-resistant and easy install. The Meter Box can be fixed on the wall or installed on the electric pole.It is suitable for both electronic meters and mechanical meters, and users also can install switches, fuses and terminal boxes in the meter box. The meter in the box is separate from the switches and users can control the switches.

FRP Meter Box

FRP Meter Box, Polycarbonate Meter Box, Fiberglass Meter Box, Electricity Meter Box, GRP Meter Box, FRP Box, SMC Enclosure

Tengfei Electric Co.,Ltd. , http://www.tenfee.net