Software and hardware design of wireless building tracking system based on CC2500

Publisher:幸福旅程Latest update time:2010-06-23 Source: 现代电子技术 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Introduction

With the increasing intelligence of buildings, people are no longer satisfied with simply using cameras to track and monitor people or objects in buildings. Therefore, wireless positioning technology has quietly emerged. This technology can not only track targets and monitor the target's route of action, but also predict the target's trajectory, which is something that traditional camera monitoring systems cannot do. This positioning system involves a lot of technologies from the underlying hardware to the upper software. This article only focuses on the hardware and software of the wireless positioning part.

The key to the wireless tracking system is how to locate. Currently, the most mature wireless positioning technology is GPS, but this technology cannot be used in buildings, so we need to find a new positioning method to achieve our goal. Here we choose the beacon positioning technology based on received signal strength (RSSI). Most RF chips can get RSSI, but considering the overall performance, we use the CC2500, a low-power 2.4 GHz global license-free band RF chip launched by Chipon. It is small in size, easy to operate, and uses a 3-wire SPI. It communicates with the MCU and can automatically generate RSSI after each signal is received, which is convenient for the upper layer to complete the positioning.

2 CC2500 Chip Introduction

2.1 Overall Performance

Its main features are:

(1) Small size and simple peripheral circuits. CC22500 has only 20 pins and a 44 mm QLP package. Compared with other RF chip packages, this package is easier to solder manually.

(2) High sensitivity, low power consumption, and adjustable rate. The comparison between CC2500 and several commonly used 2.4 GHz RF chips is shown in Table 1. The data without rate in the table are obtained at a data transmission rate of 250 kb/s.

(3) CC2500 hardware supports data processing. When receiving data, it has functions such as buffering, automatic detection of information synchronization words, address detection, information length analysis and CRC check. It supports forward error correction and has an internal integrated temperature sensor.

2.2 WOR Function

In order to save power, RF chips usually use sleep mode. The chip will inevitably lose information when it is in sleep mode, and the WOR (Wakeup-on-Radio) function of CC22500 can avoid this. The WOR function ensures that the chip wakes up periodically in deep sleep to detect whether there is a signal around. This process does not require CPU interruption. If a data packet is successfully received, the chip can output an interrupt through the pin to notify the MCU to read it. When using the WOR function, the on-chip RC clock is used as the WOR clock. The overflow cycle time can be determined by programming.

2.3 RSSI and LQI Functions

RSSI reflects the strength of the received signal, and LQI reflects the quality of the signal connection. Both can be obtained by reading the chip register. Although LQI can determine the quality of the connection, it will vary depending on the modulation method.

RSSI is a good parameter for determining the distance between two nodes. After reading the value from the RSSI register, we need to perform a series of conversions to get the reception strength value. First, determine whether the value RSSI dec in the RSSI register is greater than 128. If so, then:

If it is less than 128, then:

The RSSI offset varies according to the data transmission rate. Its value can be found in reference [1].

2.4 CCA Function

CCA (Clear Channel Assessment) can indicate whether the current channel is idle. Its function is similar to CSMA. When the chip is about to switch to the transmission mode, it will first check the channel. Only when the channel is idle will it enter the transmission mode, otherwise it will stay in the original mode or enter other modes according to the programming setting. There are 3 situations that can trigger the CCA function:

(1) When RSSI is lower than the threshold value;

(2) When a data packet is received;

(3) Both of the above.

2.5 Transmitting power table

The power meter of CC2500 is used to set the transmission power each time it is sent. It can store up to 8 bytes of power value. By default, each time it is sent, it starts reading from the lowest power value, and reads one byte at a time. When the last byte is read, it automatically returns to the first byte. If necessary, it can be programmed not to read from the first byte to achieve adjustable transmission power.

3 Tracking Algorithm

3.1 Positioning Algorithm

The so-called tracking trajectory is actually a collection of several positioning results in chronological order. So how to locate is very important. Currently commonly used positioning technologies such as positioning methods based on accurate ranging and centroid algorithms can complete positioning relatively accurately in open environments, but the effect is relatively poor inside buildings. Experiments show that the positioning trajectory based on the above methods will be jumpy rather than continuous. One advantage of positioning inside a building is that the target to be located has certain constraints on the activity space. For example, when a person walks in a corridor, he can only move forward or backward, and there are walls on both sides, so he cannot walk. In this way, his trajectory actually follows a certain rule. Therefore, the location information inside the building can be integrated for positioning.

