Vehicle Electronic Control Unit (ECU)

Github: https://github.com/dyabasdi/electronic-control-unit/
Goal:
This project aims to create an ECU that complements the main engine computer, providing additional I/O’s, customized algorithms, and dynamic vehicle estimations. It also collects GPS data and functions as a lap timer, offering performance metrics during track days.

Implementation:
The ECU is implemented in C on an STM32H7 microcontroller.

Signal Processing:

  • 3-Axis Acceleration: Data from a BNO-055 IMU for vehicle dynamics.
  • 3-Axis Rotational Velocity: Yaw, pitch, and roll rates from the same IMU.
  • GPS Data: Latitude, Longitude, and Altitude from an AdaFruit GPS unit.
  • Wheel Speeds: ABS and differential wheel speed sensors.
  • Exhaust Gas Temperature (EGT): Type-K thermocouples for each cylinder’s exhaust temperature.
  • Steering Angle: To calculate other parameters.
  • Tire Pressure & Temperature: To assess tire conditions.

CAN Message RX:
Receives engine data for calculations:

  • Engine Speed, Lambda AFR, Oil Pressure, Manifold Air Pressure, Fuel Pressure, Ethanol Content, Throttle Position, Coolant & Intake Air Temps, Battery Voltage, and Engine Run Time.

Vehicle Dynamics Estimation:
Calculates additional parameters using physics:

  • Grade, Wheel Forces, Vehicle + Wheel Side Slip, Driver Intended Yaw Rate, Oversteer/Understeer Gradient.

CAN Message TX:
Sends calculated data back to the engine computer:

  • EGT per Cylinder and Wheel Speeds.

Digital Dash Display:

  • Vital Engine Parameters: Displayed digitally.
  • Track Map: Shows the current track using GPS.
  • Logging: Simple button interface for starting, stopping, and saving logs, exportable to MDFs for analysis.

This system enhances vehicle performance tracking and tuning, especially during track days.