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.
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.
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.
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:
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:
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.
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.
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.
Previous article:Realization of home security guard system based on ATMEL AVR microcontroller
Next article:AVR microcontroller internal RC oscillator calibration method
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- PCB layout optimization of multi-output buck converter based on phase-shift control to improve EMI performance
- [Raspberry Pi Pico Review] Small size, big use~PICO here I come~
- 12V 60Ah large capacity lithium battery
- Review summary: National Technology's new M4F core N32G430 is here~
- Can you tell me what the Cf2 capacitor does in the circuit? Thanks!
- Top 10 hot technologies in 2019: 5G ranks first, and "brain-computer interaction" achieves breakthrough
- DSP Demo Programming Example Sharing
- Fudan Micro FM33LC046N Evaluation + External Interrupt
- A brief discussion on the technological innovation and market prospects of Wi-Fi 6E
- Why embedded engineers have misunderstandings about 8-bit MCUs