A UWB three-radio frequency ranging circuit and driving method thereof
Through the parallel communication technology of UWB three-radio frequency ranging circuit, using multi-radio frequency adapter board and main control module, different channels of UWB radio frequency module can work in parallel, solving the problems of slow positioning speed and small capacity in indoor multi-target scenes. Significantly improve positioning efficiency and capacity.
Patent Information
- Application Number
- CN202010357363.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-04-29
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2040-04-29
AI Technical Summary
In indoor multi-target scenarios, UWB positioning technology is difficult to meet the high-precision and efficient positioning requirements due to interference between tags and slow positioning speed.
It adopts UWB three-radio frequency ranging circuit and works in parallel through three UWB radio frequency modules. It uses multi-radio frequency adapter board and main control module to realize parallel communication of different channels, improves ranging speed and reduces system overhead.
In multi-target scenarios, the positioning speed and label capacity are significantly improved, nearly three times, while maintaining low system overhead, solving the problems of slow positioning speed and small label capacity.
Smart Images

Figure CN111487608B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of location services, and in particular to a UWB three-radio frequency ranging circuit and a driving method thereof. Background Art
[0002] In recent years, with the increasing demand for precise positioning technology, the related technologies and industries of location services are developing from outdoor to indoor, giving rise to a series of wireless positioning technologies such as UWB, WIFI, ZigBee, Bluetooth, ultrasound, infrared, etc. Among them, UWB positioning technology has the characteristics of high time resolution, strong penetration, strong resistance to multipath fading and strong anti-interference ability, making UWB more suitable for indoor positioning. However, most other technologies are easily affected by the environment, have low positioning accuracy and short positioning distance, and cannot meet the requirements of high-precision indoor positioning.
[0003] In the field of indoor positioning, there will be multiple targets to be positioned. For multi-target scenarios, the positioning of tags is bound to cause interference between different tags and slow positioning speed. At present, for the positioning of multiple UWB tags, in order to prevent positioning failure caused by communication conflicts, the TDMA method is generally adopted, that is, a scheduling cycle contains multiple time slots, and the positioning of a UWB tag is completed in one time slot. Due to the clock drift of the tag, it needs to be calibrated after a period of time, so the scheduling cycle should not be too large. In addition to other overheads, the tag capacity in one scheduling cycle will be very small. If three RF base stations are used for positioning, the three UWB RF modules on the three RF base stations use different channels, which is equivalent to having three parallel scheduling cycles. At this time, the number of tags that can be positioned at the same time is close to 3 times the original. If single RF positioning is used for multiple tags, several single RF base stations need to be placed at each base station to realize the simultaneous positioning of multiple tags. Although this improves the positioning capacity and speed, it increases the overhead, and multiple base stations are not conducive to unified control, which makes the scheduling of the entire positioning system more complicated. Summary of the invention
[0004] The present invention proposes a UWB three-RF ranging circuit and a driving method thereof, which can enable three UWB RF modules using different channels to work in parallel, and can increase the ranging speed by nearly 3 times, so as to solve the problems of slow positioning speed and small tag capacity in multi-target scenarios, while ensuring that the overhead is not too high.
[0005] To achieve the above object, the present invention adopts the following technical solutions:
[0006] A UWB three-RF ranging circuit comprises a power module, an interface module, a main control module, a multi-RF adapter board, three UWB RF modules and three LED modules; the power module is connected to the main control module and is used to provide a 3.3V working voltage for the main control module and the UWB RF module connected through the multi-RF adapter board; the interface module is connected to a host computer system and is used to perform information interaction with a high-level database and a processing process; the main control module adopts an MCU as a main control chip and reads and writes the UWB RF module through an SPI interface; the multi-RF adapter board is connected to the main control module and the UWB RF module and is used to connect the main control module and the UWB RF module; the UWB RF module comprises a communication chip and a RF antenna with a UWB transceiver function, and the three UWB RF modules all communicate with the main control module through the multi-RF adapter board and are used to realize the transmission and reception of UWB signals; the LED module is connected to the UWB RF module, and the three LED modules are used to indicate the transmission and reception status of the three UWB RF modules respectively.
[0007] The main control module reads and writes the UWB radio frequency module through the SPI interface. Since the UWB three-radio frequency ranging circuit has three UWB radio frequency modules, it is necessary to lead out two GPIO pins from the MCU of the main control module and connect them to the input end of the two / four decoders on the multi-radio adapter board. Three of the four output ends of the two / four decoders are selected and connected to the chip select lines of the three UWB radio frequency modules respectively. Four signals are generated by controlling the level of the two GPIO pins. Three of the signals SS1, SS2, and SS3 are used to chip select one of the three UWB radio frequency modules for communication, and the other signal is used to turn off the chip select. The other signal lines SCK, MOSI, and MISO of the SPI are connected in parallel to the three UWB radio frequency modules in bus mode through the multi-radio adapter board, and these three signal lines are used by them together.
[0008] After the main control module is powered on, the three UWB RF modules need to be reset. The three signal lines obtained as chip select lines through the two / four decoder are connected to the input ends of the three two-input OR gates on the multi-RF adapter board together with a GPIO pin led out from the main control module. The output ends of the three two-input OR gates are connected to the reset ends RSTN1, RSTN2, and RSTN3 of the three UWB RF modules respectively, so as to reset the specified UWB RF module.
[0009] When the UWB radio frequency module generates an interrupt when transmitting or receiving UWB signals, the interrupt lines IRQ1, IRQ2, and IRQ3 are drawn from the three UWB radio frequency modules and are respectively connected to the three input ends of the three-input OR gate on the multi-radio adapter board, and the output end of the three-input OR gate is connected to the interrupt line IRQ of the main control module. As long as one of the three UWB radio frequency modules generates an interrupt request, the interrupt response of the main control module will be triggered. When the main control module processes the interrupt, if the three UWB radio frequency modules generate interrupts again, the main control module will not process it immediately, but wait until the current interrupt processing is completed, and then poll the status registers of the three UWB radio frequency modules to determine which interrupt is generated, and then chip select the UWB radio frequency module for processing;
[0010] The three LED modules are connected to the three UWB radio frequency modules respectively, and each LED module has two LED lights for indicating the status of receiving and sending UWB signals of the corresponding UWB radio frequency module.
[0011] At the same time, the present invention provides a driving method of a UWB three-radio frequency ranging circuit, comprising the following steps:
[0012] (1) Create three tasks with the same priority, namely Task 1, Task 2, and Task 3, to form a ready task queue. The three tasks correspond to three UWB radio frequency modules to control them to complete the related functions of sending and receiving UWB signals. Since the functions completed by each UWB radio frequency module are the same, the execution code of each task is the same; assign a parameter cs to each task to select the corresponding UWB radio frequency module, where cs = 1, 2, 3. The parameter cs in each task is a specific value, that is, the parameter cs of Task 1 is 1, the parameter cs of Task 2 is 2, and the parameter cs of Task 3 is 3;
[0013] (2) Run task x, where x = 1, 2, 3, initialize the UWB RF module x of the three RF ranging circuits, and reset the specified UWB RF module x through the parameter cs and the level signal of the GPIO pin; configure the corresponding parameters, configure different channel parameters for each task, and configure other parameters in the same way. For global variables, use structure arrays to store them separately, so that the three tasks can run independently, and the operations on the three UWB RF modules are separated. Different channels are set for the three tasks, that is, the three UWB RF modules use different channels to ensure that they do not interfere with each other when communicating with three single RF tags using different channels, and perform ranging in parallel;
[0014] (3) The main control module reads and writes the UWB radio frequency module through the SPI interface, and sends instructions to control the UWB radio frequency module to send and receive UWB signals. The UWB radio frequency module generates an interrupt through the interrupt circuit to inform the main control module that the state conversion has been completed, and indicates it through the LED module. Since the processing of the interrupt will poll the three UWB radio frequency modules to determine which radio frequency module issued the interrupt request, when exiting the interrupt processing program and returning to the original task, the corresponding relationship between the original task and the parameter cs should be kept unchanged to prevent the reading and writing of the UWB radio frequency module that does not match the task. As long as one UWB radio frequency module generates an interrupt, it will stop executing the current task and handle the interrupt. After handling all the current interrupts, it will return to continue running the original task;
[0015] (4) When task x is finished executing, the scheduler will be called. At this time, task x is added to the end of the ready queue. The scheduler will run the next task from the ready queue in sequence. In the next task, the main control module reads and writes another UWB RF module through the SPI interface and controls its work. The scheduler schedules three tasks in a loop until task x is run again. After the main control module sends the positioning-related data and instructions to the UWB RF module, the UWB RF module can work independently. When in the sending state, the UWB RF module will automatically send a complete frame according to the configuration and automatically record timestamps and other operations. When in the receiving state, the UWB RF module will continue to listen to and receive signals. The above processes are all hardware implementations of the UWB RF module and do not require control by the main control module. At this time, the main control module can execute other tasks, that is, start executing tasks for another UWB RF module. Since the time for the main control module to run tasks is shorter than the time for the UWB RF module to send and receive signals and the time for the signals to propagate in the air, the three UWB RF modules can work in parallel under the serial control of the main control module for a shorter period of time.
[0016] (5) Steps (3) and (4) are executed in a loop, during which the measured distance is uploaded to the host computer system through the interface module.
[0017] It can be seen from the above technical scheme that the UWB three-RF ranging circuit and its driving method described in the present invention form a three-RF base station by expanding three UWB RF modules on a traditional single RF base station. Each UWB RF module on the three-RF base station can respectively perform ranging with a single RF tag with the same channel. When the three UWB RF modules on the three-RF base station use different channels, and the three single RF tags use three channels corresponding to the three RF base stations, the three UWB RF modules on the three-RF base station can work in parallel, that is, one three-RF base station can perform ranging with three tags in parallel at the same time, so that the ranging speed is nearly 3 times higher than that of the traditional single RF base station. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1Schematic diagram of a UWB three-radio frequency ranging system in an example of the present invention;
[0019] Figure 2 It is a structural diagram of the UWB three-radio frequency ranging module in an example of the present invention;
[0020] Figure 3 This is a schematic diagram of the connection between the main control module, the UWB radio frequency module and the LED module in an example of the present invention;
[0021] Figure 4 It is a flow chart of a driving method of a UWB three-radio frequency ranging circuit in an example of the present invention;
[0022] Figure 5 This is a timing diagram of task and interrupt switching in an example of the present invention. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments.
[0024] like Figure 1 As shown, a UWB three-RF ranging system of an embodiment of the present invention includes a single RF tag and a three-RF base station using a three-RF ranging circuit. The three-RF base station is installed in a fixed position, and three single RF tags are installed on the target to be measured. The three UWB RF modules on the three-RF base station use different channels, and the three single RF tags use three channels corresponding to the three-RF base station. Each UWB RF module on the three-RF base station can communicate with a single RF tag with the same channel respectively, measure the distance between the tag and the base station, and connect to a computer through an interface module, and display the real-time ranging distance and the position of the target to be measured on the computer. Three different channels can realize the simultaneous ranging of three UWB tags, that is, the ranging speed is nearly 3 times higher than that of the traditional single RF base station. If two more three-RF base stations are added, the positions of the three targets to be measured can be solved at the same time, wherein channel 1, channel 2, and channel 3 represent different channels that do not interfere with each other or have less interference.
[0025] like Figure 2 As shown, the UWB three-RF ranging circuit includes a power module, an interface module, a main control module, a multi-RF adapter board, three UWB RF modules, and three LED modules.
[0026] The power module is connected to the main control module, and is used to provide a 3.3V operating voltage for the main control module and the UWB RF module connected through the multi-RF adapter board; the interface module is connected to the host computer system, and is used to interact with the high-level database and processing process; the main control module adopts MCU as the main control chip, and reads and writes the UWB RF module through the SPI interface; the multi-RF adapter board is connected to the main control module and the UWB RF module, and is used to connect the main control module and the UWB RF module; the UWB RF module includes a communication chip and an RF antenna with UWB transceiver function, and the three UWB RF modules communicate with the main control module through the multi-RF adapter board to realize the transmission and reception of UWB signals and obtain the timestamp of the transmission and reception signals; the LED module is connected to the UWB RF module, and the three LED modules are used to indicate the transmission and reception status of the three UWB RF modules respectively.
[0027] The main control module reads and writes the UWB radio frequency module through the SPI interface. Since the UWB three-radio frequency ranging circuit has three UWB radio frequency modules, it is necessary to lead out two GPIO pins from the MCU of the main control module and connect them to the input end of the two / four decoders on the multi-radio frequency adapter board. Three of the four output ends of the two / four decoders are selected and connected to the chip select lines of the three UWB radio frequency modules respectively. Four signals are generated by controlling the level of the two GPIO pins. Three of the signals SS1, SS2, and SS3 are used to chip select one of the three UWB radio frequency modules for communication, and the other signal is used to turn off the chip selection. The other signal lines SCK, MOSI, and MISO of the SPI are connected in parallel to the three UWB radio frequency modules in a bus manner via the multi-radio frequency adapter board, and the three signal lines are used by them together.
[0028] After the main control module is powered on, the three UWB radio frequency modules need to be reset. The three signal lines obtained as chip select lines through the two / four decoders are respectively connected to the input ends of the three two-input OR gates on the multi-RF adapter board together with a GPIO pin led out of the main control module. The output ends of the three two-input OR gates are respectively connected to the reset ends RSTN1, RSTN2, and RSTN3 of the three UWB radio frequency modules, so as to reset the specified UWB radio frequency module.
[0029] When the UWB radio frequency module generates an interrupt when transmitting or receiving UWB signals, the interrupt lines IRQ1, IRQ2, and IRQ3 are drawn from the three UWB radio frequency modules and are respectively connected to the three input ends of the three-input OR gate on the multi-radio adapter board, and the output end of the three-input OR gate is connected to the interrupt line IRQ of the main control module. As long as one of the three UWB radio frequency modules generates an interrupt request, the interrupt response of the main control module will be triggered. When the main control module processes the interrupt, if the three UWB radio frequency modules generate interrupts again, the main control module will not process it immediately, but wait until the current interrupt processing is completed, and then poll the status registers of the three UWB radio frequency modules to determine which interrupt is generated, and then chip select the UWB radio frequency module for processing;
[0030] The three LED modules are connected to the three UWB radio frequency modules respectively, and each LED module has two LED lights for indicating the state of receiving and sending UWB signals of the corresponding UWB radio frequency module.
[0031] like Figure 3As shown in the figure, it is a schematic diagram of the connection between the main control module, three UWB radio frequency modules and three LED modules, wherein the connection part between the main control module and the three UWB radio frequency modules is a multi-radio frequency adapter board, including the main control chip STM32F105 of the main control module, the communication chips of the three UWB radio frequency modules, the first DW1000 chip U5, the second DW1000 chip U6, the third DW1000 chip U7, the first two-input OR gate U1A, the second two-input OR gate U1B, the third two-input OR gate U1C, 24-bit decoder U2A, three-input OR gate U3A, first capacitor C1, second capacitor C2, third capacitor C3, first resistor R1, first resistor R2, first resistor R3, first resistor R4, first resistor R5, first resistor R6, first LED lamp D1, first LED lamp D2, first LED lamp D3, first LED lamp D4, first LED lamp D5, first LED lamp D6, among which only some pins of STM32F105 and DW1000 are drawn.The PA4 and PB0 pins of the main control chip STM32F105 of the main control module are connected to the input end of the 24 decoder U2A, and the first three output ends of the 24 decoder U2A are respectively connected to the SPICS pins of the three UWB radio frequency modules DW1000; the first three output ends of the 24 decoder U2A are also respectively connected to the second input ends of the three two-input OR gates U1A, U1B, and U1C, the PA3 pin of the STM32F105 is respectively connected to the first input ends of the three two-input OR gates U1A, U1B, and U1C, and the output ends of the three two-input OR gates U1A, U1B, and U1C are respectively connected to the RSTN pins of the three DW1000; The PA5 pin of STM32F105 is connected to the SPICLK pins of three DW1000s respectively, and the SPICLK pins of three DW1000s are connected to one end of three capacitors C1, C2, and C3, and the other ends of three capacitors C1, C2, and C3 are connected to GND respectively; the PA6 pin of STM32F105 is connected to the SPIMISO pins of three DW1000s respectively; the PA7 pin of STM32F105 is connected to the SPIMOSI pins of three DW1000s respectively; the PA2 pin of STM32F105 is connected to the output end of three-input OR gate U3A, and the three input ends of three-input OR gate U3A are connected to three The IRQ pin of the first DW1000 chip U5 is connected to the GPIO2 pin of the first DW1000 chip U5; the GPIO2 pin of the first DW1000 chip U5 is connected to one end of the first resistor R1, the other end of the first resistor R1 is connected to the anode of the first LED lamp D1, the GPIO3 pin of the first DW1000 chip U5 is connected to one end of the second resistor R2, the other end of the second resistor R2 is connected to the anode of the second LED lamp D2, the cathode of the first LED lamp D1 and the cathode of the second LED lamp D2 are connected to GND; the GPIO2 pin of the second DW1000 chip U6 is connected to one end of the third resistor R3, the other end of the third resistor R3 is connected to the anode of the third LED lamp D3, ... The GPIO3 pin of chip U6 is connected to one end of the fourth resistor R4, the other end of the fourth resistor R4 is connected to the anode of the fourth LED lamp D4, and the cathode of the third LED lamp D3 and the cathode of the fourth LED lamp D4 are connected to GND together; the GPIO2 pin of the third DW1000 chip U7 is connected to one end of the fifth resistor R5, the other end of the fifth resistor R5 is connected to the anode of the fifth LED lamp D5, the GPIO3 pin of the third DW1000 chip U7 is connected to one end of the sixth resistor R6, the other end of the sixth resistor R6 is connected to the anode of the sixth LED lamp D6, and the cathode of the fifth LED lamp D5 and the cathode of the sixth LED lamp D6 are connected to GND together.
[0032] like Figure 4 , Figure 5 As shown, the driving method of the UWB three-radio frequency ranging circuit described in the example of the present invention is applied to the above-mentioned UWB three-radio frequency ranging circuit, and the specific steps are as follows:
[0033] S1: Create three tasks with the same priority, namely Task 1, Task 2, and Task 3, to form a ready task queue. The three tasks correspond to three UWB radio frequency modules to control them to complete the related functions of sending and receiving UWB signals. Since the functions completed by each UWB radio frequency module are the same, the execution code of each task is the same; assign a parameter cs to each task to select the corresponding UWB radio frequency module, where cs = 1, 2, 3, and the parameter cs in each task is a specific value, that is, the parameter cs of Task 1 is 1, the parameter cs of Task 2 is 2, and the parameter cs of Task 3 is 3;
[0034] S2: Run task x, where x = 1, 2, 3, initialize the UWB RF module x of the three RF ranging circuits, reset the specified UWB RF module x through the parameter cs and the level signal of the GPIO pin; configure the corresponding parameters, configure different channel parameters for each task, and configure other parameters in the same way. For global variables, use structure arrays to store them separately, so that the three tasks can run independently, and the operations on the three UWB RF modules are separated. Different channels are set for the three tasks, that is, the three UWB RF modules use different channels to ensure that they do not interfere with each other when communicating with three single RF tags using different channels, and perform ranging in parallel;
[0035] S3: The main control module reads and writes the UWB RF module through the SPI interface, and sends instructions to control the UWB RF module to send and receive UWB signals. The UWB RF module generates an interrupt through the interrupt circuit to inform the main control module that the state conversion has been completed, and indicates it through the LED module. Since the processing of the interrupt will poll the three UWB RF modules to determine which RF module issued the interrupt request, when exiting the interrupt handler and returning to the original task, the correspondence between the original task and the parameter cs should be kept unchanged to prevent reading and writing UWB RF modules that do not match the task. As long as one UWB RF module generates an interrupt, it will stop executing the current task and process the interrupt. After processing all the current interrupts, it returns to continue running the original task; among them, interrupt 1, interrupt 2, and interrupt 3 represent the interrupts generated by UWB RF module 1, UWB RF module 2, and UWB RF module 3, respectively.
[0036] S4: When task x is finished executing, the scheduler will be called. At this time, task x is added to the end of the ready queue. The scheduler will run the next task from the ready queue in sequence. In the next task, the main control module reads and writes another UWB radio frequency module through the SPI interface and controls its work. The scheduler cyclically schedules three tasks until task x is run again. After the main control module sends the positioning-related data and instructions to the UWB radio frequency module, the UWB radio frequency module can work independently. When in the sending state, the UWB radio frequency module will automatically send a complete frame according to the configuration and automatically record timestamps and other operations. When in the receiving state, the UWB radio frequency module will continue to listen to and receive signals. The above processes are all hardware implementations of the UWB radio frequency module, and no main control module control is required. At this time, the main control module can execute other tasks, that is, start executing tasks for another UWB radio frequency module. Since the time for the main control module to run tasks is shorter than the time for the UWB radio frequency module to send and receive signals and the time for the signal to propagate in the air, the three UWB radio frequency modules can work in parallel under the serial control of the main control module with less time.
[0037] S5: Steps S3 and S4 are executed in a loop, during which the measured distance is uploaded to the host computer system through the interface module.
[0038] It can be seen from the above technical solution that the UWB three-RF ranging circuit and its driving method described in the embodiment of the present invention form a three-RF base station by expanding three UWB RF modules on a traditional single RF base station. Each UWB RF module on the three-RF base station can respectively perform ranging with a single RF tag with the same channel. When the three UWB RF modules on the three-RF base station use different channels, and the three single RF tags use three channels corresponding to the three RF base stations, the three UWB RF modules on the three-RF base station can work in parallel, that is, one three-RF base station performs ranging with three tags in parallel at the same time, so that the ranging speed is increased by nearly 3 times compared with the traditional single RF base station.
[0039] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A UWB three-radio frequency ranging circuit, comprising a power module, an interface module and a main control module, characterized in that: It also includes a multi-RF adapter board, three UWB RF modules, and three LED modules; in, The power module is connected to the main control module and is used to provide a 3.3V operating voltage to the main control module and the UWB radio frequency module connected through the multi-radio adapter board; The interface module is connected to the host computer system and is used to exchange information with the high-level database and processing process; The main control module uses MCU as the main control chip, and reads and writes the UWB radio module through the SPI interface; The multi-RF adapter board is connected to the main control module and the UWB RF module respectively, and is used to connect the main control module and the UWB RF module; The UWB RF module includes a communication chip and RF antenna with UWB transceiver functions. The three UWB RF modules communicate with the main control module through a multi-RF adapter board to realize the transmission and reception of UWB signals. The LED module is connected to the UWB radio frequency module, and the three LED modules are used to indicate the receiving and transmitting status of the three UWB radio frequency modules respectively; When the UWB radio frequency module generates an interrupt when transmitting or receiving UWB signals, the interrupt lines IRQ1, IRQ2, and IRQ3 are drawn from the three UWB radio frequency modules and are respectively connected to the three input ends of the three-input OR gate on the multi-radio adapter board, and the output end of the three-input OR gate is connected to the interrupt line IRQ of the main control module. As long as one of the three UWB radio frequency modules generates an interrupt request, the interrupt response of the main control module will be triggered. When the main control module processes the interrupt, if the three UWB radio frequency modules generate interrupts again, the main control module will not process it immediately, but wait until the current interrupt processing is completed, and then poll the status registers of the three UWB radio frequency modules to determine which interrupt is generated, and then chip select the UWB radio frequency module for processing; The three LED modules are connected to the three UWB radio frequency modules respectively, and each LED module has two LED lights to indicate the status of receiving and sending UWB signals of the corresponding UWB radio frequency module; The three UWB radio frequency modules use different channels to ensure that they do not interfere with each other when communicating with three single radio frequency tags using different channels, and perform ranging in parallel.
2. A UWB three-radio frequency ranging circuit according to claim 1, characterized in that: The MCU of the main control module leads out two GPIO pins connected to the input end of the two / four decoder on the multi-RF adapter board, selects three from the four output ends of the two / four decoder and connects them to the chip select lines of the three UWB RF modules respectively, and generates four signals by controlling the level of the two GPIO pins, three of which, SS1, SS2, and SS3, are used to chip select one of the three UWB RF modules for communication, and the other signal is used to turn off the chip select, and the other signal lines SCK, MOSI and MISO of the SPI are connected in parallel to the three UWB RF modules in a bus manner via the multi-RF adapter board, and they share these three signal lines.
3. A UWB three-radio frequency ranging circuit according to claim 2, characterized in that: After the main control module is powered on, the three UWB RF modules need to be reset. The three signal lines obtained as chip select lines through the two / four decoder are connected to the input ends of the three two-input OR gates on the multi-RF adapter board together with a GPIO pin led out from the main control module. The output ends of the three two-input OR gates are connected to the reset ends RSTN1, RSTN2, and RSTN3 of the three UWB RF modules respectively to reset the specified UWB RF module.
4. A driving method of a UWB three-radio frequency ranging circuit, based on the UWB three-radio frequency ranging circuit according to any one of claims 1 to 3, characterized in that: The following steps are involved: S1. Create three tasks with the same priority, namely Task 1, Task 2, and Task 3, to form a ready task queue. The three tasks correspond to three UWB radio frequency modules to control them to complete the related functions of sending and receiving UWB signals. Since the functions completed by each UWB radio frequency module are the same, the execution code of each task is the same; assign a parameter to each task cs To select the corresponding UWB RF module, cs =1, 2, 3, parameters in each task cs is a specific value, namely the parameter of task 1 cs =1, parameter of task 2 cs= 2. Parameters of Task 3 cs =3; S2. Run tasks x ,in x =1, 2, 3, initialize the UWB RF module of the three-RF ranging circuit x , through the parameters cs The level signal of the GPIO pin resets the specified UWB RF module x ; Configure the corresponding parameters, configure different channel parameters for each task, and keep other parameters the same. Use structure arrays to store global variables separately, so that the three tasks can run independently, and separate the operations on the three UWB radio frequency modules. Set different channels for the three tasks, that is, the three UWB radio frequency modules use different channels to ensure that they do not interfere with each other when communicating with three single radio frequency tags using different channels, and measure distance in parallel; S3, the main control module reads and writes the UWB radio module through the SPI interface, sends instructions to control the UWB radio module to send and receive UWB signals, and the UWB radio module generates an interrupt through the interrupt circuit to inform the main control module that the state conversion has been completed, and indicates it through the LED module. Since the interrupt processing will poll the three UWB radio modules to determine which radio module issued the interrupt request, the original task and parameters should be kept when exiting the interrupt processing program and returning to the original task. cs The corresponding relationship remains unchanged to prevent the reading and writing of UWB radio frequency modules that do not match the tasks. As long as one UWB radio frequency module generates an interrupt, it will stop executing the current task and handle the interrupt. After handling all the current interrupts, it will return to continue running the original task. S4. When the task x The scheduler will be called at the end of this execution, and the task x Add to the end of the ready queue, the scheduler runs the next task from the ready queue in sequence. In the next task, the main control module reads and writes another UWB radio module through the SPI interface and controls its work; the scheduler schedules three tasks in a loop until it runs to task x After the main control module sends the positioning-related data and instructions to the UWB RF module, the UWB RF module can work independently. When in the sending state, the UWB RF module will automatically send a complete frame according to the configuration and automatically record the timestamp operation. When in the receiving state, the UWB RF module will continue to listen to the signal and receive. The above processes are all hardware implementations of the UWB RF module and do not require the control of the main control module. At this time, the main control module can perform other tasks, that is, start to execute tasks for another UWB RF module; S5, looping through steps S3 and S4, during which the distance measured is uploaded to the host computer system through the interface module.
