Skip to content

lucasreyese/hil-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hardware-in-the-Loop Engine Simulator

This project uses Python and a USB-to-CAN module to simulate engine sensor data and transmit it to an STM32-based Engine Control Module (ECM) written in C. The ECM responds with control outputs to maintain engine stability given a variable throttle input. This mirrors Zonal Automotive Architectures, where a Zone Controller digitises analog sensor signals before forwarding them to the ECM over CAN bus.

IN EARLY DEVELOPMENT - there are no guarantees anything works yet.

Real-World Architecture

graph LR
    A[Engine Sensors] -->|Analog/Digital Signals| B[Zone Controller]
    B -->|Digital Signals| C[Actuators]
    B <-->|CAN Bus| D[ECM]
Loading

Simulator Architecture

graph LR
    A[Python Simulator] <-->|USB| B[USB-to-CAN]
    B <-->|CAN Bus| C[STM32 ECM]
Loading

USB Device connected to a STM32 on a breadboard.

Hardware

  • STM32 development board (NUCLEO-F401RE)
  • CAN controller and transceiver unit (MCP2515 and TJA1050 respectively)
  • USB-to-CAN adapter (Canable based)
  • Potentiometer (1kΩ, used for the throttle)

Documentation

About

A Hardware-in-the-Loop system that simulates an internal combustion engine to develop and validate an STM32 ECM over CAN bus.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors