DWM3000 Two Way Ranging

Now that I played around a bit with the Apple Nearby Interaction Demo, I’d like to have a similar case by using another DWM300EVB instead of iPhone - in other words ranging between two DW3000 devices.

Of course, the one replacing the iPhone doesn’t have to have a nice 3D arrow rotating around (but it would be nice, tho! :wink: ) but functinal-wise (almost) the same thing.

Where should I start looking for docs/examples/help?

Thanks in advance!

1 Like

Hi morvo, I’d love to learn about your experiences with the Apple Nearby Interaction Demo. I can help you with your implementation between two DW3000 devices since I’ve been working for a while now getting SS TWR working between two DWM1000’s.

2 Likes

Hi @apdobaj,

Thank you for your offer! :slight_smile: I’d be glad to assist you with Apple NI Demo, as far as I can.

Maybe we should continue in another thread for Apple NI Demo and keep this thread only for DW3000 inter-communication, so others can easily follow :slight_smile:

So, how should I start with DW3000 inter-communication?

Hi @morvo,

In this software package, you can find examples where you can make a two way ranging between 2 devices to get the distance https://www.decawave.com/wp-content/uploads/2022/03/DW3xxx_XR6.0C_24Feb2022.zip.

Hope it helps,
Wassim

2 Likes

Yes, alternatively you can get the examples for SS and DS TWR from the downloaded API or from github. What is your setup? What MCU are you using as a master?

1 Like

Thank you @Wassim_Qorvo!

As far as I can see, that example is great for understanding the principles, but it doesn’t contain any MCU source code, only the PC one (using two PCs to control DWM3000 through USB/SPI interface).

Hey @apdobaj,

Here’s my case:

  • at the moment I’m still in the early PoC phase, learning and experimenting with UWB for a project I’m working on
  • ideally, for this PoC phase, I’d like to use ESP32 + Arduino framework for control (using BLE for communcation layer) because I’m familiar with it and currently I don’t have time to get familiar with a new platform (if the PoC works, and more resources are available, it may change tho)
  • I’d also like to be able to programatically switch any Tag to Anchor and vice versa on demand
  • the goal is to implement the same functionality of the Apple Nearby Accessory example - getting distance + azimuth + elevation
  • while reading through the forum, I got the impression that DWM3000 is far more advanced than DWM1000 and that existing Arduino libraries for DWM1000 might not work well or not at all(?)
  • I’d also like to be able to programatically switch any Tag to Anchor and vice versa on demand

This is purely an aspect of firmware and so depends how much time you want to spend on that. e.g. in my system the only difference between a tag and an anchor is that the tag initiates measurements autonomously. If you tell a tag to stop measuring it becomes an anchor, if you instruct an anchor to make a measurement to a different anchor or a tag it will.

  • the goal is to implement the same functionality of the Apple Nearby Accessory example - getting distance + azimuth + elevation

With a single antenna all you can measure directly is distance. To get heading information you need to use multiple antennas, there is a version of the DWM3000 chip that supports this however the antenna design and constraints become far more limiting.
To get more than one angle (so azimuth and elevation) would require 3 or more antennas and multiple DW3000 chips running from the same clock source. Or two antennas that you move / rotate either in a known way or in a way that is tracked using gyros.

This is all if you want to get the angles relative to the receiving antenna. If you want angles between two items relative to the room then you can calculate that based on the 3d geometry. If you want to know the orientation of an item relative to the room itself then including inertial measurements (accelerometers and gyroscopes) is an option.

  • while reading through the forum, I got the impression that DWM3000 is far more advanced than DWM1000 and that existing Arduino libraries for DWM1000 might not work well or not at all(?)

The DW3000 supports UWB channels 5 and 9. The DW1000 supports channels 1-5 and 7. The DW3000 supports STS encrypted timestamps, the DW1000 doesn’t. The DW3000 is slightly lower power. There are twin antenna versions of the DW3000, to achieve the same Phase difference of arrival on a DW1000 requires two devices. The DW1000 supports 110kb/s data which gives longer ranges.

Other than that the two are very similar in terms of capabilities, if you pick common settings (channel 5, non-STS packets) then they will work with each other.
The internal registers are however completely different so they are not driver compatible.

The DWMx000 is a module containing the appropriate DWx000 chip, antenna, and required supporting components. The two modules are physically and electrically compatible but not firmware compatible.

Both are capable of passing the FCC/IC/EU testing required for regulatory approvals but you must do this yourself for any commercial product you produce. Due to the inclusion of channel 9 the DW3000 can be approved more widely with less caveats. The only system that doesn’t require approvals is the DWM1001C running PANS, that is pre-approved.

1 Like

Hey @AndyA,

Thank you for very informative answers!

To get more than one angle (so azimuth and elevation) would require 3 or more antennas and multiple DW3000 chips running from the same clock source. Or two antennas that you move / rotate either in a known way or in a way that is tracked using gyros.

So, how does Apple do it with just one iPhone? I understand that the U1 chip is custom-made by Qorvo/Decawave exclusively for Apple, but I doubt it’s significantly more advanced(?) than the DWM3000, so there must be multiple UWB antennae in the iPhone, right? That’s why the position/rotation of the iPhone itself matters, as opposed to the rotation/angle of the DWM3000 module (if you played with the Apple NI Demo, you know what I mean). As you already stated, they are definitely using accelerometer/gyro as well.

I just need to figure out and understand how exactly they’re doing it :crazy_face:

Yes, the iPhone has multiple antennas. From memory there are 4 of them but I may have it wrong. It is detailed in the FCC test reports that were linked here a couple of years ago when it first came out.

2 Likes

@morvo I’m not exactly sure what you’re trying to do, but you might consider partnering with a company that already has a tracking solution in place, such as Sewio. If you would like some intros (I’m pretty familiar with the landscape because we’re working on an athlete tracking system) I’m happy to do that. I’m also using UWB for simple TWR as part of a collision avoidance device for outdoor enthusiasts (which I just got working). My setup is a wearable based upon the Nordic nRF52840-based modules. Can you tell me a bit more about the Apple NI demo? Which phones does it support and how does it work? I presume it’s a kind of asset tracking solution, but what needs to be in the firmware on the asset side? Thanks for the info.

1 Like

Hi @apdobaj,

Thank you for the info.

My setup (very simplified) is a device dispersed over a couple of tens up to a couple of hundreds of cars on a parking lot (outdoor/indoor) which do not move very often (used cars dealerships), while any car can infrequently change it’s parking slot and then we need to position it within the 1-2m precision.

Current implementation uses GPS but it’s not precise enough in this scenario and doesn’t work indoors.
That’s one of the reasons we started working on the next gen device with different positioning capabilities (among other features).

We initially started looking into using BLE for positioning, but since I saw the Apple NI Demo, I started thinking that UWB may be a more reliable, precise and simpler solution (for example: avoiding multiple device usage for trilateration, and so on)… Now I’m learning that things are not quite that simple :stuck_out_tongue:

Can you tell me a bit more about the Apple NI demo? Which phones does it support and how does it work? I presume it’s a kind of asset tracking solution, but what needs to be in the firmware on the asset side?

As I mentioned before, iPhones (starting with the iPhone 11) are equiped with the “U1” chip, which is custom-built by Qorvo/Decawave excusively for Apple. It seems there’s more to it than just more advanced DWM3XXX chip(?), like multiple antennae + sensor fusion + SW… And you’re right, so far it’s predominantly used for asset tracking of “compatible with the U1 chip” devices; Apple AirTag being one of them - you fire up the “Find My” app on the iPhone and folow directions (left/right/forward/back and the distance) to whatever you attached the AirTag to, for example - your keys.

DWM3XXX modules are avertised as “compatible with the U1 chip”, but manufacturers must have their DWM3XXX-based products certified by the Apple first if they want to sell them (as far as I understood it).

The Apple NI Demo basically shows how DWM3XXX modules can be used to build custom trackable devices.

So your solution is basically an industrial asset tag tracker, like what’s commonly used in warehouses to track the movement of people and fork lifts and so forth. This is Sewio’s main business model (and others) and they have an entire environment that includes fixed placement of a number of anchors all connected either wirelessly or via Ethernet and powered by POE and web-based software that allows configuration and real-time tracking of all the tags in the area covered by the anchors. The tracking capability can be easily deployed on a mobile device or tablet. It seems this would be the most expedient path to a product. I’m interested in the Apple and Android UWB capability because this extends our collision avoidance capability to folks that just carry an UWB-enabled phone and they don’t need to have our proprietary hardware (although there are lots of other benefits to owning our hardware :grinning: ). I suspect, however, that in alignment with Apple’s business model (planned incompatibility and obsolescence) that if you want the system to work with Apple phones you’ll need an Apple asset tag as well that has to be upgraded periodically.

You can absolutely do this but as noted you’ll be implementing a lot of “application” logic like triangulation and management. Direction finding is possible with PDoA but requires multiple antennas plus I’m not sure there are any generally available parts that use more than two antennas (the PDoA version of the DW3000 only takes two antennas I think) so you’d only get 2D direction finding I think??

If you want to use the ESP32 you’ll be in semi unsupported territory in the sense that you won’t be able to use their API libraries but will have to program registers directly. (See DW3000_notes.md · GitHub) That said I do have accurate ranging working between two (non-API-supported) micros connected to DWM3000 modules so it can be done.

For your app I probably would have reached for RTK to get the GPS accuracy up instead of trying to go for UWB (or BLE, yargh)…

With the DW1000 it was possible to do PDoA by using two chips running off the same clock. There was even a decawave devkit that did this available for a short while.

In theory you could combine two dual antenna DW3000s in this way (or a single and a dual) and create a 3/4 antenna system to give azimuth and elevation angles. It’s hardly a new idea, the Ubisense UWB system was doing this over 15 years ago, you could get tag location from a single anchor.

2 Likes

3/4 antenna system

I thought it is 0.45 lamda instead of 0.75 lamda, isn’t it right?