ESP32 DW3000 UWB Module Achieving 500m Range
Makerfabs (MaUWB DW3000) ESP32 UWB DW3000 Module with STM32 AT Commands Anchor Tag Code to test & achieve range of 500 meters distance
- Suitable forB.Tech/Diploma ESP32/IoT students
- Build time1-2 weeks
- LevelBeginner
- Available atAjvika Labs, Kakinada
About this project
Overview
In this guide, we will be using the latest UWB DW3000 Module (
Makerfabs MaUWB DW3000
) based on ESP32 & STM32 for range testing. This module integrates the MCU and all RF circuits, antennas, power management, and clock circuits. This new UWB module fixes issues between many anchors and tags and can handle up to 8 anchors and 32 tags for creating a system that tracks multiple positions.
In this tutorial, we will learn how we can set up the anchor and tag and use the basic code to establish the communication between Anchor and Tag. The Anchor and Tag will show the distance and RSSI value from each other. According to the manufacturer, it is claimed that the communicating distance that can be achieved by this module is 500 meters. We will therefore do the ESP32 DW3000 UWB Module Range test.
Before moving to the main project part, go through the following posts about the usage of the UWB Module:
Getting Started with ESP32 DW1000 UWB Module
ESP32 DW1000 UWB Indoor Location Positioning System
Ranging & Localization with ESP32 UWB DW3000 Module
ESP32 UWB Pro – Ultra Wideband Module with Amplifier
Bill of Materials
For this tutorial, we will need a pair of UWB Module which you can purchase from the following links.
S.N.
Components
Quantity
Purchase Links
MaUWB_DW3000 Module
Makerfabs
Type C USB Cable
Amazon
AliExpress
MaUWB_DW3000 ESP32 + STM32 Board
Ultra-wideband (UWB) is a wireless communication protocol that uses radio waves for secure, reliable ranging and precision sensing, adding spatial context to wireless devices. However, UWB often faces signal interference problems when multiple anchors and tags are in use.
Makerfabs’ latest MaUWB module addresses this issue. It integrates an STM32 controller with default firmware, designed and adjusted for reliability in field applications, to manage the DW3000 multiplexing. This allows the ESP32 controller to easily receive UWB arranging results through simple AT commands.
The module combines an MCU, RF circuits, antennas, power management, and clock circuits in one unit. It’s quickly configurable and operable via AT commands. The module supports up to 8 anchors and 32 tags, enabling the creation of a multi-anchor, multi-tag positioning system.
Makerfabs MaUWB make it possible to use UWB tech with any controller easily, with simple AT commands, to create a multi-anchor multi-tag positioning system. You can purchase the product from
Makerfabs Official
site.
Features
Comply with IEEE802.15.4-2011 ultra-wideband standard;
Easy to integrate without additional RF design;
Support CH5 (6489.6MHZ) RF band;
Strong resistance to multi-path fading;
Two modes of data transmission rate of 850kbps and 6.8Mbps;
The maximum packet length is 1023 bytes, which meets the application requirements of high data volume exchange;
The system supports 8Anchor32 tags.
The module supports free configuration of refresh rate, up to 100Hz;
Module serial port communication baud rate 115200;
Module (Tag) deep hibernation working current as low as 35uA, working current 34mA;
Support AT command;
Board USB supply voltage range: 4.8~5.5V, 5.0V Typical
Board Battery supply voltage range: 3.4~4.2V, 3.7V Typical
Basic Demo and Test Code
In this example code we will configure ESP32 UWB DW3000 Board with Arduino IDE and install necessaries libraries. In this demo the ESP32 controller can get the UWB arranging result simple by AT commands.
We will use the basic example code to get the distance and signal strength value from
Tag0
to
Anchor0
The Board has SSD1306 OLED Display embedded with ESP32 Board. Hence you need to install the
Adafruit SSD1306
and
Adafruit GFX
libraries to the Arduino IDE.
Basic Tag Code
In this code, we will set the board to Tag0.
Use Type-C USB cable to connect the board and PC, and select the development board “
ESP32 Dev Module
” and the “COM port”.
Verify the code and upload.
// User config ------------------------------------------
#define UWB_INDEX 0
#define TAG
// #define ANCHOR
#define FREQ_850K
// #define FREQ_6800K
#define UWB_TAG_COUNT 32
// User config end ------------------------------------------
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <Arduino.h>
#define SERIAL_LOG Serial
#define SERIAL_AT mySerial2
HardwareSerial
SERIAL_AT
(
)
;
#define RESET 32
#define IO_RXD2 18
#define IO_TXD2 19
#define I2C_SDA 4
#define I2C_SCL 5
Adafruit_SSD1306
display
(
&
Wire
)
;
void
setup
(
)
{
pinMode
(
RESET
OUTPUT
)
;
digitalWrite
(
RESET
HIGH
)
;
SERIAL_LOG
begin
(
115200
)
;
SERIAL_LOG
(
F
(
"Hello! ESP32-S3 AT command V1.0 Test"
)
)
;
SERIAL_AT
begin
(
115200
SERIAL_8N1
IO_RXD2
IO_TXD2
)
;
SERIAL_AT
println
(
"AT"
)
;
Wire
begin
(
I2C_SDA
I2C_SCL
)
;
delay
(
1000
)
;
// SSD1306_SWITCHCAPVCC = generate display voltage from 3.3V internally
if
(
!
display
begin
(
SSD1306_SWITCHCAPVCC
0x3C
)
)
{
// Address 0x3C for 128x32
SERIAL_LOG
println
(
F
(
"SSD1306 allocation failed"
)
)
;
for
(
;
;
)
;
// Don't proceed, loop forever
}
display
clearDisplay
(
)
;
logoshow
(
)
;
sendData
(
"AT?"
2000
)
;
sendData
(
"AT+RESTORE"
5000
)
;
sendData
(
config_cmd
(
)
2000
)
;
sendData
(
cap_cmd
(
)
2000
)
;
sendData
(
"AT+SETRPT=1"
2000
)
;
sendData
(
"AT+SAVE"
2000
)
;
sendData
(
"AT+RESTART"
2000
)
;
}
long
int
runtime
=
;
String
response
=
""
;
String
rec_head
=
"AT+RANGE"
;
void
loop
(
)
{
// put your main code here, to run repeatedly:
while
(
SERIAL_LOG
available
(
)
>
)
{
SERIAL_AT
write
(
SERIAL_LOG
read
(
)
)
;
yield
(
)
;
}
while
(
SERIAL_AT
available
(
)
>
)
{
char
c
=
SERIAL_AT
read
(
)
;
if
(
c
==
'\r'
)
continue
;
else
if
(
c
==
'\n'
||
c
==
'\r'
)
{
SERIAL_LOG
println
(
response
)
;
response
=
""
;
}
else
response
+=
c
;
}
}
// SSD1306
void
logoshow
(
void
)
{
display
clearDisplay
(
)
;
display
setTextSize
(
)
;
// Normal 1:1 pixel scale
display
setTextColor
(
SSD1306_WHITE
)
;
// Draw white text
display
setCursor
(
)
;
// Start at top-left corner
display
println
(
F
(
"MaUWB DW3000"
)
)
;
display
setCursor
(
)
;
// Start at top-left corner
// display.println(F("with STM32 AT Command"));
display
setTextSize
(
)
;
String
temp
=
""
;
#ifdef TAG
temp
=
temp
+
"T"
+
UWB_INDEX
;
#endif
#ifdef ANCHOR
temp
=
temp
+
"A"
+
UWB_INDEX
;
#endif
#ifdef FREQ_850K
temp
=
temp
+
" 850k"
;
#endif
#ifdef FREQ_6800K
temp
=
temp
+
" 6.8M"
;
#endif
display
println
(
temp
)
;
display
setCursor
(
)
;
temp
=
"Total: "
;
temp
=
temp
+
UWB_TAG_COUNT
;
display
println
(
temp
)
;
display
display
(
)
;
delay
(
2000
)
;
}
String
sendData
(
String
command
const
int
timeout
boolean
)
{
String
response
=
""
;
// command = command + "\r\n";
SERIAL_LOG
println
(
command
)
;
SERIAL_AT
println
(
command
)
;
// send the read character to the SERIAL_LOG
long
int
time
=
millis
(
)
;
while
(
(
time
+
timeout
)
>
millis
(
)
)
{
while
(
SERIAL_AT
available
(
)
)
{
// The esp has data so display its output to the serial window
char
c
=
SERIAL_AT
read
(
)
;
// read the next character.
response
+=
c
;
}
}
In this guide, we will be using the latest UWB DW3000 Module (
Makerfabs MaUWB DW3000
) based on ESP32 & STM32 for range testing. This module integrates the MCU and all RF circuits, antennas, power management, and clock circuits. This new UWB module fixes issues between many anchors and tags and can handle up to 8 anchors and 32 tags for creating a system that tracks multiple positions.
In this tutorial, we will learn how we can set up the anchor and tag and use the basic code to establish the communication between Anchor and Tag. The Anchor and Tag will show the distance and RSSI value from each other. According to the manufacturer, it is claimed that the communicating distance that can be achieved by this module is 500 meters. We will therefore do the ESP32 DW3000 UWB Module Range test.
Before moving to the main project part, go through the following posts about the usage of the UWB Module:
Getting Started with ESP32 DW1000 UWB Module
ESP32 DW1000 UWB Indoor Location Positioning System
Ranging & Localization with ESP32 UWB DW3000 Module
ESP32 UWB Pro – Ultra Wideband Module with Amplifier
Bill of Materials
For this tutorial, we will need a pair of UWB Module which you can purchase from the following links.
S.N.
Components
Quantity
Purchase Links
MaUWB_DW3000 Module
Makerfabs
Type C USB Cable
Amazon
AliExpress
MaUWB_DW3000 ESP32 + STM32 Board
Ultra-wideband (UWB) is a wireless communication protocol that uses radio waves for secure, reliable ranging and precision sensing, adding spatial context to wireless devices. However, UWB often faces signal interference problems when multiple anchors and tags are in use.
Makerfabs’ latest MaUWB module addresses this issue. It integrates an STM32 controller with default firmware, designed and adjusted for reliability in field applications, to manage the DW3000 multiplexing. This allows the ESP32 controller to easily receive UWB arranging results through simple AT commands.
The module combines an MCU, RF circuits, antennas, power management, and clock circuits in one unit. It’s quickly configurable and operable via AT commands. The module supports up to 8 anchors and 32 tags, enabling the creation of a multi-anchor, multi-tag positioning system.
Makerfabs MaUWB make it possible to use UWB tech with any controller easily, with simple AT commands, to create a multi-anchor multi-tag positioning system. You can purchase the product from
Makerfabs Official
site.
Features
Comply with IEEE802.15.4-2011 ultra-wideband standard;
Easy to integrate without additional RF design;
Support CH5 (6489.6MHZ) RF band;
Strong resistance to multi-path fading;
Two modes of data transmission rate of 850kbps and 6.8Mbps;
The maximum packet length is 1023 bytes, which meets the application requirements of high data volume exchange;
The system supports 8Anchor32 tags.
The module supports free configuration of refresh rate, up to 100Hz;
Module serial port communication baud rate 115200;
Module (Tag) deep hibernation working current as low as 35uA, working current 34mA;
Support AT command;
Board USB supply voltage range: 4.8~5.5V, 5.0V Typical
Board Battery supply voltage range: 3.4~4.2V, 3.7V Typical
Basic Demo and Test Code
In this example code we will configure ESP32 UWB DW3000 Board with Arduino IDE and install necessaries libraries. In this demo the ESP32 controller can get the UWB arranging result simple by AT commands.
We will use the basic example code to get the distance and signal strength value from
Tag0
to
Anchor0
The Board has SSD1306 OLED Display embedded with ESP32 Board. Hence you need to install the
Adafruit SSD1306
and
Adafruit GFX
libraries to the Arduino IDE.
Basic Tag Code
In this code, we will set the board to Tag0.
Use Type-C USB cable to connect the board and PC, and select the development board “
ESP32 Dev Module
” and the “COM port”.
Verify the code and upload.
// User config ------------------------------------------
#define UWB_INDEX 0
#define TAG
// #define ANCHOR
#define FREQ_850K
// #define FREQ_6800K
#define UWB_TAG_COUNT 32
// User config end ------------------------------------------
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <Arduino.h>
#define SERIAL_LOG Serial
#define SERIAL_AT mySerial2
HardwareSerial
SERIAL_AT
(
)
;
#define RESET 32
#define IO_RXD2 18
#define IO_TXD2 19
#define I2C_SDA 4
#define I2C_SCL 5
Adafruit_SSD1306
display
(
&
Wire
)
;
void
setup
(
)
{
pinMode
(
RESET
OUTPUT
)
;
digitalWrite
(
RESET
HIGH
)
;
SERIAL_LOG
begin
(
115200
)
;
SERIAL_LOG
(
F
(
"Hello! ESP32-S3 AT command V1.0 Test"
)
)
;
SERIAL_AT
begin
(
115200
SERIAL_8N1
IO_RXD2
IO_TXD2
)
;
SERIAL_AT
println
(
"AT"
)
;
Wire
begin
(
I2C_SDA
I2C_SCL
)
;
delay
(
1000
)
;
// SSD1306_SWITCHCAPVCC = generate display voltage from 3.3V internally
if
(
!
display
begin
(
SSD1306_SWITCHCAPVCC
0x3C
)
)
{
// Address 0x3C for 128x32
SERIAL_LOG
println
(
F
(
"SSD1306 allocation failed"
)
)
;
for
(
;
;
)
;
// Don't proceed, loop forever
}
display
clearDisplay
(
)
;
logoshow
(
)
;
sendData
(
"AT?"
2000
)
;
sendData
(
"AT+RESTORE"
5000
)
;
sendData
(
config_cmd
(
)
2000
)
;
sendData
(
cap_cmd
(
)
2000
)
;
sendData
(
"AT+SETRPT=1"
2000
)
;
sendData
(
"AT+SAVE"
2000
)
;
sendData
(
"AT+RESTART"
2000
)
;
}
long
int
runtime
=
;
String
response
=
""
;
String
rec_head
=
"AT+RANGE"
;
void
loop
(
)
{
// put your main code here, to run repeatedly:
while
(
SERIAL_LOG
available
(
)
>
)
{
SERIAL_AT
write
(
SERIAL_LOG
read
(
)
)
;
yield
(
)
;
}
while
(
SERIAL_AT
available
(
)
>
)
{
char
c
=
SERIAL_AT
read
(
)
;
if
(
c
==
'\r'
)
continue
;
else
if
(
c
==
'\n'
||
c
==
'\r'
)
{
SERIAL_LOG
println
(
response
)
;
response
=
""
;
}
else
response
+=
c
;
}
}
// SSD1306
void
logoshow
(
void
)
{
display
clearDisplay
(
)
;
display
setTextSize
(
)
;
// Normal 1:1 pixel scale
display
setTextColor
(
SSD1306_WHITE
)
;
// Draw white text
display
setCursor
(
)
;
// Start at top-left corner
display
println
(
F
(
"MaUWB DW3000"
)
)
;
display
setCursor
(
)
;
// Start at top-left corner
// display.println(F("with STM32 AT Command"));
display
setTextSize
(
)
;
String
temp
=
""
;
#ifdef TAG
temp
=
temp
+
"T"
+
UWB_INDEX
;
#endif
#ifdef ANCHOR
temp
=
temp
+
"A"
+
UWB_INDEX
;
#endif
#ifdef FREQ_850K
temp
=
temp
+
" 850k"
;
#endif
#ifdef FREQ_6800K
temp
=
temp
+
" 6.8M"
;
#endif
display
println
(
temp
)
;
display
setCursor
(
)
;
temp
=
"Total: "
;
temp
=
temp
+
UWB_TAG_COUNT
;
display
println
(
temp
)
;
display
display
(
)
;
delay
(
2000
)
;
}
String
sendData
(
String
command
const
int
timeout
boolean
)
{
String
response
=
""
;
// command = command + "\r\n";
SERIAL_LOG
println
(
command
)
;
SERIAL_AT
println
(
command
)
;
// send the read character to the SERIAL_LOG
long
int
time
=
millis
(
)
;
while
(
(
time
+
timeout
)
>
millis
(
)
)
{
while
(
SERIAL_AT
available
(
)
)
{
// The esp has data so display its output to the serial window
char
c
=
SERIAL_AT
read
(
)
;
// read the next character.
response
+=
c
;
}
}
Technologies used
Hardware components
- ESP32
- Arduino
- STM32
- SSD1306
- OLED
Software & tools
- Arduino IDE
What you get
- Working project / hardware kit, tested before delivery
- Complete source code with explanation
- Project demo and guidance for your viva
- Project report, PPT and IEEE paper support (on request)
Delivery & Payment
Delivery takes a minimum of two weeks from the date your inquiry is confirmed.
Payment is in two parts:
• 50% advance to start the project
• Remaining 50% before delivery
Note:
• Documentation and PPT are not included by default
• If you need documentation/PPT, it can be arranged for extra time and cost
We'll confirm the exact timeline and cost with you after reviewing your requirements.