"Affordable" indoor positioning using ESP32 UWB modules

I think it is safe to say that every robot builder wants the robot to know where it is and where it is headed, without human input. Companies like Pozyx offer systems to do this, which work well, and are Arduino-compatible, but are prohibitively expensive for hobbyists.

Several years ago, Decawave announced inexpensive ($20), ultra wide band 3-6 GHz transceiver modules capable of indoor ranging with +/- 10 cm accuracy. Although a DW1000 Arduino library has been developed, to date, I’ve seen only one ranging example suitable for hobby applications, and none that are capable of true indoor localization, i.e. accurately and unambiguously determining the (x, y) or (x, y, z) position of a tag.

Recently, Makerfabs began offering a small ESP32 bluetooth/WiFi development board with a clone or close relative of the DW1000 module: https://www.makerfabs.com/esp32-uwb-ultra-wideband.html

Four of these form the minimum setup required to do true 2D indoor localization on the scale of a large room (five or more are better: four anchors and a tag can accurately report a robot’s position in 2D or 3D). So, a few weeks ago, I sent off for five ESP32 UWB modules. I am delighted with their build quality and ease of use.

I’ve done the work required to demonstrate a complete system for indoor localization and tracking. I demonstrate that it is capable of localizing a tag to +/- 10 cm accuracy, anywhere in a large (say, 10m x 10m) room and possibly quite a bit larger.

I don’t have a video demonstrating the operation, but all the important details, including source code, test code and test results are posted on my Github site: https://github.com/jremington/UWB-Indoor-Localization_Arduino

There is plenty of work to do, so I look forward to seeing efforts to repeat the work and welcome comments and suggestions. I would also welcome efforts to advance the technology from the application code perspective.

I was wondering how fast a refresh rate you can get from the Makerfab boards for position measurements. 100hz? Could they be used to measure average velocity to any degree of accuracy? For example, a drone flies 10m from point A to point B, is the refresh accuracy high enough to measure average velocity at 10m/s (+/- 0.1m/s)?

Yes, of course. The refresh rate depends on the number of beacons, the reliability of communications and other factors, so it is hard to characterize.

Since the range is limited to about 30 meters with the standard settings, what would be the point of using UWB beacons to locate rapidly flying drones?

Actually, the use-case is for a human wearable speed-testing in a fixed position all within 30m range.
So with 4 Anchors, and 2 tags on on the human, the application is to capture the acceleration. and horizontal velocity within a 1-3 second span. Most critical point is to have good accuracy to distinguish max average velocity of 7.2m/s vs. 7.5m/s. vs 7.9 m/s over a 1-2m (0.1-0.2s) span.
Vertical velocity would be good to have, but I assume that it would be easy to add base stations. (All would be on a X-Z plane, no need for lateral Y positioning.)

I might give it a try, but wanted to check before shelling out $200 on 5 esp32 UWMs.

Since humans effectively block line of sight for 6 GHz UWB transmissions, you will probably need more than 4 anchors for reliable positioning.

Sounds like a fun project to me, and if you get it to work, it would advance the field, especially for DIY enthusiasts.

This is still cheap, considering the cost of the 3D camera/image processing installations often used to track human motion and activity.

Currently, I have a couple of TFmini-s Lidar (TOF) sensors with radio link acting as a speed gate. They refresh at 100hz (can tweak up to 1000hz allegedly).
Could also aim the ranging device at the back, but using a wearable UWM in a helmet or both shoes would be more accurate, and give the full acceleration curves.
Cost is cheap for the boards.. dev-time is more expensive if it is a non-starter because of XYZ. :slight_smile:

Here is some previous similar work: https://repositorio-aberto.up.pt/bitstream/10216/106608/2/206303.pdf

Would the newer DWM3000 be of any significant advantage? (https://www.mouser.com/ProductDetail/Qorvo/DWM3000TR13?qs=hWgE7mdIu5QrWWDEt6OFQw%3D%3D) There is no ecosystem support for Arduino yet, but it might not take too long.

It looks like Makerfabs released the new DWM3000 esp board today. So I guess I will find out if they work.

https://github.com/Makerfabs/Makerfabs-ESP32-UWB/tree/main/Dw3000