← AXS-045

Circuit review & bench-test guide

AXS-045 — MQ-series combustible-gas carrier PMOD module

Design-stage — board not yet fabricated

Document purpose#

This document explains the axs-045-gas carrier at component level and turns the design evidence into a manual-review and bench-test plan. It is based on generate_design.py, the generated schematic, the README, and manufacturer documentation for the MQ-2 sensing element, the TI ADS7042 ADC, and the Nexperia BAT54S clamp.

The board is an unfabricated prototype: schematic generated, ERC clean (0/0), netlist reviewed, no PCB layout, no fabricated board, no BOM export, no bench results. The Phoenix terminal MPN is TBD:. The plug-in is a generic "MQ-2 comparator breakout" whose pin order and comparator behavior vary by vendor — the carrier can only be validated together with a specific purchased breakout.

1. What the board does#

The carrier hosts a common MQ-2 breakout (LPG/propane/smoke, SnO₂ heated element) on a 1×4 socket and makes its two outputs safe for a 3.3 V PMOD:

The MQ-2 heater requires external 5 V on screw terminal J3 (~150 mA class, continuous — the element runs hot by design).

Functional block diagram#

EXT 5 V ──> J3 ──┬──> J2 pin 1 VCC ──> MQ-2 breakout (heater + comparator)
                 ├── C4 100 nF
                 └── C5 10 µF
J2 pin 4 AO ──> R1 10 k ──┬── R2 18 k ──> GND          (GAS_DIV = AO × 18/28)
                          └── R3 1 k ──┬──> U1 AINP (GAS_FILT)
                                       └── C3 10 nF ──> GND
J2 pin 3 DO ──> R4 10 k ──> GAS_DO ──> PMOD pin 2
                              └── D1 BAT54S: A1→GND, K2→3V3 (clamp)
U1 ADS7042 (AVDD=DVDD=3V3, AINM=GND): SCLK=PMOD4, CS_N=PMOD1,
  SDO ── R5 100 Ω ──> MISO (PMOD pin 3);  C1 100 nF + C2 1 µF on 3V3

2. Safety and scope boundaries#

3. Supply sequencing, common ground, and no-host behavior#

  1. Common ground first. J3 GND, J2 pin 2, and PMOD GND are one net; buzz before power.
  2. Recommended order: PMOD host on first (3V3 present), then J3 5 V. Power down in reverse (5 V off first). Reason: with 5 V present and 3V3 absent, the breakout drives the carrier's protection networks into an unpowered ADC and a dead rail:
  1. 5 V with no PMOD host attached at all: the heater runs and the board gets warm; AO/DO drive into open or clamped nets at sub-mA levels. No damage expected, but there is also no reason to operate this way.
  2. The heater is a near-resistive ~31 Ω load: expect ≈160 mA continuous from J3 with a cold-start inrush slightly above that as the coil warms.

4. Plug-in module verification (read before first power)#

Mandatory section. MQ-2 breakout pin orders genuinely vary between vendors, and a swapped VCC/AO or VCC/GND connection can burn the divider or feed 5 V where it must not go.

4.1 Pin-order check against the breakout silkscreen#

The carrier assumes J2 order 1 VCC (5 V), 2 GND, 3 DO, 4 AO. Common breakouts also ship as VCC/GND/AO/DO (DO and AO swapped) and other orders. Before fitting a breakout:

  1. Read the breakout silkscreen next to its 4-pin header; write the order down. If the silkscreen is ambiguous, trace the board: VCC feeds the heater pins and the LM393; AO comes from the sensing-element divider; DO from the LM393 output/pull-up.
  2. With the carrier unpowered and the breakout unplugged, buzz carrier J2 pin 1 to the J3 +5 V terminal and pin 2 to GND.
  3. Confirm the breakout's VCC pin will land on J2 pin 1 and GND on pin 2 in the actual insertion orientation. A 1×4 socket has no key — mark the orientation on both boards with paint before first power.
  4. Consequences of getting it wrong: AO into the VCC position puts 5 V onto the divider continuously (survivable: 5 V across 28 k) — but DO into the VCC position leaves the breakout unpowered, and VCC into the AO position feeds the heater current path through R1/R2, burning 0603 resistors. Check twice.

4.2 Plug-in key specifications (Hanwei MQ-2 element; breakout-level notes)#

