GitHub
River City Cyber

Raspberry Pi CAN-Bus & Dash-Cam System

Assembly Preview

Raspberry Pi 5 + Waveshare Touchscreen — drag to rotate, scroll to zoom

PROJECT O.D.A.S.H.I.

Project O.D.A.S.H.I. (Onboard Diagnostics Assistant Serving Helpful Information) is a Raspberry Pi 5 based CAN-Bus/K-line reader and dash-cam system. It is designed to be a custom solution for handling a variety of smart-car features in a secure manner. The system utilizes a Raspberry Pi 5, USB camera, buck converter, audio DAC, and CAN-Bus interface to provide the following features:

  1. Car system diagnostics
    • Engine and system performance
    • Any error codes (such as check engine lights)
    • Oil, coolant, and battery levels
    • Other system data as needed
  2. Dashcam recording
  3. Apple Carplay
  4. Voice activated commands
  5. Maintenance reminders based on odometer reading

BUILD YOUR OWN PI DASH-CAM

  1. Install Raspberry Pi OS Lite (or distro of choice) on a Raspberry Pi
  2. Connect USB camera of choice (I am using a Logitech Webcam)
  3. Update the system (sudo apt update && upgrade)
  4. Run the following to show your webcam's information
    v4l2-ctl --list-devices
  5. Create the following script in /usr/local/bin/
    #!/bin/bash
    cd /home/pi/videos
    find /home/pi/videos -type f -name "*.mjpeg" -mtime +14 -delete
    
    ffmpeg -f v4l2 -input_format mjpeg -video_size 1280x720 -framerate 30 \
      -i /dev/video0 -c:v copy -f segment -segment_time 60 \
      -segment_atclocktime 1 -strftime 1 "dashcam_%Y%m%d_%H%M%S.mjpeg"
  6. Set the script to run on startup
  7. Now you have a fully functioning dashcam that should record all video while running and store locally. To expand it to the full ODASHI setup, follow the next step.

BUILD YOUR OWN ODASHI

  • Install react-carplay
  • Attach a CarPlay converter from CarlinKit
  • Connect the Raspberry Pi to a touchscreen (I prefer the Adafruit 3.5" TFT LCD)
  • Start customizing to your need!