Descentralized distance measurement

Hello :slight_smile:

I recently developed a project using the dwm library to develop a system in which the dwm1001s can obtain the distances between them, without having to force certain nodes to be anchors. I leave you the link of the repository in case you are interested.

1 Like

Hi abvg,

Thanks for your contribution! I’m very interested in this. Does it use TDMA? And you mentioned the max number of nodes is 14. What fundamentally limits this?

Thank you,

1 Like

Hi jleng,

First of all, thank you very much for showing interest. This motivates me to keep developing :slight_smile:

We use TWR since, when configuring the anchors, the dwm library does not allow TDOA mode.

The limit is due to what the library sets us, since when an anchor scans its neighboring anchors, it only allows scanning a maximum of 14. Another restriction that is given by the library.

It is due to these types of limitations that we are going to develop our own library, without dwm.o, since we are very limited. If you are interested in this new development, at the end of the readme of the repository that I shared, there is a link to the new repository where we are going to make our developments.

I hope I’ve been helpful.
Best whishes,

1 Like

Does this library allow distance detection between one node and the closest node e.g. for a social distancing device.
E.g. both nodes alert when they are less than 2 meters away from each other.

1 Like

Hi in06khattab,

This library implements a system that automates the calculation of distances between nodes and returns the distances to them through the UART port. From there you can do whatever you want with those distances, calculate positions, etc. That is, if you want to implement a system in which the nodes do not approach more than x meters, you must implement that logic. Actually implementing this logic is quite simple, since it would only be to compare the distance returned and if it is inferior to a certain threshold, warn or activate a series of actuators.

I hope I’ve been helpful.
Best whishes,

Thank you very much. That is useful!


I was trying to develop tag fw which can measure distance among them.
I was believing your repo could help me but I cant reach repo.
Are you still sharing repo.

Thank you!

1 Like

Hi Sirac,

Yes for sure.
Sorry, the source of the repository has been changed. I pass you the new link. I think you will also be interested in the second version of the library. I’m still developing it but I hope to have it shortly. This new library implements from scratch a driver to control the dwm1001 as well as complete access to all the registers in a simple way and functions to send messages following the 802.15.4 standard and functionalities to calculate distances.

Here is the link to the repository of the second version. I hope it helps :slight_smile:

Anyway, as soon as I finish with the development of this second version, I plan to share the link in the forum.

Best regards,

Hi Alvaro,

I took notes on my calendar. I will check the second version for sure.

Thank you for your contributions :slight_smile:

Best Regards,

1 Like

I found this repository very useful since Decawave does not provide any official examples that do what the 1st gen repository can do. I’m also interested in the 2nd gen repository.

I have a few questions related to this repository:

  1. It seems like most operations are performed using PANS v2 API functions? Do we need any additional low-level drivers other than PANS?
  2. dwm_anchor_list_get provides a list of surrounding anchors. What is the maximum number of anchors available in the list. The DWM1001 Firmware API guide does not mention any limit.
  3. dwm_loc_get provides the Tag with the position/distance information to the anchors that it is currently ranging to. The DWM1001 Firmware API guide mentions that the Maximum number of anchor distances/positions is 15. Does this mean that the maximum number of nodes in the system capable of ranging with each other is 16 (1 tag and 15 anchors at all times)?
1 Like

Hi jonathanrjpereira,

Thank you very much for showing interest in the project, it is gratifying to see that your work is useful to others :slight_smile:

I will gladly answer your questions:

  1. No, in the first version of my software you dont need anything, it is an all in a box project.
  2. If I’m not mistaken, I think the anchor limit is at 14. Which is pretty curious since 802.15.4 addresses allow infinitely more addresses. I don’t really know the reason for this limitation but this was one of the main reasons why I decided to implement the second version without the dwm API.
  3. I understood it as you say. Since there is no access to its binaries, we cannot know for sure the reason for this limitation. I imagine it is because of the way they have implemented their API, so that they can afford a maximum of 16 nodes to guarantee a calculation of distances/positions with a margin of error of + -10 cm.

Anyway, these limitations of which you speak are resolved in the second version of my library. It is true that in wireless communications there is always the problem that the more nodes there are in the network, the more problematic the issue of sending and receiving messages becomes (overlapping of messages, more delays between sending and receiving times, etc) and let alone the calculation of distances, where you have to measure differences in time stamps xD. In this first version that I am developing, it is contemplated that there are not many connected devices(more than 16 of course). But, I have designed a solution based on how OSPF works, in such a way that if there are many nodes, they are divided into smaller networks and designate nodes that act as bridges between the different networks. As long as people continue to be interested in the work, I will continue to develop :slight_smile:

I hope I helped with my answer,

Best whises,

Hello everyone :slightly_smiling_face:

Here is the promised firmware, I attach the link to the post of this forum where I put all the information.

Have a nice day.