ItemManufacturer value (MQ-2 element)Bench relevance
Heater voltage VH5.0 V ± 0.2 V AC or DCJ3 setting; keep ≤5.0 V to protect the divider margin (section 6)
Heater resistance RH31 Ω ± 3 Ω at room temperature≈150–165 mA continuous from 5 V (README's "~150 mA" is this number)
Heater power PH≤900 mWThe breakout runs hot; that is normal
Loop voltage VC≤24 V DC (element rating; breakout uses 5 V)AO can range 0 to ~VCC
Sensing resistance RS2–20 kΩ in 2000 ppm propaneWide part-to-part spread — per-unit characterization required
Detection range300–10000 ppm combustible gasQualitative bench response only
Preheat / burn-in"Over 48 hours" standard preheat timeSee honesty note below
Poisoning/degradationSilicone vapors, corrosive gas, salt, water, freezingStorage and handling rules

Burn-in honesty note: the Hanwei datasheet's standard test condition is a preheat of over 48 hours. Community practice quotes 24–48 h for a stored sensor to drift back to a stable baseline, and minutes-scale warm-up before any single session's readings settle. Consequences for this project: (a) no quantitative result from a freshly unboxed sensor means anything; (b) the bench plan below deliberately grades only relative response and interface correctness, not ppm accuracy; (c) if the module is stored unpowered for months, budget another long burn-in (the datasheet notes reversible resistance drift in storage requiring re-aging).

Breakout-level cautions (vendor-dependent, verify per unit): the LM393 comparator's threshold is set by an on-board trimpot; DO polarity differs between boards (many pull DO low on detection with an LED indicator); and the DO pull-up is commonly a 1–10 k resistor to VCC = 5 V — the reason for R4/D1.

5. Component-by-component review#

#FLG01#FLG03 are ERC power flags, not physical parts.

5.1 Connectors and ADC#

Ref.Part / valueFunction and why neededIf absent/openIf shorted, wrong, or misassembled
J12×6 right-angle PMOD plug (MPN TBD:)Host SPI (Type 2) + GAS_DO on pin 2No host linkMirrored assembly puts rails on signals — verify pin-1 orientation
J21×4 pin socket 2.54 mm (MPN TBD:)Breakout socket, order VCC/GND/DO/AONo sensorUnkeyed: reversed or offset insertion misroutes 5 V — see 4.1
J3Phoenix MKDS 1,5/2-5,08 (MPN TBD:)External 5 V for the heaterHeater never runs; AO meaninglessReversed polarity feeds −5 V to the breakout; loose contact cycles the heater and ruins stability
U1TI ADS7042IDCUR, VSSOP-812-bit 1 MSPS SAR ADC; AVDD (=3V3) is also the referenceNo analog readingsPinout is verified against the datasheet (DCU: 1 DVDD, 2 SCLK, 3 SDO, 4 CS, 5 AINM, 6 AINP, 7 AVDD, 8 GND) — rotation/misplacement swaps supply onto SDO; poor VSSOP soldering shows up as stuck codes
D1Nexperia BAT54S,215, SOT-23Series Schottky pair: pin 1 A1→GND, pin 2 K2→3V3, pin 3 (K1;A2 midpoint)→GAS_DO; clamps to −VF…3V3+VFDO can drive ~5 V into the FPGA pin (through R4) — the exact hazard this part exists to stopWrong orientation/rotation clamps the wrong node or shorts GAS_DO to a rail; BAT54S specifically (series variant) — A/C variants wired identically would not clamp correctly

5.2 Resistors and capacitors#

Ref.Value / partFunctionIf omitted or wrong
R110 kΩ, RC0603FR-0710KLAO divider topOpen: ADC reads 0 (via R2/R3 to GND). Value error changes scale silently — see calibration test
R218 kΩ, RC0603FR-0718KLAO divider bottom: 5 V × 18/28 = 3.214 VOpen: GAS_DIV floats to AO level — up to ~5 V at the RC, exceeding AVDD+0.3 at the ADC input (R3 limits current). Short: ADC always 0
R31 kΩ, RC0603FR-071KLSource resistor / anti-alias into the SAR charge bucket with C3Open: AINP floats; Short: SAR kickback noise increases slightly — benign
C310 nF 50 V C0G, GRM1885C1H103JA01DCharge reservoir + RC filter (fc ≈ 15 kHz with R3; the divider impedance raises the effective time constant)Open: conversion droop/noise; wrong dielectric (X7R) adds distortion — C0G is deliberate
R410 kΩ, RC0603FR-0710KLDO series limiter into the clamp; with DO at 5 V, clamp current ≈ (5 − ~3.5)/10 k ≈ 0.15 mADo not bypass. Open: DO reads nothing. Short (0 Ω): clamp current rises ~×100 and D1/3V3 rail absorb mA-level injection
R5100 Ω, RC0603FR-07100RLSeries protection on ADC-driven SDOOpen: MISO floats; host reads 0xFFF/garbage
C1100 nF 16 V X7R, GRM188R71C104KA01DU1 AVDD/DVDD decoupling at the pinsConversion noise, worse INL — the datasheet's layout guidance calls for close placement
C21 µF 16 V X5R, GRM188R61C105KA93DReference/bulk decoupling for U1 (AVDD is the reference)Reference droop during conversions → gain wobble
C4100 nF 16 V X7RBreakout supply decouplingHF noise on the 5 V at the socket
C510 µF 10 V X5R, GRM21BR61A106KE19LHeater bulk on EXT_5VDroop at connection/inrush; benign but present for lead inductance

6. Datasheet summary and design interpretation#

DeviceKey manufacturer factsBoard-specific interpretation
MQ-2 (Hanwei)VH 5.0±0.2 V, RH 31±3 Ω, PH ≤900 mW, RS 2–20 kΩ @2000 ppm propane, preheat >48 h, 300–10000 ppmHeater current ≈ 5.0/31 ≈ 161 mA nominal (144–179 mA over RH tolerance); J3 and wiring must handle it continuously
ADS7042 (TI SBAS608C)12-bit, 1 MSPS, AVDD 1.65–3.6 V is the reference, AINP range 0–AVDD (abs max AVDD+0.1 V operating, +0.3 abs), SCLK ≤16 MHz, CS-framed 16-clock read with 2 leading zeros, offset calibration on power-up3V3 AVDD ⇒ 1 LSB ≈ 0.81 mV; full-scale = 3.3 V so divider output must stay below it
Divider margin5.00 V × 18/28 = 3.214 V; with ±1 % resistors worst case ≈ 3.26 V; with J3 at 5.25 V ≈ 3.42 VMargin is thin: keep J3 at 5.0 V or below. A 5.25 V "USB high" supply can push AINP past AVDD at full-scale AO. Bench rule: J3 = 5.00 V regulated
BAT54S (Nexperia, 2022-07-01)30 V VRRM, 200 mA IF, VF ≤240 mV @0.1 mA / ≤320 mV @1 mA, IR ≤2 µA @25 V; pins: 1 A1, 2 K2, 3 K1;A2At ~0.15 mA clamp current GAS_DO tops out near 3.3 + 0.25 ≈ 3.55 V — within the FPGA's VCCIO+0.3 ≈ 3.6 V window, but measure it (section 9.D)

Official references: MQ-2 datasheet (Hanwei, Pololu mirror), ADS7042 datasheet SBAS608C / product page, BAT54S datasheet (Nexperia).

7. Expected values before bench testing#

QuantityDesign target / calculatedWhat to measure
Heater current≈161 mA nominal (144–179 mA range)J3 supply readout after 1 min
EXT_5V5.00 V regulated (do not exceed — divider margin)DMM at J2 pin 1
Divider ratio18/28 = 0.6429; 3.214 V out for 5.000 V inKnown-source test, section 9.C
ADC code for AINP = 3.214 V≈ 3989 of 4095 (AVDD = 3.300 V)SPI readback
GAS_DO clamped high level≈3.4–3.6 V worst case (3V3 + VF at ~0.15 mA)DMM/scope at PMOD pin 2, section 9.D
GAS_DO clamped low≥ −0.3 VScope during DO falling edges
SPIMode 0, CS-framed, 2 leading zeros + 12 bits MSB-first, SCLK ≤16 MHzLogic analyzer
Warm-upMinutes for session stability; >48 h burn-in for baselineLog AO vs time

8. Manual schematic and assembly review checklist#

9. Ordered bench-test procedure#

Stop at the first abnormal result.

A. Unpowered checks#

  1. Socket empty: resistance EXT_5V-to-GND, 3V3-to-GND, GAS_DO-to-3V3/GND (expect diode signatures through D1 in diode mode: ~0.3 V to both rails).
  2. Buzz J3 GND ↔ PMOD GND ↔ J2 pin 2.
  3. Verify divider: with the socket empty, inject nothing yet — just measure R1+R2 from the AO pad to GND ≈ 28 k, and R3 from GAS_DIV to GAS_FILT.

B. ADC alone (no breakout fitted)#

  1. Host on. Read the ADS7042 with AINP tied through the empty socket's AO pad left floating: short the AO pad to GND briefly — codes near 0 (±12 LSB uncalibrated offset per datasheet).
  2. Feed a known voltage (bench PSU through 1 k) into the AO pad: 1.000 V → expect code ≈ round(1.000 × 0.6429/3.300 × 4095) ≈ 797. Step 2.000 V (~1595), 3.000 V (~2392), 5.000 V (~3989). This is the AO divider scaling verification: fitted ratio error must match resistor tolerance (±2 % worst) and be recorded as this board's calibration constant.
  3. Confirm 28/18 recovery math in fabric returns the injected voltage.

C. DO clamp test (no breakout fitted)#

  1. Inject 5.00 V through the socket's DO pad (current-limited supply). Measure GAS_DO at PMOD pin 2: expect ≈3.4–3.6 V, and compute clamp current from the drop across R4 (≈0.15 mA). It must never read 5 V.
  2. Inject −1 V briefly through 10 k external: GAS_DO must clamp near −0.2…−0.3 V.
  3. Raise injection to 6 V: clamped level rises only by the VF slope. Record. (This bounds the "cheap breakout with hard 5 V pull-up" case with margin.)

D. First power with the breakout#

  1. Verify section 4.1 orientation marks. Host on, then J3 at 5.00 V, 300 mA limit.
  2. Current ≈150–180 mA; the element warms; burnt-dust smell on a new unit is normal for a few minutes.
  3. Log AO (via ADC) for 15 minutes: expect a large initial transient settling toward a baseline. Do not interpret absolute values within the first 24–48 h of cumulative powered time (burn-in note, section 4.2).
  4. Gas response (qualitative): a brief unlit-lighter puff at ~10 cm in a ventilated area — ADC value rises promptly and decays. Record shapes, not ppm.
  5. DO behavior: adjust the breakout trimpot so DO trips during the puff; confirm GAS_DO edge polarity (many boards drive DO low on detection) and clamped levels on the scope. Record polarity for the HDL.

E. Soak#

  1. 24 h powered soak (part of burn-in anyway): log ADC baseline drift, heater current, and J3/J2 terminal temperatures.

10. Troubleshooting map#

SymptomFirst measurementsLikely areas
No heater currentJ3 voltage, J2 pin 1Breakout orientation, J3 wiring, socket contact
ADC always 0GAS_DIV, GAS_FILT voltagesR1 open, R2 short, AO not at pad 4 (pin-order error), U1 solder
ADC always full-scaleAINP vs AVDDR2 open, AO/VCC swapped at the socket, AVDD missing
Scale off by ~×0.56Ratio from known-source testR1/R2 swapped
Codes noisyC3 present? C1/C2 at U1? SCLK integrityMissing/wrong-dielectric C3, decoupling, long SPI leads
GAS_DO reads ~5 VR4/D1 present and orientedUnsafe: clamp defeated — stop and rework
DO never tripsTrimpot, DO at socket vs after R4Comparator threshold, R4 open, DO polarity assumption
Baseline drifts for daysCumulative powered hoursNormal MQ burn-in; keep logging

11. Bench record template#

FieldRecord
Board serial / assembly variant
Breakout vendor, silkscreen order, orientation photos
MQ-2 cumulative powered hours (burn-in tracker)
Divider calibration constant (measured ratio)
ADC known-source results
DO clamp levels (5 V and 6 V injection)
Heater current, terminal temperatures
Gas-puff response record (qualitative)
DO polarity for HDL
24 h soak result
Reviewer / date / disposition

12. Review conclusion#

This carrier takes the right lessons seriously: the 5 V heater lives on an external terminal, the analog path is divided and filtered into a properly decoupled ADC whose pinout matches the datasheet, and the one genuinely dangerous line (DO with a 5 V pull-up) gets both a series limiter and a verified-pinout BAT54S rail clamp. The principal risks are (1) breakout pin-order variation into an unkeyed 1×4 socket — the only class of error here that burns parts; (2) thin divider headroom if J3 drifts above 5.0 V — regulate it; (3) the MQ-2's >48 h burn-in and wide RS spread, which make any quick quantitative claim dishonest; and (4) no layout, fabrication, or bench evidence yet at this revision.