3 Demo Kit – Software Applications

The TDoA and DS-TWR demo applications are running on the ATA8352 demo kit. For more details, refer to the ATA8352 Demo and Evaluation Kit User's Guide (DS50003129). The following figure shows that one node is used as the Tag node and the other node is the Anchor node.

The demo applications are developed using Microchip Studio 7 and MPLAB® X IDE V6.00 for the SAM C21 MCU. Both nodes are connected to a PC with a USB cable, and the virtual COM port connection is used by a PC terminal application to log the measurement data. For the COM port connection, the setup is:
  • Data rate = 115.2 kBaud
  • Data = 8-bit
  • Parity = No
  • Stop bit = 1
Figure 3-1. ATA8352 Demo Kit for TDoA and DS–TWR Application

In the wireless TDoA demo application, the Tag node transmits data telegrams every 0.5 seconds and the Anchor node shows the received information in the PC terminal application (see the following figure).

This demo application uses the wireless synchronization to generate an internal synchronization pulse every 170 µs. For more details on the wireless synchronization, refer to the ATA8352 Impulse-Radio Ultra-Wideband (IR-UWB) Transceiver User's Guide (DS50003125).

The information and counters refer to the description in the ATA8352 Impulse-Radio Ultra-Wideband (IR-UWB) Transceiver User's Guide (DS50003125) for the TDoA counters bb_t_cnt, sync_cnt and the calculated time differences (see Figure 2-3).

The figure shows the PC terminal window of the Anchor node, which lists the received data telegram content from the Tag node. For each data telegram, two lines are shown with the timestamp data of the Anchor and Tag node. Beside the raw data bb_t_cnt and sync_cnt, the calculated timestamp TS and the timestamp difference, dTS, (with resolution of 165 ps) are shown. The dTS is calculated for the Anchor between two subsequent RX timestamps and for the Tag between two subsequent TX timestamps. Note that the TX timestamp from the Tag node is included in the data telegram payload. Finally, the timestamp difference dT = dTSRX – dTSTX with a resolution of 0.1 ns and the calculated distance d in cm is shown.

At start-up of the demo (when pressing the reset button of the SAM C21 XplainedPro board from the Anchor node), an offset measurement is performed. Therefore, the antennas have to be placed face-to-face at a distance of 50 cm. This offset is required to calibrate the measurement with a known distance.

From the data telegrams illustrated in the figure, the temperature and clock drift can be observed from the changes in the dT and the distance over time.

Figure 3-2. Example of Measurement Data for Wireless TDoA Demo Application

In the DS-TWR demo application (refer to the IEEE 802.15.4z–2020 Standard), the Tag node initiates the data telegram sequence every 2 seconds and the Anchor node responds to it and shows the received information and calculated ToF and distance in a PC terminal application (see the following figure).

Figure 3-3. Example of Measurement Data of the DS-TWR Demo Application

The DS-TWR demo software application uses the message sequence described in the Figure 2-5 but uses a fourth data telegram to transmit the timestamp RXT2 to the Anchor node. This implementation ensures the same telegram length and link budget conditions for all data telegrams. This demo application uses wireless synchronization, as described earlier.

The Tag PC terminal window shows the data telegram number and the telegram sequence for each measurement cycle. In addition, the Anchor PC terminal window shows the calculated time differences Tround1, Treply1, Tround2 and Treply2 with a resolution of 0.1 ns together with the calculated ToF and the distance in cm. With a time resolution of ~165 ps (refer to the ATA8352 Impulse-Radio Ultra-Wideband (IR-UWB) Transceiver User's Guide (DS50003125)), a distance resolution of ~5 cm is achievable.

Another Xplained Pro Extension board is available for the Anchor node, which includes two ATA8352 modules and the logic to create a combined 48 MHz clock/synchronization signal for the wired TDoA synchronization, as described in the ATA8352 Impulse-Radio Ultra-Wideband (IR-UWB) Transceiver User's Guide (DS50003125). This allows synchronization of both modules to one clock and synchronization signal generated by the host controller MCU in the software application. The following figure illustrates the Anchor node with the Xplained Pro Extension board and two attached antennas.

Figure 3-4. Anchor Node for Wired TDoA Application

The wired TDoA software application that has to be programmed in the Anchor node uses both modules and determines the timestamp difference between these modules. The following figure illustrates the PC terminal application window with the recorded information from both modules and the timestamp difference and mean value of the timestamp difference. This mean value is calculated from the latest 10 measurements and shows a stable value after the first 10 values of mean_diff = -9 * 165 ps = -1.485 ns, as shown in following figure at position Tag# 18.

The timestamp difference depends on the distance between the two antennas, the cable connection to the ATA8352 antenna connectors and the Tag node's position to the antennas. In the example illustrated in the following figure, the two antennas had a distance of 55 cm. This timestamp difference calculates the angle between the Tag node and the baseline of the two anchor antennas. The application behind is also known as the Angle-of-Arrival (AoA) measurement.

Figure 3-5. Example of Measurement Data for Wired TDoA Demo Application
The following figure illustrates the details for the AoA measurement and how to determine the angle (α), and Table 3-1 provides the resulting angle α for measured ToF difference values. The timestamp difference values from the wired demo application can be used to determine the AoA with an antenna distance of 55 cm using the table below. For other antenna distances, a new table has to be calculated with the formula shown in following figure:
Figure 3-6. Angle-of-Arrival Measurement Setup
Table 3-1. Angle Resolution for Antenna Distance = 55 cm
dToF (165 ps) dToF (cm) α (°)
0 0.00 90.0
1 4.95 84.8
2 9.90 79.6
3 14.85 74.3
4 19.80 68.9
5 24.75 63.3
6 29.70 57.3
7 34.65 50.9
8 39.60 43.9
9 44.55 35.9
10 49.50 25.8
11 54.45 8.1

Due to the time resolution of 165 ps for the timestamps, a distance resolution of about 4.95 cm is achieved. Depending on the antenna distance (d), an angle can be calculated using the AoA formula shown in the preceding figure. The table shows that the angle resolution depends on the measured angle and is between 5.2° and 17.7°. The antenna distance can change this angle resolution; that is, a larger antenna distance gives a better resolution and vice versa.