Analog Inputs - ADS1115¶
Overview¶
The ADS1115 (designator U3, I2C address 0x48 — ADDR pin tied to GND) is a 4-channel, 16-bit ADC used to measure Battery Voltage (AIN0), Alternator Current (AIN1), Engine Speed (AIN2), and optional analog Temperature (AIN3). Each channel uses a TLV9154 op-amp configured as a unity-gain buffer so that high-impedance sources can be measured accurately by the ADC. The analog front end is capable in a noisy environment and includes input protection, output isolation, and local decoupling.
Design Considerations¶
Op-Amp Buffering¶
The voltage dividers and analog sources feeding the ADS1115 are intentionally high impedance in order to minimize current draw. The ADS1115 input uses an internal switched-capacitor structure and multiplexer — a direct connection from a high-impedance source can introduce loading error, settling error, and channel-to-channel interaction. The TLV9154 is used as a unity-gain buffer to isolate the source from the ADC input.
Near 0 V on a single 3.3 V supply, offset, noise, and output swing limits mean signals very close to 0 V should not be treated as ideal. This is not practically relevant for Battery Voltage or Alternator Current. It may matter at very low RPM or in certain temperature sensor configurations, but not likely.
ADS1115 Input Range¶
The ADS1115 runs from a single 3.3 V supply. All input signals must remain within approximately 0 V to 3.3 V. The design is treated as a single-supply, ground-referenced measurement system. Negative input voltages are not intended to be measured. Divider ratios and signal conditioning are chosen accordingly.
System Architecture¶
Signal Chain¶
All channels follow the same general structure:
Input Signal ──[R1]──┬──[R2 or DNP]──GND
│
[4.7kΩ]
│
TLV9154 IN+
│
TLV9154 OUT ────┬──── TLV9154 IN−
│
[330Ω]
│
ADS1115 AINx
│
[0.33µF]
│
GND
- The 4.7 kΩ resistor is in series with the non-inverting input and provides fault-current limiting.
- The TLV9154 is configured as a unity-gain buffer by tying OUT directly to IN−.
- The 330 Ω output resistor must remain outside the feedback loop.
- The 0.33 µF capacitor is placed on the ADS1115 side of the 330 Ω resistor.
Output Filter¶
Every channel uses the same RC filter between the TLV9154 output and the ADS1115 input: a 330 Ω series resistor followed by a 0.33 µF capacitor to ground. This gives a cutoff frequency of approximately 1.46 kHz and a time constant of 109 µs. There is no filtering before the op-amp on any channel.
ADC Resolution¶
- Supply: 3.3 V
- PGA setting: ±6.144 V full scale (firmware sets
ADS1115_REG_CONFIG_PGA_6_144V) - LSB resolution: 0.1875 mV (6.144 V ÷ 32768 counts); the usable 0–3.3 V span covers ~17,600 counts
- Practical accuracy: limited by resistor tolerance, op-amp offset, noise, and layout
Channel 0: Battery Voltage Monitor¶
Application: Battery voltage monitoring for 12 V, 24 V, 36 V, and 48 V systems.
Components¶
| Designator | Value | Part Number | Package | Tolerance |
|---|---|---|---|---|
| R1 (top) | 1 MΩ | 1MRTT021004BTH | 0402 | ±0.1% |
| R2 (bottom) | 49.9 kΩ | RT0402BRE0749K9L | 0402 | ±0.1% |
Divider Parameters¶
- Divider ratio: 49.9k / (1000k + 49.9k) = 0.04753
- Maximum measurable voltage: 3.3 V ÷ 0.04753 = 69.4 V
- Engineering resolution: 0.1875 mV ÷ 0.04753 = 3.9 mV per LSB at the input
- Thevenin resistance: (1000k × 49.9k) / (1000k + 49.9k) ≈ 47.6 kΩ
Performance¶
| Input Voltage | Divided Voltage | ADC Reading | Practical Accuracy |
|---|---|---|---|
| 12.0 V | 0.570 V | Valid | 0.46% |
| 24.0 V | 1.141 V | Valid | 0.23% |
| 48.0 V | 2.281 V | Valid | 0.11% |
| 60.0 V | 2.852 V | Valid | 0.092% |
| 69.4 V | 3.300 V | Valid (max) | — |
Power Consumption¶
| Input Voltage | Divider Current | Divider Power |
|---|---|---|
| 12.0 V | 11.4 µA | 0.14 mW |
| 24.0 V | 22.9 µA | 0.55 mW |
| 48.0 V | 45.7 µA | 2.19 mW |
| 60.0 V | 57.1 µA | 3.43 mW |
Channel 1: Alternator Current Monitor¶
Application: QNHCK1-21 Hall Effect Current Sensor, 300 A (2.5 V @ 0 A, ±2 V swing for ±300 A). Sensor specifications and selection rationale: Current Sensor.
Components¶
| Designator | Value | Part Number | Package | Tolerance |
|---|---|---|---|---|
| R1 (top) | 300 kΩ | ERA3AEB304V (Panasonic) | 0603 | ±0.1% |
| R2 (bottom) | 300 kΩ | ERA3AEB304V (Panasonic) | 0603 | ±0.1% |
Divider Parameters¶
- Divider ratio: 300k / (300k + 300k) = 0.5000 exactly
- Thevenin resistance: 150 kΩ
- Sensor voltage range: 0.5 V (−300 A) to 4.5 V (+300 A)
- ADC voltage range: 0.25 V to 2.25 V (identical for all sensor ratings — the voltage swing is the same; only the A/V scale changes)
Performance¶
| Hall Sensor Voltage | Current | Divided Voltage | ADC Reading |
|---|---|---|---|
| 0.5 V | −300 A | 0.250 V | Valid |
| 2.5 V | 0 A | 1.250 V | Valid |
| 4.5 V | +300 A | 2.250 V | Valid |
- Sensor scaling: 6.67 mV/A at the sensor (150 A/V); the 2:1 divider halves the voltage, so the scale at the ADC input is 3.33 mV/A — 300 A per volt. The
AmpSensorRangesetting selects the scale — see Current Sensor - Theoretical current resolution: 0.056 A per LSB at 300 A range (0.1875 mV × 300 A/V)
- Practical accuracy: approximately ±1 A, limited by sensor drift, noise, and EMI
Power Consumption¶
| Input Voltage | Divider Current | Divider Power |
|---|---|---|
| 2.5 V (0 A) | 4.17 µA | 10.4 µW |
| 4.5 V (+300 A) | 7.50 µA | 33.8 µW |
Fast-sampling tap (optional rework)¶
The ADS1115 reads this channel roughly every 10 ms, which aliases anything above ~50 Hz — adequate for control, blind to the mechanical and electrical disturbance bands on the signal (belt/torsional oscillation, stator imbalance, rectifier ripple). A small board rework routes the same buffered signal to the ESP32's internal ADC, which can stream it at tens of kSPS for disturbance analysis:
- Remove C66 (the 1 µF on net EXTRA6). This is mandatory — left in place it loads the op-amp output directly through the jumper and risks destabilizing the buffer that feeds the control loop's current reading.
- Solder a short jumper (30 AWG, routed away from the field PWM area) from U9 pins 6+7 (the channel's unity-gain buffer output — the two pins share a net and can be bridged) to J3 pin 11 (the unpopulated 12-position connector footprint).
- Configure GPIO3 (ADC1 channel 2) in continuous mode, 6 dB attenuation. The existing 330 Ω series resistor, TVS, and pullup on the EXTRA6 net all stay.
Do not tap anywhere before the op amp — the divider node is ~150 kΩ source impedance, and loading it corrupts the ADS1115 reading as well. The buffer output is the only suitable node. With C66 removed the path carries the sensor's full DC–10 kHz bandwidth.
Channel 2: Engine Speed Monitor¶
Application: LM2907 frequency-to-voltage converter output from alternator stator tap
Tachometer input signal range: 25 mVpp minimum to 100 V peak maximum, measured at the tachometer terminal relative to regulator ground. The minimum is the LM2907 detection threshold (25 mVpp at the chip; plan on ~30 mVpp at the terminal to cover conditioning losses). The maximum is set by the 100 V rating of the two AC-coupling capacitors: in a DC fault they hold the full input voltage, so 100 V is the absolute ceiling with no margin beyond it. For AC signals the rest of the circuit survives somewhat beyond this (the 2 W series resistor reaches its power rating near ~150 V peak continuous), but 100 V peak is the published limit for all conditions. Signals above ~28 V pk-pk are peak-clipped at ±13 V by the TVS at the LM2907 input; clipping is harmless — frequency detection needs only zero crossings — so the RPM reading stays correct all the way to the maximum.
Design Parameters¶
- Source interface: LM2907 output to TLV9154 input through the standard 4.7 kΩ input protection resistor
- Filter capacitor: 5 nF ±10%, X7R, 0603 SMD
- LM2907 output range: 0 V to 5 V
- Op-amp output range: 0 V to 3.3 V (clipped by supply rail)
- ADC voltage range: 0 V to 3.3 V
- Minimum measurable: 0.01 V LM2907 output (8 Hz minimum frequency)
- Maximum measurable: 3.3 V LM2907 output (2640 Hz maximum frequency)
LM2907 Circuit Configuration¶
Power & Bypass - Pin 6 (V+): 5 V supply - Pin 5 (COL): 5 V supply - Pin 8 (GND): System ground - Bypass capacitor: 1 µF from Pin 6 to ground
Timing Components (Frequency-to-Voltage Conversion) - Pin 2 (CP1): 10 nF capacitor to ground - Pin 3 (CP2/IN+): - One 1 µF capacitor to ground as built — two additional 1 µF footprints (C46, C48) are DNP, so the populated total is 1 µF - 25 kΩ resistor to ground - Transfer function: VO = VCC × fIN × C1 × R1 = 5 V × fIN × 10 nF × 25 kΩ - Scaling factor: VO = fIN × 0.00125 V/Hz
Output Configuration - Pin 4 (EMIT): Connected to Pin 7 and 10 kΩ pull-down, feeds the op-amp input through 4.7 kΩ - Pin 7 (IN−): Connected to Pin 4 (feedback)
Input Signal Conditioning (Pin 1 – TACH+) - AC coupling: Two 10 µF/100 V capacitors in parallel (20 µF total) - Series resistance: 4.7 kΩ, 2 W (HP122WJ0472T4E) - Input filtering: 6.8 nF capacitor to ground - Input termination: 100 kΩ resistor to ground - Overvoltage protection: SMBJ12CA bidirectional TVS diode (12 V standoff; conducts from ~13 V, clamps to ≤ ~15 V at these currents)
Input Signal Conditioning - Detailed Analysis¶
The LM2907 input circuit is an AC-coupled, attenuated input with complex frequency-dependent behavior. Proper analysis requires treating this as an AC circuit with both capacitive reactances and resistive elements.
Circuit Topology:
Stator Signal → 20µF coupling (2 × 10µF, 100 V) → 4.7kΩ 2W series → LM2907 Pin 1
↓
(100kΩ || 6.8nF) to GND
↓
SMBJ12CA TVS
The coupling capacitors sit directly at the connector terminal, ahead of the series resistor. Under AC drive they carry only their own reactive drop (133 Ω at 60 Hz — a few volts even at maximum input); it is only under DC or sub-hertz input that they end up holding the full input voltage.
High-Pass Filter Characteristics: - Time constant: τ = (R_series + R_bias) × C_coupling = 104.7 kΩ × 20 µF = 2.1 seconds (the loop includes the 4.7 kΩ series resistor) - Corner frequency: f_c = 1/(2πτ) = 0.076 Hz - Purpose: Blocks DC offset, allows AC signal to pass. The corner sits two decades below the minimum measurable frequency (8 Hz), so AC-coupling attenuation is negligible at every frequency the LM2907 can actually read.
Complex Impedance Analysis at Operating Frequencies:
At typical alternator frequency (60 Hz): - Coupling capacitor reactance: X_c(20 µF) = 1/(2π × 60 Hz × 20 µF) ≈ 133 Ω - Shunt capacitor reactance: X_c(6.8 nF) = 1/(2π × 60 Hz × 6.8 nF) ≈ 389 kΩ
Parallel Load Impedance (100 kΩ || 6.8 nF at 60 Hz):
Z_parallel = (R_bias × Z_shunt) / (R_bias + Z_shunt)
Z_parallel = (100kΩ × (-j389kΩ)) / (100kΩ - j389kΩ)
|Z_parallel| ≈ 96.9kΩ at ∠-14.4°
Total Circuit Impedance:
Z_total = R_series + Z_coupling + Z_parallel
Z_total = 4.7kΩ + (-j133Ω) + (93.8kΩ - j24.1kΩ)
|Z_total| ≈ 101.5kΩ
Frequency-Dependent Transfer Function:
The transfer function is complex voltage division across the full series chain:
H(f) = Z_load(f) / [Z_series + Z_coupling(f) + Z_load(f)]
where Z_load(f) = 100kΩ || X_c(6.8nF), Z_series = 4.7kΩ, Z_coupling(f) = X_c(20µF)
With the AC-coupling corner at 0.076 Hz, the coupling term contributes essentially nothing above 1 Hz. Gain is flat at the resistive-divider value 100k / 104.7k = 0.955 across the entire working band, easing off only at the top of the band where the 6.8 nF shunt (a ~5.2 kHz low-pass against the 4.7 kΩ) begins to bite:
Signal Attenuation vs. Frequency:
| Frequency | X_c(20µF) | X_c(6.8nF) | Total Gain | Attenuation | Required Input* |
|---|---|---|---|---|---|
| 5 Hz | 1592 Ω | 4.68 MΩ | 0.955 | 4.5% | 26.2 mVpp |
| 10 Hz | 796 Ω | 2.34 MΩ | 0.955 | 4.5% | 26.2 mVpp |
| 50 Hz | 159 Ω | 468 kΩ | 0.955 | 4.5% | 26.2 mVpp |
| 60 Hz | 133 Ω | 389 kΩ | 0.955 | 4.5% | 26.2 mVpp |
| 100 Hz | 80 Ω | 234 kΩ | 0.954 | 4.6% | 26.2 mVpp |
| 1000 Hz | 8 Ω | 23.4 kΩ | 0.938 | 6.2% | 26.7 mVpp |
| 2000 Hz | 4 Ω | 11.7 kΩ | 0.892 | 10.8% | 28.0 mVpp |
| 2640 Hz | 3 Ω | 8.9 kΩ | 0.852 | 14.8% | 29.4 mVpp |
* Required stator amplitude to produce 25 mVpp at LM2907 Pin 1 (minimum detection threshold)
Key Observations: 1. The required stator signal is essentially flat at ~26 mVpp across the whole working band, rising slightly toward the 2640 Hz ceiling. 2. The AC coupling (0.076 Hz corner) never limits detection — the minimum measurable frequency (8 Hz) is two decades above the corner. 3. The 6.8 nF shunt is negligible below ~1 kHz and provides noise filtering above the working band. 4. Low-RPM detection is limited by the alternator, not this circuit: stator EMF scales with shaft speed, so the available signal shrinks at low RPM while the circuit's ~26 mVpp requirement stays constant.
TVS Clamping Analysis:
The SMBJ12CA TVS begins conducting when node voltage exceeds approximately 13 V, which corresponds to an input of ~28 V pp (13.3 V breakdown ÷ 0.955 gain = 13.9 V peak). Unclamped node peak voltage vs. input amplitude:
| Input Amplitude | Unclamped Node Peak @ 60 Hz | TVS Status | Impact |
|---|---|---|---|
| 12 V pp | 5.73 V | No clamp | Normal operation |
| 24 V pp | 11.46 V | No clamp | Normal operation |
| 28 V pp | 13.4 V | Clamp onset | Peaks just begin to clip |
| 48 V pp | 22.91 V | Clamps | Peaks clipped at ~13 V |
| 60 V pp | 28.64 V | Clamps | Heavy clipping |
Above ~28 V pp, TVS clamping clips the signal peaks at the LM2907 input, providing overvoltage protection; zero crossings are unaffected, so frequency detection is unimpaired.
LM2907 Recovery Time After Field Dropout¶
Problem Description: When the alternator field is cut off (load dump protection or shutdown), the RPM reading drops to zero and takes 5–10 seconds to recover even though actual zero-crossing loss is only ~300 ms. This is caused by the AC coupling capacitor charge retention.
Coupling Capacitor Discharge Mechanism:
When a large signal is present, the 20 µF coupling capacitor charges to a DC level corresponding to the signal amplitude. When the signal suddenly drops (field cutoff), this stored charge must discharge through the 100 kΩ bias resistor before the LM2907 can detect the restored signal.
Exponential Decay:
V_offset(t) = V_initial × e^(-t/τ)
where τ = (R_bias + R_series) × C_coupling = 104.7kΩ × 20µF ≈ 2.1 seconds
Recovery Time to Detection Threshold:
The LM2907 requires approximately 25 mVpp at Pin 1 for reliable frequency detection. Recovery is defined as the time until the residual DC offset has decayed enough for the restored signal to exceed this threshold.
Recovery fraction α = 1 - (V_threshold / V_initial)
t_recovery = -τ × ln(1 - α)
Recovery Timing:
| Recovery Level | Time Factor | Recovery Time | Practical Meaning |
|---|---|---|---|
| 63% recovered | 1.0τ | 2.1 seconds | One time constant |
| 90% recovered | 2.3τ | 4.8 seconds | Practical recovery |
| 95% recovered | 3.0τ | 6.3 seconds | Near-complete |
| 99% recovered | 4.6τ | 9.6 seconds | Essentially complete |
Observed Behavior: - Field dropout creates 5–10 second RPM reading gap - Actual zero-crossing signal loss is only ~300 ms - Remaining ~4.8–9.6 seconds is coupling capacitor discharge time - This matches the exponential recovery prediction of 2.3τ to 4.6τ
Final Design Decision — 100 kΩ Bias and 6.8 nF Shunt Are Kept:
The production values are 100 kΩ bias and 6.8 nF shunt. Faster-recovery alternatives were analyzed and bench-tested, and the change was rejected. The deciding factor is detection sensitivity: against the fixed 4.7 kΩ series resistor, the 100 kΩ bias forms a near-unity divider (gain 0.955), keeping the required stator signal at ~26 mVpp. Lowering the bias resistance divides every incoming signal down, at every frequency — which costs the most at idle and low RPM, exactly the region where the stator signal is weakest. That is what faster recovery trades away (time constants below use the full discharge loop, R_bias + 4.7 kΩ):
| Bias Resistor | Divider Gain (vs 4.7 kΩ) | Coupling Time Constant | High-Pass Corner | Required Stator (in band) | 90% Recovery After Cutoff |
|---|---|---|---|---|---|
| 100 kΩ (production) | 0.955 | 2.1 s | 0.076 Hz | ~26 mVpp | 4.8 s |
| 10 kΩ | 0.680 | 0.29 s | 0.54 Hz | ~37 mVpp | 0.68 s |
| 1 kΩ | 0.175 | 0.11 s | 1.4 Hz | ~148 mVpp | 0.26 s |
Bench testing of the 10 kΩ option confirmed the tradeoff: fixing the recovery problem degraded detection elsewhere and a better overall balance could not be found. Secondary factor against the lower values: a lower-impedance input node changes the noise behavior. The ~5 second recovery after an abrupt field cutoff is accepted as a hardware characteristic and handled in software.
Solution - Software Field Management:
Rather than compromise the hardware circuit balance, the recovery time issue is addressed in software by maintaining a small alternator field current at all times. This field current is sufficient to generate a detectable stator signal for RPM measurement but small enough that no charging occurs (effectively "off" from a charging perspective). This ensures continuous RPM readings without the 5–10 second dropout after field transitions. During shutdown, the firmware ramps the field down gradually so the coupling capacitor tracks the falling signal, cuts the field fully once the engine has stopped, tolerates the brief false-zero window a deliberate field cut can produce, and rejects single-sample glitches at the point the reading is taken — so recovery-time artifacts do not reach recorded data.
Power Dissipation Analysis¶
AC Operation (Normal Conditions):
Under normal AC operation, power dissipation must be calculated using complex impedance analysis with RMS voltage and current values.
At 12 V Peak-to-Peak (4.24 V RMS, 60 Hz):
|Z_total| = 101.5kΩ
I_rms = 4.24V / 101.5kΩ = 41.8µA
P_series = (41.8µA)² × 4.7kΩ = 0.008mW
P_bias = |V_node_rms|² / R_bias = 0.16mW
P_total = 0.17mW
At 24 V Peak-to-Peak (8.49 V RMS, 60 Hz):
I_rms = 8.49V / 101.5kΩ = 83.6µA
P_series = (83.6µA)² × 4.7kΩ = 0.033mW
P_bias = 0.66mW
P_total = 0.69mW
At 48 V Peak-to-Peak (24 V peak, 60 Hz) - TVS Clamping Occurs:
Node clamped at ~13.3V for ~60% of each half-cycle.
While clamped, series current = (V_in − 13.3V) / 4.7kΩ (2.3mA at the 24V peak)
I_rms ≈ 1.3mA → P_series ≈ 8mW
P_TVS ≈ 13.3V × 0.8mA average ≈ 11mW
P_bias ≈ 1.3mW
P_total ≈ 20mW
Summary - AC Power Dissipation:
| Input Amplitude | Frequency | Bias R Power | Series R Power | TVS Power | Total | TVS Status |
|---|---|---|---|---|---|---|
| 12 V pp | 60 Hz | 0.16 mW | 0.008 mW | 0 | 0.17 mW | No clamp |
| 24 V pp | 60 Hz | 0.66 mW | 0.033 mW | 0 | 0.69 mW | No clamp |
| 48 V pp | 60 Hz | ~1.3 mW | ~8 mW | ~11 mW | ~20 mW | Clamps |
| 60 V pp | 60 Hz | ~1.5 mW | ~18 mW | ~19 mW | ~39 mW | Clamps |
| 200 V pp (100 V peak, input maximum) | 60 Hz | ~1.8 mW | ~0.7 W | ~0.14 W | ~0.85 W | Clamps |
All values are far inside component ratings — the 4.7 kΩ series part is rated 2 W and would not reach it until ~150 V peak continuous.
DC Fault Conditions (Engine-Off with Rectifier Leakage):
If DC voltage appears on the stator tap (fault condition), the coupling capacitors charge to the full input voltage and then block it. Once charged, no steady-state DC current flows anywhere in the circuit and nothing dissipates — the fault voltage is held entirely across the coupling capacitors. Their 100 V rating is therefore what sets the absolute input ceiling:
| DC Input | Steady-State Current | Voltage Across Coupling Caps | Status |
|---|---|---|---|
| 14 V | 0 | 14 V | Safe |
| 48 V | 0 | 48 V | Safe |
| 100 V | 0 | 100 V | At capacitor rating — absolute maximum |
Transient DC Fault (While Capacitors Charge):
During the charging transient, current flows through the series resistor into the clamped node. For any fault above ~14 V the TVS clamps the node at ~13 V, so the transient current is set by the series resistor alone and decays with τ = 4.7 kΩ × 20 µF ≈ 94 ms:
I_transient(0) = (V_input − 13 V) / 4.7 kΩ (TVS clamping)
| DC Input | Initial Transient I | Initial Series R Power | Status |
|---|---|---|---|
| 28 V | 3.2 mA | 48 mW | Safe |
| 56 V | 9.1 mA | 0.39 W | Safe (decays in ~0.3 s, 2 W part) |
| 100 V | 18.5 mA | 1.6 W | Safe (decays in ~0.3 s, 2 W part) |
Component Ratings: - 4.7 kΩ series resistor: HP122WJ0472T4E rated at 2 W — massive safety margin - 100 kΩ bias resistor: 0.1 W rated — adequate for all operating conditions - Maximum power in bias resistor: ~23 mW at 48 V DC fault (4.3× safety margin) - Normal AC operation: <1 mW in bias resistor under typical conditions
Normal AC Operation¶
- No damage risk: AC signals don't cause sustained power dissipation above safe limits anywhere in the published input range (25 mVpp to 100 V peak)
- TVS clipping: Signals above ~28 V pp get peak-clamped to ~13 V by SMBJ12CA, maintaining proper LM2907 operation while protecting the circuit
- Continuous-AC power ceiling: At 100 V peak the series resistor dissipates ~0.75 W of its 2 W rating and the TVS averages ~0.14 W; the resistor would not reach its rating until ~150 V peak continuous
Filter Characteristics (LM2907-to-TLV9154 Interface)¶
The LM2907 channel does not use the same front-end voltage divider as the battery and current channels, but it still uses the same protected TLV9154-to-ADS1115 interface: - 4.7 kΩ series resistor into the op-amp non-inverting input - Direct output-to-inverting-input feedback - 330 Ω output isolation resistor - 0.33 µF capacitor at the ADS1115 input node
Frequency and RPM Analysis¶
Engine-to-Stator Scaling Factors: - Conservative case: 6-pulse alternator, 1.5:1 belt ratio → Engine RPM × 0.15 = Stator Hz - Aggressive case: 7-pulse alternator, 2.5:1 belt ratio → Engine RPM × 0.292 = Stator Hz - Worst case: 1-pulse per revolution, 1:1 direct → Engine RPM × 0.0167 = Stator Hz
Performance Analysis (Conservative Case Example)¶
Minimum detectable frequency: 8 Hz Maximum detectable frequency: 2640 Hz (limited by 3.3 V op-amp supply rail)
| Engine RPM | Stator Frequency | LM2907 Output | ADC Voltage | Status |
|---|---|---|---|---|
| 53 RPM | 8 Hz | 0.010 V | 0.010 V | Minimum detectable |
| 133 RPM | 20 Hz | 0.025 V | 0.025 V | Valid |
| 300 RPM | 45 Hz | 0.056 V | 0.056 V | Valid |
| 600 RPM | 90 Hz | 0.113 V | 0.113 V | Valid |
| 1500 RPM | 225 Hz | 0.281 V | 0.281 V | Valid |
| 3000 RPM | 450 Hz | 0.563 V | 0.563 V | Valid |
| 4000 RPM | 600 Hz | 0.750 V | 0.750 V | Valid |
| 6000 RPM | 900 Hz | 1.125 V | 1.125 V | Valid |
| 8000 RPM | 1200 Hz | 1.500 V | 1.500 V | Valid |
| 10667 RPM | 1600 Hz | 2.000 V | 2.000 V | Valid |
| 14667 RPM | 2200 Hz | 2.750 V | 2.750 V | Valid |
| 17600 RPM | 2640 Hz | 3.300 V | 3.300 V | Maximum detectable |
RPM Range Summary: - Conservative (6-pulse, 1.5:1): 53 RPM to 17,600 RPM - Aggressive (7-pulse, 2.5:1): 27 RPM to 9,041 RPM - 1-pulse direct: 479 RPM to 158,400 RPM
Input Signal Requirements¶
Minimum detectable signal: ~25 mVpp at Pin 1 after attenuation (LM2907 worst-case threshold per datasheet interpretation)
Required Stator Signal vs. Frequency:
The circuit's requirement is essentially flat — the divider costs 4.5% everywhere, and the 6.8 nF shunt adds a little more only at the top of the band:
| Frequency | Required Stator | Signal at Pin 1 | Circuit Loss | Engine RPM (Conserv.) |
|---|---|---|---|---|
| 5 Hz | 26.2 mVpp | 25 mVpp | 4.5% | 33 RPM |
| 10 Hz | 26.2 mVpp | 25 mVpp | 4.5% | 67 RPM |
| 50 Hz | 26.2 mVpp | 25 mVpp | 4.5% | 333 RPM |
| 100 Hz | 26.2 mVpp | 25 mVpp | 4.6% | 667 RPM |
| 1000 Hz | 26.7 mVpp | 25 mVpp | 6.2% | 6667 RPM |
| 2640 Hz | 29.4 mVpp | 25 mVpp | 14.8% | 17600 RPM |
Frequency Response Impact:
What limits detection at low RPM is the alternator, not the conditioning circuit: stator EMF scales with shaft speed, so at idle and below the available signal shrinks toward the ~26 mVpp requirement while the requirement itself stays constant. This is why low-RPM detection depends on stator signal strength — and why the firmware maintains a small keep-alive field (see the recovery section above).
Input signal analysis for 100 mVpp stator input:
| Frequency | Signal at Pin 1 | Detection | Engine RPM (Conservative) | Engine RPM (1-pulse) |
|---|---|---|---|---|
| 50 Hz | 95.5 mVpp | Excellent | 333 RPM | 3000 RPM |
| 100 Hz | 95.4 mVpp | Excellent | 667 RPM | 6000 RPM |
| 500 Hz | 95.1 mVpp | Excellent | 3333 RPM | 30000 RPM |
| 800 Hz | 94.4 mVpp | Excellent | 5333 RPM | 48000 RPM |
| 1000 Hz | 93.8 mVpp | Excellent | 6667 RPM | 60000 RPM |
Very Low Frequency Analysis (1-pulse systems):
Minimum detectable: 8 Hz = 479 RPM for 1-pulse systems
| Engine RPM | Frequency | Required Stator | Signal at Pin 1 | Detection Status |
|---|---|---|---|---|
| 479 RPM | 8 Hz | 26.2 mVpp | 25 mVpp | Minimum detectable (LM2907 output floor) |
| 1500 RPM | 25 Hz | 26.2 mVpp | 25 mVpp | Good if signal present |
| 3000 RPM | 50 Hz | 26.2 mVpp | 25 mVpp | Good |
| 6000 RPM | 100 Hz | 26.2 mVpp | 25 mVpp | Excellent |
| 18000 RPM | 300 Hz | 26.2 mVpp | 25 mVpp | Excellent |
| 30000 RPM | 500 Hz | 26.3 mVpp | 25 mVpp | Excellent |
| 60000 RPM | 1000 Hz | 26.7 mVpp | 25 mVpp | Excellent |
| 95040 RPM | 1584 Hz | 27.4 mVpp | 25 mVpp | Excellent |
| 158400 RPM | 2640 Hz | 29.4 mVpp | 25 mVpp | Maximum detectable |
Sine vs. Square Wave Performance: Both waveform types perform identically for frequency detection — the LM2907 detects zero crossings regardless of waveform shape.
Floating Stator Reference Note: The alternator stator (three-lead wye configuration) is electrically floating with respect to chassis ground and battery negative. The stator neutral is not tied to ground or B+, and individual phase voltages are defined phase-to-neutral, not phase-to-ground.
When a stator phase is measured relative to chassis ground, the observed waveform and peak voltage are influenced by internal rectifier diode steering and system voltage, and do not represent the true phase amplitude. Apparent "clamping" near battery voltage during grounded measurements is a measurement artifact, not a hard electrical limit of the stator.
Input conditioning for RPM measurement therefore assumes: - Potentially large common-mode voltage relative to ground - AC waveform with floating reference - Protection and level-limiting must be defined relative to the measurement circuit ground, not alternator ground
The RPM input conditioning (series resistance + bidirectional TVS + AC coupling) is designed to safely handle this floating stator behavior without relying on any assumed ground reference.
High-Voltage Input Robustness: If an extreme-case AC stator waveform reaches ~120 V peak relative to system ground, the LM2907 input remains protected by the 4.7 kΩ series resistor + SMBJ12CA bidirectional TVS. The series resistor limits peak clamp current to ~20–25 mA, and the TVS clamps the LM2907 input node to approximately ±15 V, well below the ±28 V absolute maximum rating of the grounded-input LM2907. Even under continuous sinusoidal excitation, average TVS dissipation remains well below 0.5 W, within safe thermal limits for the SMBJ package with normal PCB copper. Result: no overvoltage risk to the LM2907, even for large floating stator voltages.
The chain's actual ceilings are elsewhere: the 4.7 kΩ series resistor reaches its 2 W continuous rating near ~150 V peak sinusoidal (it dissipates ~1.15 W at 120 V peak), and any DC or sub-hertz fault is limited to 100 V absolute by the coupling capacitors' voltage rating — which is why the published input maximum is 100 V peak, not the AC-survival figure.
Channel 3: Optional Analog Temperature Input¶
Application: Engine or alternator temperature monitoring using a 10 kΩ NTC thermistor or TMP235A4DCKR analog temperature sensor. For most users, the preferred temperature measurement method is a digital OneWire sensor. Channel 3 is therefore optional and ships as a ground by default.
Which sensor to choose, the voltage and accuracy tables, and the settings to enter are all on Temperature Sensors — this section covers only the circuit itself.
Components¶
| Designator | Value | Part Number | Package | Notes |
|---|---|---|---|---|
| Ground jumper | 0 Ω | 1206W4F0000T5E | 1206 | Before the divider; shorts AIN3 to GND when channel not needed |
| R1 (top) | 0 Ω | 0603WAF0000T5E | 0603 | Populated as 0 Ω; replace to add attenuation |
| R2 (bottom) | 10 kΩ | 0603WAF1002T5E | 0603 | 1%, always populated |
Default State (Ground Jumper Installed)¶
The 1206 0 Ω ground jumper is placed before the voltage divider, between the connector pin and the divider network. When installed, AIN3 is held to GND and the channel functions as an extra ground at the connector. Remove this jumper to use Channel 3 as an analog input.
Active State (Ground Jumper Removed)¶
With the 0 Ω in R1 and 10 kΩ in R2, the circuit presents no voltage division. The analog source connects between 3.3 V and the measurement node; the 10 kΩ to GND acts as a pull-down or load.
Circuit topology:
3.3 V ── Sensor ──●── 10 kΩ ── GND
│
TLV9154 IN+ (via 4.7 kΩ)
Electrical Notes¶
- Reference thermistor: Murata NXFT15XH103FA2B050 — R25 = 10 kΩ ±1%, β25/50 = 3380 K ±1%, −40 °C to +125 °C. Transfer function: V_node = 3.3 × (10k / (10k + R_NTC(T))).
- Excitation is 3.3 V and the firmware conversion assumes it — powering the divider from a 5 V pin gives wrong readings everywhere.
- The divider output crowds the 3.3 V rail above ~90–100 °C, so resolution and ADC headroom collapse exactly where alternator protection matters most — the resulting accuracy figures, the full voltage table, and the comparison against the digital sensor and TMP235 are on Temperature Sensors. Beyond about +135 °C the divider output rails out and the firmware returns its
−99invalid-reading sentinel. - Disconnect detection: V_node < 0.05 V is treated as "no sensor" by the firmware. The lowest legitimate V_node (sensor at −40 °C) is 0.134 V, so the floor cleanly distinguishes a missing thermistor from a real cold reading.
- ADC quantization (16-bit, 0.1875 mV per LSB) is never the limiting factor on this channel — sensor and resistor tolerances are.
- The thermistor constants (Beta, series resistor, reference temperature) are user settings; which values to enter, substitution rules for other parts, and the TMP235 alternative are all covered on Temperature Sensors.
Protection and Stability¶
The following components are present on every channel:
- 4.7 kΩ series resistors on each TLV9154 non-inverting input — fault-current limiting
- 330 Ω series resistors on each TLV9154 output, placed outside the feedback loop — op-amp stability and ADC input protection
- 0.33 µF capacitors from each ADS1115 input node to ground — RC anti-aliasing filter
- 0.1 µF local decoupling capacitor directly across TLV9154 V+ and V−
Fault current with 4.7 kΩ protection (5 V source, op-amp unpowered): - (5 V − 0.3 V) / 4.7 kΩ = 1.0 mA → Safe
Fault current limiting on TLV9154 output (ADS1115 unpowered): - (3.3 V − 0.3 V) / 330 Ω = 9.1 mA → Within ADS1115 ±10 mA spec
TLV9154 Op-Amp Failure Analysis (Historical Reference)¶
Failure Description¶
Two TLV9154 op-amps failed with similar symptoms in an earlier PCB revision. One showed visible burn damage at the ground pin (Pin 11). The second showed no visible damage but produced garbage ADC readings. One failure occurred with the engine off and no input signals active.
Root Cause Analysis¶
Theory 1: Power Sequencing¶
The original design connected 5 V signals directly to op-amp inputs on channels powered from 3.3 V, with no input protection resistors. During power-up, the 5 V rail established before the 3.3 V rail. With supply pins at 0 V, input signals forward-biased the internal ESD protection diodes, driving current through them above their continuous rating. The ground pin (Pin 11) was the current exit point, explaining the burn damage pattern.
Channel 2 (LM2907, 0–5 V) and Channel 3 (thermistor with 5 V pullup) were the affected nodes.
Fault current without protection: - Channel 2: 5 V directly to Pin 10, limited only by LM2907 output impedance - Channel 3: 5 V through 10 kΩ = 0.5 mA potential clamp current
Both exceed continuous ESD diode ratings.
With the 4.7 kΩ protection resistors now in place: - Op-amp powered (3.3 V): (5 − 3.3 − 0.3) / 4.7k = 0.3 mA — Safe - Op-amp unpowered (0 V): (5 − 0.3) / 4.7k = 1.0 mA — Safe
Theory 2: Grounding Architecture¶
The original design connected ADS1115 AGND to battery negative through the INA228 Shunt− terminal via a Cat6 wire strand. The TLV9154 was grounded to the main PCB ground plane. This created different ground references for the two ICs.
The INA228 Shunt± terminals are Kelvin sensing inputs — they are designed to carry no return current from other circuits. Using Shunt− as a ground reference for the ADS1115 violates this principle. During transient fault conditions, instantaneous return currents through this high-impedance path created a ground delta between the TLV9154 and ADS1115, potentially contributing to thermal damage.
Grounding fix applied: ADS1115 AGND connected to the main PCB ground plane, shared with the TLV9154. INA228 Shunt± used only for Kelvin voltage sensing.
Conclusion¶
Both failure modes are addressed in the current design by the 4.7 kΩ input protection resistors and the corrected grounding architecture. Two similar failures on two separate units indicate a systematic design issue, not random component failure.
LM2907 Output Response — Ripple vs. Lag¶
This section covers the output-side response of the Channel 2 RPM chain: the delay and ripple between a real stator-frequency change and the software-visible RPM value. The input-side conditioning network at pin 1 is a separate issue — it drives the multi-second recovery after a field cut (covered under Channel 2 above) but is not the dominant source of lag during normal running.
Governing equations¶
Average output: VO = VCC × fIN × C1 × R1 = 5 V × fIN × 10 nF × 25 kΩ = 1.25 mV/Hz (equivalently fIN = 800 × VO).
The firmware applies an empirical engine calibration of RPM = 1330 × VO, so one hertz of stator frequency reads as about 1.66 RPM. That is an engine/pulley calibration, not an LM2907 property.
Datasheet ripple: V_ripple(pk-pk) = (VCC/2) × (C1/C2) × (1 − fIN/fMAX), where fMAX = I2 / (C1 × VCC) = 180 µA / (10 nF × 5 V) = 3600 Hz.
Output smoothing time constant: τ = R1 × C2 = 25 kΩ × 1 µF = 25 ms as built (63% of a step in 1τ, 90% in 2.3τ, 95% in 3τ, 99% in 4.6τ). The ADC-side RC (330 Ω × 0.33 µF = 109 µs) is negligible by comparison.
What sets the visible lag¶
- LM2907 pin-3 smoothing (C2). With the as-built 1 µF: 90% of a step in ~58 ms.
- RPM sample cadence. Channel 2 gets one slot per ADS1115 scan cycle, so the reading refreshes about every 30 ms (~31 ms measured). The scan schedule and its constants are documented in Sensors.
- The 109 µs ADC-side RC — negligible.
Software-visible RPM response with the as-built hardware: best case ~25–30 ms, typical ~55–75 ms, worst case ~105 ms depending on sample phase. Fast protection events unfold over roughly 100–200 ms, so the measurement chain's lag is real on that scale but not dominant.
Ripple at the as-built 1 µF¶
V_ripple(pk-pk) = 25 mV × (1 − fIN/3600); converted at 1330 RPM/V, RPM_ripple(pk-pk) = 33.25 × (1 − fIN/3600).
| fIN | VO | V_ripple (pk-pk) | RPM_ripple (pk-pk) |
|---|---|---|---|
| 600 Hz | 0.750 V | 20.8 mV | 27.7 RPM |
| 1000 Hz | 1.250 V | 18.1 mV | 24.1 RPM |
| 1500 Hz | 1.875 V | 14.6 mV | 19.4 RPM |
| 2000 Hz | 2.500 V | 11.1 mV | 14.8 RPM |
These are ideal raw pin-3 figures, not guaranteed software jitter — actual logged jitter depends on sample phase, real torsional variation, and any downstream averaging. Observed steady-state jitter of ~5 RPM sample-to-sample indicates the chain is clean.
Smaller C2: faster, noisier¶
Reducing C2 is the clean hardware lever for faster RPM response, at the direct cost of proportionally more ripple:
| C2 | τ | 90% settle | RPM ripple @ 1000 Hz (pk-pk) | Typical visible lag |
|---|---|---|---|---|
| 1 µF (as built) | 25 ms | 58 ms | 24 RPM | ~55–75 ms |
| 0.47 µF | 11.8 ms | 27 ms | 51 RPM | ~33–50 ms |
| 0.22 µF | 5.5 ms | 12.7 ms | 109 RPM | ~25–35 ms (scan-limited) |
| 0.10 µF | 2.5 ms | 5.8 ms | 241 RPM | scan-limited |
Going to 0.47 µF roughly halves the analog lag for double the ripple. Below about 0.22 µF the ADS1115 scan cadence dominates the total delay, so further reduction buys only jitter. If a change is ever made, 0.47 µF is the reasonable first step; beyond that, the clean path is a digital pulse-counting architecture rather than more analog speed.