Radar
An ultrasonic radar system that detects objects' positions using sound waves instead of radio signals.
Author: Zaluceanu Mihaela
GitHub Project Link: https://github.com/UPB-PMRust-Students/proiect-mihaelazaluceanu
Description
This project is a small-scale ultrasonic RADAR system that detects the presence and relative position of objects in the horizontal plane. It uses the HC-SR04 ultrasonic sensor for distance measurements and the SG90 micro servo motor to rotate the sensor across a 180° arc, enabling area scanning. The system is controlled by a Raspberry Pi Pico 2. Designed as a modular component, this project can be integrated into larger systems where echolocation improves spatial awareness and obstacle detection.
Motivation
This project is modular and can be integrated into larger robotics or IoT projects later.
Architecture
Log
Week 5 - 11 May
Starting writing project's documentation.
Week 12 - 18 May
I assembled the hardware components and wrote a demo code to ensure everything was working correctly. I also started working on the GUI code for the radar interface.
Week 19 - 25 May
I implemented the main logic of the project (reading sensor data and sending it to the GUI). Additionally, I integrated a BMP180 sensor to measure the actual room temperature, and added a passive buzzer that emits different frequencies depending on the distance to the detected object.
Hardware
- x2 Raspberry Pi Pico 2W;
- SG90 micro-servomotor with 180° rotation range;
- HC-SR04 ultrasonic distance sensor;
- 3k3 Resistor;
- 6k8 Resistor;
- BMP180 sensor;
- passive buzzer;
![]() | ![]() |
---|
Schematics
Bill of Materials
Device | Usage | Price |
---|---|---|
Raspberry Pi Pico 2 | The microcontroller | 35 RON |
Raspberry Pi Pico 2 | The debugger | 35 RON |
Breadboard | Breadboard | 16.52 RON |
LM7805 | The stabilizer | 7.33 RON |
Wires | Wires | 20.53 RON |
USB to Micro-USB Cable | USB | 8.79 RON |
HC-SR04 Sensor | The Ultrasonic Sensor | 12.54 RON |
SG90 Servo-Motor | The Servomotor | 19.64 RON |
HC-SR04 Sensor Holder Support Bracket | Sensor Holder Support Bracket | 3.94 RON |
BMP180 Sensor | The Temperature Sensor | 6.98 RON |
Passive Buzzer | The Buzzer | 0.99 RON |
Total 220.72
Software
Library | Description | Usage |
---|---|---|
embassy | Asynchronous embedded framework for Rust | Core framework for running async tasks on the Raspberry Pi Pico 2 |
embassy-rp | For the Raspberry Pi RP2040 microcontroller | Hardware abstraction layer for Raspberry Pi Pico 2 |
embassy-hal | Hardware abstraction layer for embedded devices | Standard interface for GPIO, SPI, I2C, PWM, etc. |
panic-probe | Minimal panic handler with defmt logging support | Used for debugging embedded apps with logging via RTT |
defmt | Logging framework optimized for embedded systems | Logs debug information with minimal resource usage |
hcsr04-async | Async driver for HC-SR04 ultrasonic sensor | Measures distance via async API and GPIO pins |
bmp180-embedded-hal | Driver for BMP180 pressure/temperature sensor | Reads environmental data over I2C using embedded-hal traits |
embassy-usb | Async USB device stack for embedded devices | Sends serial data over USB via CDC-ACM class |
fixed | Fixed-point arithmetic types | Used for converting float to fixed point for better performance or precision |
eframe/egui | GUI framework for Rust apps | Used in host-side GUI for rendering radar visualizations (not running on embedded device) |