- Details
- Written by: zhang
- Category: Technology
This article was published on André Chr. Andersen's blog, http://blog.andersen.im/2012/07/signal-emitter-positioning-using-multilateration .
Unfortunately, his blog cannot be opened now. Maybe he has no longer maintained it.
The TDOA algorithm used by our first version of the positioning engine comes from this article of his. André Chr. Andersen also provided MATLAB code at the end of the article, and Paul Hayes translated his MATLAB code toy into Python code, which can be found on github https://github.com/paulhayes/MultilaterationExample .
This algorithm is for ultrasonic positioning, but it is essentially the same as UWB positioning. The important thing is that this is a simple and easy-to-implement Multilateration algorithm, which can be used in UWB coordinate calculations after modification.
- Details
- Written by: zhang
- Category: Technology
Hardware Design of Location Anchor
The main control of the location anchor is STM32F103RET6. This MCU has a relatively large Flash and a relatively large RAM, and is suitable for running RTOS.
The UWB transceiver of the anchor uses the DW1000 chip. We directly used the DWM1000 module in the early stage, because the DWM1000 module has already completed the radio frequency part and provides some SPI interfaces to the outside world. We do not need to worry about the analog part of the circuit and can just focus on the logic circuit. Later, some anchor types were added, and some changes were made in this part. Several new designs were added: (1) Making your own modules similar to DWM1000 can save costs; (2) Your own UWB modules use ceramic antennas or PCB antennas, and there are also IPX The base lead uses an external high-gain underline; (3) Add PA/LNA. The original communication distance can reach up to 300 meters at the rate of 850K, and it can reach more than 1000 meters after adding PA/LNA.
- Details
- Written by: zhang
- Category: Technology
Hardware Design for Location Tags
Our mass-produced location tags are name-card style and use DW1000 as the UWB transceiver. In the early stage, the DWM1000 module was used, and in the later stage, the self-designed UWB module was used. Some models also added LNA/PA to increase the location range.
Use STM32F103RBT6 as the main control MCU. Our initial purchase price for this chip was about 12 yuan to 14 yuan, and later it rose to 180 yuan per piece. It was really crazy and made us very passive. However, it later fell back.
The power supply uses an 800mah lithium battery as the power source, and uses a USB interface for charging, which also serves as the tag configuration interface.
There is an MPU6050 three-dimensional accelerometer chip designed on the tag. During mass production, it was found that the effect was not very great, and this chip was not attached in the later production.
There are 2 LEDs designed on the tag, one red and one green.
There is a button designed on the tag, which can be used for alarm purposes. Specific uses require server-side design. The firmware design can support multiple buttons, and later OEM customers need to add other functions (such as anti-tampering, etc.).
- Details
- Written by: zhang
- Category: Technology
Firmware Design of Location Anchor
The location anchor uses RTOS because the program is relatively complex. If the OS is not used, coordination between various functions will be difficult.
For UWB communication between the location anchor and the tag, the location anchor and the location anchor, we have defined several data packets. There are mainly clock synchronization packages (used for clock synchronization between anchors), basic location packages (containing only the most basic location functions), and extended location data packages (including battery voltage, button information, three-dimensional accelerometer information, etc.). Later, we also added TOF auxiliary location data packets and so on.
For communication with the location engine, we have also defined several data packets. Basically, the anchor just forwards the received UWB data to the location engine. Of course, some necessary data conversion needs to be done, such as using standard timestamps, etc. Theoretically, it is not necessary to send the clock synchronization packet to the location engine. We also support sending the clock synchronization packet to the location engine, which helps to monitor the clock synchronization situation.
An important function of the location anchor is clock synchronization. At least it is necessary to ensure that several anchors within a "location area" have unified clocks. Moreover, because the frequency of the crystal oscillator used by each DW1000 chip will be slightly different, clock synchronization needs to be performed frequently, otherwise the clock differences will accumulate more and more.
The DW1000 chip can be configured with some parameters to adapt to different usage environments. We developed a anchor configuration program to configure the anchor. For example, set some functions of the anchor, the UWB channel used, the IP address of the anchor, gateway and other parameters. The anchor configuration program is developed using Delphi7, and uses the network to communicate with the anchor.
The anchor configuration program also has built-in new version of anchor firmware, which can upgrade the anchor firmware.
- Details
- Written by: zhang
- Category: Technology
Firmware Design for Location Tags
The location tag does not use RTOS, and "electricians" describe it as "streaking" :).
The location tag can be connected to the computer via USB. We have a tag configuration program that can configure various parameters of the tag. The tag configuration program has a new version of tag firmware built-in, and the tag firmware can be upgraded.
The working principle of the tag is relatively simple. It is usually in a sleep state. After the set time is up, it wakes up, sends a UWB location data packet, and then continues to sleep.
When the button is pressed, the tag will also wake up and immediately wake up to send a UWB location data packet.
The tag is designed with a battery reminder function. When the battery voltage is lower than a certain value, the red LED will flash. This feature can be turned on or off via the configuration program.
There are several types of UWB data packets sent by location tags. The most basic UWB data packet only contains location data, has the shortest length, takes the shortest time in the air, and saves the most power.