Teslonda is an incredible Raspberry Pi project that turns an old Honda Accord into an electric car with a Tesla engine.
Many people remember their first car, but very few will keep hold of it for decades. Then again, not everyone is like Jim Belosic, a vehicle modder who saw great potential in his 1981 Honda Accord. Rather than sell it, he decided to bring it into the 21st century. And that meant fitting it with an electric motor from a salvaged Tesla Model S P85.
“I’ve been wrenching on something since I can remember,” Jim says. “So turning the Accord into an electric car seemed like a good way of keeping it around for the nostalgia. I also figured that if I want to be able to modify cars in the future, I’d better learn everything I can about these kinds of vehicles now.”
This article first appeared in The MagPi issue 70. Click here to download your free copy of The MagPi: The Official Raspberry Pi magazine.
The work involved replacing the steering and suspension system and moving to a straight-axle front end to accommodate the battery pack. Jim also added some drag-race tyres. “It gave the car a ton of character,” he says. But what makes the car rather special for us is Jim’s integration of a Raspberry Pi 3. This was carried out by his car-modding and software-developing friend, Michael Mathews.
Teslonda: Raspberry Pi controlled home-made Tesla
As well as powering the electronic dash, the Raspberry Pi allows for feedback and configuration of the motor hardware. It can constantly monitor the temperature levels of the batteries and motor to ensure the car is not being overexerted, and it can be used for both traction control and to change the voltage and amperage levels to the motor.
One main goal was to make it semi-portable so that it could be stuffed into another project without much rework. “I also wanted to allow any device to connect to it via WiFi through a web server, and it needed the ability to monitor, control, and log data on the back end through a web app,” Michael continues.
Creating a UI for the Tesla / Honda
To achieve all of this, Michael grabbed a pencil and paper to draw his desired UI and design flow. He opted to use the Chromium browser in its kiosk mode running an accelerated Canvas, and he wanted the back end to listen to data from the motor’s controller for incoming messages using a Node.js server via a WebSocket. At first, he had problems with the visual performance since he was getting below 20 frames per second and heavy spikes of lag.
He solved this by using a ‘frame’ to only get the back end to send the most updated data rather than every single message. He also minimised browser reflows, and enabled Canvas acceleration by turning on every relevant flag on Chromium. By making sure Canvas would only draw when something updated, and erased only what was dirty, he could maintain 45 to 60 fps on the dash.
The result is amazing. Turn the car on, flick a switch to activate the dash, and the Pi 3 boots with a fantastic display that’s reminiscent of a 1980s arcade game. It shows the speed, battery voltage, charge, and temperature, among other attributes. “I’ll soon be hooking up a GPS to assist with logging, acceleration, and G-force readings as well,” Michael reveals. “And that’s the only problem: I now want to do so much more.”
Booting up the Teslonda
When the Teslonda’s Raspberry Pi 3 boots, it opens with a fun 1980s-style video-game sequence. The theme fits the 1981 vintage of the Honda Accord. “It needed to look fun,” says Michael.
High score table
There’s a high score table of the fastest 0 to 60. “I did some research on what early 1980s digital dashboards looked like and found my inspiration – a Mitsubishi Cordia 1982 digital dash.”
The dashing dash
The dash shows the speed, gear, voltage, amp, temperature, power, and more. “I wanted the driving experience to feel like you’re at the arcade. There’s also a ‘Continue?’ countdown when the Tesla motor is turned off.”