Skip to main content
Version: ACS CC

Radar

An ultrasonic radar system that detects objects' positions using sound waves instead of radio signals.

info

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​

Radar

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​

kicad

Bill of Materials​

DeviceUsagePrice
Raspberry Pi Pico 2The microcontroller35 RON
Raspberry Pi Pico 2The debugger35 RON
BreadboardBreadboard16.52 RON
LM7805The stabilizer7.33 RON
WiresWires20.53 RON
USB to Micro-USB CableUSB8.79 RON
HC-SR04 SensorThe Ultrasonic Sensor12.54 RON
SG90 Servo-MotorThe Servomotor19.64 RON
HC-SR04 Sensor Holder Support BracketSensor Holder Support Bracket3.94 RON
BMP180 SensorThe Temperature Sensor6.98 RON
Passive BuzzerThe Buzzer0.99 RON

Total 220.72

Software​

LibraryDescriptionUsage
embassyAsynchronous embedded framework for RustCore framework for running async tasks on the Raspberry Pi Pico 2
embassy-rpFor the Raspberry Pi RP2040 microcontrollerHardware abstraction layer for Raspberry Pi Pico 2
embassy-halHardware abstraction layer for embedded devicesStandard interface for GPIO, SPI, I2C, PWM, etc.
panic-probeMinimal panic handler with defmt logging supportUsed for debugging embedded apps with logging via RTT
defmtLogging framework optimized for embedded systemsLogs debug information with minimal resource usage
hcsr04-asyncAsync driver for HC-SR04 ultrasonic sensorMeasures distance via async API and GPIO pins
bmp180-embedded-halDriver for BMP180 pressure/temperature sensorReads environmental data over I2C using embedded-hal traits
embassy-usbAsync USB device stack for embedded devicesSends serial data over USB via CDC-ACM class
fixedFixed-point arithmetic typesUsed for converting float to fixed point for better performance or precision
eframe/eguiGUI framework for Rust appsUsed in host-side GUI for rendering radar visualizations (not running on embedded device)
  1. Lab03 - PWM & ADC
  2. Lab06 - I2C
  3. Radar 2016