Skip to content

open-vehicle-control-system/ovcs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

916 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open Vehicle Control System (OVCS)

An open-source hardware and software platform for vehicle embedded systems, built with Elixir, Nerves, Phoenix, and Flutter.

OVCS tackles vendor parts lock-in in transportation by redesigning the embedded systems in a vehicle. It allows parts from different brands to seamlessly communicate and creates an abstraction layer on top of them that can be standardized, extended, and monitored.

About

OVCS was started in early 2024 by Marc Lainez, Loic Vigneron, and Thibault Poncelet at Spin42. The project was born from a desire to make vehicle embedded computing accessible using simple, off-the-shelf components and high-level programming languages.

The first full-size platform, OVCS1, is a 2007 Volkswagen Polo converted to an electric vehicle using a Nissan Leaf AZE0 drivetrain, a Bosch iBooster Gen2 brake system, an Orion BMS2 battery management system, and custom Arduino-based controllers -- all orchestrated by Elixir running on Raspberry Pis via the Nerves framework.

A smaller-scale platform, OVCS Mini, replicates the same software and hardware stack on a Traxxas 4WD RC car, enabling safe development and testing of remote control and ROS2 features before deploying to the full-size vehicle.

Key Features

  • CAN bus abstraction -- The Cantastic library provides a YAML-driven CAN bus communication layer that handles frame encoding/decoding, signal extraction, and multi-bus routing via Linux SocketCAN.
  • Multi-vendor component integration -- Seamlessly makes parts from Nissan, Volkswagen, Bosch, Orion, and custom OVCS components work together by isolating and bridging their CAN buses.
  • Vehicle Management System (VMS) -- The central brain of the vehicle, running on a Raspberry Pi 4, that translates and orchestrates all vehicle components.
  • Infotainment system -- An in-car touchscreen UI built with Flutter running on a Raspberry Pi 5, providing gear selection, vehicle status, and diagnostics.
  • Remote control -- Drive the vehicle using a MAVLink-compatible RC transmitter via a dedicated bridge on a Raspberry Pi 3A.
  • ROS2 integration -- A bridge for Robot Operating System 2 communication, enabling autonomous driving research with IMU data publishing and joystick interpretation.
  • Generic controllers -- Arduino R4 Minima-based controllers that interface with specific vehicle components via CAN bus, receiving their configuration from the VMS through an over-the-air adoption process.
  • OBD2 diagnostics -- A diagnostic mode for reading standard OBD2 data from any vehicle.
  • Debug dashboard -- A real-time Vue.js web dashboard for monitoring vehicle metrics, CAN bus traffic, and component status during development.

Architecture Overview

OVCS is designed around multiple isolated CAN buses to prevent message conflicts between components from different manufacturers. The VMS acts as the central hub, connected to all buses.

                          +---------------------+
                          |    Infotainment      |
                          |    (RPi 5 + Flutter) |
                          +---------+-----------+
                                    |
                                OVCS CAN Bus
                                    |
+------------------+    +-----------+-----------+    +------------------+
| Radio Control    |    |                       |    | ROS Bridge       |
| Bridge (RPi 3A) +----+    VMS (RPi 4)        +----+ (RPi 4/5)       |
+------------------+    |    Central Brain       |    +------------------+
                        +-+---+---+---+---+---+-+
                          |   |   |   |   |   |
                    +-----+   |   |   |   |   +------+
                    |         |   |   |   |           |
               Leaf CAN  Polo CAN | BMS CAN    Misc CAN
                              |
                          OVCS CAN
                              |
                   +----------+----------+
                   |          |          |
              Controller  Controller  Controller
              (Arduino)   (Arduino)   (Arduino)

See the hardware architecture documentation for more details.

OVCS architecture

Repository Structure

This is a monorepo containing multiple independent applications:

ovcs/
+-- vms/                        Vehicle Management System
|   +-- core/                     Elixir library - VMS business logic, component drivers, vehicle composers
|   +-- api/                      Phoenix JSON API + WebSocket server for the debug dashboard
|   +-- dashboard/                Vue.js real-time debug dashboard (Vite + ECharts + TailwindCSS)
|   +-- firmware/                 Nerves firmware targeting Raspberry Pi 4
|
+-- infotainment/               Infotainment System
|   +-- core/                     Elixir library - infotainment business logic, layout, pages
|   +-- api/                      Phoenix JSON API + WebSocket server for the Flutter dashboard
|   +-- dashboard/                Flutter/Dart in-car touchscreen application
|   +-- firmware/                 Nerves firmware targeting Raspberry Pi 5
|
+-- bridges/                    Communication Bridges
|   +-- radio_control_bridge/     MAVLink RC transmitter bridge (Nerves on RPi 3A)
|   +-- ros_bridge/               ROS2/Zenoh bridge with IMU support (Nerves on RPi 4/5)
|
+-- controllers/                Arduino Controllers
|   +-- generic_controller/       PlatformIO C++ project for Arduino R4 Minima
|
+-- libraries/                  Shared Libraries
|   +-- cantastic/                CAN bus communication library (Elixir, SocketCAN)
|
+-- scripts/                    Utility Scripts
|   +-- setup_can.sh              Setup physical CAN interfaces
|   +-- setup_virtual_can.sh      Setup virtual CAN interfaces for local development
|   +-- setup_flutter.sh          Flutter environment setup
|   +-- bind_remote_can.rb        Bind to remote CAN interfaces over network
|   +-- faker.rb                  Generate fake CAN data for testing
|
+-- config/                     Global Configuration
|   +-- bms_config.o2bms          Orion BMS2 configuration
|
+-- candumps/                   CAN bus capture logs for offline testing and replay
+-- docs/                       Project documentation
+-- ovcs                        CLI tool for building, burning, and uploading firmware

Supported Vehicles

Vehicle Description Status
OVCS1 2007 VW Polo converted to EV with Nissan Leaf AZE0 motor, Bosch iBooster Gen2, Orion BMS2, VW Polo 9N original systems Drivable (manual + remote)
OVCS Mini Traxxas 4WD RC car with the same OVCS software/hardware stack for development and testing Operational
OBD2 Diagnostic mode for reading OBD2 data from any vehicle via a standard OBD plug Operational

Technology Stack

Layer Technology
Vehicle control logic Elixir
Embedded firmware Nerves (Linux + Erlang/OTP on Raspberry Pi)
Web APIs Phoenix Framework 1.7
In-car UI Flutter / Dart
Debug dashboard Vue.js 3 + Vite + ECharts
CAN bus communication Cantastic (Elixir + Linux SocketCAN)
Controllers C++ / PlatformIO on Arduino R4 Minima
Database SQLite via Ecto
Real-time communication Phoenix Channels (WebSocket)
ROS2 integration Zenoh + MQTT

Quick Start

See the full Getting Started guide for detailed instructions.

Prerequisites

  • Linux (or a Linux VM on macOS -- see getting started)
  • asdf version manager
  • Erlang 27.3+, Elixir 1.17+, Node.js 24+, Ruby 3.3+
  • can-utils and libsocketcan kernel support
  • Nerves (for firmware builds)

Running locally

# Setup virtual CAN interfaces
./scripts/setup_virtual_can.sh

# Start the VMS API (in one terminal)
cd vms/api
mix deps.get
mix phx.server

# Start the VMS debug dashboard (in another terminal)
cd vms/dashboard
npm install
npm run dev

See Applications for more details on running each component.

Deploy

Build, burn, or upload firmware using the ovcs CLI tool:

# Build firmware
./ovcs -c build -a [vms|infotainment|radio-control-bridge|ros-bridge] -v [ovcs1|ovcs-mini]

# Burn to SD card
./ovcs -c burn -a [vms|infotainment] -v [ovcs1|ovcs-mini]

# Upload over the network
./ovcs -c upload -a [vms|infotainment] -v [ovcs1|ovcs-mini] -h [host|ip]

Presentations and Media

Event Date Links
ElixirConf EU 2024 April 2024 Video: Retrofitting a Car and Running it with Elixir -- Slides
Makilab November 2024 Slides
FOSDEM 2025 February 2025 Video: Converting an '07 car to an RC EV using open source software -- Video: Building a robot from a Traxxas RC car -- Slides
OVCS Teaser 2025 Video: Open Vehicle Control System teaser

Subscribe to the Spin42 Engineering YouTube channel for video updates, demos, and build logs.

Documentation

Full documentation is available in the docs/ directory:

  1. Getting Started -- Environment setup and installation
  2. Applications -- Application descriptions and local development
  3. Hardware Architecture -- Hardware design and component overview
  4. Running on Hardware -- Firmware deployment and configuration
  5. Testing CAN Messages -- Simulating CAN traffic for development
  6. Testing Generic Controllers -- Controller adoption and I/O testing

Disclaimer

OVCS is provided as-is without any warranty. Use it at your own risk. It is not road-certified and therefore does not meet all required criteria to be so. We decline any responsibility for any incident resulting from the usage of OVCS. OVCS is a hobby research project.

License

MIT License -- Copyright (c) 2026 Spin42 SRL

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •