123 Main Street, New York, NY 10001

Gas Analyzer Front-End (NDIR / TCD / EC)

← Back to: Industrial Sensing & Process Control

This page explains how to build a stable gas analyzer analog front-end across NDIR, TCD, and electrochemical sensors—covering source drive, TIA + lock-in detection, temperature control, isolation, EMC hardening, and calibration. It also provides a deterministic evidence-chain for debugging drift, noise, and long-term accuracy in the field.

Chapter 1

Mission & System Boundary

Mission: build a repeatable front-end blueprint that keeps readings stable across temperature gradients, long-term drift, and electrical noise—while making failures diagnosable from measurable evidence rather than guesswork.

What this page covers (strict boundary)

  • Electrical chain only: source/excitation → sensor output domain → AFE (TIA/bridge/INA) → synchronous detection / filtering → ADC/MCU → isolation → comms I/O.
  • Stability loops: temperature measurement + heater control, compensation models, baseline tracking, and drift management hooks.
  • Evidence-first debug: which waveforms/fields to capture, where to tap them, and what “healthy vs failing” looks like.
  • Design-for-noise: grounding, isolation partitioning, leakage control, EMI coupling paths, and coherent sampling constraints.
Not covered here: gas chemistry libraries, spectroscopy theory beyond design constraints, mechanical gas path design, cloud/IoT platforms, or certification procedures (only design hooks).

Evidence fields (used as a contract across chapters)

  • Chain gain: sensor-domain input → ADC codes (include demod/filter gain). Required for repeatable calibration and for detecting hidden saturation.
  • Noise floor (in-band): measured after the same bandwidth/decimation used for the final reading—otherwise noise numbers are misleading.
  • Drift vs temperature: ppm/°C or LSB/°C after compensation; track both “before” and “after” to prove the model works.
  • Baseline stability: zero condition variance over seconds/minutes/hours; use it to separate electrical drift from process variation.
  • Recovery time: time to return from saturation/over-range/step disturbance back to spec (includes thermal settling and filter convergence).
  • Calibration coefficients: versioned, checksum-protected, with validity flags and temperature segment tables to prevent silent corruption.
Gas Analyzer Front-End Map Three sensor lanes → shared AFE/ADC/MCU → isolation → I/O, with temperature control and evidence taps Sensor Lanes NDIR Source Drive Optics Detector (I/V) TCD Bridge Excite Bridge ΔR Electrochemical Bias Control Cell nA–µA Shared Signal Chain AFE (TIA/INA) leakage + stability Lock-in / DFE sync demod ADC coherent Clock / Timing jitter → noise MCU + Coeff Store + Logs versioned calibration + evidence Isolation Barrier I/O (UART / RS-485 / SPI) Temperature: sensors → control → heater/comp tables tap Debug contract: gain • noise • drift/°C • baseline • recovery • coeffs
Figure: Gas Analyzer Front-End Map. Cite this figure (module names only; taps indicate recommended measurement points).
Chapter 2

Modality Selection Map (NDIR vs TCD vs EC) — What Changes Electrically

NDIR, TCD, and electrochemical sensors often share the same downstream ADC/MCU and isolation strategy, but the electrical signal domain, the required excitation/reference, and the dominant error source change the entire front-end constraint set. This chapter maps each modality to a measurable budget so the architecture stays stable when the sensing element changes.

The 5 electrical questions that decide the front-end

  • Output domain: current (pA–µA), voltage (µV–mV), or resistance change (mΩ–Ω).
  • Reference requirement: synchronous reference (lock-in), ratiometric bridge excitation, or electrode bias control.
  • Dominant noise: 1/f + leakage, resistor thermal noise, source/thermal drift, or mains/EMI coupling.
  • Time constant: optical/thermal settling vs bridge thermal mass vs electrochemical diffusion—sets filter/decimation strategy and recovery behavior.
  • Isolation sensitivity: common-mode and ground-loop risk increases with long cabling and high-impedance nodes; architecture must choose where the ADC sits.

Engineering comparison matrix (use as a routing table)

Constraint NDIR TCD Electrochemical (EC)
Output domain Photodiode current or thermopile voltage Resistive bridge imbalance (ΔR) Cell current (nA–µA) with bias
Must-have excitation Chopped/modulated source + phase reference Stable bridge excitation (often ratiometric) Reference/working electrode bias + compliance
Dominant errors Source temperature/aging, phase error, ambient IR drift Excitation drift, self-heating, thermal gradients Leakage, bias drift, humidity/temp influence, aging
Best stabilization lever Lock-in demod + coherent sampling + baseline tracking Ratiometric readout + controlled excitation (CTA if used) Guarding + ultra-low leakage + stable bias/reference
Isolation priority Medium–High (long sensor head cables can inject CM noise) Medium (bridge can be robust, but loops can pick up hum) High (high impedance nodes are ground-loop sensitive)
First debug capture Raw detector + reference phase + demod output Excitation stability + bridge diff output + thermal response Bias voltage + input leakage check + zero baseline trend
“What breaks first” Phase/alignment or source thermal drift Excitation drift or loop stability (if CTA) Leakage paths or bias/reference instability
Usage: when a design “works in lab but drifts in enclosure,” the matrix points to the first evidence field to measure (phase/thermal/excitation/leakage) before changing algorithms or calibration tables.
Signal & Noise Budget Matrix Order-of-magnitude view: domain + excitation + dominant error → where to read next Signal domain (typical) pA nA µA mV ΔR EC: nA–µA current + bias NDIR: I/V (detector) + lock-in ref TCD: bridge ΔR readout NDIR Excitation: modulated source + ref Dominant: phase + thermal drift First capture: raw + ref + demod Read next: H2-3 source • H2-4 lock-in • H2-9 EMC TCD Excitation: stable bridge drive Dominant: excitation + gradients First capture: excite + diff + temp Read next: H2-5 bridge • H2-7 thermal • H2-9 EMC Electrochemical Excitation: bias + compliance Dominant: leakage + 1/f drift First capture: bias + leakage + zero Read next: H2-6 EC AFE • H2-8 isolation • H2-9 EMC EMI TEMP 1/f
Figure: Signal & Noise Budget Matrix. Cite this figure (minimal text; engineering routing to next chapters).
Chapter 3

