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:
-
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
- Dashcam recording
- Apple Carplay
- Voice activated commands
- Maintenance reminders based on odometer reading
BUILD YOUR OWN PI DASH-CAM
- Install Raspberry Pi OS Lite (or distro of choice) on a Raspberry Pi
- Connect USB camera of choice (I am using a Logitech Webcam)
- Update the system (sudo apt update && upgrade)
-
Run the following to show your webcam's information
v4l2-ctl --list-devices -
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" - Set the script to run on startup 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.