All projects
Automotive Electronics · Hardware / PCB Design · Embedded Systems
Custom STM32 Automotive ECU
An independent engine control unit design based on the STM32G474. The schematic covers automotive power input and protection, dual CAN, conditioned analogue and digital sensor inputs, variable-reluctance crank/speed inputs, knock-sensor processing, and injector and ignition output stages. The design is in progress: it has not been manufactured or tested, and it does not run an engine.
Ongoing· PCB layout in progress2026 – ongoing
ECU / ENGINE CONTROL
Hardware → firmware → softwareConcept diagram
Problem and motivation
After NINA I wanted to work on the harder side of automotive electronics: the circuits that sit between an engine's sensors and actuators and a microcontroller. Designing an ECU from scratch means working through power integrity, protection, signal conditioning and high-voltage switching, all of which a production ECU has to get right.
Requirements
- Operate from a 12 V automotive supply and survive reverse polarity and transients.
- Condition crank/cam variable-reluctance signals, temperature and pressure sensors, and switched 12 V inputs.
- Drive fuel injectors and an ignition coil.
- Communicate over CAN.
- Keep calibration and runtime data in non-volatile memory.
Hardware architecture
The schematic is organised as hierarchical sheets, one per subsystem:
- Power input: reverse-polarity protection, SMBJ18A TVS diodes and an LMR16030 buck converter followed by LD39050 low-noise LDOs.
- MCU core: STM32G474VET6 with a 32.768 kHz RTC crystal and CY15B128Q SPI FRAM for non-volatile data.
- CAN: two TCAN332 transceivers with PESD2CAN ESD protection.
- Analogue inputs: NTC temperature inputs, 5 V sensor inputs, fuel level and battery-voltage sensing with filtering and clamp diodes.
- Digital and speed inputs: Schmitt-trigger buffering (SN74LVC14), with MAX9924 variable-reluctance interfaces for crank and speed signals.
- Knock: TPIC8101 knock-sensor signal processor.
- Outputs: low-side MOSFET channels for injectors and auxiliary loads, and an ignition coil driver stage using a 400 V-rated MOSFET.
- PCB: a 4-layer stack-up is defined and components are being placed. Routing has not started.
Engineering decisions
- STM32G474: high-resolution timers, fast ADCs, FD-CAN and an FPU in one part, all of which suit engine control.
- Dedicated interface ICs for VR and knock signals instead of discrete circuits, so input behaviour is well specified.
- FRAM instead of flash emulation for frequently written data, for endurance and simple writes.
- Hierarchical schematic sheets for each input and output type, so channels are consistent and easy to review.
Testing and validation
Not yet tested. No boards have been manufactured. The planned validation path is power-stage bring-up, then input channels against a signal generator, then outputs into dummy loads, all before any connection to an engine.
Results
Work in progress: schematic capture is largely complete and PCB layout has started.
Next steps
- Finish placement and routing, with a design review focused on high-current paths and grounding.
- Manufacture and assemble a first revision.
- Bring up power, MCU and CAN before working on the input and output stages.