Skip to content
 
 

Latest commit

 

History

505 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation



Arduino library to use Decawave's DW1000 IC and relative modules.

c++11 Arduino

Status

⚠️ We are archiving the repo as we can't support it anymore and we are not currently working with dw1000 hardware, feel free to create your own fork if you intend to support the project, we will be happy to add a link on this project. Thank you everyone for the support you gave this project it was truly appreciated.

Differences with F-Army/arduino-dw1000-ng

This is a fork of https://github.com/F-Army/arduino-dw1000-ng.
The main reason for this fork is to implement a tag centered positioning system. A "Main" Anchor indicates each tag sequentially to initiate ranging with each Anchor. In the original version, there are 4 messages exchanged when using tagTwrLocalize :

    • 1 : Short blink from the Tag (transmitTwrShortBlink)
    • 2 : RANGING_INITIATION from the main Anchor (transmitRangingInitiation)
    • Poll from Tag (transmitPoll)
    • ACTIVITY_CONTROL from anchor (transmitResponseToPoll)
    • FINAL_MESSAGE from Tag (transmitFinalMessage)
    • ranging confirm from Anchor (transmitRangingConfirm), where the anchor sends the id of the next tag, encoded in 2 bytes

We then repeat steps 1-4 untill the last Anchor, where we send a transmitActivityFinished (instead of transmitRangingConfirm).

To gather the ranging data, each Anchor then needs to transmit its range to the Tag sequentially. What we want is to exploit the 4th message to send the range instead of the id of next tag (or blink_rate for the last anchor).

For that, we need an architecture change, where the tag itself is aware of all anchor ids.

On a more global aspect, as we need to get the position of multiple tags, we decided to initiate all communications from the Main Anchor. In the process, this message replaces the RANGING_INITIATION from Main, reducing by one the amount of messages from the original architecture.

A problem we encountered later was the range calculation time taken by the atmega 32u4 (2200 to 2500 µs). This forces us to add a delay in the loop. As the calculation time is much more reasonable on the ESP32 (around 170 µs), we replace the tag by the ESP32, and force all expensive calculations there. This forces us to change the type of the fourth message to send the 2 timing values.

    • 1 : data from Main (transmitTwrShortBlink)
    • 2 : Short blink from the tag (transmitRangingInitiation)
    • Poll from the Anchor (transmitPoll)
    • ACTIVITY_CONTROL from the Tag (transmitResponseToPoll)
    • FINAL_MESSAGE from the Anchor (transmitFinalMessage)
    • ranging confirm from the Tag (transmitRangingConfirm)

Differences with thotro/arduino-dw1000

This is a fork of https://github.com/thotro/arduino-dw1000.
The main reason for this fork is because the development there is really slow (due to the original author not developing it anymore) and some important features were missing (for example antenna delay calibration).
We also wanted to change how the ranging logic works.
Rather than providing a ranging loop, we wanted to provide functions to send the different Two way ranging flow frames, giving the user more control over the program.
The base driver was also re-written in a lot of places, to make every API function more independent from each other. We also plan to make very high-level abstractions to hack projects fast.

Features

Ranging Localization NLOS Optimizations Frame filtering Antenna Calibration Antenna Delay Arduino EEPROM Transmission power setup Deep sleep Sleep Double buffering Transmit Power Spectrum Test Mode Continuous wave mode

Devices

Arduino ESP8266 ESP32 STM32-BluePill

Specific tested devices, whit related pinout, are inside the Wiki.

Installation

Requires c++11 support, Arduino IDE >= 1.6.6 support c++11.

  1. Get a ZIP file of the master branch or the latest release and save somewhere on your machine.
  2. Open your Arduino IDE and goto Sketch / Include Library / Add .ZIP Library...
  3. Select the downloaded ZIP file of the DW1000 library
  4. You should now see the library in the list and have access to the examples in the dedicated section of the IDE

Usage

Check examples folder for basic usage.

The Decawave documentation helps a lot in understanding this project, especially if you want to go deeper.

Authors

License

The project is under MIT (see LICENSE.md)
Some files are under a Dual Apache 2.0/MIT because this is a fork of thotro/arduino-dw1000

About

Arduino driver and library to use Decawave's DW1000 IC and relative modules.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages