Raspberry Pi CAN-Bus & Dash-Cam System
PROJECT ODASHI
Project ODASHI (Onboard Diagnostics Assistant Serving Helpful Information) is a Raspberry Pi-based CAN-Bus reader and dash-cam system. It is designed to be a cost-effective solution for handling a variety of smart-car features in a secure manner. The system utilizes a Raspberry Pi 5, USB camera, and CAN-Bus interface to provide the following features:
-
Car system diagnostics
- Engine utilization and 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
BUILD YOUR OWN PI ZERO DASH-CAM
- Install Raspberry Pi OS Lite on a Raspberry Pi Zero
- Connect your USB camera of choice (I am using a Logitech Webcam)
- Update the system (sudo apt update && upgrade)
-
Run
to show your webcam's informationv4l2-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
- 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!