From MakerFabsWiki
Revision as of 02:48, 9 February 2022 by Charlin (talk | contribs) (FAQ)

Jump to: navigation, search


Ultra-wideband (UWB) is a short-range, wireless communication protocol that operates through radio waves, enables secure reliable ranging and precision sensing, creating a new dimension of spatial context for wireless devices.

The DW1000 is a single-chip wireless transceiver based on ultra-wideband technology, provides a new approach to real-time location and indoor location systems, location-based services, wireless sensor networks and the Internet of Things by providing accurate location awareness and communication.

ESP32 UWB module based on DW1000 and ESP32, is like a continuously scanning radar that can precisely lock onto another device, discover its location and communicate with it. Once the device is near another UWB device, the devices start “ranging.” Ranging refers to calculating the time of flight (ToF) between devices: the roundtrip time of challenge/response packets.


ESP32 UWB 101.jpg


  • Decawave DWM1000 for precision tracking
  • ESP32 for fast & powerful applications
  • Support Wifi, Bluetooth
  • Arduino compatible
  • Micro-USB connector
  • Board USB supply voltage range: 4.8~5.5V, 5.0V Typical


ESP32 UWB module ranging principle.
ESP32 UWB 103.jpg

How to set ESP32 UWB module as the anchor port.

  • Prepare the module and connect it to the PC with a USB cable.
  • There is a sketch(anchor.ino) for the setting, the sketch is available on GitHub.
  • Open the sketch by Arduino IDE. If you did not install the ESP32 development board on Arduino IDE, please check here for how to install it.
  • Install the library for DW1000.
ESP32 UWB 104.jpg
  • For the code compilation, it needs a change in the library file DW1000.cpp. If not modified, it will cause the compilation wrong.
The path of DW1000.cpp is C:\Users\makerfabs\Documents\Arduino\libraries\DW1000\src
Comment out the code in the red block.
ESP32 UWB 105.jpg
    //#ifndef ESP8266
    //	SPI.usingInterrupt(digitalPinToInterrupt(irq)); // not every board support this, e.g. ESP8266
  • Select the development board "ESP32 Dev Module" and the port.
ESP32 UWB 106.jpg
  • Upload the sketch to the board.
  • This module can be an anchor port to receive the other UWB device signal.

How to use ESP32 UWB module to measure the distance from the anchor port.

  • Open the sketch (tag.ino) by Arduino IDE.
  • As above mentioned to install the development board and library.
  • Upload the sketch to the board.
  • Open the serial monitor, it will print the distance from the anchor port.
ESP32 UWB 107.jpg


1. What's difference between of ESP32 WROOM and ESP32 WROVER?
ESP32 UWB 200A.jpg
IO16 and IO17 of ESP32 WROVER are used for PSRAM.
You can list your questions here or contact for technology support. A detailed description of your question will be helped to solve.