ECU Source Code

Engine Control Unit, Sep-2017

JeT1 Engine Control Unit (ECU) software provides fuel management, ignition timing, cooling fan control for inline 4 cylinder internal combustion engines. The ECU software & hardware was originally developed around the Arduino 2560 microcontroller board but development has now moved on to 32-bit STM32 ARM Cortex based microcontrollers. The first release uses the STM32 NUCLEO G431KB microcontroller board. This provides numerous advantages over the 8-bit Arduino family, including:

  • Much faster CPU speed, reduced latency and increased CPU throughput, allowing much more to be accomplished in less time and more accurate time-based functions.
  • Improved ADC resolution (12-bit vs 10) and much faster conversion time.
  • Many more 16 bit timers, allowing much greater resolution and accuracy in pulse timing and measurement.
  • Much greater RAM capacity.

All this allows improved functionality and more complex processes to be adopted. For example, the STM32 code has a Proportional/Integral Air-Fuel Ratio controller which provides far greater accuracy and real-time control of the air-fuel ratio.

The STM32 source code is developed in the CubeMX IDE in ‘C’. The code, plus configuation guide and Windows desktop / laptop application are available below. Hardware documentation can be found here but note that the ECU main board needs modifications to operate at 3.3V.

DateECU S/WDocumentationWindows AppRemarks
Feb 2021V3202.03Config Guide

Application Interface
V0.39Main development is that all configuration data is now stored to / restored from an external EEPROM rather than the CPU’s main Flash memory. Additionally, up to 8 different configurations can now be stored and instantly selected.

The original Arduino Mega 2560 microcontroller software is here:

DateECU S/WDocumentationWindows AppRemarks
June 20190.8

Config Guide

Application Interface

V0.23

Final version, no longer being developed.

The software/firmware source code or executable program developed by just-technology.co.uk is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. The license is available at https://www.gnu.org/licenses/gpl-3.0.html

The software/firmware source code or executable program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.