ZigBee technology as the core motor vehicle comprehensive detection system program

This paper proposes a comprehensive vehicle detection system scheme with ZigBee technology as the core, and a data collection terminal node and network coordinator with CC2430 wireless communication chip and LPC2292 microcontroller as the core, and the data transmission and reception process and wireless network of the system The networking process is analyzed in detail, and the key technology implementation process is given.

With the continuous expansion of the application field of wireless technology, the field of industrial control begins to use wireless communication technology for field data transmission. Compared with wired devices, wireless communication technology has the advantages of low cost and no wiring. In recent years, the low-cost wireless network communication standard ZigBee has attracted much attention, and wireless network communication devices based on the ZigBee standard and wireless network communication technologies based on the ZigBee standard (hereinafter referred to as ZigBee technology) have been continuously developed. The ZigBee standard is based on the IEEE 802.15.4 protocol and has powerful device networking capabilities. It mainly supports three self-organizing wireless network types: star network, peer-to-peer network, cluster tree network. The network system node has multi-hop routing function, especially can form a cellular mesh network structure, so it has strong network robustness and system reliability.
ZigBee technology has the characteristics of low power consumption, low cost, short delay, high capacity, free wiring, etc. Taking it as the core to upgrade the existing motor vehicle detection system will greatly simplify the system structure and reduce production and maintenance costs .
1 System overall design The complete motor vehicle inspection system is generally composed of three parts: background management system, foreground control system, and on-site inspection system. The background management system is composed of servers, office systems, toll machines, etc .; the front desk control system is composed of the main control computer system, front panel, photoelectric switch, network system, entry program, communication service program, etc .; the on-site detection system is analyzed by CO / HC It consists of instrument, smoke meter, vehicle speed test stand, wheel load meter, brake test stand, side slip test stand, headlamp tester, sound level meter and secondary meter. The block diagram of the detection system based on ZigBee wireless network is shown in Figure 1.

The star topology is adopted in the detection system, and only one network coordinator controls the communication of the entire network, mainly to complete network synchronization and link management between maintenance equipment. In the network, the terminal devices can not communicate directly, only through the network coordinator to complete the communication between the devices.
Each testing station's testing equipment in the field testing system has a built-in ZigBee module to become a wireless terminal node, and the network coordinator is connected to the host computer in the foreground control system through a UART interface. In application, the terminal device (terminal node) is connected to the on-site detection device; the base station (coordinator) is connected to the main control machine in the foreground. The terminal equipment part performs filtering processing calculation on the real-time collected data, and the processed data is sent to the analog signal modulated by the ZigBee radio frequency (RF) front end integrated in the chip CC2430. The CC2430 in the base station part demodulates the received remote data and transmits it to the upper computer through the UART interface, and further processes, analyzes, displays, stores and shares the data. Because the equipment is placed at the site data collection point at one time, no additional wiring is required, which reduces the construction difficulty and cost. At the same time, even if a device fails, it will not affect the normal operation of other devices, enhancing the reliability and stability of the system. Because the equipment can be taken away from the on-site data collection point, it also makes the maintenance work more convenient and fast.
2 Terminal node and coordinator design The terminal node consists of ZigBee chip CC2430, LPC2292, external memory Flash, ADC module, RS232 and RS485 interfaces, and is responsible for the collection, storage and wireless transmission of on-site test data. The terminal node hardware schematic diagram is shown in Figure 2. CC2430 is a low-cost, low-power monolithic and highly integrated solution of the IEEE802.15.4 standard. It works on the ISM free frequency band and operates at 2.4 GHz.

