In this article, we will talk about the ESP32 UWB Antenna delay calibrating, let's see how to calibrate and the UWB antenna calibrating result.

1. ESP32 UWB &DW1000 Antenna Delay

Makerfabs ESP32 UWB has been popular in the last few months, to give Makers a way for Indoor positioning applications. We got some feedback on the accuracy/error in usage, which seems mainly related to the Antenna Delay.

The DW1000 Antenna delay is internal to the chip and not included in the TOF, but are included in the propagation delay from transmission timestamp to receive message timestamp:
tMeasured = tADTX + TOF + tADR
● ToF = Time of Flight
● tMeasured = The measured time from the transmit timestamp to the receive timestamp
● tADTX = Transmit antenna delay
● tADRX = Receive antenna delay

The internal propagation delays in DW1000 devices vary slightly from chip to chip. There can also be variations due to components between DW1000 and the antenna. When the producer makes the IC/ module, it is impossible for them to make/ set the delays differently in the hardware, so it needs the users to set/ calibrate for this in the firmware.

2. How to Calibrate

Thanks to Makerfabs customer Jim Remington, for Makerfabs ESP32 UWB module that runs on Arduino, Jim provides us a simple/easy way to calibrate this, based on Thomas Trojer’s DW1000 library, Jim modified it a little to make the antenna calibration there. The updated DW1000 library here. With the antenna calibration, the distance measuring seems more accurate.

The Steps of the Calibration:
1) Download the Jim Remington library here to substitute the original DW1000 library;
2) Download the ESP32_UWB_setup_tag.ino to Tag;
3) Place the Tag and Anchor with a fixed distance (such as 8m);
4) Set the distance at ESP32_anchor_autocalibrate.ino with 8m, and download the ketch to the Anchor;

5) Have a record of the Adelay from the Anchor’s serial output;
6) Reset the Adelay parameter in the anchor firmware. (which is 16384 by default) for further measuring.

3. Comparison: The Data Before & After Antenna Calibration

 

ID Distance(m) Adelay(16384 by Default) Adelay_16681 Adelay_16705
1 0.8 1.8 0.6 0.2
2 1.6 2.7 1.5 1
3 2.4 3.5 2.4 1.9
4 3.2 4.4 3.2 2.7
5 4 5.3 4.1 3.6
6 4.8 6.1 4.9 4.4
7 5.6 6.8 5.7 5.3
8 6.4 7.6 6.4 6.1
9 7.2 8.4 7.2 6.9
10 8 9 7.9 7.8

 

We can see that, with the calibrated Adelay parameter, the measured distance (color Yellow and Gray) get much closed to the real distance (color Blue). With a proper Adelay set, the measurement accuracy could be improved greatly.

4. Conclusion
(1) The antenna calibration improves the UWB distance measuring much.
(2) The measured distance larger as Adelay spec bigger.
 
If you have further questions about ESP32 UWB Antenna Delay Calibrating, or need some custom PCB assembly service, please contact service@makerfabs.com

>>> Previous Article: ESP32 UWB Indoor Positioning Test

New Video: 32 UWB High Power Version with Amplifier, Up to 120m~