[page]

Considering the above application requirements and environment, we borrowed the RADAR system in the literature [2] and adopted an indoor positioning system based on RSSI technology, but made improvements on the test method. Instead of using base station positioning, we used beacon positioning.

There are two types of nodes in the system: one is the beacon node whose position is completely known; the other is the target node whose position is to be measured. After testing, the maximum transmission distance of our node based on CC2500 hardware in the building is about 60 m (the routing of the RF part of the PCB board affects the maximum transmission distance), so for the sake of accuracy, the interval between the beacons is 20 m. When there is a wall or obstacle between the two locations, two beacons must be placed, which does not follow the above rules. Of course, the more beacons there are, the more accurate the positioning is. The target node sends out signals periodically. After the beacon receives the signal from the target node, it obtains the signal strength value RSSI, calculates the position of the target node based on the strength value, and then sends the positioning information to the base station to complete the positioning work.

There are usually two types of in-building positioning algorithms: empirical models based on signal transmission and theoretical models based on signal propagation. The accuracy of the latter is greatly affected by the building materials, and a lot of experimental corrections are required in the end, so we use the empirical model of signal propagation. First, place the beacon. And give its coordinates. Let half of the distance between the two beacons be D (m). If there is an obstacle between the two beacons, the distance between the beacon and the obstacle is defined as D. Use the target node to move within the distance D to obtain the RSSI of each point, and establish a discrete data table (x, y, RSSI) of the relationship between the position and signal strength at each point. At the same time, it is important to ensure that the target node will be located by a beacon node at each point. It can be seen that the positioning accuracy of the system is:

Among them, (x1, y1, RSSI1) and (x2, y2, RSSI2) are two adjacent data in the discrete data table.

During positioning, the beacon looks up the table for positioning. When the target node signal is less than the minimum threshold RSSI in the table, it is directly discarded and other beacons will locate it.

3.2 Cluster Routing Algorithm

信标在得到目标节点的位置之后,需要将位置信息发往基站,由基站进入监控软件系统。在楼宇中信标的数量非常多,如果不选择一种良好的路由算法,那么很容易造成信息的丢失和误码率升高。我们采用分簇路由算法,这种拓扑有利于分布式算法的应用,适合大规模网络,簇头节点担负数据融合的任务,可使整个网络的数据传输量大大减轻,在使用电池供电的场合,其还可以显著延长整个网络的生存周期。

All beacon nodes are fixedly divided into several clusters. Each cluster selects a cluster head node. When selecting a cluster head node, it is important to select a beacon node in a remote location. This type of beacon positioning work is relatively less and is not prone to conflicts in positioning and transmission. Clustering is mainly based on geographical location. The number of nodes in each cluster does not need to be the same, which helps avoid conflicts when data is sent to the base station. The cluster head node is responsible for allocating time slots for all beacon nodes in the cluster. Each beacon node sends positioning information to the cluster head node at its own specified time. After receiving the information from all nodes in the cluster, the cluster head node synthesizes it and summarizes it into a frame of data to send to the base station. In this frame, the positioning time difference of all beacons is ignored and treated as positioning information at the same time.

If positioning is performed once every 2 seconds, and there is a cluster of 5 nodes, the time slot allocated by the cluster head node to each node can be 300 ms. CC2500 with a transmission rate of 250 kb/s can fully complete the positioning and data transmission work within this time slot. This leaves about 800 ms for the cluster head node to perform data fusion and data transmission. The process of beacon node data fusion is shown in Figure 1.

After the data is uploaded to the base station, the base station uploads it to the computer's monitoring software through the network port. The monitoring software uses a graphical method to illustrate the location of the node, as shown in Figure 2.

4 Conclusion

The test shows that CC2500 can do a good job of positioning in the system, but this positioning method is relatively simple and not precise enough. Its accuracy mainly depends on the accuracy of the RSSI data table before the system is formed. Since the whole measurement process has considerable randomness and subjective factors, it usually cannot achieve the ideal level. How to reduce this subjective factor and how to reduce the workload in the early stage need further exploration.

Reference address:Software and hardware design of wireless building tracking system based on CC2500

Previous article:Power Quality Monitor Based on Embedded Win CE System
Next article:Design of large capacity Chinese character fire floor display based on CAN bus

Latest Security Electronics Articles
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号