|
|
UNO R3Arduino
|
x 1 | |
|
|
Two REYAX RYUW122_Lite UWB modules |
x 1 | |
|
|
16×2 I2C LCD |
x 1 | |
|
|
logic-level shifter for UART communication |
x 1 | |
|
|
Breadboards and jumper wire |
x 1 |
|
arduino IDEArduino
|
Building a UWB Distance Monitoring and Alert System with Arduino UNO
Measuring the distance between two devices is a useful capability in robotics, wireless sensing, and embedded systems. For example, a system might need to detect when an object moves beyond a predefined boundary or trigger an alert when two devices are no longer within a desired distance.
One way to implement this functionality is with Ultra-Wideband (UWB) technology. In this project, I've created a distance monitoring and alert system using two REYAX RYUW122_Lite UWB modules, Arduino. 16×2 I2C LCD displays the measured distance, while a buzzer activates when the distance exceeds 200 cm.
Understanding UWB Distance Measurement
Ultra-Wideband is a wireless technology used for ranging, positioning, and data communication. Its wide bandwidth supports precise signal-timing measurements, which can be used to estimate the distance between two devices.
In Time of Flight (ToF) ranging, the system uses the propagation time of radio signals to determine the separation between devices. Radio waves travel at approximately the speed of light, so small timing differences can correspond to meaningful changes in distance.
The actual ranging process depends on the protocol and timing method used by the devices. Practical performance is also influenced by antenna placement, obstacles, reflections, and the surrounding environment.
UWB is useful when an application needs distance information rather than simply detecting whether a wireless connection exists.
REYAX RYUW122_Lite Module Overview
The REYAX RYUW122_Lite is a UWB transceiver module with an integrated antenna and UART interface. It supports Anchor and Tag operating modes and can be configured using AT commands.
Its relevant specifications include:
- UWB support: IEEE 802.15.4-2015 and IEEE 802.15.4z BPRF mode
- Supported channels: Channel 5 at 6489.6 MHz and Channel 9 at 7987.2 MHz
- Stated ranging accuracy: approximately 10 cm under open-field conditions
- Stated open-field communication range: up to 100 m
- Security: AES-128
- Default UART baud rate: 115200 bps
- Supported UART baud rates: 9600, 57600, and 115200 bps
- Operating voltage: 2.4–3.6 V
- Operating temperature: −40°C to +85°C
- Low-power sleep mode
The accuracy and range figures depend on the test environment and should not be treated as guaranteed results for every application.
Configuring the UWB Modules
Before connecting the modules to the Arduino, configure each one separately using a USB-to-TTL converter. Connect the converter's TX to the module's RXD, its RX to the module's TXD, and the grounds together. Use a suitable 3.3 V supply and ensure the UART logic levels are compatible.
Open the serial monitor at 115200 bps and select Both NL and CR as the line ending. Send the following command:
AT
The module should respond with:
+OK
Set the same Network ID on both modules:
AT+NETWORKID=1
Configure the Anchor using:
AT+MODE=1
AT+ADDRESS=ANC
AT+IPR=9600
The first command selects Anchor mode, the second assigns the Anchor address, and the third changes its UART baud rate to 9600 bps to match the Arduino's SoftwareSerial connection.
Configure the Tag using:
AT+MODE=0
AT+ADDRESS=TAG
Both modules must share the same Network ID but use different addresses.
To test the ranging communication, send this command to the Anchor:
AT+ANCHOR_SEND=TAG,2,Hi
A successful command should return +OK. A ranging response may look like this:
+ANCHOR_RCV=TAG,2,Hi,50 cm
The value of 50 cm is only an example. The actual measurement depends on the physical distance and surrounding conditions.
Connecting the Anchor to Arduino UNO

The Arduino UNO uses 5 V logic, while the RYUW122_Lite uses 3.3 V logic. A logic-level shifter is required for the UART signal connections.
Use the following connections:
Arduino 3.3V → UWB module VDD
Arduino GND → UWB module GND
UWB TXD → level shifter LV1; corresponding HV1 → Arduino digital pin 9
Arduino digital pin 10 → level shifter HV2; corresponding LV2 → UWB RXD
The Arduino uses SoftwareSerial with digital pin 9 as RX and digital pin 10 as TX.
Before powering the circuit, verify that the selected 3.3 V supply can support the module's current requirements. If the Arduino's 3.3 V output is insufficient, use an appropriate regulated supply with a common ground.
LCD Connections
Connect the 16×2 I2C LCD as follows:
LCD VCC → Arduino 5V
LCD GND → Arduino GND
LCD SDA → Arduino A4
LCD SCL → Arduino A5
For the original circuit, the LCD address is 0x27 when the A0, A1, and A2 address-selection jumpers are open.
Buzzer Connections
The active-low buzzer is connected as follows:
Buzzer positive/supply pin → Arduino 5V
Buzzer negative/control pin → Arduino digital pin 2
Driving digital pin 2 LOW activates the buzzer. Check the buzzer's current requirements before connecting it directly to an Arduino pin. If the load exceeds the pin's safe output capability, use a suitable transistor driver.
Powering the Tag

