A real-time vehicle speed and data display.
The Instrument Cluster is designed to provide real-time speed data from a PiRacer car on a graphical interface (GUI). The application is split across two devices: the Jetson Nano handles all the processing tasks, while the Raspberry Pi is used solely for rendering the Qt-based display. Both devices receive speed data simultaneously from the sensor via the Controller Area Network (CAN) protocol. The Jetson Nano processes the data for any necessary computations (such as filtering, calculations, etc.), and the Raspberry Pi renders the GUI with the processed speed data.
This architecture allows for improved performance by offloading processing to the Jetson Nano while simplifying the display connection on the Raspberry Pi. Check it out the pheripherals Readme to better understand about the project architecture.
This project offers hands-on experience with software engineering, embedded systems, and automotive communication protocols, with a focus on performance optimization through a modular system design.
-
Design and implement a Qt-based graphical user interface (GUI) for displaying speed data on the Raspberry Pi.
-
Use the Jetson Nano for handling all processing tasks related to speed data and mathematical calculations.
-
Integrate a Raspberry Pi with an Arduino-based speed sensor using the CAN protocol.
-
Display real-time speed data on the instrument cluster.
-
Test the application in realistic driving scenarios.
-
Document the entire project, including system architecture, software design, and implementation details.
BONUS: Display battery level on the instrument cluster.
-
Jetson Nano: Handles all the computational tasks and mathematical processing for the instrument cluster. It processes speed sensor data and other inputs before sending them to the Raspberry Pi.
-
Raspberry Pi: Dedicated to rendering the GUI with Qt, displaying the processed data received from the Jetson Nano over CAN bus.
This section lists the major frameworks, libraries, and tools used in this project.
🗂️ Check here the CAN ID Reference Table
Once the application is up and running, the instrument cluster will display real-time speed data and the vehicle's battery status on an LCD screen. The data is continuously updated as it is received via the CAN bus.
This project can be deployed and tested in two main environments:
To deploy the interface on a Raspberry Pi with an attached LCD display:
-
Make sure you're in the root directory of the repository.
-
Update the
.envfile located in the root directory:
-
Change the
PI_IP_ADDRESSto the IP address of your Raspberry Pi. -
Update the
CREDENTIALSwith the username (PI_USERNAME) and password (PI_PASSWORD) for your Raspberry Pi.
- Run the deployment script from the root repository:
./RaspberryPi/deploy/scripts/deployToRasp.sh
- Restart the application to apply the changes. The executables will be placed in
PI_PATH_BINin your Raspberry Pi, make sure to change that if necessary.
For testing purposes, you can simulate the application on your local machine:
-
Install the required dependencies as listed in the
requirements.txtfile. -
Run the application locally using:
./RaspberryPi/deploy/deployLocal/deployLocal.sh
- Ensure the CAN bus data is being simulated or fed into the application for testing.
We use LCOV for test coverage analysis to ensure the reliability and quality of the codebase. Follow the steps below to run the tests:
- Navigate to the
RaspberryPi/testsdirectory:
cd RaspberryPi/tests
- After the tests are executed, a coverage report will be generated. Run the test script:
./test.sh
Make sure all tests pass and the coverage meets the project's standards before submitting any changes.
Together, we've collaborated to bring this project to life, combining our knowledge, skills, and experience every step of the way. It has been a great journey of learning and growing as a team.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
-
Fork the repository
-
Create a new branch for your feature (
git checkout -b feature-name) -
Commit your changes (
git commit -am 'Add feature') -
Push to the branch (
git push origin feature-name) -
Open a pull request
Distributed under the MIT License. See LICENSE for more information.
-
Qt Framework: Qt – A cross-platform framework for GUI applications.
-
Raspberry Pi Foundation: Raspberry Pi – The small, powerful computer that powers the display side of the project.
-
Arduino: Arduino – A versatile open-source electronics platform used for sensor data collection.
-
CAN Bus Protocol: CAN Protocol – The communication protocol used to connect different ECUs in the vehicle.