NDIR Source Driver Architecture (Lamp / MEMS IR / LED) + Modulation Strategy

NDIR stability is constrained first by the source: modulation depth must be predictable, the reference must be phase-stable, and the drive noise must not fold into the demodulated band. The driver is treated as a measurable subsystem with explicit evidence taps, not as a black box.

Source type → electrical constraints (what changes in the driver)

  • Lamp: strong warm-up drift and thermal inertia; modulation frequency is limited by heating/cooling time constants; overdrive trades lifetime for faster settling.
  • MEMS IR emitter: supports higher modulation rates but can exhibit resonance-sensitive behavior; drive wave-shape and peak current limiting are critical.
  • IR LED: fast response and easy modulation; optical output tracks junction temperature tightly, so temperature sensing + derating and/or power-aware control becomes the stability lever.

Constant-current vs constant-power drive (stability budget decision)

Constant-current makes electrical excitation repeatable, but optical output still drifts with temperature and aging. Constant-power attempts to reduce thermal drift but introduces new error sources from voltage sensing noise, switching ripple, and estimator bandwidth. The choice is judged by evidence fields, not by preference.

Decision axis Constant-current drive Constant-power drive
Primary benefit Repeatable modulation depth (electrical) Reduced optical drift vs temperature (target)
Hidden risk Optical output still temperature/aging dependent Power estimate noise + ripple can leak into demod band
Key evidence Drive current ripple, settling time, source temperature V/I sensing noise, estimator bandwidth, EMI signature
First failure symptom Baseline drift tracks temperature Residual ripple or “breathing” at demod output

Modulation waveform + frequency selection (rules that prevent false drift)

  • Waveform: square waves maximize amplitude but add harmonics (EMI coupling risk); sine waves reduce harmonics but demand tighter amplitude control.
  • Frequency: place modulation above low-frequency drift regions, avoid 50/60 Hz mixing paths, and avoid emitter/fixture resonance bands; keep sampling coherent with the modulation period.
  • Sampling alignment: define explicit sample windows and integration windows so the demod result is repeatable across runs and temperature.

Drive topology + EMI containment (control the coupling path)

  • Low-side switching: simplest, but ground bounce can pollute high-impedance AFE references; return current paths must be short and predictable.
  • H-bridge (when needed): enables symmetric drive but adds switching nodes; containment focuses on loop area, edge-rate control, and separation from AFE inputs.
  • Regulation bandwidth: too slow reduces modulation depth; too fast can amplify switching noise. The loop is tuned against measured ripple and demod residuals.

Safety hooks (measured, not assumed)

  • Open/short detection: protects against “silent failure” where algorithms chase a broken source.
  • Over-temp derate: reduces drift and extends life; derate state should be logged as a first-class evidence field.
  • Aging compensation concept: track run-time and temperature history to justify coefficient updates without hiding real faults.
NDIR driver evidence checklist: drive current ripple (pp/RMS), modulation depth, phase marker stability, source temperature, warm-up settling time, EMI signature near the demod band.
NDIR Source Driver + Modulation Timing Block diagram (top) and coherent timing windows (bottom) Driver Blocks Power In VIN / rails Current / Power regulation loop Switch Stage low-side / H IR Source Lamp / MEMS / LED modulated output Temp sensor Safety Hooks open/short • OTP Aging Log runtime • temp hist tap: drive I tap: output tap: T Coherent Timing time Drive Ref ADC sample sample sample Lock-in integrate window Evidence: ripple • depth • phase • settling • EMI
Figure: NDIR Source Driver + Modulation Timing. Cite this figure
Chapter 4

NDIR Detector Front-End: TIA + Lock-In Detection Chain

NDIR detectors produce small signals that are easily buried by offset, leakage, and ambient drift. The front-end is built as a coherent signal path: the modulation reference defines what is “signal,” and everything else becomes rejectable noise—if phase, bandwidth, and sampling are engineered as a unit.

Detector choice changes the input model (and the failure modes)

  • Photodiode (current): the input looks like a current source with junction capacitance. Stability is dominated by input capacitance, feedback compensation, and leakage paths.
  • Thermopile (voltage): the input looks like a small voltage with high source resistance. Amplifier input noise and bias/leakage currents become first-order error sources.

TIA design knobs (each knob has a measurable consequence)

  • Feedback R (gain): increases sensitivity but raises susceptibility to leakage and slows recovery from saturation; must be validated by recovery time evidence.
  • Feedback C (stability): closes the phase margin against detector capacitance; too small causes ringing/oscillation, too large reduces demod SNR by narrowing bandwidth.
  • Leakage & bias current: at high feedback resistance, picoamp-level leakage becomes a large offset with temperature sensitivity; guarding and surface cleanliness become electrical requirements.
  • Input protection: clamps must be chosen for ultra-low leakage; “safe but leaky” protection can silently destroy baseline stability.

Lock-in options: analog demod vs digital demod (choose by evidence needs)

