Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

116 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vehicle Gateway ECU Banner

Vehicle Gateway ECU

License Platform Embedded Linux Language Version Status


Overview

The Vehicle Gateway ECU is an Automotive Embedded Systems project that demonstrates real-time communication between an STM32 NUCLEO-G071RB microcontroller and an NXP i.MX 8M Plus EVK running Embedded Linux.

The STM32 acquires vehicle parameters from sensors, processes the data, and transmits it through UART. The Embedded Linux application running on the NXP board receives the data, displays it on a dashboard, logs the information, and provides a foundation for future automotive communication protocols such as CAN and Ethernet.

The project is designed to demonstrate firmware development, embedded Linux application development, hardware interfacing, system architecture, and real-time communication.


Table of Contents


Project Objectives

  • Design a simplified Automotive Vehicle Gateway ECU
  • Acquire real-time vehicle parameters using STM32
  • Communicate with an Embedded Linux system over UART
  • Display live vehicle information on a dashboard
  • Log vehicle data for diagnostics
  • Demonstrate modular Embedded C firmware architecture
  • Develop an Embedded Linux application for monitoring
  • Build a professional portfolio project based on automotive embedded systems

Features

  • Real-Time Vehicle Data Acquisition
  • STM32-Based Sensor Interface
  • Embedded Linux Data Processing
  • UART Communication
  • Vehicle Parameter Monitoring
  • Terminal Dashboard
  • System Health Monitoring
  • Data Logging
  • Modular Firmware Design
  • Professional Project Documentation

Hardware Components

Component Description
STM32 NUCLEO-G071RB Vehicle Data Acquisition Controller
NXP i.MX 8M Plus EVK Embedded Linux Processing Platform
Potentiometer 1 Vehicle Speed Input
Potentiometer 2 Engine RPM Input
Potentiometer 3 Fuel Level Input
DS18B20 Engine Temperature Sensor
UART STM32 ↔ NXP Communication
USB Programming & Debugging

Software Stack

Category Technology
Programming Language Embedded C
Operating System Embedded Linux
IDE STM32CubeIDE
MCU Configuration STM32CubeMX
Linux IDE MCUXpresso IDE
Communication UART
Version Control Git
Repository GitHub

Project Structure

Vehicle-Gateway-ECU
│
├── .github/
├── dashboard/
├── docs/
├── firmware/
│   ├── Core/
│   ├── Drivers/
│   ├── Inc/
│   ├── Src/
│   └── stm32cubemx/
├── hardware/
├── images/
│   ├── architecture/
│   ├── dashboard/
│   ├── hardware/
│   └── results/
├── linux/
├── scripts/
├── simulations/
│
├── .gitignore
├── CITATION.cff
├── LICENSE
└── README.md

System Architecture

The Vehicle Gateway ECU is divided into two processing units.

STM32 NUCLEO-G071RB

Responsible for:

  • Vehicle Speed Acquisition
  • Engine RPM Acquisition
  • Fuel Level Acquisition
  • Temperature Measurement
  • UART Packet Generation

NXP i.MX 8M Plus EVK

Responsible for:

  • UART Reception
  • Packet Parsing
  • Dashboard Display
  • Data Logging
  • System Monitoring
  • Future CAN Support

Block Diagram

The block diagram illustrates the overall architecture of the Vehicle Gateway ECU, showing the interaction between the STM32 microcontroller, communication interface, Embedded Linux platform, and dashboard.


Data Flow

The complete system follows the workflow below:

  1. Vehicle parameters are acquired by the STM32.
  2. ADC values are converted into engineering units.
  3. A UART packet is generated.
  4. The packet is transmitted to the NXP board.
  5. Embedded Linux receives and parses the packet.
  6. Dashboard values are updated.
  7. Vehicle information is logged.

Software Stack

The project software is organized into multiple layers.

Layer Responsibility
Hardware Sensors and STM32
HAL Drivers Peripheral Drivers
Firmware Embedded C Application
UART Communication Layer
Embedded Linux Packet Processing
Dashboard Vehicle Visualization
Logger Data Storage

Hardware Setup

Hardware Setup

The hardware setup consists of the STM32 NUCLEO-G071RB, NXP i.MX 8M Plus EVK, three potentiometers for vehicle parameter simulation, and a DS18B20 temperature sensor.


Wiring Diagram

Wiring Diagram

The wiring diagram shows the electrical connections between the STM32 board, NXP board, sensors, UART interface, and power supply.


Board Connections

Board Connections

The board connection diagram illustrates the GPIO, ADC, UART, and power pin mapping used in the project.

Wiring Diagram

The wiring diagram shows the connections between the STM32, NXP board, sensors, power supply, and UART interface.


Board Connections

STM32 ADC Inputs

Parameter Pin
Vehicle Speed PA0
Engine RPM PA1
Fuel Level PA4
Temperature PB6

UART

STM32 NXP
TX RX
RX TX
GND GND

Dashboard

Embedded Linux Dashboard

The Embedded Linux dashboard provides a graphical overview of the vehicle's operating parameters received from the STM32 microcontroller.

Dashboard Features

  • Real-Time Vehicle Speed
  • Engine RPM Monitoring
  • Fuel Level Display
  • Engine Temperature
  • UART Communication Status
  • System Health Status
  • Live Vehicle Monitoring

Terminal Dashboard

A lightweight terminal-based dashboard continuously displays live vehicle information received through UART. It is suitable for debugging, development, and embedded Linux deployments without a graphical interface.

Displayed information includes:

  • Vehicle Speed
  • Engine RPM
  • Fuel Level
  • Engine Temperature
  • UART Status
  • Packet Counter
  • System Status

Vehicle Parameters

The parameter screen provides a concise summary of the latest vehicle information received from the STM32 firmware.

Parameter Unit
Vehicle Speed km/h
Engine RPM RPM
Fuel Level %
Engine Temperature °C
UART Status Connected / Disconnected

Runtime Results

The following screenshots demonstrate successful execution of the Vehicle Gateway ECU application.


UART Output

The STM32 periodically transmits formatted UART packets containing vehicle parameters to the NXP i.MX 8M Plus Embedded Linux platform.

Example packet:

SPD:82,RPM:3150,FUEL:68,TEMP:36.5

System Running

The Embedded Linux application successfully receives UART packets, updates the dashboard, and monitors system health continuously.


Communication Flow

The communication log verifies successful data transfer between the STM32 firmware and the Embedded Linux application over UART.


Logging Demo

The application records diagnostic information and runtime events, providing a foundation for future fault logging and vehicle diagnostics.


Firmware Architecture

The STM32 firmware is developed using a modular architecture to simplify maintenance and future expansion.

Firmware Modules

Module Responsibility
ADC Driver Reads analog vehicle parameters
UART Driver UART communication
DS18B20 Driver Temperature acquisition
Packet Generator Formats UART packets
Gateway Manager Coordinates data acquisition and transmission

Embedded Linux

The NXP i.MX 8M Plus EVK runs an Embedded Linux application that receives UART packets from the STM32 and performs real-time processing.

Linux Modules

  • UART Receiver
  • Packet Parser
  • Vehicle Dashboard
  • Data Logger
  • System Monitor

Scripts

The repository includes helper scripts for development.

Script Purpose
build.sh Build Linux application
run.sh Execute Vehicle Gateway ECU
clean.sh Remove build files
flash.sh Placeholder for firmware flashing

Simulation

Simulation resources and documentation are included for future development.

Contents include:

  • Architecture Diagrams
  • Hardware Documentation
  • Validation Results
  • Future Proteus Support

Installation

Clone the repository.

git clone https://github.com/shashikiranam/Vehicle-Gateway-ECU.git

Go to the project directory.

cd Vehicle-Gateway-ECU

Build Instructions

Example Linux build process:

mkdir build
cd build
cmake ..
make

Run the application.

./vehicle_gateway

Project Workflow

Vehicle Sensors
      │
      ▼
STM32 NUCLEO-G071RB
      │
      ▼
ADC Acquisition
      │
      ▼
UART Packet Creation
      │
      ▼
UART Communication
      │
      ▼
NXP i.MX 8M Plus EVK
      │
      ▼
Embedded Linux Application
      │
      ▼
Dashboard
      │
      ▼
Data Logger
      │
      ▼
Diagnostics

Future Improvements

  • CAN Bus Integration
  • CAN FD Support
  • OBD-II Diagnostics
  • DTC Management
  • Ethernet Communication
  • MQTT Integration
  • SQLite Database
  • OTA Firmware Update
  • PyQt GUI Dashboard
  • Touchscreen Support
  • Cloud Connectivity
  • AI-Based Vehicle Diagnostics
  • AUTOSAR-Compatible Gateway Architecture

Repository Structure

Vehicle-Gateway-ECU
│
├── .github/
├── dashboard/
├── docs/
├── firmware/
├── hardware/
├── images/
├── linux/
├── scripts/
├── simulations/
├── .gitignore
├── CITATION.cff
├── LICENSE
└── README.md

Author

Shashi Kiran A M

Embedded Systems Engineer

Automotive Electronics Engineer

Skills

  • Embedded C
  • STM32
  • Embedded Linux
  • NXP i.MX 8M Plus
  • UART
  • CAN
  • Automotive Embedded Systems
  • Firmware Development

GitHub:

https://github.com/shashikiranam


License

This project is licensed under the MIT License.

See the LICENSE file for more information.


Acknowledgements

Special thanks to the open-source embedded systems community, STMicroelectronics, NXP Semiconductors, and the Embedded Linux ecosystem for providing the tools and resources used throughout this project.


⭐ If you found this project useful, consider giving it a star!

About

Automotive Vehicle Gateway ECU using STM32 NUCLEO-G071RB and NXP i.MX 8M Plus for real-time vehicle data acquisition, UART communication, diagnostics, and Embedded Linux dashboard.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages