A WPAN network equipment solution

Publisher:美丽花朵Latest update time:2014-10-31 Source: 21ic Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

  The IEEE 802.15.4-2003 protocol specifies 27 communication channels: 1 at 868 MHz with a rate of 20 kbps; 10 at 915 MHz with a rate of 40 kbps; and 16 at 2.45 GHz with a rate of 250 khps. It supports three topological structures: star, tree, and mesh. According to the functional division, there are two different types of devices in the network: fully functional (FFD) and reduced functional (RFD). In order to simplify the protocol, IEEE 802.15.4-2003 meets the OSI reference model, specifies the physical layer and MAC layer, each layer completes its own specified tasks, and provides a service task interface to the upper layer. The data communication methods in the protocol can be divided into direct data transmission and indirect data transmission, and are packaged and sent out in the form of data frames. The network can work in superframe and non-superframe modes. In order to improve its reliability, it adopts the CSMA/CA media access control mechanism, the confirmation frame response method and the CRC-16 ITU verification mechanism, and can add some data encryption and security control modes. For low power consumption and low cost considerations, the physical layer has only 14 service primitives and the MAC layer has 35 primitives. Compared with Bluetooth, these primitives are only 1/3 of it.

  1 Hardware Circuit Design

  In general, the basic structure of IEEE802.15.4 network equipment is shown in Figure 1. The power supply of the system is usually provided by a battery, or by a voltage regulator module. The RF transceiver chip is responsible for the generation and reception demodulation of the RF signal, and its reference clock is provided by an external high-precision crystal oscillator; at the same time, it must realize some basic functions of the physical layer and MAC layer, such as encoding and decoding, channel selection, power control, receiver energy detection (RSSI), link quality indication (LQI), idle channel assessment (CCA) and hardware CRC check. Under the premise of realizing these basic functions, the RF chip should be as low power consumption, high sensitivity and small package as possible. The microcontroller should have abundant resources to complete the control of the RF chip, as well as the real-time response to sensors, various application interfaces and user interfaces. Usually, the protocol stack needs to occupy about 32 KB of storage space.

The basic structure of IEEE802.15.4 network equipment

  1.1 AT86RF230 Performance and Internal Structure

  Atmcl's AT86RF230 is a wireless RF transceiver chip compatible with ZigBee/IEEE802.15.4. It operates in the 2.4 GHz ISM band, has a 104dB link budget, -101 dB receiving sensitivity and 3 dB transmission power, thereby reducing the total number of node devices required in the network and greatly reducing the networking cost of the IEEE 802.15.4 system. All RF key components (except antennas, crystal oscillators, and decoupling capacitors) are integrated into a chip, and the package form adopts a 32-pin, 5 mm×5mm×0.9mm QFN package. The device composed of this chip requires only 6 external components, and the functional block diagram is shown in Figure 2. The terminal node is usually battery-powered, with a current consumption of 17 mA in transmit mode, 15 mA in receive mode, and only O.7μA in sleep mode; the operating voltage can reach 1.8~3.6V, and there is an integrated 1.8V LDO inside. AT86RF230 has 35 8-bit registers that can be accessed through SPI control timing. There are 8 basic states when working (can be expanded to 14 as needed). The buffers for sending data and receiving data on the chip are 129 bytes and 130 bytes respectively, which can just meet the maximum frame length of 127 bytes specified by the IEEE802.15.4 protocol. A 2-byte CRCl6 check code is required when sending, and an additional 1-byte link quality indicator is required when receiving.

AT86RF230 Internal Structure

  1.2 Hardware circuit composition of network equipment

  The schematic diagram of the main hardware parts is shown in Figure 3. The digital interface of the module is the SPI interface between ATmega128l and AT86RF230 and other 4 control lines. AT-megal28l is an 8-bit high-performance AVR microcontroller from Atmel. Its basic features are: it adopts RISC architecture, has 135 instructions, and can reach a throughput of 16MIPS when working at 16MHz; it has 128KB Flash, 4KB on-chip E2PROM and 8KB SRAM, and can download programs through ISP or JTAG; the operating frequency can reach up to 16MHz, the operating voltage is 1.8~5.5V, and the operating current is only 0.1μA in power-down mode. In this design, ATmegal281 works at an internal oscillation frequency of 8MHz. If an external clock signal synchronized with AT86RF230 is to be used, the CLKM pin should be connected to the XTAL1 pin of ATmegal281, and the fuse bit should be set to the external clock. The various working status interrupt signals of AT86RF230 are controlled by the IRQ pin, which is connected to the ICPl pin of ATmegal281 to generate a capture interrupt, because the capture interrupt can reduce external interference by setting the noise elimination mode, thereby improving the reliability of the interrupt. For the specific methods of SPI read and write timing, state transition diagram and various interrupt control of AT86RF230 registers, please refer to the references. It should also be noted that the long-term working frequency stability of the external crystal oscillator X1 connected to AT86RF230 should be less than or equal to 40 ppm, and the appropriate load capacitor should be selected according to the driving capability of the crystal oscillator and the chip. [page]