Axis Analog demod (switch/mixer) Digital demod (multiply + filter)
Where signal is compressed Before ADC (reduces ADC dynamic range demand) After ADC (requires clean sampling + headroom)
Common risk Switch injection and ripple leaking into baseband Clock jitter and non-coherent sampling → phase wander
Key evidence Residual ripple at demod output, phase symmetry Phase error, 50/60 fold-in, in-band noise after decimation

Anti-alias + coherent sampling + decimation (where “false drift” is born)

  • Coherent sampling: sampling windows must align to the modulation period; phase slip turns a stable signal into an apparent baseline drift.
  • Anti-aliasing: keep switching harmonics and mains components from folding into the baseband after decimation.
  • Decimation defines the real noise bandwidth: evaluate noise floor only after applying the same LPF/decimation used for the final reading.
  • 50/60 Hz rejection: implement notch/strategy before or during demod/decimation so mains interference cannot masquerade as concentration drift.

Offset management (use only when the evidence justifies it)

  • Chopping/auto-zero: reduces low-frequency offset but can introduce ripple and switching artifacts; verify residual ripple in the demod band.
  • Correlated sampling: useful when the modulation permits paired samples; validate that it improves baseline stability without increasing recovery time.
NDIR lock-in evidence checklist: in-band noise (post-decimation), phase error, demod gain, residual ripple, 50/60 Hz rejection, baseline drift vs temperature, recovery after saturation.
Lock-In Signal Path (NDIR) Reference defines signal; phase + sampling coherence determines stability Coherent Pipeline Mod Ref phase marker Detector I / V TIA / Preamp Rf/Cf + guard Demod (choose one) Analog mixer Digital multiply LPF / Decimate sets ENBW Notch 50/60 Hz ADC / DFE coherent Fs Baseline tracking tap: raw tap: TIA tap: demod phase path Evidence fields noise (post-decim) • phase error • demod gain • ripple • 50/60 reject • baseline drift
Figure: Lock-In Signal Path. Cite this figure
Chapter 5

TCD Excitation & Bridge Readout (Constant-Temp / Constant-Current) + AFE

TCD readout is a coupled electro-thermal system: excitation defines both the electrical reference and the sensor heating power. Instability usually appears as slow baseline drift, sensitivity changes with ambient conditions, or (in constant-temperature mode) loop oscillation. This chapter treats excitation, bridge, and readout as one measurable chain.

Bridge fundamentals (where drift is born)

  • Excitation stability: any drift in excitation appears as an apparent bridge imbalance unless the measurement is ratiometric.
  • Lead/contact resistance: wire and connector resistance changes with temperature and mechanical stress; it can dominate low-level drift in long cable assemblies.
  • Self-heating: excitation is power; power changes modify element temperature, shifting the bridge in a way that looks like “real signal.”

Constant-current vs constant-temperature (control implication)

Axis Constant-current (CC) Constant-temperature (CTA)
Main advantage Simpler; fewer stability risks Improves immunity to ambient & flow disturbances
Primary risk Baseline drift vs ambient temperature / airflow Loop instability (ringing/oscillation), thermal runaway
Key evidence Excitation ppm, bridge drift, step response Stability margin (or overshoot), step response, recovery
First debug capture Excitation monitor + bridge diff + temperature Error signal + drive power + bridge diff + temperature

Readout chain (reduce excitation-induced drift at the root)

  • Instrumentation amplifier: robust common-mode rejection for small differential signals; validate input bias/current noise vs bridge impedance.
  • Differential ADC: enables direct digitization and cleaner ratiometric strategies; requires a deliberate anti-alias approach.
  • Ratiometric measurement: measure bridge output relative to the same excitation reference so excitation drift becomes second-order.
  • Chopping / auto-zero: reduces low-frequency offset but can introduce ripple; confirm with in-band noise after final filtering/decimation.

Protect & detect (make “quiet failures” visible)

  • Bridge open/short: detect via out-of-range bridge node voltages and saturation patterns in the readout path.
  • Overload & thermal runaway: detect power increasing without convergence; enter a safe derate/disable state and log the event.
  • Recovery validation: after overload, measure step response and baseline return time to prevent “stuck drift” being mistaken for concentration change.
TCD evidence checklist: excitation stability (ppm), bridge imbalance drift, step response (overshoot/settle), loop stability margin (CTA), overload recovery time.
TCD Bridge + Excitation + Readout CC mode or optional CTA loop; ratiometric reference reduces excitation drift Excitation CC / CV tap: ppm Lead R wires Bridge ΔR + self-heat R R R R ΔR R tap: diff INA diff amp Diff ADC codes Ratiometric Ref excite → ADC ref Optional CTA Loop Error Comp Drive tap: margin Protect & Detect open/short • overload runaway flags ref path
Figure: TCD Bridge + Excitation + Readout (with optional CTA loop). Cite this figure
Chapter 6

Electrochemical (EC) Sensor AFE: Biasing, TIA, and Interference Control

EC sensors often fail quietly: leakage, bias errors, and contamination shift the baseline without obvious alarms. A robust EC front-end is designed around bias stability, leakage budgeting, and controlled recovery after overload—using a potentiostat-like topology with explicit evidence taps.

2-electrode vs 3-electrode cells (electrical meaning)

  • 2-electrode: simpler wiring, but the reference point is less controlled; bias errors can translate into drift and non-repeatable sensitivity.
  • 3-electrode: separates working (WE), reference (RE), and counter (CE) roles; enables controlled bias but increases compliance and protection requirements.

Bias generation (the foundation of repeatability)

  • Low-noise reference: bias noise becomes measurement noise after the TIA and filtering chain.
  • Compliance voltage: ensure the loop can hold the intended electrode potential under expected current and temperature conditions.
  • Transient protection: hot-plug, ESD, and surge events must not permanently shift the bias point or increase leakage.

TIA + input protection (leakage budget dominates)

  • Picoamp bias & leakage paths: board contamination, humidity, and “safe but leaky” clamps can create offsets that dwarf the signal.
  • Guarding: guard rings and driven guards are electrical requirements for high-impedance nodes; validate with humidity/handling sensitivity tests.
  • Input protection: select protection components by leakage (not only by voltage rating); confirm zero-baseline drift after assembly and cleaning.

Interference control (hooks, not chemistry deep dive)

  • Cross-sensitivity: treat as a monitoring and flagging problem at the AFE boundary (baseline anomaly, recovery anomaly) rather than chemistry modeling here.
  • Humidity/temperature influence: capture T/RH fields and expose them to compensation tables and health diagnostics.
  • Overload recovery: define a recovery timer and validity flag to prevent “polarization tail” from being interpreted as true concentration.
EC evidence checklist: bias stability, input leakage budget, zero-gas baseline drift, recovery after overload, in-band noise after final filtering.
EC Potentiostat-like Front End Bias loop controls electrode potential; TIA measures WE current; leakage budget is first-class EC Cell WE RE CE 2-electrode: WE+RE 3-electrode: WE/RE/CE Bias Ref low-noise Control error + comp Compliance Driver to CE TIA Rf/Cf + leakage ADC codes Guard driven ring Low-leak Protection series R/RC • low-leak ESD avoid “safe but leaky” clamps tap: bias tap: WE I tap: noise tap: zero RE sense Evidence fields bias stability • leakage budget • zero baseline drift • overload recovery • in-band noise
Figure: EC Potentiostat-like Front End. Cite this figure
Chapter 7

Temperature Control & Compensation (Shared Core for NDIR / TCD / EC)

Temperature is the dominant error source across all three modalities. Treat it as a first-class subsystem with a measurable thermal map, explicit control loops (where required), and a compensation model that is validated by residual temperature coefficient rather than assumed “good enough.”

Where to measure temperature (make gradients observable)

  • Source zone (NDIR): emitter temperature drives optical output drift and warm-up behavior; use it to gate validity and to stabilize modulation depth.
  • Detector / AFE zone (NDIR/EC): offsets and leakage are strongly temperature dependent; measure near high-impedance nodes and low-noise references.
  • Flow cell / sensor chamber (all): airflow coupling and enclosure thermal inertia set the baseline drift and step response seen in the measurement.
  • Ambient / enclosure: provides boundary conditions for feedforward and for diagnosing unexpected gradients.
  • PCB hot spots: isolate power and digital heat sources; track them as health signals to prevent compensation from masking thermal design faults.

Control options (feedback and feedforward as a system)

  • Heater + thermistor/RTD + PID: validate with settling time and overshoot under step disturbances rather than only steady-state error.
  • Feedforward: use ambient and power-state predictors to reduce PID workload, minimizing oscillation and reducing warm-up time.
  • Combined strategy: feedforward handles slow drift; feedback closes residual error and rejects disturbances (airflow, enclosure changes).

Compensation model (engineered for maintainability)

  • Piecewise linear: production-friendly, stable across operating regions; easy to update with calibration points.
  • Polynomial: smooth but risky outside calibrated ranges; requires careful validation to avoid “good fit, bad physics.”
  • Reference channel: NDIR dual-channel approaches can separate optical/ambient drift from absorption changes without relying on a single sensor temperature.
  • Ratiometric strategies: in TCD, reference-based measurement reduces excitation drift so temperature compensation targets true thermal effects.

Thermal design hooks (reduce unmodeled coupling)

  • Isolation barrier effects: isolators and isolated power can create local hot spots and gradients; treat them as thermal zones with sensors if needed.
  • Self-heating: excitation and high-value feedback networks can introduce internal heating; include power state in the compensation context.
  • Airflow coupling: enclosure and flow changes move gradients; compensation should use the right measurement zones, not a single “board temp.”
Temperature evidence checklist: temperature gradient map, control-loop settling time, residual temperature coefficient after compensation.
Thermal Zones & Control Loops Measure gradients, control key zones, validate with residual temperature coefficient Zones Source Zone T-sense Heater tap Detector / AFE T-sense Low-noise ref Flow Cell / Sensor T-sense Heater Airflow Ambient T-sense PCB Hot Spots ISO Power DCDC MCU/RF T-sense Control & Compensation Thermal Ctrl PID FF Comp Model Piecewise Poly ref channel • ratiometric Evidence gradient map settling time residual TC T signals control
Figure: Thermal Zones & Control Loops. Cite this figure
Chapter 8

Isolation, Safety, and Grounding (Sensor Head vs Mainboard)

Gas analyzers often operate with long cables, metal enclosures, and harsh EMI/ESD environments. Isolation is not only for safety: it breaks ground loops, improves common-mode noise immunity, and prevents quiet baseline corruption in high-impedance analog front ends.

Why isolate (convert hidden coupling into controlled paths)

  • Ground loops: low-frequency hum and drift appear as baseline movement, especially in bridge and TIA measurements.
  • Common-mode noise: CM excursions can saturate front ends and fold into baseband after filtering/demodulation.
  • Safety and touch/ESD: protects sensor head electronics and user-accessible surfaces in the presence of transients and unknown grounds.

