Abstract: This paper introduces the application of home information terminal with Atmegal03 as the main control chip in the intelligent construction of residential areas. The software and hardware technical points of the interface application between Atmegal03 microcontroller, touch screen and nRF401 wireless data transceiver chip are elaborated in detail.
After several years of development, a series of standards have been formed in the construction of intelligent residential areas in China, which meet the requirements of different income groups for intelligent housing. As an important part of intelligent residential area construction, indoor terminals have gradually developed into a comprehensive information service processing platform integrating multiple functions with the development of electronic technology and the improvement of people's requirements for intelligent residential housing.
Traditional indoor terminals can only perform simple security and electrical appliance control in the user's room, which can no longer meet people's requirements for intelligent housing. On the other hand, home information terminals (HIT) not only have security and electrical appliance control functions, but also highlight information service functions (such as e-commerce and housekeeping services, etc.), meeting people's fast-paced and open lives in modern society.
1. Community overall structure and system flow
The entire community management system consists of two parts: indoor control for residents and internal management of the community. Among them, internal management of the community mainly consists of two parts: community public security and community daily management. The indoor terminal of the residents and the indoor controller RC (Room Controller) constitute the indoor control of the residents. Figure 1 is the overall structure of the community and the system flow chart.
Inside the community, the system monitors illegal intrusions into the community through public safety facilities (TV monitoring and perimeter control, etc.) and community management equipment (entrance and exit access control and vehicle management, etc.). Once an abnormality occurs in a certain link, the public safety facilities or community management equipment will immediately upload the abnormality to the community monitoring center (central database) so that corresponding countermeasures can be taken.
In the resident's room, the resident sends control data to the indoor controller RC by wireless data transmission through the HIT terminal. After receiving the data, RC determines whether the received data is an indoor control command (security or electrical control) or a request for information service command (query property management notification or request housekeeping service, etc.) according to the communication protocol. If the received data is an indoor control command, RC will directly operate the indoor defense zone or electrical appliance after parsing the command. Once the defense zone is set up, RC will query the status of each set defense zone in turn. When an abnormality occurs in the defense zone, RC will upload the abnormality to the community monitoring center while sounding an alarm indoors. If a command requesting information service is received, RC will not process the command and directly upload it to the community monitoring center, and the central database will process the request for information service command.
2 Terminal Hardware Design
The terminal adopts the form of a handheld PDA and completes the communication with the indoor controller RC by wireless data transmission. Figure 2 is a diagram of the terminal hardware structure. The terminal is mainly composed of a microcontroller Atmega103, a touch screen input, wireless data communication, a contactless IC card identification, an LCD display module, and a power management module. Among them, the touch screen input module and the LCD display module jointly realize the input operation and status display of the terminal. The wireless communication module organizes the input function operation into a command data frame according to the provisions of the communication protocol, sends it to the RC in a wireless manner, and receives the response information given by the RC. In order to ensure the security of the terminal, the terminal introduces an identity recognition module. Only after the user passes the terminal's identity recognition, can he have a certain use authority of the terminal. And different terminal use authorities can also be set in the software design of the identity recognition module.
The terminal uses Atmega103 as the main control microcontroller. Atmega103 is a high-performance AV_R series microcontroller, which achieves a processing capacity of 1MIPS per MHz crystal frequency, has 128K bytes of internal Flash Memory, 4K bytes of SRAM, and 4K bytes of online programmable EEPROM, and supports ISP function. The microcontroller in this terminal system has a very heavy task. While driving the LCD display and touch screen, it also needs to complete the interface with the nRF401 wireless data transmission module and use it to interact with the indoor controller RC. Atmega103 has rich internal resources and powerful functions, which can simplify system design and improve system reliability, making it very suitable for this system.
2.1 Touch screen controller
In actual applications, the touch screen controller used in the terminal is AD7843. AD7843 is an analog/digital converter produced by AD company and is specially used for 4-wire resistive touch screen. AD7843 has two optional working modes of 12-bit or 8-bit, with the characteristics of single power supply, complete low power consumption mode, fast conversion speed, etc. Figure 3 is a typical interface diagram of AD7843 and 4-wire resistive touch screen.
In Figure 3, the PENIRQ pin generates a negative pulse with a width of about 4 DCLKs immediately after the touch screen is clicked to request an interrupt from the master microcontroller. After the master microcontroller responds to this interrupt, it writes the control word into the control register of the AD7843 through the DIN pin to start a conversion. After the conversion is completed, BUSY will also generate a negative pulse to request an interrupt from the master microcontroller. After responding to the interrupt, the master microcontroller reads the conversion result from the DOUT pin. The result read out after conversion is the coordinate of the clicked point on the touch screen.
In the terminal design, function icons are used to represent specific function operations of the terminal. Thus, by clicking the function icon displayed on the LCD at the corresponding position of the touch screen, the corresponding function operation can be selected, so that the corresponding operation can be performed on the terminal.
2.2 LCD interface circuit
The terminal uses a 160x160 (dots) LCD as the display interface. The LCD controller uses SED1335 from SEIKOEPSON. SED1335 has a powerful I/O buffer, rich instructions, 4-bit data parallel transmission and strong driving ability, and can realize mixed display of graphics and text.
The single-chip microcomputer uses direct access to the LCD, and directly connects the LCD to the single-chip microcomputer bus as a memory. The data bus of the LCD controller is connected to the data bus of the single-chip microcomputer, and the single-chip microcomputer gives the controller chip select and register select signals. In addition, the LCD single-chip microcomputer interface timing and the timing of the SED1335 interface circuit use Intel8080 timing.
2.3 Wireless Data Transmission
The terminal organizes the selected specific function operation into a data command frame according to the provisions of the communication protocol and sends it to the indoor controller RC through the wireless data transmission module. The system uses nRF401 as the control chip for wireless data transmission and reception. nRF401 is a wireless RF data transceiver chip launched by Nordic that operates at 433MHz, has dual channels, and has a data transmission rate of up to 20kbps. Moreover, nRF401 can realize the transmission and reception of FSK signals with a single chip. Its pin level is CMOS level and can communicate directly with the serial port of the microcontroller.
The wireless data transmission module and the microcontroller use a 5-wire interface. Figure 4 is the connection circuit between Atmega103 and the wireless data transmission module.
In Figure 4, PB4, PBS, and PB6 control the power control terminal (PWR_UP), operating frequency selection terminal (CS), and operating mode selection terminal (TXEN) of the wireless data transmission module respectively. When TXEN=1, nRF401 works in the sending state; when TXEN=0, nRF401 works in the receiving state. In addition, the serial port (TXD/RXD) of the microcontroller communicates directly with the data input/output terminal (DIN/DOUT) of the wireless data transmission module.
Ensuring the stability of wireless data transmission is one of the keys to terminal development. Anti-interference measures have been added to both the software and hardware aspects of the terminal design. In terms of hardware, an isolation circuit is added between the serial port of the microcontroller and the data end of the wireless data transmission module, and a decoupling filter circuit is set for the power supply circuit of the wireless data transmission module to reduce the electromagnetic interference of the microcontroller to the wireless data transmission module. In terms of software, appropriate information code combination methods and data frame verification methods are used to reduce the bit error rate of data transmission and the impact of erroneous data frames on the overall data transmission of the terminal.
2.4 Identity Recognition
Among the functional services included in the terminal, some are related to the commercial interests and home safety of residents. For example, electronic ordering and security control functions. These functions can only be performed after the terminal user has been identified and has certain operating permissions. The terminal uses a contactless IC card to identify the user.
Previous article:Design of fall detection alarm system based on Arduino Uno platform
Next article:Application of JTAG ICE MKII in AVRSTUDIO
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
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
- Detailed explanation of intelligent car body perception system
- How to solve the problem that the servo drive is not enabled
- Why does the servo drive not power on?
- What point should I connect to when the servo is turned on?
- How to turn on the internal enable of Panasonic servo drive?
- What is the rigidity setting of Panasonic servo drive?
- How to change the inertia ratio of Panasonic servo drive
- What is the inertia ratio of the servo motor?
- Is it better for the motor to have a large or small moment of inertia?
- What is the difference between low inertia and high inertia of servo motors?
- The Three Realms of Oscilloscopes
- Problems with the snubber circuit
- Hardware Emulation
- [RVB2601 Creative Application Development] Introduction and use of cJSON for RVB2601
- I bought an ST-LINK emulator for SensorTile.box for 19 RMB
- How to set the clearance of ALTIUM without affecting the copper coating
- Common RF Certification Systems
- [RVB2601 Creative Application Development] VII. RVB2601 Sound Recognition Preliminary Test
- Smart Home Energy Management with Levarys and Qorvo Technologies
- Use FPGA to simulate USB function (written in VHDL language).rar