Skip to content
Manual / Part VI / 24 Flex-Fuel / Ethanol
Chapter 24 · Air Path: Throttle, Flex Fuel, MAFless & Intake

Flex-Fuel / Ethanol

Ethanol sensor hardware, the C167 blending routine, and interpolation formulas.

Calibration symbols
KRKTE LDRXN KFZW
ECUs covered
—
Size
3 symbols · 1 diagram · ~703 words

Ethanol sensor hardware, the C167 blending routine, and interpolation formulas.

Running E85 ethanol fuel provides immense knock resistance (effective octane > 105\text{ AKI}) and significant charge cooling, allowing turbocharged 1.8T engines to run maximum MBT ignition advance and elevated boost without knock retard. However, pump E85 varies drastically in ethanol concentration by season (ranging from 51\% in winter to 85\% in summer).

By integrating an automotive digital ethanol content sensor directly into the Bosch ME7.5 hardware and injecting a custom C167 timer capture routine into Code Cave 2, the ECU can be converted into a true Flex-Fuel system that continuously calculates ethanol fraction (E\%) and dynamically blends fuel, boost, and spark tables in real time.

┌──────────────────────────────────────────────────────────────────────────────────────────────────┐
│                   REAL-TIME FLEX-FUEL DYNAMIC BLENDING TOPOLOGY                                  │
├──────────────────────────────────────────────────────────────────────────────────────────────────┤
│           [ Continental / GM Digital Ethanol Sensor (13577429) ]                                 │
│           • Plumbed into fuel return line                                                        │
│           • Frequency Output: 50 Hz (E0) to 150 Hz (E100)                                        │
│                                    │                                                             │
│                                    ▼ Pulse Signal                                                │
│           ECU Pin 54 / Pin 116 (C167 CAPCOM Timer Channel)                                       │
│                                    │                                                             │
│                                    ▼                                                             │
│           [ Custom C167 Interrupt Service Routine in Code Cave 2 ]                               │
│           Calculates: Ethanol Fraction Alpha = (Frequency - 50) / 100                            │
│                                    │                                                             │
│                                    ▼ Alpha Blend Factor [0.0 to 1.0]                             │
│       ┌────────────────────────────┼────────────────────────────┐                                │
│       ▼                            ▼                            ▼                                │
│ [ Primary Fueling ]      [ Dynamic Boost Limit ]      [ Ignition Angle Advance ]                 │
│ KRKTE_active =           LDRXN_active =               KFZW_active =                              │
│ KRKTE_gas +              LDRXN_gas +                  KFZW_gas +                                 │
│ (Alpha * Delta_Fuel)     (Alpha * Delta_Boost)        (Alpha * Delta_Advance)                    │
└──────────────────────────────────────────────────────────────────────────────────────────────────┘

24.1. Hardware Interfacing & Signal Physics#

  • Sensor Model: Continental / GM OEM Flex Fuel Sensor (Part Number 13577429 / 13577394).
    • Frequency Modulation (Ethanol Content): E\% = f_{\text{signal}}\text{ (Hz)} - 50
    • Pulse Width Modulation (Fuel Temperature): \text{Temperature (°C)} = (t_{\text{high}}\text{ (ms)} \times 41.25) - 81.25
  • Plumbing: Installed in the low-pressure fuel return line (between the fuel rail pressure regulator and the tank return hardline) using 5/16\text{''} quick-connect EFI fittings.
  • Electrical Connections:
  • Signal Waveform Specification:

24.2. C167CR Assembly Interrupt Routine & Blending Math#

In Code Cave 2 (0x07F800), an edge-triggered timer capture interrupt routine measures the high-pulse duration and period:

; ==============================================================================
; Bosch ME7.5 Real-Time Ethanol Capture Handler (C167CR-LM)
; Location: Code Cave 2 (Flash Offset 0x07F800 / Linear 0x87F800)
; ==============================================================================

            ORG     0x07F800

FlexFuel_Capture_ISR:
            PUSH    R4
            PUSH    R5

            ; Read Timer Capture Register CC7 (Pin 54 transition time)
            MOV     R4, CC7                     ; Load captured timestamp
            MOV     R5, R4
            SUB     R4, LAST_TIMESTAMP          ; Calculate period T = t2 - t1
            MOV     LAST_TIMESTAMP, R5

            ; Convert Period to Frequency: f = Clock / T
            ; Scaled integer division yielding Hz in R4
            CALLS   0x00, Integer_Divide_Freq

            ; Plausibility Filter: Valid frequency must be 45 Hz to 155 Hz
            CMP     R4, #45
            JPR     cc_ult, Failsafe_Default_Gas
            CMP     R4, #155
            JPR     cc_ugt, Failsafe_Default_Gas

            ; Calculate Ethanol Percentage: E% = Freq - 50
            SUB     R4, #50
            MOV     ETHANOL_PCT_RAM, R4         ; Save E% to RAM (0x383F10)
            JPR     cc_UC, Exit_ISR

Failsafe_Default_Gas:
            ; If sensor disconnected or wire shorted, lock to 10% ethanol (E10)
            MOV     ETHANOL_PCT_RAM, #10

Exit_ISR:
            POP     R5
            POP     R4
            RETI

24.3. Real-Time Interpolation Formulas for Fuel, Boost & Spark#

Once the ethanol scalar \alpha =\frac{E\%}{100} \in [0.0, 1.0] is computed, the ECU updates the live operating scalars every 100\text{ ms}:

  1. Primary Fueling (KRKTE): \mathbf{KRKTE}_{\text{active}} = \mathbf{KRKTE}_{\text{gas}} +\alpha \times (\mathbf{KRKTE}_{\text{E85}} - \mathbf{KRKTE}_{\text{gas}})
    • Automatically raises maximum allowed boost from 18\text{ psi} (175\% load) on pump gas up to 26\text{ psi} (225\% load) on full E85 without requiring user intervention.
  2. Ignition Timing Advance Floor (KFZW): \mathbf{KFZW}_{\text{active}} = \mathbf{KFZW}_{\text{gas}} +\alpha \times \mathbf{\Delta KFZW}_{\text{E85}}
  3. Engine Load Ceiling (LDRXN): \mathbf{LDRXN}_{\text{active}} = \mathbf{LDRXN}_{\text{gas}} +\alpha \times (\mathbf{LDRXN}_{\text{E85}} - \mathbf{LDRXN}_{\text{gas}})

Cross-referenced on shared calibration symbols, not on subject matter — these are the chapters that touch the same maps.

← Previous chapter · Contents · Next chapter →

Related

Cross-referenced on shared calibration symbols, not on subject matter — these are the chapters that touch the same maps.