Partitioning (two islands with clear responsibilities)

  • Sensor head island: AFE, temperature control, and (often) ADC/clock live close to the sensor to minimize leakage and pickup.
  • Processing island: MCU, storage, host interfaces, and high-noise digital subsystems remain on the mainboard side.

Isolation choices (pick the noise boundary on purpose)

  • Digitize-then-isolate: common approach; keeps analog small and local, then isolates digital data across the barrier.
  • Analog isolation: used only when necessary; validate linearity, drift, and bandwidth against the measurement chain requirements.
  • Isolated power: required for sensor head autonomy; treat its switching noise and thermal impact as managed hot spots.
  • Isolated comms: SPI/I²C/UART/RS-485 selections follow cable length and noise environment; confirm with CM noise measurements.

Creepage/clearance and leakage paths (barrier integrity under reality)

  • Barrier leakage: humidity and contamination can create unexpected leakage across the isolation boundary.
  • Parasitic capacitance: high-frequency CM currents can couple across the barrier and return through the AFE reference if the shield/earth strategy is wrong.

Cable shield termination patterns (avoid “shield becomes antenna”)

  • Define return paths: route CM currents to a controlled chassis/earth path instead of through sensitive analog grounds.
  • Single-point vs multi-point: select termination based on dominant frequency content; validate by measuring noise difference with and without shield changes.
Isolation evidence checklist: CM rejection, isolation withstand target, leakage current across barrier, noise difference with/without isolation.
Isolation Partition Diagram Sensor head island separated from processing island by data + power barrier Sensor Head Island AFE ADC/Clock Temp Ctrl ISO Power tap Processing Island MCU Host/Comms Storage DCDC/Noise Barrier Data Power Cable / Shield / Earth Shield Chassis Earth CM return path tap Evidence: CM rejection • withstand target • leakage current • noise delta
Figure: Isolation Partition Diagram. Cite this figure
Chapter 9

Noise/EMC Hardening for µV/nA Signals (Layout + Filtering + Timing)

Ultra-low signals fail through hidden coupling paths: EMI, leakage, microphonics, and sampling jitter. Hardening is most effective when each aggressor is mapped to a victim node and a specific mitigation, then verified by PSD/FFT and leakage/jitter sensitivity tests.

Layout rules (protect the victim nodes)

  • Guard rings and driven guards: surround high-impedance inputs and feedback networks to reduce humidity/contamination leakage and hand-touch sensitivity.
  • High-impedance routing: keep sensitive nodes short and isolated from switching edges (DCDC, isolators, MCU) and from board edges/cable entry points.
  • Split planes (done correctly): do not break return paths; instead, guide noisy return currents away from analog references and ADC grounds.

Filtering (match frequency budgeting to sampling)

  • Input RC: reduces RF/ESD energy and prevents non-linear rectification that turns HF into baseband drift.
  • Anti-alias: define the analog bandwidth contract against ADC sampling; prevent out-of-band pickup folding into the demodulated/decimated band.
  • 50/60 Hz notch: suppress mains hum without breaking coherent lock-in constraints; validate with FFT peak reduction.
  • Spread-spectrum vs coherent lock-in: spread-spectrum may be used for power/digital clocks, but lock-in reference integrity must remain coherent and phase-stable.

Clocking and jitter (preserve reference integrity)

  • Lock-in reference integrity: phase/period stability determines demod gain and residual ripple; cross-barrier timing must be controlled.
  • ADC aperture jitter: converts timing noise into amplitude noise near modulation/signal bands; quantify with jitter-to-noise sensitivity tests.
  • Synchronous sampling: align sampling windows to the modulation reference and use coherent decimation to avoid spectral leakage.

Mechanical/electrical coupling (make “mystery noise” repeatable)

  • Vibration coupling: thermopile/optical assemblies can exhibit microphonics; correlate PSD changes with controlled vibration.
  • Cable triboelectric noise: cable motion can inject low-frequency bursts into EC paths; fix routing and shielding to stabilize.
Noise evidence checklist: FFT/PSD before/after, hum amplitude, jitter-to-noise sensitivity, leakage test results.
Noise Coupling Map Aggressors → Victims → Mitigations, verified by PSD/leakage/jitter evidence Aggressors Victims Mitigations DCDC / ISO PSU MCU Edges Mains Hum Cable ESD Vibration TIA Input Node Bridge Diff Lock-in Ref ADC Ref/GND Bias Node Guard / Driven RC + AA Filter Notch 50/60 Coherent Samp Shield Term Fix / Strain PSD hum leak jitter
Figure: Noise Coupling Map. Cite this figure
Chapter 10

Calibration, Self-Test, and Drift Management (Design for Truth Over Time)

Long-term accuracy requires engineered hooks: zero/span workflows, on-board self-test injections, drift tracking by modality, and a data model that preserves coefficients, validity flags, and evidence logs. “Working today” is not sufficient without measurable truth over time.

Zero/span workflows (one concept, three implementations)

  • NDIR: use a reference channel concept to separate optical/ambient drift from absorption changes; validate with calibration residuals and repeatability.
  • TCD: use ratiometric strategies so excitation drift does not corrupt calibration; track zero/span residuals over time.
  • EC: baseline tracking requires overload-recovery gating; prevent baseline updates during polarization tails.

On-board self-test (stimulus injection points)

  • Injected test current/voltage: verifies TIA gain, linearity, saturation and recovery without external gas changes.
  • Simulated modulation: validates the lock-in chain (gain/phase/filtering) as a digital/analog loop.
  • Bridge test mode: inject known imbalance or switch in reference legs to validate the differential readout and protection logic.

Drift sources (tracked, separated, and managed)

  • NDIR source aging: track modulation depth and reference ratios; trigger recalibration or derate when drift rate exceeds thresholds.
  • EC contamination/leakage growth: track zero baseline drift and recovery time; surface health degradation and maintenance needs.
  • TCD resistor drift: track long-term zero drift and excitation stability; rely on ratiometric design plus scheduled calibration.

Data model (coefficients + tables + validity flags)

  • Coefficient storage: versioned, timestamped, and scoped by temperature region; store fit error and last residual.
  • Temperature tables: piecewise nodes or polynomial ranges with validity limits to avoid unsafe extrapolation.
  • Validity flags: warm-up valid, self-test valid, calibration valid, overload recovery valid, sensor health degraded.
Truth evidence checklist: calibration residuals, repeatability, drift rate per day/week, self-test pass/fail codes, calibration validity flags.
Calibration & Self-Test Hooks Inject known stimulus, log evidence, manage coefficients and validity flags Measurement Chain Sensor AFE/TIA/Bridge Lock-in ADC MCU + Estimator cal residual • drift/day • health Inject Test I Test V Mux Bridge Ref Sim Mod Lock-in Data Model Coefficients ver • ts • region Temp Tables piecewise • poly Flags/Logs cal valid self-test code drift/day tap tap
Figure: Calibration & Self-Test Hooks. Cite this figure
Chapter 11

Diagnostics & Telemetry: What to Log to Debug Fast

Troubleshooting becomes deterministic when logs form an evidence chain: raw signals → computed metrics → fault flags → actionable conclusions. The goal is a minimal debug packet that can separate AFE issues, timing/lock-in errors, thermal instability, and isolation/power faults without requiring a scope on-site.

Design rule: Keep always-on telemetry small; when a fault/quality event fires, capture a short pre/post window of raw data (e.g., 1–2 s) and attach the same packet header for traceability.

Logging layers (raw → health → quality → decision)

  • Raw signals: ADC (pre-demod), demod outputs (I/Q or post-demod), temperatures, heater duty, excitation current/voltage, key rails.
  • Fault flags: open/short, saturation, lock-in phase error, isolation fault, over-temp, end-of-life/health degraded.
  • Quality metrics: SNR estimate, baseline stability, convergence status, calibration age/validity, recovery timers.
  • Decision outputs: compact action codes (e.g., CHECK_SYNC, CHECK_LEAKAGE, CHECK_EXCITATION, RECAL_REQUIRED).

Minimum Debug Packet (field → unit → update rate → why it matters)

Minimum Debug Packet — recommended baseline set
Field Unit Rate Why it matters (evidence chain)
timestamp, device_id, fw_ver, coeff_ver, log_schema_ver per packet Ensures traces are comparable; without versions, logs cannot explain drift across updates.
adc_raw_pre_demod[ch] LSB event window (50–500 Hz) Reconstructs pickup/saturation and verifies whether noise is analog or introduced by DSP.
demod_I, demod_Q (or post-demod) LSB or engineering mid (10–50 Hz) Shows lock-in gain/phase behavior; Q growth often indicates phase misalignment or coherence loss.
phase_err (lock-in) deg mid (1–10 Hz) Direct evidence for reference integrity; correlates with residual ripple and SNR collapse.
temp_source, temp_det, temp_cell, temp_amb, temp_pcb_hot °C low (0.5–2 Hz) Explains baseline drift and warm-up; enables gradient diagnosis vs compensation masking.
heater_duty (and optional PID e/u) % low (0.5–2 Hz) Distinguishes thermal instability from sensor drift; validates settling time and disturbance rejection.
excitation_I/excitation_V (TCD/NDIR source) mA / V low (1–10 Hz) Detects excitation drift or modulation depth loss; separates “sensor changed” vs “drive changed.”
rail_afe, rail_adc_ref, rail_iso, rail_main V low (1–10 Hz) Captures brownout/UVLO events and noise coupling across islands; supports isolation diagnosis.
snr_est, baseline_rms, drift_slope dB, LSB, LSB/s low (0.5–2 Hz) Quantifies “can trust output” and correlates with EMI/leakage/thermal disturbances.
converged, warmup_valid, overload_recovery bool / s low (0.5–2 Hz) Prevents baseline updates during transient tails; explains “works then suddenly wrong” reports.
cal_age, cal_valid, last_residual h / bool / %FS low (0.1–1 Hz) Links output accuracy to calibration truth; enables deterministic maintenance triggers.
fault_flags (open/short/sat/iso/ot/eol) bitmask event + low Drives triggers for raw capture; provides immediate bucketization for fault trees.
action_code (CHECK_SYNC, CHECK_LEAKAGE, …) enum event Turns evidence into a first-step; reduces “random debugging” time dramatically.

Hardware hooks (example MPNs) that make the logs trustworthy

Telemetry is only as good as the measurement chain. The following example parts are commonly used to implement stable sensing, reference integrity, isolation, and event-safe logging.

