Refine this doc
Ask about this doc
Project Specification
Status
  • Schematic reconstructed from the original Flux design with 80 components and 47 nets.
  • PCB uses a 160 × 100 mm, four-layer stackup with dedicated inner GND and +5 V planes.
  • All footprints are in bounds and routing is complete.
  • ATtiny1616 firmware source, Makefile, and bring-up instructions are included.
Purpose
Dual-channel knock-sensor conditioner for a Volkswagen/Audi 1.8T engine with 81.5 mm bore and MaxxECU V1. It accepts two ungrounded differential piezoelectric knock sensors and produces one protected 0.5–4.5 V analog knock-severity output with RPM compensation.
Electrical Interfaces
  • J1: Knock sensor 1 differential input; neither pin is ground.
  • J2: Knock sensor 2 differential input; neither pin is ground.
  • J3: Pin 1 ECU regulated +5 V sensor supply; pin 2 sensor ground.
  • J4: Pin 1 0–5 V RPM pulse input; pin 2 sensor ground.
  • J5: Pin 1 protected ECU analog output; pin 2 sensor ground.
  • J6: Pin 1 UPDI data; pin 2 target +5 V; pin 6 ground; pins 3–5 no-connect.
Functional Architecture
  1. Each sensor lead has 10 kΩ current limiting and a bidirectional 5 V TVS to ground.
  2. 4.7 nF C0G/NP0 AC coupling and 1 MΩ biasing reference both leads to buffered 2.5 V.
  3. Matched differential active filters around U1 emphasize the expected 6–8 kHz knock band.
  4. U2 samples ADC_CH1 on PA4 and ADC_CH2 on PA5; firmware performs baseline removal, rectification, envelope extraction, selection, calibration, and RPM-dependent noise-floor compensation.
  5. PB0/TCA0 WO0 generates 31.25 kHz PWM. The analog network implements VOUT = 0.501599 + 3.996803 × D volts, where D is duty from 0 to 1.
MCU Pin Map

Table


PinNet / use
PA4ADC_CH1 waveform
PA5ADC_CH2 waveform
PA6CAL_CH1_ADC
PA7CAL_CH2_ADC
PB5CAL_RPM_ADC
PB4RPM_MCU rising-edge input
PB3SEL_CH1 active low
PB2SEL_CH2 active low
PB0PWM_RAW, TCA0 WO0
PA0UPDI_MCU
Performance Targets
  • Peak analog response near 6.9 kHz; verified source-model peak 6.950 kHz and 2.1647 V/V.
  • Output range approximately 0.5016–4.4984 V.
  • Default RPM configuration: PULSES_PER_REV = 2, explicitly configurable in firmware.
  • 8000 RPM at 2 PPR corresponds to 266.67 Hz.
  • Typical current below 25 mA; design maximum target 50 mA from the 5 V sensor supply.
Safety and Use Limits
  • Prototype hardware only; not a safety-certified knock-control device.
  • ECU corrections must use conservative retard and plausibility limits.
  • RPM-only processing cannot provide crank-angle or cylinder identification.
  • Use shielded/twisted-pair sensor wiring and ECU sensor ground; keep the module away from ignition coils and high-current wiring.
Success Criteria
  • Focused electrical ERC has no unresolved electrical errors or warnings.
  • All footprints are in bounds with no component/copper overlap shorts.
  • PCB has zero airwires and zero critical DRC issues.
  • Firmware starts at quiet output, samples all five ADC inputs, measures RPM with timeout/filtering, supports active-low selection, and saturates safely.
  • Bring-up measurements meet the numerical limits in the Board Bring-Up Plan.
  • Status

  • Purpose

  • Electrical Interfaces

  • Functional Architecture

  • MCU Pin Map

  • Performance Targets

  • Safety and Use Limits

  • Success Criteria