The terminal node is equivalent to a communication protocol converter, and the corresponding communication interface is set according to the interface characteristics of the connected detection equipment (such as CO / HC analyzer, smoke meter, vehicle speed test bench, wheel load meter, brake test bench, etc.) (RS485, RS232 and A / D sampling interface), direct data collection and analysis. The main chip of the control module is the LPC2292 of the ARM7TDMI-S core. The maximum operating frequency is 60 MHz, which contains 256 KB of Flash space and 16 KB of RAM space. The peripheral control part includes a timer module, capture / compare module, and A / D conversion Module, SPI interface and USART serial port, etc., complete the control and processing functions of the system.
The CC2430 and the master controller are connected via SPI, where the master controller is in master mode and the CC2430 is in slave mode. LPC2292 also has 4 I / Os connected to CC2430, the main function is to query the status of CC2430 when necessary. CC2430 uses SFD, FIFO, FIFOP, and CCA 4 pins to indicate the status of sending and receiving data. The high level of the SFD pin indicates that it is in the receiving state; the FIFO and FIFOP pins indicate the status of the receiving FIFO buffer area; the CCA pin outputs a high level when the channel has a signal, and it is only valid in the receiving state. CC2430 is a half-duplex RF chip, which is only in one working state at a time. CC2430 has 15 command registers, and each register has a fixed address. The transmit buffer and the receive buffer are separate: TXFIFO and RXFIFO each have 128 bits.
The hardware structure of the coordinator is similar to the terminal node, and will not be repeated here. The format of data transmission is specified in Table 1. The frame data format is: detection station number (1B) + data content (4B).
2.1 Hardware data sending program The sending program first queries the status word to ensure that CC2430 allows sending. If the sending is allowed, the program first clears the information remaining in the TXFIFO, and then writes the data packet to be sent to the TXFIFO through SPI. Then trigger the sending command through the SPI interface, namely STROBE_STXONCCA. The status bit is used to determine whether the transmission is successful. If it is unsuccessful, the CSMS / CA algorithm is called for multiple attempts; if the transmission is successful, the primitive of successful transmission is returned to the upper layer. The program flow is shown in Figure 3.

2.2 Hardware data receiving program When CC2430 receives a valid data packet, it will indicate the arrival of the data packet by pulling the FIFOP pin high. The main controller detects the high level of FIFOP will trigger an external interrupt, use the interrupt function to receive data, this interrupt priority is set to the highest. The program flow is shown in Figure 4.

3 Network establishment and communication The network system designed in this paper does not use the standard configuration file defined by the ZigBee Alliance, but configures the network in the application program. Set the maximum number of sub-nodes of the node to 5, the network depth to 3, and the maximum number of routers among the sub-nodes to 3. Therefore, the maximum number of nodes in the network can be calculated as 66.
In LR-WPAN defined by ZigBee technology, the starting point for network establishment is the PAN Coordinator. The node will establish a new PAN network in two situations: (1) No beacon frame is received during active scanning; (2) The parameters of the received beacon frame do not match the capabilities of its own node.
The steps to establish a PAN network are as follows:
(1) After the coordinator node is powered on, the network layer first releases the NLME-NETWORK-FORMATION.request primitive, then the network layer management entity (NLME) requests the MAC layer to detect the network channel, by issuing the MLME-SCAN.request primitive Scan the effective channel energy, and the result after the scan is returned to the network layer management entity by the MLME-SCAN.confirm primitive. NLME discards channels with lower energy levels according to the results of energy detection, and then actively scans the selected channels to finally find the best channel to establish the network (default is 18 channels).
(2) Select the network logo. Each network is assigned an independent network identification PAN ID. The devices in the network confirm the network to which they belong based on this identification. After completing the first step, the coordinator node selects a random network identifier on this channel and starts to listen to the channel. This system uses the PAN ID number 0x1aab corresponding to channel 18.
(3) Set the network address. Once the network identification is selected, NLME will select a 16-bit network address and at the same time modify the PIB attribute macShortAddress of the MAC sublayer by issuing the MLME-SET. Request primitive to keep it consistent. At this time, NLME will issue the MLME START.request primitive to the MAC layer to start a new PAN operation. Then, the network layer management entity (NLME) notifies the upper layer of the execution result of initializing the ZigBee coordinator by sending the NLME-NETWORK-FORMATION.confirm primitive.
After the ZigBee coordinator device establishes the network, the terminal device can join the network established by the coordinator as a child node. There are two ways for the child node to join the network: join the network through the MAC layer association mode; directly join the network through the designated parent node. This article takes the former method.
First, the child node calls the NLME-NETWORK-DISCOVERY.request primitive to set the channel to be scanned and the time for each channel to scan. Once the MAC layer completes the scan, it will send the MLME-SCAN.confirm primitive to inform the network layer, network The layer will send the NLME-NETWORK-DISCOVERY.confirm primitive to inform the application layer that the application layer selects the discovered network from the association table to join. Once the potential parent node is determined, the network layer will call the MLME-ASSOCIATE.request primitive to the MAC layer. After receiving the node's network access request, the MAC layer of the coordinator will store the 16-bit network address and its IEEE 64-bit network address allocated to the child node in the AddressMap and record it in the NeighborEntry. The coordinator will create an entry in the association table as its child node, and return to the terminal node by including the 16-bit network address in the confirmation message through the MLME-ASSOCIATE.reponse primitive.
Fig. 5 is the related information display of the coordinator networking and terminal node access to the network. In debug mode, the hardware sends data to the computer through the serial port. The serial port transmission setting is: rate 9 600 b / s, 8 data bits, 1 start bit, 1 stop bit, and no parity. The left side of Figure 5 shows the process of coordinator networking and adding child nodes, and the right side shows the process of child nodes joining the network.