Example MPNs (multi-vendor) — pick by noise, drift, and isolation targets
Subsystem Example MPNs Why it helps diagnostics
Precision ADC TI ADS124S08, ADS1220; ADI AD7124-4/AD7124-8; Microchip MCP3564 Stable raw channels (pre/post demod) with low noise; enables meaningful PSD and drift tracking.
Low-noise op-amp (TIA/filters) TI OPA188, OPA189, OPA140; ADI ADA4522-2, ADA4530-1; Microchip MCP6V51 Reduces baseline drift and offset uncertainty so logs reflect environment faults rather than amplifier artifacts.
Instrumentation amp (bridge) TI INA333, INA826; ADI AD8421; Maxim MAX4208 Improves bridge differential integrity; makes excitation/bridge imbalance telemetry interpretable.
Voltage reference TI REF5025 / REF5050; ADI ADR4525 / ADR4550; Maxim MAX6070 Reference stability ties directly to raw ADC credibility, drift/day estimates, and calibration residuals.
Digital isolator TI ISO7741 / ISO7842; ADI ADuM141E / ADuM1250; Silicon Labs Si86xx Prevents ground-loop corruption; logs can separate sensor-head issues from mainboard noise.
Isolated DC-DC Murata NXJ1S; RECOM R05P05S; TI SN6505 + transformer (driver) Sensor-island supply stability; rail telemetry becomes meaningful and repeatable across installations.
High-side / eFuse (rail monitor) TI TPS25940, TPS2660; ADI LTC4368; Infineon PROFET family (varies) Captures surge/brownout events; supports deterministic “rail fault → recovery” logging.
TVS / protection Littelfuse SMBJxx, SMAJxx; Nexperia PESD series; TI TPD1E10B06 Enables ESD event classification; reduces “mystery resets” and protects high-impedance inputs.
Temp sensor TI TMP117, TMP102; ADI ADT7420; Maxim MAX31865 (RTD interface) Accurate thermal evidence (gradient + settling time) for compensation validation and drift separation.
Non-volatile storage Winbond W25Qxx (SPI NOR); Microchip 24LCxx (I²C EEPROM); Cypress/Infineon FM24Cxx (FRAM) Stores coefficients, validity flags, and debug snapshots safely across brownouts and field events.
RS-485 PHY (DMX/long cable, optional) TI SN65HVD178x; ADI ADM485; Maxim MAX13487E Robust comm telemetry over long cables; supports isolation diagnosis and CRC/err-rate logging.
MPNs above are representative examples for each function block. Final selection should match noise density, input bias/leakage, isolation rating, and the chosen sampling/modulation strategy.

Evidence dashboard logic (signals → metrics → fault tree)

  • If baseline drifts: check temp gradients + heater duty + leakage indicators + rail noise; only then adjust compensation.
  • If SNR collapses: check phase_err + coherence + ADC saturation + excitation ripple; verify with event-window raw capture.
  • If “random jumps” appear: correlate with cable/ESD flags, rail dips, and isolation fault counters.
Evidence Dashboard Signals → Metrics → Flags → Actions, driven by a minimal debug packet Signals ADC pre Demod I/Q Temps Heater duty Excitation Rails Metrics SNR Baseline Phase err Converged Cal age Flags & Actions Flags open/short sat / iso ot / eol CHECK_SYNC CHECK_LEAK RECAL Minimum Debug Packet Header High-rate Mid/Low Event window
Figure: Evidence Dashboard. Cite this figure

Request a Quote

Accepted Formats

pdf, csv, xls, xlsx, zip

Attachment

Drag & drop files here or use the button below.
Chapter 12

FAQs (Troubleshooting Accordion)

Each answer follows the same evidence-chain structure: 1) short answer, 2) what to measure, 3) first fix, 4) where to read (chapter link).

1 NDIR reading drifts with ambient temp—source aging or detector/TIA drift? Maps to: H2-4 / H2-7 / H2-10
Short answer: Separate thermal coefficient drift from optical/source aging by correlating output with temperature zones and reference/drive telemetry.
What to measure:
  • Detector/TIA baseline vs temp_det and temp_amb (slope + repeatability).
  • Source drive telemetry: excitation_I/mod depth proxy (or current ripple) vs time.
First fix:
  • Lock the measurement to a stable thermal state (warm-up valid) and re-check drift; then update compensation tables only after stability is proven.
Where to read: H2-4 H2-7 H2-10
2 Lock-in output unstable—phase misalignment or aliasing? Maps to: H2-4 / H2-9
Short answer: If the phase error wanders, it is alignment/coherence; if phase is stable but noise rises, suspect aliasing/out-of-band pickup folding in.
What to measure:
  • phase_err (or I/Q balance) while holding modulation frequency constant.
  • FFT/PSD of adc_raw_pre_demod to identify strong out-of-band aggressors near harmonics.
First fix:
  • Enforce coherent sampling (reference-aligned windows) and tighten the anti-alias filter before changing demod math.
Where to read: H2-4 H2-9
3 Works on bench, fails in enclosure—thermal gradient or ground loop? Maps to: H2-7 / H2-8
Short answer: Enclosure failures are usually either new thermal gradients (sensor vs PCB) or new return/shield paths creating common-mode coupling.
What to measure:
  • Temperature map: temp_cell, temp_pcb_hot, temp_amb and heater duty during the failure.
  • Noise delta with/without external cable/shield connection (CM sensitivity test).
First fix:
  • Stabilize thermal zones first; if the symptom persists, re-terminate shield/earth consistently and validate isolation partitioning.
Where to read: H2-7 H2-8
4 TCD bridge saturates at startup—excitation loop or sensor overheat? Maps to: H2-5 / H2-7
Short answer: Startup saturation is most often an excitation transient (loop overshoot) or self-heating exceeding the safe thermal time constant.
What to measure:
  • Excitation step response: excitation_V/I and bridge differential during the first seconds.
  • Local temperature rise near the bridge element (temp_pcb_hot or sensor temp if available).
First fix:
  • Implement a soft-start (slew-limit) on excitation and verify loop stability margins before increasing drive.
