Skip to main content

Proximity Sensor

A sensor that measures the distance

info

Author: Iubitu Mara
GitHub Project Link: https://github.com/UPB-FILS-MA/project-MaraIubitu.git

Description

A proximity sensor designed for safety and awareness. It accurately detects nearby objects and alerts users visually and audibly through a progressive buzzer and LCD screen. Ideal for navigating tight spaces or vehicles, it offers comprehensive spatial awareness, reducing the risk of accidents.

Motivation

While researching for project ideas, I came across a parking sensor and a distance measuring project and I thought it would be interesting to try and combine these two ideas.

Architecture

architecture

Log

Week 6 - 12 May

Got the components for the project and made the documentation part.

Week 7 - 19 May

I did some more research for the hardware and made the KiCad schematics.

Week 20 - 26 May

Hardware

I am using a Pico MCU to recieve the distance measured by the HR-SC04 proximity sensor, while sending the data to an LCD screen. Additionally, the buzzer is connected to the sensor, changing its intensity based on the distance from the outside object.

Schematics

KiCad

Bill of Materials

DeviceUsagePrice
Rapspberry Pi Pico WThe microcontroller35 RON
Senzor Ultrasonic de Distanță HC-SR04+The distance sensor15 RON
BreadboardThe breadboard10 RON
WiresThe wires8 RON
LCD screenThe screen15 RON
BuzzerThe buzzer2 RON
ResistorsThe resistors15 RON

Software

LibraryDescriptionUsage
pwmPulse-width modulationUsed for controlling the buzzer's sound intensity
embassy-executorAsynchronous executor for Rust embedded systemsUsed for task scheduling and asynchronous programming
embassy-rpPeripheral access libraryUsed for initializing and interacting with peripherals
logLogging facadeUsed for logging messages
embassy-syncSynchronization primitivesUsed for syncronizing asynchronous tasks
ag-lcdDisplay libraryUsed for writing to the display
  1. Proximity Sensor With Raspberry Pi Pico W and HC-SR04
  2. Raspberry Pi Pico and Proximity Sensor
  3. Measuring distance accurately with a Raspberry Pi and a HC-SR04 sensor
  4. How to Use the HC-SR04 Ultrasonic Sensor with Raspberry Pi