Building an Open Vehicle Control System using Elixir and Nerves with Marc, Thibault, and Loïc
Dec 26, 2024
auto_awesome
Marc Lainez, Thibault Poncelet, and Loïc Vigneron, software engineers at Spin42, delve into their innovative project retrofitting a 2007 VW Polo with an Open Vehicle Control System using Elixir and Nerves. They share their journey of integrating modern tech into classic cars, emphasizing environmental sustainability and community engagement. The team discusses overcoming challenges like reverse engineering CAN messages, creating a vehicle management system, and the fun of collaborating on an open-source platform. Potential applications for their system range from boats to construction vehicles.
The Spin42 team employs Elixir and Nerves to build an Open Vehicle Control System that modernizes older cars and reduces environmental waste.
Their motivation includes creating an open-source platform to inspire community contributions and tackling challenges in automotive technology through collaboration.
Deep dives
Innovators in Retrofit Technology
The engineers at Spin42 share their journey of retrofitting a car, focusing on the development of an open vehicle control system (OVCS) using Elixir, NERVs, and Raspberry Pis. Their motivation stems from their experiences in the finance industry, steering them towards automotive technology to enhance older vehicles that often lack modern functionalities. This project addresses both environmental concerns and the growing trend towards electric vehicles, aiming to prolong the life of older cars while implementing upgrades like infotainment systems and potential self-driving capabilities. Their background in computer science and startup culture has equipped them with the skills necessary to tackle this innovative automotive challenge.
Choosing Elixir for Embedded Systems
The choice of Elixir and NERVs for this automotive project is grounded in their suitability for embedded systems, particularly due to the capabilities of the BEAM virtual machine and features like easy process management. Working on components that require real-time communication, the engineers highlight the comfort and elegance of programming in Elixir, which simplifies interaction with the car's internal communication bus. They appreciate how Elixir facilitates both firmware deployment and business logic, allowing for efficient development as they integrate various vehicle systems. Their experience with past projects reinforces the notion that Elixir stands out as a language for modern automotive applications.
Integrating Vehicle Components
The main challenge involves constructing a vehicle management system (VMS) that connects various vehicle components and ensures compatibility even among different manufacturers' technologies. Key tasks include translating communication protocols between components from different brands, such as Volkswagen and Nissan, to allow seamless operation. The team also embarks on developing a range of control systems and functions for the car, which includes everything from throttle and brake control to maintaining the integrity of data communication. By keeping the original dashboard and integrating new tech seamlessly, they aim to create a driving experience that feels inherently cohesive and user-friendly.
Future Aspirations and Community Involvement
Looking ahead, the engineers focus on completing their retrofitted vehicle by finishing the battery system and continuing to enhance the autonomous driving features. Their ambition includes making the OVCS as an open-source project, encouraging community contributions while documenting their progress for broader accessibility. They face the challenge of funding their ongoing work while balancing the project with contracting jobs, emphasizing the need for community support and collaboration. With aspirations to expand beyond personal cars into larger vehicles like buses and trucks, their project aims to influence a variety of sectors in the transportation industry, promoting sustainable practices through retrofitting.
For the Season 13 finale, Elixir Wizards Dan and Charles are joined by Spin42 Engineers Marc Lainez, Thibault Poncelet, and Loïc Vigneron to discuss their work retrofitting a 2007 VW Polo and creating an Open Vehicle Control System (OVCS). Using Elixir, Nerves, and Raspberry Pis, the team is reimagining vehicle technology to extend the lifespan of older cars and reduce waste—all while making the process approachable and open source.
The Spin42 team shares the technical details behind OVCS and how they use Elixir and Nerves to interact with the CAN bus and build a Vehicle Management System (VMS) to coordinate various vehicle components. They dive into the challenges of reverse engineering CAN messages, designing a distributed architecture with Elixir processes, and ensuring safety with fail-safe modes and emergency shutoffs.
Beyond the technical, the team discusses their motivation for the project—upgrading older vehicles with modern features to keep them on the road, building an open-source platform to share their findings with others, and above all-- to just have fun. They explore potential applications for OVCS in boats, construction equipment, and other vehicles, while reflecting on the hurdles of certifying the system for road use.
If you’ve ever wondered how Elixir and Nerves can drive innovation beyond software, this episode is packed with insights into automotive computing, hardware development, and the collaborative potential of open-source projects.
Topics Discussed in this Episode:
Retrofitting a 2007 VW Polo with electric engines and modern tech
Building an open-source Vehicle Control System (OVCS) using Elixir and Nerves
Leveraging Elixir to interact with the CAN bus and parse proprietary messages
Designing a Vehicle Management System (VMS) to coordinate vehicle components
Developing custom hardware for CAN communication
Creating a YAML-based DSL for CAN message and frame descriptions
Building a distributed architecture using Elixir processes
Ensuring safety with fail-safe modes and emergency shutoffs
Using Flutter and Nerves to build a custom infotainment system
Exploring autonomous driving features with a ROS2 bridge
Developing remote control functionality with a Mavlink transmitter
Testing OVCS features at scale with a Traxxas RC car (OVCS Mini)
Challenges of certifying OVCS for road use and meeting regulatory requirements
Encouraging community contributions to expand OVCS functionality
Balancing open-source projects with contract work to sustain development
The fun and fulfillment of experimenting with Elixir beyond traditional applications