Where to read: H2-5 H2-7
5 TCD sensitivity varies with airflow—mechanical/thermal time constant issue? Maps to: H2-5 / H2-7
Short answer: Airflow changes the thermal boundary conditions; if the measurement is not time-constant aware, sensitivity appears to “change.”
What to measure:
  • Step response of bridge output vs airflow changes (time-to-settle and overshoot).
  • Temperature gradient between sensor region and ambient (temp_cell vs temp_amb) under airflow.
First fix:
  • Re-tune the excitation/CTA control dynamics (or sampling/averaging) to match the dominant thermal time constant.
Where to read: H2-5 H2-7
6 EC zero baseline won’t settle—leakage, bias error, or contamination? Maps to: H2-6 / H2-9 / H2-10
Short answer: A baseline that never settles is usually dominated by leakage/bias instability or recovery tails after overload—contamination is suspected when recovery time steadily grows.
What to measure:
  • Bias node stability (reference/bias voltage) and baseline_rms / drift slope over time.
  • Leakage sensitivity: baseline shift vs humidity/board state (cleaning vs contaminated).
First fix:
  • Audit leakage paths (input protection, contamination, guarding) before changing the baseline algorithm.
Where to read: H2-6 H2-9 H2-10
7 EC signal noisy when cable moves—triboelectric noise or shielding termination? Maps to: H2-9 / H2-8
Short answer: Motion-correlated bursts point to triboelectric cable noise; continuous hum-like rise often points to shield termination/grounding errors.
What to measure:
  • Event-window raw capture while moving the cable (PSD/burst signature correlation).
  • Noise delta vs shield termination strategy (single-point vs both-ends, earth vs floating).
First fix:
  • Apply strain relief and standardize shield termination at the isolation boundary (do not “guess” per install).
Where to read: H2-9 H2-8
8 50/60 Hz hum dominates—filtering or grounding? Maps to: H2-9 / H2-8
Short answer: If hum amplitude changes with cable/shield contact, it is grounding/CM coupling; if hum stays constant, filtering and coherent sampling are the primary levers.
What to measure:
  • Hum peak amplitude in FFT (50/60 + harmonics) under different shield/earth states.
  • Notch effectiveness and residual ripple after demod/decimation (post-demod metrics).
First fix:
  • Fix ground/shield termination first if hum is contact-sensitive; otherwise implement notch + anti-alias without breaking coherence.
Where to read: H2-9 H2-8
9 Calibration fails after weeks—source power drift or coefficient storage corruption? Maps to: H2-3 / H2-10
Short answer: Source drift changes the measurement physics, while coefficient corruption changes the interpretation—distinguish by validating drive telemetry and coefficient version/CRC logs.
What to measure:
  • Drive telemetry trend: excitation_I stability and modulation depth proxy vs time.
  • Coefficient integrity: version, CRC/pass flags, last residual, and write events (brownout history).
First fix:
  • Add atomic/verified writes (CRC + version + rollback) for coefficient storage before re-tuning calibration logic.
Where to read: H2-3 H2-10
10 Self-test passes but readings wrong—test injection point missing a failure mode? Maps to: H2-10 / H2-11
Short answer: A self-test that bypasses critical nodes can pass while real measurements fail—ensure injection covers the same nodes and bandwidth as the real signal path.
What to measure:
  • Compare self-test response and real-signal response at the same observation point (pre/post demod where applicable).
  • Check whether the test stimulus excites phase/coherence and anti-alias behavior (not just DC gain).
First fix:
  • Move/add injection points so the test traverses the full chain (AFE → demod → ADC → DSP), not a shortcut.
Where to read: H2-10 H2-11
11 After isolation added, noise improved but offset changed—bias path or barrier leakage? Maps to: H2-8 / H2-6
Short answer: Isolation can break unintended return paths (good) but also alter bias references and leakage distribution (offset shift); verify bias references across the barrier.
What to measure:
  • Bias node and reference voltages on both sides of isolation (before/after change).
  • Offset shift vs humidity/temperature to detect barrier leakage or board contamination effects.
First fix:
  • Define a single authoritative bias/reference domain and ensure the isolated island references are explicit, not accidental.
Where to read: H2-8 H2-6
12 Heater control oscillates—PID tuning or sensor placement? Maps to: H2-7
Short answer: Oscillation is either loop tuning too aggressive for the thermal time constant, or the temperature sensor is not measuring the controlled thermal mass.
What to measure:
  • Heater duty and temperature step response: overshoot, settling time, and disturbance rejection.
  • Gradient evidence: delta between temp_pcb_hot, temp_cell, and ambient during oscillation.
First fix:
  • Move the sensor closer to the controlled mass (or add a second sensor) before tightening PID gains.
Where to read: H2-7
Tip: Keep FAQ answers scoped to the evidence chain (measure → first fix → chapter). Avoid introducing new subsystems or “platform” recommendations inside FAQ responses.
FAQ Evidence Flow Symptom → What to measure → First fix → Chapter Symptom drift • noise • hum Measure raw • temp • phase First fix coherent • shield Where to read (chapters) Lock-in / AFE H2-4 Thermal H2-7 Isolation H2-8 Noise/EMC H2-9 Cal / Drift H2-10 Telemetry H2-11
Figure: FAQ Evidence Flow. Cite this figure
Optional MPN anchors (for FAQ context): precision ADC (TI ADS124S08 / ADI AD7124-8), chopper op-amp (TI OPA188 / ADI ADA4522-2), digital isolator (TI ISO7741 / ADI ADuM141E), temp sensor (TI TMP117 / ADI ADT7420), FRAM (Infineon/Cypress FM24Cxx).