The Tag does not require a connection to the Arduino. It needs a regulated power supply within its specified operating range.
In the original setup, a 12 V source feeds the input of a breadboard power-supply module configured for a 3.3 V output. Connect the regulated output to the Tag's VDD and GND pins.
Never apply 12 V directly to the RYUW122_Lite. Its specified operating voltage is 2.4–3.6 V.
How the System Works?
The system consists of two UWB modules configured as an Anchor and a Tag. The Anchor connects to the Arduino UNO through a UART interface. The LCD and buzzer are also connected to the Arduino, which processes the ranging information received from the Anchor. The Tag is placed on the object being monitored and operates independently with a suitable regulated power supply.
The Arduino sends a ranging request to the Anchor. The Anchor communicates wirelessly with the Tag and returns a response containing the distance measurement. The Arduino extracts the distance value and displays it in centimeters.
The program then compares the measurement with a threshold of 200 cm. When the reported distance exceeds this limit, the active-low buzzer is activated.
This arrangement keeps the Tag relatively simple because it does not require a second Arduino. The main controller handles the display, serial communication, and alert logic.
Testing the Complete System
Once the modules are configured and the wiring is complete, upload the Arduino program. The sketch should use SoftwareSerial on pins 9 and 10 and communicate with the Anchor at 9600 bps.
Power up the Arduino, Anchor, and Tag. The LCD should initialize and display the measured distance in centimeters.
Move the Tag closer to and farther away from the Anchor to observe the readings. When the measured distance exceeds 200 cm, the buzzer should activate.
For initial testing, place the modules in an open area with a clear path between them. Walls, people, nearby objects, and antenna orientation can influence the ranging result.
Applications and Possible Improvements
The project can serve as a starting point for proximity alerts, object-distance monitoring, robotics experiments, and UWB-based presence detection.
Possible improvements include adding an LED indicator, introducing multiple alert thresholds, recording distance measurements, or sending the data to another embedded system for further processing.
For applications where the distance measurement is used for safety or industrial control, the complete system should be validated under the expected operating conditions. This includes checking ranging reliability, handling invalid serial responses, and verifying alert behavior near the threshold.
Conclusion
This project demonstrates how UWB ranging can be integrated with a common microcontroller to create a practical distance monitoring system. The combination of two REYAX RYUW122_Lite modules, an Arduino UNO, an LCD, and a buzzer provides a useful platform for exploring wireless ranging and embedded-system interfaces.
It also highlights several important implementation details: configuring Anchor and Tag modes correctly, matching UART baud rates, protecting 3.3 V signals from 5 V logic, and accounting for environmental effects during distance measurement.
The same design can be extended with additional indicators, data logging, or more advanced control logic as the application requirements grow.
Building a UWB Distance Monitoring and Alert System with Arduino UNO
Raspberry Pi 5 7 Inch Touch Screen IPS 1024x600 HD LCD HDMI-compatible Display for RPI 4B 3B+ OPI 5 AIDA64 PC Secondary Screen(Without Speaker)
BUY NOW- Comments(0)
- Likes(0)
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by Rachana Jain
-
Building a UWB Distance Monitoring and Alert System with Arduino UNO
Measuring the distance between two devices is a useful capability in robotics, wireless sensing, and...
-
HC-SR501 PIR Motion Sensor: Working, Pinout, and Arduino Interface
Motion detection is a common requirement in embedded and electronics systems. Applications such as a...
-
Interfacing OLED Display with Arduino
OLED displays are a useful upgrade over traditional character LCDs when an Arduino project needs a c...
-
Long-Range Appliance Control Using Arduino and RYLR999 LoRa
Controlling an appliance wirelessly is straightforward when Wi-Fi is available, but things become mo...
-
GPS Tracker using Heltec WiFi LoRa 32 V4 and REYAX RYS352A GNSS Module
This browser-based GPS tracker combines the Heltec WiFi LoRa 32 V4 development board with the REYAX ...
-
Arduino Stepper Motor Control Using 28BYJ-48 and ULN2003 Driver
This project demonstrates how to control the popular 28BYJ-48 5V stepper motor using an Arduino Uno ...
-
Arduino Water Level Indicator Using Water Level Sensor
Monitoring water levels in tanks is important for preventing overflow and reducing water wastage. In...
-
Arduino Servo Motor Control
Precise motion control is at the heart of many modern electronics projects—from robotic arms to came...
-
Build a Long-Range Wireless Appliance Control System
Controlling electrical devices over long distances is often challenging, especially when internet co...
-
DHT11 and DHT22 Sensors with Arduino Uno
Temperature and humidity monitoring plays a crucial role in various applications, from smart home cl...
-
Line Follower Robot using Arduino
A Line Follower Robot (LFR) is an autonomous robot that follows a predefined path, typically a black...
-
Ultrasonic Sensor HC-SR04 Interfacing with Arduino
The HC-SR04 Ultrasonic Sensor is a widely used and easy-to-implement sensor for distance measurement...
-
Interfacing IR Sensor Module with Arduino Nano
In this project, we will learn how to interface an Infrared (IR) sensor module with an Arduino Nano....
-
-
-
AudioLink – USB & Bluetooth LE Audio / Auracast Receiver with Balanced Line Outputs (nRF5340)
228 0 0 -
-
-
-
Émetteur Récepteur Optique Expérimental (communication UART ATtiny + fibre optique)
346 0 1 -
SmallOLED - Live PC Stats, Animated Clocks & Audio Visualizer
1384 0 3 -
"Talking Multimeter": Arduino-Based Speech Add-on for Multimeters with SCPI Protocol
782 0 1







