- 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.
- 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.).
- 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.
- 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.
- Written by: zhang
- Category: Technology
The Production Process of Location Anchors and Location Tags
Product production is divided into two steps: hardware production and factory initialization.
Hardware production: We purchase the required components ourselves, place an order with a PCB manufacturer to make the PCB, and entrust a SMD(Surface Mounted Device) factory to do the surface mount (soldering). Finally, what we get is a PCBA, which is a semi-finished board with components installed. Sometimes, due to procurement cycle time, some components may be soldering by ourselves.
After getting the PCBA, we first powered on to see if it was normal. Sometimes, components on the board may have weak soldering or short circuits. If the soldering is OK, some LEDs on the board will light up.
If there is no abnormality when powering on, you can flash the firmware. The firmware on the board is divided into two parts: Bootloader and Firmware.
Bootloader is a boot loader, which is fixed and unchanged throughout life. In other words, once it is flashed to the board, the Bootloader will not change. Even if there is a new Bootloader version in the future, the user's device cannot be updated.
Firmware is normal firmware, which performs normal functions and can be upgraded to a new version at any time.
We use a special firmware Flasher to flash the Bootloader, and most factories will use a firmware Flasher to flash the firmware. The firmware in the Flasher is encrypted to prevent it from being read by others. The programmer also has a flash count, which can count how many times it has been flashed.
After the bootloader is flashed, a factory initialization work needs to be done.
Factory configuration of the anchor: For the anchor, it is connected to the network (in fact, the power on mentioned above means connected to the network, because it uses POE for power supply). We have a dedicated computer running the factory initialization program. This program will automatically assign a MAC address and serial number to the new anchor, automatically write firmware to the new anchor, and automatically write the default anchor configuration. The factory configuration program can also print the nameplate of the new anchor, that is, use a label printer to print out an instant label with relevant information about the anchor: such as manufacturer, MAC address, serial number, anchor model, etc.
The factory configuration program will also do some testing at the same time, such as communicating with the reference anchor to confirm that UWB communication is normal; the factory configuration program pretends to be a location engine to confirm that it can normally receive data packets from the new anchor.
Factory configuration of the tag: The factory configuration of the tag is similar to that of the anchor. The difference is that the tag uses a USB data cable to connect to the configuration computer instead of using the network. Run the "tag factory configuration program" on the configuration computer. The configuration program will automatically assign an EUI64 address to the tag and upload the tag firmware to the new tag.
The factory configuration of the tag will also communicate with the reference anchor to confirm that UWB communication is normal.
For some tag models, we have a built-in RFID tag. We use an RFID Reader and Writer to write some initialization information to the RFID. This operation is also performed by the tag factory configuration program.
The tag factory configuration program also prints the tag's nameplate.