Skip to content

TB543/4RunnerDash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

140 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

4RunnerDash Setup Guide for Raspberry Pi 5

Project Demo

Hardware List

Software Installation Prerequisites

Flashing the Raspberry Pi OS Lite (64-bit)

  1. Open Raspberry Pi Imager.
  2. Select Raspberry Pi 5 as the device.
  3. Choose OS:
    • Select Raspberry Pi OS (Other) -> Raspberry Pi OS Lite (64-bit).
  4. Select the storage device to flash to.
  5. Modify settings:
    • Create your username and password.
    • Configure Wireless LAN settings.
    • Other options can be left as default.
  6. Wait for the flashing process to complete.

Note: Whatever name you give the Pi will be the name of the bluetooth connection to the Pi.

Note: Program has not been tested for newer versions of RaspiOS, if they do not work use Bookworm and apply the same settings manually in raspi-config

Initial Boot and Configuration

  1. Plug the SD card into the Pi, boot the Raspberry Pi and wait for the initial setup to finish.
  2. Log in using the username and password you set during flashing.
  3. Run the configuration tool:
    sudo raspi-config
  4. Navigate to System Options -> Auto Login and enable it.
  5. Navigate to Interface Options -> Serial Port and disable login shell over serial and enable serial hardware.
  6. Navigate to Interface Options -> I2C and enable I2C.
  7. Optionally you can also disable screen sleeping after 10 mins in Display Options -> Screen Blanking

Note: Sometimes you may need to change the WLAN Country and reconnect to Wi-Fi for proper internet connectivity, even if it was set during flashing. This can be done in Localization Options -> WLAN Country and System Options -> Wireless LAN. Make sure if your internet/password ever changes you update this setting to ensure software updates and album art continues to work.