WPAN network equipment hardware circuit

For the analog design, anti-interference measures need to be taken to reduce the interference of other parts and improve the RF performance. For example, add magnetic beads or inductors to the analog power input; the analog ground and digital ground of AT86RF230 should be wired separately and grounded at one point; in order to reduce the influence of distributed parameters, the ground should be as large as possible, and vias should be properly punched; the capacitor used for filtering should also be as close to the chip as possible. In addition, attention should be paid to impedance matching. The antenna port of AT86RF230 is a 2-way 100Ω differential output, which can be directly connected to a differentially fed antenna, but the disadvantage is that impedance matching and testing are difficult. Generally, a balun can be used to transform the 2-way 100Ω differential output into a 50Ω output, and then connect various single-ended fed antennas. When controlling the impedance of the PCB conductor of the RF signal output pin, the model shown in Figure 4 can be used.   

  According to the selected parameters, use the free software Ap-pCAD provided by Agilent, enter the Passive Circuits interface and select the corresponding model. This design uses the Coplanar Waveguide model. After entering the parameters, the characteristic impedance of the feeder can be calculated. If the impedance of the feeder designed according to the calculation results does not reach 50Ω in the actual test situation, 50Ω matching can be achieved by adding inductor L2 and corresponding capacitor C1 or C2. In terms of antenna selection, you can choose a double-ended 100Ω differential antenna or a 50Ω single-ended antenna, as long as you add a double-ended to single-ended balun as needed. The advantage of using a dual-board or F-type PCB antenna is that you can obtain a relatively high gain and strong anti-interference ability; the sheet antenna is small in size, but the gain is not high and it is easily interfered.
2 Software Design
  The software development environment is AVRSTUDIO+AVRGCC. Both software are free. The software design mainly includes three parts: RF drive, peripheral circuit control and ZigBee protocol stack design. The software flow of the coordinator and network node in the WPAN network based on the IEEE802.15.4 protocol is basically the same, except that the network coordinator has to assume the function of network establishment, and the network node has to assume some control or measurement functions. In order to be compatible with other ZigBee products, the software design must strictly comply with the IEEE 802.15.4 protocol. The network topology established in this design is a star network with a non-superframe structure. The specific software flow is shown in Figure 5.  

  The basic process is: the network coordinator first initializes the WPAN information database, establishes the ZigBee network, allocates the network ID number and 16-bit network address, initializes the neighbor device table, and then waits for other nodes to connect; after the network node is powered on, it initializes the internal resources and the WPAN information database of the network node, sends a scan signal to request a connection, and after the connection is successful, records the network ID and the allocated 16-bit network address, and sends information to the coordinator according to the function setting. Because the network node is generally battery-powered, it must enter a dormant energy-saving state when idle. Peripheral circuit control is mainly for the control of sensors, switches and other devices, and the software can be modified accordingly according to different needs.

  3 Test results and summary

  Figure 6 shows the output spectrum of the modulated signal at 2.405 GHz on the 11th channel, from which the frequency corresponding to the maximum power can be seen. In an open environment, the bit error rate of communication can be less than 1% at a distance of 150 m. The system consumes 23.7 mA in the transmitting state, 21.78 mA in the receiving state, and only 2.5 μA in the sleep state. The experimental results show that the WPAN network device based on the AT86RF230 transceiver designed in this paper has the advantages of high fault tolerance, superior performance, ultra-low power consumption, and low price, and can meet the actual needs of various occasions.

Reference address:A WPAN network equipment solution

Previous article:Construction of robot speech recognition system based on Julius
Next article:Intelligent lighting control solution

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号