Coder Social home page Coder Social logo

pasindu651 / smart-go-kart Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pathumd/smart-go-kart

0.0 0.0 0.0 233.15 MB

🏎️Go-Kart Dashboard with Collision Detection System, Media Player, and Reverse Camera

License: MIT License

Python 100.00%
car collision-detection dashboard gui music-player pyqt5 qt raspberry-pi system system-programming temperature-sensor ultrasonic-sensor

smart-go-kart's Introduction

🏎️💨 Smart Go-Kart

🤝 Contributors

⚡Hardware

Circuit diagram

image

Raspberry Pi 4 Model B

image

  • Used to run the main dashboard application.

GPS Receiver

image

  • Used to determine the go-kart's current speed and location.

HC-SR04 Ultrasonic sensor (x6)

image

  • Used to calculate and determine the proximity of objects surrounding the go-kart
  • Three ultrasonic sensors are positioned at the front of the go-kart, and three at the back

DHT11 Temperature and Humidity Sensor (x1)

image

  • Used to determine the external temperature of the go-kart.

Breadboard (x3)

  • Used a half-sized 400 point breadboard to host the temperature sensor
  • Used two full-sized 830 point breadboards to host 3 ultrasonic sensors each

Resistors

  • Used a voltage divider circuit with 1kΩ (x6) and 2kΩ (x6) resistors to lower the sensor output voltage from 5V to 3.3V. Consider the example diagram below (values vary).

image

Jumper wires

  • Female-to-male jumper wires were used to connect the Raspberry Pi to the breadboards
  • Female-to-female jumper wires were used to connect the buzzer to the Raspberry Pi
  • Red = VCC
  • Blue = Trig
  • Yellow = Echo
  • Black = Ground

Wide Angle Camera for Raspberry Pi (Inno-Maker)

image

  • Used to provide rear visibility for user

CREATIVE Pebbles USB Speakers (x1)

image

  • Used to play the startup sound for the dashboard and to play media.

7" IPS Touch Display

image

  • Used to display the main dashboard application.

👨‍💻 Software

Home Tab

image

  • Features a navigation menu at the top to quickly switch between tabs
  • Displays the current time using the Raspberry Pi system clock
  • Displays the Go-kart's current speed (in km/h) by parsing received GPS packets from GPS receiver
  • Displays the Go-kart's current location by comparing its latitude/longitude to a coordinate database
  • Displays the tempature outside by polling temperature sensor

Media Tab

image

  • Starts playing the media found in dashboard/music as a playlist upon startup with automatic shuffling
  • Pulls metadata from each track to display the track's album cover, track name, and artist name(s)
  • Allows the user to play, pause, skip, or move to previous track
  • Media is run in a background thread, allowing the user to freely move between tabs while music plays
  • When an obstacle is detected by one of the ultrasonic sensors, the music volume is reduced by 50%

Reverse Camera Tab

image

  • Includes 180 degree collision detection system
  • Features a reverse camera when the Go-kart is in reverse
  • Includes parking assistance
  • Includes a buzzer with frequency that corresponds to the proximity to obstacles
  • Uses distance steps to display colour-coded levels of proximity to obstacles with distance data recieved from ultrasonic sensors
  • When one of the sensors turn yellow, the program automatically reduces the music volume, switches to the camera tab, and activates the buzzer

📖 Software Dependencies

Raspberry Pi:

  • Raspbian (insert OS version here)

Python 3.8.2

(add library versions)

  • PyQt5
  • gpsd
  • mutagen
  • Adafruit_DHT
  • vlc

Linux dependencies

  • pulseaudio
  • gpsd
  • gpsd-clients

⚠️ Problems we ran into

  • Many of the online resources supported circuits with 1-2 ultrasonic sensors. Employing 6 ultrasonic sensors was a new obstacle that had to be overcome.
  • Layering images over a video in the camera tab (ex. shapes and parking lines) was difficult as they would replace the video QLabel. The solution to this was to implement a vbox layout that hosts the necessary labels similar to an array.
  • A traditional threading mechanism for updating the GUI with distances and video frames proved suboptimal. After experimenting with various approaches, a signal-slot connection that utilizes references was settled upon.
  • Finding a mathematical approach for a GUI representation of the collision detection and implementing an accurate buzzer frequency was challenging

⏩ Next steps

  • Automatically running the dashboard application upon boot-up
  • Engineering the Go-kart frame, mechanics, and dashboard housing
  • Soldering the hardware onto a perfboard

smart-go-kart's People

Contributors

pasindu651 avatar pathumd avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.