Design of electronic anti-lost and anti-theft device based on AVR and RFID

Publisher:TranquilDreamsLatest update time:2020-02-26 Source: 21icKeywords:AVR Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Introduction: Aiming at the development demand of anti-lost products, this paper introduces the software and hardware design and test analysis of an electronic anti-lost and anti-theft device with dual microcomputers and color LCD touch screen. The system is different from existing products. The host has an LCD touch screen and the slave is embedded with a microprocessor. The wearer can find the protected object through the prompt information on the LCD screen and the gradual increase or decrease of the sound. The experiment shows that the system solution is flexible and feasible, with a high level of humanized service and is easy to apply in practice.


Abstract: Aiming at the development demand of anti-lost products, this paper introduces the software and hardware design and test analysis of an electronic anti-lost and anti-theft device with dual microcomputers and color LCD touch screen. The system is different from existing products. The host has an LCD touch screen and the slave is embedded with a microprocessor. The wearer can find the protected object through the prompt information on the LCD screen and the gradual increase or decrease of the sound. The experiment shows that the system solution is flexible and feasible, with a high level of humanized service and is easy to apply in practice.


0 Preface

In the fast-paced modern society, the elderly, children or pets are lost; valuables such as mobile phones and luggage are stolen; keys, wallets and other items are forgotten. Electronic anti-lost and anti-theft devices belong to security products. They can reduce the losses and inconveniences caused by forgotten or lost items. Based on the application status and development needs of electronic anti-lost and anti-theft devices, this paper uses RFID technology to design an electronic anti-lost and anti-theft device with a color LCD touch screen, which provides a better application solution for the application of Internet of Things technology and the development of security products.


With the help of nRF24L01 chip's DPL and ACK PAYLOAD functions, combined with the touch screen design method, this paper designs an electronic anti-lost and anti-theft device based on nRF24L01, ATmega48PA and TFT graphic LCD, which can effectively prevent loss, theft and forgetfulness of the elderly, children or protected items under guardianship. Using a high-performance controller, the color LCD touch screen display, wireless remote control, and MCU system are independently controlled. The system has a high level of humanized service and strong practicality, and has good prospects for technology promotion and market application.


1 System design

The system structure is shown in Figure 1. The electronic anti-lost and anti-theft device consists of a host and a slave. The host is placed at the master controller, and the slave is placed on the protected object such as the elderly, children or mobile phones. The electronic anti-lost and anti-theft device has a microprocessor embedded in both the host and the slave. When working normally, the slave emits stable radio waves, and the host does not alarm after receiving the radio waves. When the distance between the host and the slave exceeds the predetermined distance, the host cannot receive the radio signal of the slave, and immediately sounds an alarm (sound pressure ≤ 75 dB) accompanied by vibration to attract the user's attention. If the search button of the host is pressed to start the search mode, the host wearer can find the protected object through the prompt information on the LCD touch screen and the gradual increase or decrease of the alarm sound. Under normal circumstances, the lithium battery is charged by connecting the power adapter or computer with the USB interface.

a.JPG

2 Hardware Design

2.1 AVR microprocessor control circuit

ATMEL's ATmega48PA is selected as the microprocessor of the main control unit. This chip is a high-performance, low-power 8-bit microprocessor with an operating voltage of only 1.8 to 5.5 V, an operating frequency of 0 to 20 MHz, and 4 KB of in-system programmable FLASH. As shown in Figure 2, the ATmega48PA peripheral circuit includes a power supply circuit, an 8M clock circuit, a reset circuit, and a USB/ISP download interface.


The power supply circuit is shown in area ① of Figure 2. A lithium battery with a nominal value of 3.7 V is connected to the input terminal of the integrated three-terminal voltage regulator chip REG1117-3.3 V. REG1117-3.3 V outputs a stable 3.3 V DC voltage to supply the system power module.


The clock circuit is shown in area ② of Figure 2. ATmega48PA has a built-in RC oscillator circuit that can generate oscillation frequencies of 1 MHz, 2 MHz, 4 MHz, and 8 MHz. When the system requires a more accurate baud rate, it needs to be achieved through an external circuit.


The reset circuit is shown in area ③ of Figure 2. ATmega48PA has a built-in power-on reset, and the fuse bit can control the reset time. Therefore, when the external reset circuit is powered on, a 10 kΩ resistor R3 can be directly pulled to VCC. The 10 μF capacitor C11 is used to eliminate interference and clutter.


The ISP download interface is shown in area ④ of Figure 2. It uses a double-row 2x5 socket to access the interface. Since there are no peripheral components, the PB3 (MOSI), PB4 (MISO), PB5 (SCK), and RESET pins are not affected by the ISP download interface and can still be used normally.


2.2 Design of wireless data transmission module

The circuit diagram of nRF24L01 is shown in Figure 3. The nRF24L01 module is connected to SPI1 of ATmega48PA to exchange information. Configure PD6 and PB2 as GPI0 ports, respectively connected to CE and CSN of nRF24L01; configure PB5, PB4, and PB3 as SPIO ports, respectively connected to SCK, MISO, and MOSI of nRF24L01; configure PD2 as EINT0 port connected to IRQ of nRF24L01. When connecting to the AVR microprocessor, attention should be paid to power isolation. In Figure 3, a filter inductor is connected between nRF24L01 and the antenna to isolate the two parts. In addition, 1.5 pF bypass capacitors C4 and C5 are used to resist high-frequency interference.

b.JPG

2.3 Color LCD module

The system uses a 5.6 cm (2.2 inch) resistive touch screen with 65k/262k colors, a QVGA 320x240 resolution, 3 LEDs in parallel for backlight, μPD161704A driver chip for LCD control IC, XPT2046 for touch control IC, and SPI interface.


3 Software Design

The software development adopts ATMEL AVR Studio integrated development environment (IDE) and uses C language with good portability and high programming efficiency. The main flow chart of the electronic anti-lost and anti-theft device system is shown in Figure 4. The software program mainly includes the initialization of the host and slave, the transmission and reception of wireless signals, and the design of the color LCD module.

c.JPG

3.1 nRF24L01 SPI port configuration

The configuration register completes all configurations of the nRF24L01 and implements the configuration through the SPI interface. The description of the SPI read operation is as follows:

d.JPG

e1.jpg

3.2 LCD display module design

2. The 2-inch TFT graphic LCD touch control IC uses XPT2046, and the interface is SPI interface. The sub-functions and color definitions are as follows:

e.JPG

4 Overall system test

After soldering and debugging of the PCB board, the system can successfully send and receive data. The system host is equipped with an external antenna, and the slave uses the PCB onboard antenna. A loud alarm sound can be heard in the 400 m2 laboratory. The host color LCD screen displays the results as shown in Figure 5.

f.JPG

The segmented distance test was carried out in an open area outdoors. Each distance segment was tested 8 times, and the data volume sent each time was 512 bits (32×16 bits). The test results of receiving complete data packets in 6 distance segments within 100 meters are shown in Table 1.

g.JPG

It can be seen from the data in Table 1 that the system wireless data transmission module can achieve error-free data transmission within 40 m in an open area, and the experiment is successful.


5 Conclusion

Based on RFID and AVR control technology, this paper designs an electronic anti-lost and anti-theft device with a color LCD touch screen. After experimental testing, the system works reliably and the touch screen is sensitive. It can effectively prevent the loss, theft and forgetfulness of items such as the elderly, children, mobile phones and wallets. This design has strong flexibility and can also be applied to indoor and outdoor warehouses, overhead cranes in docks and open-air storage yards, as well as service robots such as rescue, flight and medical care, to effectively reduce the occurrence of failures and accidents.

Keywords:AVR Reference address:Design of electronic anti-lost and anti-theft device based on AVR and RFID

Previous article:Realization of home security guard system based on ATMEL AVR microcontroller
Next article:AVR microcontroller internal RC oscillator calibration method

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号