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.
- Project Objectives
- Features
- System Architecture
- Hardware Components
- Software Stack
- Project Structure
- Hardware Setup
- Wiring Diagram
- Board Connections
- Dashboard
- Runtime Results
- Firmware Architecture
- Embedded Linux
- Scripts
- Simulation
- Installation
- Build Instructions
- Project Workflow
- Future Improvements
- Author
- License
- Acknowledgements
- 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
- 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
| 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 |
| 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 |
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
The Vehicle Gateway ECU is divided into two processing units.
Responsible for:
- Vehicle Speed Acquisition
- Engine RPM Acquisition
- Fuel Level Acquisition
- Temperature Measurement
- UART Packet Generation
Responsible for:
- UART Reception
- Packet Parsing
- Dashboard Display
- Data Logging
- System Monitoring
- Future CAN Support
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.
The complete system follows the workflow below:
- Vehicle parameters are acquired by the STM32.
- ADC values are converted into engineering units.
- A UART packet is generated.
- The packet is transmitted to the NXP board.
- Embedded Linux receives and parses the packet.
- Dashboard values are updated.
- Vehicle information is logged.
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 |
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.
The wiring diagram shows the electrical connections between the STM32 board, NXP board, sensors, UART interface, and power supply.
The board connection diagram illustrates the GPIO, ADC, UART, and power pin mapping used in the project.
The wiring diagram shows the connections between the STM32, NXP board, sensors, power supply, and UART interface.
| Parameter | Pin |
|---|---|
| Vehicle Speed | PA0 |
| Engine RPM | PA1 |
| Fuel Level | PA4 |
| Temperature | PB6 |
| STM32 | NXP |
|---|---|
| TX | RX |
| RX | TX |
| GND | GND |
The Embedded Linux dashboard provides a graphical overview of the vehicle's operating parameters received from the STM32 microcontroller.
- Real-Time Vehicle Speed
- Engine RPM Monitoring
- Fuel Level Display
- Engine Temperature
- UART Communication Status
- System Health Status
- Live Vehicle Monitoring
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
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 |
The following screenshots demonstrate successful execution of the Vehicle Gateway ECU application.
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
The Embedded Linux application successfully receives UART packets, updates the dashboard, and monitors system health continuously.
The communication log verifies successful data transfer between the STM32 firmware and the Embedded Linux application over UART.
The application records diagnostic information and runtime events, providing a foundation for future fault logging and vehicle diagnostics.
The STM32 firmware is developed using a modular architecture to simplify maintenance and future expansion.
| 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 |
The NXP i.MX 8M Plus EVK runs an Embedded Linux application that receives UART packets from the STM32 and performs real-time processing.
- UART Receiver
- Packet Parser
- Vehicle Dashboard
- Data Logger
- System Monitor
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 resources and documentation are included for future development.
Contents include:
- Architecture Diagrams
- Hardware Documentation
- Validation Results
- Future Proteus Support
Clone the repository.
git clone https://github.com/shashikiranam/Vehicle-Gateway-ECU.gitGo to the project directory.
cd Vehicle-Gateway-ECUExample Linux build process:
mkdir build
cd build
cmake ..
makeRun the application.
./vehicle_gatewayVehicle Sensors
│
▼
STM32 NUCLEO-G071RB
│
▼
ADC Acquisition
│
▼
UART Packet Creation
│
▼
UART Communication
│
▼
NXP i.MX 8M Plus EVK
│
▼
Embedded Linux Application
│
▼
Dashboard
│
▼
Data Logger
│
▼
Diagnostics
- 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
Vehicle-Gateway-ECU
│
├── .github/
├── dashboard/
├── docs/
├── firmware/
├── hardware/
├── images/
├── linux/
├── scripts/
├── simulations/
├── .gitignore
├── CITATION.cff
├── LICENSE
└── README.md
Embedded Systems Engineer
Automotive Electronics Engineer
- Embedded C
- STM32
- Embedded Linux
- NXP i.MX 8M Plus
- UART
- CAN
- Automotive Embedded Systems
- Firmware Development
GitHub:
https://github.com/shashikiranam
This project is licensed under the MIT License.
See the LICENSE file for more information.
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!