ZigBee is a high-performance, short-distance, low-rate wireless network technology with broad application prospects. Motor vehicle inspection system has many terminal devices and complex on-site environment. It uses ZigBee technology to build a wireless sensor network and realize real-time processing of each inspection station data. It has simple networking, low system cost, easy network expansion, stable communication, and maintenance. Convenience and other advantages, this is a new trend of integrated and intelligent vehicle detection systems.

5050 Red Smd Led is deeply loved by their users because of the small size, the high brightness.

Meanwhile, 5050 Red SMD LED have the cooling copper at the bottom, which can make the product to get out of the heat in time.


It is often used in LED lighting, LED Lamps , LED backlight, LED panel lights, LED furniture, grow light LED, fill light LED, LED aperture and other lighting products.


In this catalog, we mainly introduce the 5050 Red Smd Led of visible light. 2835 SMD LED, size is 3.0*3.6mm. For this red SMD LED , we can package with single chip 5050 SMD LED or 2 chips 5050 SMD LED, 3chips 5050 SMD LED and the power can be 0.1W 5050 red SMD LED, 0.06W 5050 red SMD LED, 0.2W 5050 red SMD LED, 0.5W 5050 red SMD LED, 0.6W 5050 red SMD LED, 0.8W 5050 red SMD LED, 1W 5050 red SMD LED, 3W 5050 red SMD LED and so on.

The voltage of the 5050 Red SMD LED is between 1.8-2.5V, but most of them are between 2.0-2.2V.

In addition, this 5050 red SMD LED have the angle like the through-hole LED so it belongs to the spotlight SMD LED. It have a len on the top of the SMD LED, which can make this 5050 SMD LED with angle like 30 degrees, 60 degrees.


5050 red LED



We supply kinds of 5050 SMD LED with different wavelength from 365nm to 1550nm, which include the visible LED and the invisible LED.
In this catalog, we mainly introduce the 5050 red SMD LED.


All of our product are meet with Reach, CE, RoSH, SGS, EN62471 standards and have 5 years warranty.


5050 Red SMD LED

5050 Red SMD LED, 5050 SMD LED, Red Color SMD LED, Waterproof Red SMD LED

Shenzhen Best LED Opto-electronic Co.,Ltd , https://www.bestsmd.com