Skip to main content

Radar Secure System

A Raspberry Pi Pico W-based radar-like security system.

info

Author: Cristiana-Florentina Precup
GitHub Project Link: https://github.com/UPB-FILS-MA/project-cristianaprecup

Description

This project aims to develop a radar-like security system using a Raspberry Pi Pico W as its core. Designed to monitor and track the presence of objects within a specified perimeter, the system utilizes ultrasonic sensing technology to detect movements or intrusions. Objects within the sensor's range will be displayed on a computer through a graphical interface similar to naval radars, and there will be a visual and acoustic notification system. It will also provide data about the detected objects, including their distance and speed.

Motivation

I chose this radar security system project because it combines practical engineering with advanced technology to address significant security issues, including military needs. Using a Raspberry Pi Pico W and ultrasonic sensors, this system mimics the radar used in submarines and aircraft for everyday safety and military surveillance. Additionally, I am implementing this system using the Rust programming language, which offers enhanced safety and performance features ideal for such critical applications. This project not only challenges my technical skills but also allows me to develop a tool that enhances safety in various environments, such as homes, warehouses, and military zones. It offers a valuable chance to deepen my understanding of hardware-software integration and contribute to creating safer, more secure areas with innovative technology.

Architecture

Main Components:
Sensor Module: This includes the Ultrasonic Distance Sensor, which measures the proximity of objects. It is mounted on the Micro Servo Motor, allowing the sensor to pivot and scan a wider area.
Control Unit: The Raspberry Pi Pico W acts as the brain of the system. It controls the Sensor Module, processes the distance data, operates the Servo Motor, and manages user interactions through buttons.

Feedback Mechanisms:
Visual Feedback: Delivered by the RGB LED, which changes color to indicate different system statuses or alerts.
Auditory Feedback: The Passive Buzzer produces sound alerts when movement is detected or under specific conditions.

User Interface: Consists of Tactile Push Button Switches that allow users to manually operate the system.
Display Interface: A laptop connected to the Raspberry Pi Pico W via Wi-Fi. It displays the radar data graphically, mimicking naval radar systems, and provides a user-friendly interface for monitoring.

Connections Between Components:
Sensor to Controller: The Ultrasonic Sensor is connected to the Raspberry Pi Pico W through GPIO pins, sending back data to the microcontroller for analysis.
Servo Motor to Controller: The Servo Motor is connected to the Raspberry Pi Pico W, receiving commands to adjust the sensor’s orientation for comprehensive scanning.
Feedback to Controller: Both the RGB LED and the Passive Buzzer are linked to the Pico W, which activates these elements based on the processed data to provide alerts.
User Interface to Controller: The push buttons are wired to GPIO pins on the Pico W, enabling direct user control and configuration changes.

Architecture photo

Log

Week 6 - 12 May

Assembled hardware components temporarily on a breadboard for testing.
I started to test code on each component one by one to be sure that they worked as expected.

Week 7 - 19 May

Created the KiCad schematic for the project.
Final assembled the components on the breadboard.
Assembled the box structure, ensuring stability and correct dimensions.

Week 20 - 26 May

I developed the software needed for the project.
This part of the project turned out to be the most challenging due to the technical aspects of establishing network connections and server communication.
Additionally, I encountered challenges with the servomotor, which lacked sufficient power to perform as needed.

Hardware

Raspberry Pi Pico W: Microcontroller with Wi-Fi, serves as the main processing unit.
HC-SR04 Ultrasonic Distance Sensor: Measures distances to detect objects.
SG90 Micro Servo Motor: Rotates the ultrasonic sensor for a wider scanning area.
RGB LED: Provides visual feedback through color changes.
Passive Buzzer Module: Emits audible alerts.
Tactile Push Button Switches: Allows manual control and system adjustments.
Resistors: 10KΩ for the buttons and 220Ω for the RGB LED.
Breadboard: Used for assembling the prototype.
Wires: Female-to-Male, Female-to-Female, and Male-to-Male for connections.
Micro USB Cable: Powers the Raspberry Pi Pico W.
Laptop: Displays the radar data graphically.

This is what the wiring looks like:

Wiring OverviewCloser look
Hardware 1Hardware 2

This is the prototype:

Hardware3

This is how final project looks:

Final projectFinal project

Schematics

KiCad Schematics

Connected to the Rasperry Pi Pico W, there is a RGB LED connected to GPIO 0, GPIO 1 and GPIO 2, two push buttons connected to GPIO 3 and GPIO 4. The buzzer is connected to GPIO 5. The HC-SR04 ultrasonic sensor is connected through I2C to the Raspberry Pi Pico using GPIO 18 as SDA and GPIO 19 as SCL, and to PIN 36 (3V3_OUT) for the power. The Servomotor is connected to GPIO 16 in order to be used with PWM, and connected to PIN 39 (VSYS, used to power system, can be in range 1.8V-5.5V).

Bill of Materials

DeviceUsagePrice
Raspberry Pi Pico WThe microcontroller with Wi-Fi for phone notification34.5 lei
HC-SR04 Ultrasonic Distance SensorFor measuring distances to objects20 lei
SG90 Micro Servo MotorTo rotate the ultrasonic sensor for a wider scan area14 lei
Passive Buzzer ModuleFor audible alerts1 lei
Tactile Push Button SwitchFor manual controls2 lei for 2
10KΩ ResistorsFor the buttons0.5 lei for 2
220Ω ResistorsFor the RGB LED1 lei for 3
BreadboardFor assembling the prototype10 lei
Female-to-Male WiresFor connections5 lei per pack
Female-to-Female WiresFor connections3 lei per pack
Male-to-Male WiresFor connections9 lei for 3 packs
Micro USB CableTo power the Raspberry Pi Pico W3 lei
RGB LEDFor visual feedback2 lei

Software

LibraryDescriptionUsage
embassyAsync runtime for embedded systemsManages tasks and system operations
embassy-halHardware Abstraction LayerInterfaces with Raspberry Pi Pico W hardware
embassy-executorTask executorHandles asynchronous tasks and data processing
embassy-timeTiming moduleProvides timing functions for operations
embassy-netNetworking libraryManages Wi-Fi communications
embassy-gpioGPIO managementControls GPIO pins for devices and inputs
embassy-syncSynchronization primitivesProvides channels, mutexes, and other synchronization tools for concurrent tasks
embassy-usbUSB device managementManages USB connections and operations
embassy-pwmPulse Width Modulation (PWM) controlControls PWM outputs for motor control and LEDs
embassy-pioProgrammable I/O managementFacilitates complex I/O operations programmatically
  1. YouTube Video