rusEFI – DIY Open Source Engine Management For Your Car?!

In the car community, when we see something as a shortcoming with a vehicle we often have the means to correct it. Through pre-designed parts available for purchase or custom fabricating new parts, most mechanical issues can be addressed. Whether it be changing the ride height by lowering to improve handling or raising to improve suspension travel, anyone with enough fabrication skills can modify or change parts needed to obtain the desired result. As someone involved with car culture, it’s easy to forget how easy it is to customize the mechanical components of a vehicle in order to change the way it operates.  However, one critical component that traditionally has not been open for customization is the computer responsible for running the engine, or ECU.

Matthew Kennedy’s 1993 Volvo with a GM 5.3L LS V8 running on Proteus

In the realm of engine management, closed source solutions are the norm. Almost all ECUs that come in stock vehicles are closed and proprietary.  Many of these computers eventually can be adjusted by enthusiasts, but this requires a significant amount of effort in the form of reverse engineering before useful tools for end-users can be created.  The lack of public, published information on the algorithms and methods used by OEMs can present a significant stumbling block to effectively reprogramming factory computers. Commercial aftermarket ECUs can be purchased, but they have their limitations. You can always email the ECU vendor and pitch your idea for a new feature or edit, but if they are not interested or don’t have the resources you are stuck with the functionality of the device as it was purchased. With rusEFI, you have access to the code, which allows you to customize it without limits and inspect how it works to fully understand its operation. The Open source license of rusEFI software is what sets it apart. rusEFI software code is covered by the GPL software license, which guarantees that end users are able to read, review and modify the code used for running an engine.

At the heart of current rusEFI hardware is an ST Micro STM32 microcontroller, featuring an ARM core. You could port rusEFI beyond the STM32 microcontrollers, no one has done it yet.  The firmware for ECU hardware is written in a mixture of C and C++ code and is designed to be built using free, open-source compilers and dev tools. Another important user-space component is the rusEFI console. Written in Java, the console is used for a few tasks such as loading firmware, editing Lua scripts that customize ECU actions without loading new firmware, and for deep-dive troubleshooting beyond what is typically possible in tuning software. Finally, there are web applications written in PHP for the landing page and a repository of tunes that are shared among the community. Here is the best part – if you are familiar with any of the languages used in rusEFI and see something you think can be improved or clarified, the open-source nature of the project allows you to easily contribute improvements, using Github to create pull requests.

ST32F7 Microprocessor shown at the center of a proteus board.

rusEFI firmware is already a capable, feature-filled platform based on an open-source Real-Time Operating System (ChibiOS).  Many cam/crank pattern decoding patterns are supported, including variable cam control.  Sequential and batch port fuel injection is supported currently, with GDI currently being worked on.  Batch and per-cylinder fire ignition schemes are supported.  Incorporating ion sensing is a current development effort.  Various idle motors are supported.  Drive-by-wire throttle bodies are supported with idle valve behavior modeled in DBW throttle opening.  Many math models for airflow are supported including Alpha-N, speed density, and mass-air flow. A wall wetting algorithm for transient fuel compensation is standard, with additional enrichments possible. A comprehensive fuel injector model including pressure compensation, latency compensation, short-pulse behavior modeling, and phasing control is ready to use.  There is a charge temp estimation model to try and better predict the temperature of the air entering the motor.  CANbus communication is supported for receiving and transmitting data.  Schemes for communicating with some OEM clusters are ready to use.  Some failover logic exists to allow graceful operation when sensors go bad and further work in this area is ongoing.  In 2021, countless improvements ranging from better starting fuel control to acoustic knock detection happened.  Lua integration improved.  An in-house wideband oxygen sensor design continues to mature.  In 2022, continued progress will be made hopefully with the help of new users interested in development.

One of the most unique features of rusEFI is the integration of the Lua scripting language. If a feature doesn’t exist in the main compiled firmware, Lua gives end-users the ability to change ECU behavior without making changes to the C/C++ source code and recompiling.  Lua scripts can be quickly adjusted using the rusEFI console.  Lua scripts can adjust all aspects of ECM operation ranging from changing the status of General Purpose I/O to receiving and transmitting CAN bus packets.  Lua is currently an area of active work with more capabilities being added in each release.

A rusEFI user, Mark Tykhnenko, has used Lua to add useful features to his Harley Davidson running on Proteus hardware. Intercepting CAN messages, he has been able to add some features such as adjustable Launch control and adjustable idle that were not in the base rusEFI firmware.

1 comment

  1. I drove for Andrey from 2016 until 2018. We campaign the number 101 Miata in Lemons here in the Northeast. It was always a blast and the car just got better and better. One of the biggest upgrades of the time was getting the old 1.6 out and putting in a 1.8 VVT engine into the car. It drastically changed the dynamic of that Miata and the ECU performed almost flawlessly besides a hiccup during cold starts.?

    It was really great to be apart of the research for Andrey and had a fun time wheeling for him. From day one I firmly believed in what he is trying to accomplish and we are in the current situation of getting our Miata running on a newer version of RUSEFI now. Keep it up Andrey the racing community really needs this!

    The Miata is not the only RUSEFI car I have campaigned in. I was invited to run John Ceci’s Fore Escort that is powered by RUSEFI twice last year and we ended up taking a first place home at the Thompson Bracket GP here in Connecticut last summer. Goes to show that this ECU is extremely capable compared to all the options on the market.

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*