Software Installation

  1. Install Git:

    sudo apt install -y git
  2. Clone the latest release from the 4RunnerDash repository:

    git clone --branch $(curl -s https://api.github.com/repos/TB543/4RunnerDash/releases/latest | grep -Po '"tag_name": "\K.*?(?=")') https://github.com/TB543/4RunnerDash
  3. Change into the resources directory:

    cd 4RunnerDash/resources
  4. Run the setup script:

    ./setup_boot.sh

    it will display a list of connected devices like so:

    N: Name="pwr_button"
    N: Name="QDTECH̐MPI700 MPI7002"
    N: Name="vc4-hdmi-0"
    N: Name="vc4-hdmi-0 HDMI Jack"
    N: Name="vc4-hdmi-1"
    N: Name="vc4-hdmi-1 HDMI Jack"

    It will ask you to copy and paste the device for the touch screen. So in my case it would be QDTECH̐MPI700 MPI7002.

    Lastly, you will be asked for your Spotify API client ID and client secret. This is needed for viewing album art in the music menu.

    Note: If you set up ssh keys and ssh from desktop it will be easier to copy and paste.

  5. Next you will need to plug in your External Storage and run:

    ./format_drive.sh

    This will display a list of connected drives like so:

    NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
    sda           8:0    0 465.8G  0 disk 
    └─sda1        8:1    0 465.8G  0 part /home/usr/4RunnerDash/src/AppData/map_data
    mmcblk0     179:0    0 119.1G  0 disk 
    ├─mmcblk0p1 179:1    0   512M  0 part /boot/firmware
    └─mmcblk0p2 179:2    0 118.6G  0 part /

    copy and paste the external drive that you will use to store your map data, for me it would be sda1.

    Note: You can skip this step if your OS drive has enough storage for the map data (you will need about 200 GB of free space for US map data).

  6. Next run the dependency install script:

    ./install_dependencies.sh

    it will first install rust. You can proceed with standard installation by pressing enter when prompted. The remaining installs will take a few minutes and might ask for conformation, do so by typing "y".

  7. Lastly, run the map install script:

    ./install_map.sh

    This will take a really long time to run (took me about 2 weeks) as it has to download large map data files and format it but you do not to be present while it is running, just be patient. The Raspberry Pi will automatically shutdown when complete to not waste power.

    Note: By default only the US map database is installed, but feel free to modify the install_map.sh file to change this.

  8. The 4RunnerDash/src/AppData/init.py file contains configuration settings that can be changed as needed to fit your car/hardware. Feel free to modify based on your needs and the dashboard will reflect these changes.

Hardware Installation

Note: Make sure software installation has completed before continuing to hardware installation. Additionally you should 3d print the 3d model of the mount using any filament that can resist heat and UV (I used ASA). The file for the mount can be found in the resources folder.

  1. Connect the Ribbon Cable to the RaspBerry Pi 5 and the GPIO Breakout Board

  2. Connect the Raspberry Pi Camera to the RaspBerry Pi 5 via the Ribbon to Ethernet and an HDMI cable

    • You will need to connect the 6 pins in the extender to the respective pins on the pi (the breakout board blocks the direct connection so you will need to do some wiring)
    • route the camera to the rear of the car to be used as the reverse camera
  3. Connect the GPS Module to the GPIO Breakout Board:

  4. Connect the Volume Control Knob to the GPIO Breakout Board

  5. Connect the GPIO Breakout Board to the CarPiHAT PRO 5

  6. Connect the Compass Module to the CarPiHAT PRO 5 via the Output Cable

  7. Connect the Temperature Sensor to the CarPiHAT PRO 5 via the Output Cable

  8. Remove the car radio. Here is a guide for a 2002 Toyota 4Runner (Only Remove the radio, not the amp)

  9. Connect your Car Amp Head Unit Connection and wire everything as follows:

  10. Plug in your OBD Scanner to the OBD port on your car (usually bottom right of the steering wheel) and wire the USB connection into the slot where the radio used to be and into the RaspBerry Pi 5 along with all of the other usb connections

  11. Connect the Antenna to the GPS Module and mount the antenna on the Ground Plate and wire to the roof of the car.

  12. Connect the HDMI Cable and Power/Data Cable to the Touch Screen Display and shove everything into the mount

  13. Route the USB Breakout Cable and Volume Control Knob to the respective slots on the mount and connect to the car

Note: The mount is slightly bigger than a standard double din radio. I needed to remove some excess plastic from the car so it would fit. Additionally you will need to drill a hole in the mount for wire outputs wherever you find it most convenient.

Note: The Temperature Sensor and Compass Module should be routed somewhere in the cabin away from electrical interference so that the readings can be more accurate. Additionally, make sure the compass is mounted in the correct orientation (there should be an xyz axis printed on the module. mount the x-axis to face the front of the car).

Power Usage

The Pi will automatically boot up when the car is turned on so there is no need to worry about powering it up manually. Additionally the Pi will automatically shutdown 5 seconds after the car is turned off. This 5 second delay is to prevent a reboot when switched from car battery to engine power. When the Pi is off it will draw a negligible amount of power and will not drain the car battery.

Software Updates

Each time the Pi is booted up and connected to the internet (in your driveway) it will automatically check the GitHub repository to see if a new update is available. If there is, there will be a notification on the main menu to install it via the settings menu. When installing the update, make sure that you stay within range of your internet router to ensure all update files can properly download. When the update is complete, the Pi will reboot and display the patch notes for the update. If an update ever adds additional hardware or breaks your current hardware you can visit this github page for more info or revert to a previous version via the command:

git checkout <version num>

where "version num" is the release you wish to go back to. For example "v1.0.0".

Note: Reverting to a previous version and then reinstalling the update at a later time will cause unknown behavior and you will likely need to reinstall

Album Art Handling

Due to limitations in Bluetooth protocols, album art cannot be transferred directly from connected devices. As a result, this dashboard uses the Spotify Web API to fetch album artwork and metadata in real time.

To ensure smooth performance and offline capability:

  • Album art is cached locally for every track played while connected to the internet and with music menu open.
  • If a track is played while offline or without image data, its metadata is queued for caching.
  • On the next internet-connected session, the app will automatically fetch and save any missing album art for previously played tracks.

This approach ensures a seamless user experience, with album visuals displayed even when the device is offline, after being seen once online.

Maps Credits

Map data from ©OpenStreetMap contributors, available under the Open Database License (ODbL) downloaded from GeoFabrik.

Navigation is powered by GraphHopper, an open-source routing engine.

Address search is provided by Nominatim.

Map tiles generated with TileMaker and rendered with TileServer-GL.

About

A Raspberry Pi project to create a smart dashboard for my car

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors