Project Specification — Smart CDI Motorcycle ECU
Overview
High-performance modular smart CDI / motorcycle ECU intended to operate stably up to 20,000 RPM. The design uses an ESP32-WROOM-32UE-N4 module with external U.FL antenna, automotive 12V input protection, 5V and 3.3V regulation, isolated SCR CDI firing, VR pickup conditioning, analog sensor inputs, and auxiliary low-side outputs.
Key Requirements
- ESP32-WROOM-32UE-N4 MCU module powered from 3.3V.
- SCR firing output on GPIO27 only; do not use GPIO12 for firing.
- Debug DIP switch inputs on GPIO13, GPIO16, GPIO17, GPIO23 with 10k pull-ups.
- 12V battery input with reverse polarity diode, SMBJ15A TVS, LC EMI filtering, and protected 12V net.
- 5V sensor rail from XL1509-5.0E1 buck regulator.
- 3.3V MCU rail from AP2112K-3.3 or equivalent LDO on the 5V rail.
- UC3843-based flyback boost stage charging a 1.5uF / 400V CDI film capacitor to about 250–300V DC.
- Through-hole/mechanically validated flyback transformer and HV film capacitor.
- Through-hole TO-220 SCR CDI discharge stage; selected substitute: 2N6509G 800V/25A TO-220AB SCR.
- Optical isolation between ESP32 GPIO27 and SCR gate drive using MOC3021S-family optotriac/optoisolator.
- MAX9924 VR sensor interface to GPIO14 interrupt input.
- TPS input to GPIO32 ADC1 with 5V-to-3.3V divider, RC filter, and 3.3V zener clamp.
- Temperature NTC input to GPIO33 ADC1 with 2.2k pull-up, RC filter, and 3.3V zener clamp.
- Auxiliary low-side outputs on GPIO25 and GPIO26 using AO3400A MOSFETs with flyback diodes to protected 12V.
Accepted Substitutions
- External connectors are through-hole/pluggable terminal blocks for vibration reliability.
- Power and coil connectors use 5.08mm pitch THT terminals.
- Sensor and auxiliary connectors use 3.5mm THT terminals where practical.
- CDI SCR uses 2N6509G TO-220AB because exact BT151-600R TO-220 was not available in Flux library.
- Flyback transformer and CDI film capacitor are mechanically validated BOM items requiring final vendor/footprint confirmation.
Safety Notes
This is an automotive, high-voltage, ignition-energy design. Layout must enforce creepage/clearance between low-voltage logic and HV CDI nodes, strong return paths, protected inputs, and mechanically secured heavy parts. Prototype testing must use current-limited supplies and appropriate HV safety procedures.