We use some essential cookies to make our website work.

We use optional cookies, as detailed in our cookie policy, to remember your settings and understand how you use our website.

OVCS: Raspberry Pi–powered electric car

This Maker Monday, we’ve gone big with this Raspberry Pi–powered electric ‘Frankencar’ made up of parts from different vendors. The OVCS (Open Vehicle Control System) team converted an old VW Polo into an electric vehicle that can be driven remotely.

And kids, adults, all of the above, I cannot stress this enough — DO NOT TRY THIS AT HOME.

The electric vehicle (EV) revolution is just about here. With EV charging points found nearly everywhere, and more established car manufacturers introducing electric variants of existing models — or entirely new ones — a petrol-free future seems closer than ever. Of course, as a reader of this blog, you will be aware of how technology companies can be, and won’t be surprised to know that these manufacturers are using a lot of proprietary tech in their vehicles.

The vehicle is currently not road-legal

“Our project, OVCS [Open Vehicle Control System], aims at breaking the traditional vendor lock-in that you see in cars and other vehicles,” Marc Lainez tells us. “We want to make it possible to interface parts from different brands together as if they were always meant to be working that way. Most car parts have a universal functionality to perform (braking, steering, showing data…), but the language they speak is different. So we thought we could build such a platform that would allow tinkerers like us to extend or swap a vehicle’s functionalities with parts from any brands.”

Marc and his team have developed a prototype of this platform, which uses Raspberry Pi to translate between the different parts.

Cross-compatible

The team had been looking for a larger-scale hobby project they could sink their teeth into, one that would combine all of their various interests. EVs ended up sitting at the centre of the Venn diagram.

A custom steering column was used, so why not attach a very serious racing wheel?

“[We] were growing concerned with the security and reliability of vehicle software platforms,” Marc says. “We thought this was the perfect project to learn a ton about how car parts communicate, how they interact together, and how we could seamlessly integrate parts together using modern languages on off-the-shelf hardware components like Raspberry Pi.”

Raspberry Pi is used in multiple ways in the concept car: first, to power the vehicle management system, which they describe as the brains of the platform.

“It translates messages from the different communication buses (CAN) and routes them to the appropriate ones,” Marc explains. “In total, we have five CAN networks that are being accessed through SPI modules connected to a Raspberry Pi. Without this Raspberry Pi, the car wouldn’t be driveable.”

The prototype was built on wood before any modifications to a real car happened

It’s also used in the infotainment system — something we’ve seen several folks do with Raspberry Pi in cars before. Not only does it show all of the usual info about your vehicle, but it also includes a touchscreen automatic gear shift, as the car is an EV conversion.

Finally, there’s the radio bridge: “[It’s] a component connected to the CAN bus and sends instructions to the VMS to accelerate, brake, and steer,” Marc says. With it, they can control the car remotely.

“From a software perspective, we wanted to have a technology stack that was familiar and at the same time, something ‘batteries-included’ that would allow us to easily build firmware in a high-level language while at the same time making the firmware updates really easy,” Marc continues. “Since we had done quite a lot of Elixir development, we used Nerves. This is an IoT framework built in Elixir and Erlang that relies on Buildroot (Linux build system) and gives you the ability to write your firmware in plain Elixir, a high-level functional language. It made our development cycles much faster/shorter and easier and allowed us to use a language we were already familiar with.”

Put it in reverse

Getting the various parts to communicate — such as a Nissan Leaf electric motor and parts from a VW Polo — was one of the hardest elements, as manufacturers generally do not publish documentation on how their components communicate.

The infotainment system, also powered by a Raspberry Pi, has a touchscreen gear selector

“We had to reverse-engineer quite a lot of messages in order to make the car functional,” Marc reveals. “To give an example, if you want to know what message gives you the handbrake status (pulled or not), you look at all that is passing on the bus, you pull the handbrake a few times to see what frame is perfectly synchronised with your action to isolate its ID, then you check which bytes change when you pull it… For more complex components, this is a combination of multiple messages and, fortunately, there is a community of car tinkerers who publish their findings on forums online. Sometimes the work was done; sometimes partially and we had to complete it.”

Over the course of 18 months, the team did manage to make their ‘Frankencar’ driveable, which was their main goal — they then went beyond that by making it remote-controlled. They also wanted to document their build, which they’re in the process of completing. After that? “The next goal is for the car to be self-driving,” Marc says.

Issue 165 of Raspberry Pi Official Magazine is out now!

If you liked this article, there are many more like it in the latest issue of Raspberry Pi Official Magazine. You can purchase a copy from the Raspberry Pi Store in Cambridge. It’s also available from our online store, which ships around the world. And you can get a digital version via our app on Android or iOS.

You can also subscribe to the print version of our magazine. Not only do we deliver worldwide, but those who sign up for a six- or twelve-month print subscription will receive a FREE Raspberry Pi Pico 2 W!

No comments
Jump to the comment form

Leave a Comment