Skip to main content
Version: FILS English

Internal Combustion Engine Emulator

An emulator that brings electric cars to life.

info

Author: Eduard-Costin Ionescu
GitHub Project Link: https://github.com/UPB-PMRust-Students/fils-project-2026-edi10pro1

Description

iCEE (short for Internal Combustion Engine Emulator) uses the STM32 Nucleo G0B1RE to add audio, mechanical and visual feedback, similar to a thermic engine vehicle to an electric car platform. For the audio simulation it uses 6 buzzers, capable to mimic the audio signature of different engine layouts (inline 4, 6, V8, V10, V12) by the help of realistic software cylinder mapping. Commands such as acceleration, driving mode, engine start-up or shutdown are sent to the system using a phone app connected to a JDY-18 BLE module. The acceleration is filtered and mapped to a specific power map of each different engine type that ressembles its mechanical characteriscitcs, then sent over to two DC motors which simulates the electric car motor, and the steering is implemented using the MG90S Servo. The power curve is converted through software algorhithms from a linear one (specific to electric motors) to a non-homogenous bell shaped one, simulating the thermic engine. Also, to add to the realism the system simulates an automatic gearbox, giving the DC motor a short "hickup" reenacting a real gear change. The load of the motor is read by an ACS712 Current sensor, to feed the system back with how much the motor is struggling so that the virtual RPM of the motor decreases accordingly. Exhaust pipes are routed from the buzzers to the back of the platform to guide the sound underneath and behind it like a real thermic car. To top the experience up, for the Sport mode, there is a "Pops and Bangs" feature added to symbolize sportivity, with audio and LED light effects in the exhaust system. Also on the platform there is a TFT screen to see the menu, see the power curve of the engine and see the current gear.

Motivation

The reason I came up with this idea relies in my early passion for cars and what makes each one unique feelings for the driver. Another reason is the fact that the world seems to be slowly but surely shifting to the EVs. But EVs are "boring" especially for people that appreciate the engineering behind "classic" cars. And while they are powerful and deliver instant loads of torque, they often feel soulless. My goal with this project is to prove that electric vehicles implementing this kind of emulation can get extremely fun.

Architecture

iCEE recieves, remodels signals and output power through a multi-layered async architecture:

  1. Signal Input Layer:
    • Bluetooth (UART): Receives real-time acceleration data and commands from the phone app.
    • Load Sensing (ADC): Monitors motor effort via the ACS712 sensor to dynamically adjust the virtual RPM.
  2. Processing Layer (Engine Logic Engine):
    • Physics Simulator: Maps linear pedal input to non-linear engine power curves.
    • Gearbox Emulator: Manages gear ratios and introduces power "hickups" during shifts for realism.
    • Acoustic Mapper: Calculates precision timing for the 6 buzzers based on engine firing orders.
  3. Output Layer:
    • Audio Synthesis: High-frequency digital pulses sent to 6 buzzers to mimic cylinder explosions.
    • Visual Feedback: Menu and current gear on the TFT screen via SPI, LED Visuals for the "exhaust".
    • Power Simulation: DC Motor speed control & servo steering via PWM.

Architecture Schematic

Log

Week 5 - 11 May

Assembled everything on the breadboard, created an unpolished software variant, set up the bluetooth connection.

Week 12 - 18 May

Assembled the components on proto-boards, added more bluetooth funcionalities, started working on the chasis

Week 19 - 25 May

Hardware

Built around the STM32 Nucleo G0B1RE, iCEE uses an array of six passive buzzers to synthesize multi-cylinder engine sounds through precise software timing. It features wireless control via a JDY-18 BLE module and visual telemetry on an ST7735 TFT display. The mechanical simulation employs two DC motor driven by an TB6612FNG module and an MG90s Servo, using an ACS712 current sensor for real-time load feedback and dynamic RPM adjustment.

Photos

First Hardware Prototype (One Motor, 4 Buzzers)

Schematics

iCEE System Schematic

Bill of Materials

DeviceUsagePrice
STM32 Nucleo G0B1REThe main microcontroller unit120.00 RON
JDY-18 BLE ModuleWireless communication with phone app22.00 RON
ST7735 1.8" TFT DisplayReal-time telemetry and menu interface24.5 RON
ACS712 Current Sensor (5A)Motor load monitoring for dynamic RPM13.30 RON
Custom PCB 6 Buzzers Module & Current Amplifier(Developed using KiCAD) Cylinder sound synthesis150.00 RON
6x NPN TransistorsUsed for the cusotm PCB5.00 RON
4x LEDsVisual Synthesis5.00 RON
ResistorsResistors for the Custom PCB + Spares14.00 RON
TB6612FNG Motor DriverDC Motor power management26.45 RON
2x DC Motor 3-6VDrivetrain powertrain simulation7.20 RON
MG90S ServoSteering System20.00 RON
3x Proto BoardAuxiliary PCBs12.00 RON

Software

LibraryDescriptionUsage
embassy-stm32Hardware Abstraction Layer (HAL)Provides async support for UART, SPI, ADC, and PWM peripherals.
embassy-executorAsync/Await RuntimeManages concurrent tasks for engine logic, BLE parsing, and display updates.
embassy-timeTime management libraryHandles precision microsecond delays for Software PWM and engine firing orders.
embassy-syncAsync synchronization primitivesUses Signal to safely communicate engine states between the main loop and display task.
embedded-graphics2D graphics libraryUsed for drawing text, power plots, and menu UI elements on the TFT screen.
static_cellStatic resource allocationUsed for safe, zero-cost aliasing of hardware peripherals like the SPI bus.
defmtDeferred formatting loggerHigh-efficiency logging used for real-time debugging of RPM and current sensor values.
panic-probePanic handlerProvides detailed error traces over RTT in case of a system crash.
  1. STM32 Datasheet
  2. STM32 Reference Manual
  3. ACS712 Current Sensor Datasheet
  4. Rust Embedded Manual
  5. Dual Motor Driver Datasheet
  6. JDY-18 BLE Module Manual