Skip to content

CSharpTeoMan911/BerrySonar

Repository files navigation

🍓 BerrySonar

BerrySonar is a Linux-based C# application developed for the Raspberry Pi, designed to act as a DIY LIDAR-like system—similar in concept to the object detection systems used in autonomous vehicles like Teslas. It uses trigonometry and an ultrasonic sensor rotated by a stepper motor to scan a 180° field, detect and display nearby objects. The data is transmitted securely to a Firebase Realtime Database for monitoring and analysis. The GUI of the application is served as a React based application called berry-sonar-view that is getting the LIDAR metadata in real time using Firebase real-time database and rendering the data in a sonar UI element that is drew and rendered dynamically in the browser



BerrySonar-ezgif.com-gif-maker.mp4

🚀 Features

  • 🧠 LIDAR-like Scanning – Scans a 180° arc using a rotating ultrasonic sensor.

  • 🔄 Stepper Motor Rotation – Uses a 28BYJ-48 stepper motor to rotate the sensor precisely.

  • 🧰 Raspberry Pi-Controlled – All hardware is interfaced and controlled via GPIO pins.

  • ☁️ Firebase Realtime Database – Secure, cloud-based storage of distance and angle data.

  • 🔐 Secure Writes – Only the super-admin can write data.

  • 👀 Read-Only Access – A restricted admin account can read data.

🧱 Tech Stack

  • Programming Language: C# (.NET Core)

  • Platform: Linux (Ubuntu Server)

  • Cloud: Firebase Realtime Database

  • Security: Firebase Authentication & Realtime Database Rules

  • Communication: GPIO with PWM for motor control & timing for ultrasonic pulse detection

🔩 Hardware Requirements

  • 🧠 Raspberry Pi (any model with GPIO support; tested on Raspberry Pi 3/4)

  • 📏 HC-SR04 Ultrasonic Sensor – For distance measurement

  • 🔁 28BYJ-48 Stepper Motor with ULN2003 Driver Board – For rotating the sensor

  • 🪛 Breadboard & Jumper Wires – For circuit connections *🔌 5V Power Supply – To power the motor and sensor



⚙️ Configuration

🖥️ Software Configuration

Driver dependencies

Install the required GPIO drivers using APT.

sudo apt install gpio -y || sudo apt install wiringpi -y && sudo apt install libgpiod-dev -y

Download the release

Download the application from the repository Release section and run the application as sudo

sudo -i && ./BerrySonar

🔩 Hardware Setup

🧱 Required Hardware 🧠🔩


🔁 28BYJ-48 Electric Stepper Motor

🌀 Tiny but mighty! This 5V stepper motor rotates the ultrasonic sensor to scan the surroundings.



⚙️ ULN2003A Stepper Motor Driver Board

🧠 The brain behind the motor! Controls the motor's stepping sequence and power delivery.



📡 HC-SR04 Ultrasonic Distance Sensor

👀 The “eyes” of BerrySonar. Sends sound waves and listens for echoes to measure object distances.


🔩🧰 Hardware Configuration and Wiring

BerrySonar pinnout legent schematic

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages