← AXS-004

Circuit review & bench-test guide

AXS-004 — Vibration sensor PMOD module

Design-stage — board not yet fabricated

Document purpose#

This document explains the axs-004-vibration PMOD module at component level and turns the design evidence into a practical manual-review and bench-test plan. It is based on the implemented schematic generator (generate_design.py), the module README, the sensor-line conventions in ../README.md, and the verified Pmod-spec notes in ../../pmod-common/PMOD-SPEC-NOTES.md.

This board is a schematic-complete prototype. It has NOT been laid out, fabricated, assembled, or bench-verified. Repository status: schematic generated, ERC clean (0 errors / 0 warnings), netlist reviewed; PCB layout not started. All voltages, time constants, and trip points below are calculated design targets to verify on a first article, not proof that a board works. The SW-420 spring element itself is a generic commodity part with no controlled datasheet (MPN TBD in the schematic) — its behavior is characterized on the bench, not specified.

1. What the board does#

An SW-420 spring-contact vibration element chatters open/closed when shaken. A 1 MΩ pull-up biases its node high; a 10 kΩ / 100 nF RC smooths the chatter into an analog dip; an LMV7219 push-pull comparator slices that dip against a threshold set by a 10 kΩ trimmer (RV1). The host sees clean, fast digital pulses on PMOD Type 1 pin 1 (VIB): the line idles high and pulses LOW while the filtered node is below the trimmer threshold. This is the line's comparator lesson: an analog threshold turns a noisy mechanical contact into countable events, and RV1 makes the threshold-versus-event-rate trade-off tangible.

Functional block diagram#

      3V3 ──┬────────────┬──────────────────┬───────────┐
            │            │                  │           │
           R1 1M        RV1 10k trim       C1 100nF     │
            │            │ (track 3V3→GND)  │ (U1       │
            v            │                 GND  bypass) │
        VIB_ELEM         ├── wiper ── VIB_TH            │
            │            │              │               │
   J2 ── SW-420          │              v               v
   spring element       GND        ┌─ −IN ─────────┐
            │                      │  U1 LMV7219   │── VIB_CMP ── R3 100R ── VIB
           GND        VIB_FILT ────┤ +IN (push-    │              (PMOD pin 1)
            │            ^         │  pull out)    │
            └── R2 10k ──┤         └───────────────┘
                         │
                        C2 100nF
                         │
                        GND

  Idle: element open → VIB_FILT high → +IN > −IN → VIB high.
  Shake: contact chatters → C2 discharges via R2 (τ≈1 ms) → VIB_FILT dips
  below VIB_TH → VIB pulses low; recovers via R1+R2 (τ≈101 ms).

2. Safety and scope boundaries#

3. Theory of operation and signal sequence#

  1. At rest the SW-420's internal spring does not touch its center pin; the element is open. R1 (1 MΩ) pulls VIB_ELEM toward 3.3 V, and C2 charges through R1+R2 so VIB_FILT approaches 3.3 V.
  2. Bias-current caveat (calculated, must be verified): the LMV7219's input bias current (450–500 nA typ, 950 nA max at 25 °C, 2 µA max over temperature per the datasheet) flows through R1+R2 ≈ 1.01 MΩ. The idle VIB_FILT therefore sits BELOW 3.3 V by roughly 0.45 V typical — possibly ~1 V at 25 °C worst case and ~2 V at temperature extremes, depending on bias-current direction. The threshold must be set against the MEASURED idle voltage (procedure 9.C), never assumed to be 3.3 V.
  3. Vibration makes the spring chatter against the center pin, pulling VIB_ELEM low in sub-millisecond bursts. Each closure discharges C2 through R2 with τ = 10 kΩ × 100 nF = 1.0 ms; dense chatter walks VIB_FILT down.
  4. When VIB_FILT crosses below VIB_TH (RV1's wiper voltage), U1's output snaps low in ~10 ns with clean edges guaranteed by ~7 mV of internal hysteresis — no output chatter even on slow crossings.
  5. When chatter stops, C2 recharges through R1+R2 with τ ≈ 101 ms, so VIB_FILT climbs back and VIB returns high tens of milliseconds later (e.g., ~70 ms to recross a mid-scale threshold from a full dip). The asymmetric RC (fast fall / slow rise) deliberately stretches events into countable pulses and caps the event rate at a few Hz.
  6. The host counts pulses or integrates low-time in fabric to grade shake intensity; turning RV1 changes how deep a dip must be to count.

4. Interfaces#

PMOD Type 1 (GPIO) per Digilent Pmod Interface Specification 1.2.0; pin-1 orientation as verified in ../../pmod-common/PMOD-SPEC-NOTES.md.

PMOD pin123456789101112
NetVIBNCNCNCGND3V3NCNCNCNCGND3V3

VIB is module-driven, idles high, pulses low during vibration.

NodeWhereExpected role
VIB_ELEMJ2 pin 1 / R1 / R2 junctionRaw chattering element node
VIB_FILTR2 / C2 / U1 +IN junctionFiltered analog dip
VIB_THRV1 wiper / U1 −INDC threshold — the DMM node for setup
VIB_CMPU1 OUT / R3Comparator output before series protection
VIBPMOD pin 1Host-side digital line

5. Component-by-component review#

5.1 Sensing element, comparator, threshold#

Ref.Part / datasheet summaryFunction and why neededIf absent/openIf shorted, wrong, or misassembled
J112-pin right-angle PMOD plug, 2×6, 2.54 mmSole power and signal interfaceNo functionMisaligned mating can short 3V3 to a signal; mirrored pin 1 reverses power
J21×2 THT pad pair (PinHeader footprint used as plain pads)Mounting pads for the bare SW-420 spring element, which is non-polarized; one side to VIB_ELEM, one to GNDNo element: VIB_FILT idles high (minus bias droop) and the board never triggersA bridged pad pair holds VIB_ELEM at GND → VIB stuck low once below threshold; a cold joint makes an intermittent "sensor" that responds to board flex instead of vibration
SW-420 element (on J2; MPN TBD)Generic spring-and-pin vibration contact — NO controlled datasheet exists; behavior (sensitivity axis, chatter density, contact resistance) is uncontrolled commodity behaviorThe transducer: converts mechanical shake into contact chatterSee J2Element orientation affects sensitivity axis (roughly axial); mounting it horizontally vs vertically changes the response — decide and silkscreen it at layout time
U1TI LMV7219 (SNOS458I), 7 ns comparator, 2.7–5 V, push-pull rail-to-rail output, SOT-23-5Slices VIB_FILT against VIB_TH; push-pull output needs no pull-up and drives the line both ways; ~7 mV internal hysteresis stops output chatter on slow rampsNo digital output; VIB floats (R3 connects to a dead pin)Pinout is OUT/V−/+IN/−IN/V+ (1/2/3/4/5): a rotated part swaps supply onto inputs; swapped +IN/−IN inverts the logic (VIB idles LOW — instantly visible)
RV1Bourns TC33X-2-103E, 3 mm SMD trimmer, 10 kΩ, ±25%, 270°±20° adjust angle, rotational stopFull-span 3V3-to-GND divider; wiper sets the comparator threshold anywhere from ~0 to ~3.3 V−IN floats → output undefined/chatteringTrack open at one end turns the divider into a rheostat (threshold pegged); wiper-open is the classic trimmer failure → floating −IN; note the track burns 0.33 mA continuously (1.1 mW — fine vs 0.15 W rating)

5.2 Bias, filter, protection, decoupling#

Ref.Value / partPurposeWhat is lost if omittedImportant failure/review point
R11 MΩ (Yageo RC0603FR-071ML)Element bias: holds VIB_ELEM high with only 3.3 µA flowing when the contact closes — a wetting current gentle enough for a commodity spring contactNode floats; circuit deadThe high value is why comparator bias current matters (section 3.2); if bench results show excessive idle droop, a future rev could drop R1 to 100 kΩ at 10× the closed-contact current
R210 kΩ (Yageo RC0603FR-0710KL)With C2, the τ≈1 ms low-pass that turns chatter into an analog dip; also isolates C2 from the raw contactComparator sees raw chatter → output bursts of ns-fast edges per bounce (defeats the lesson)Value sets fall τ; open leaves +IN tracking only C2's stored charge (stuck)
C2100 nF 16 V X7R (Murata GRM188R71C104KA01D)The filter capacitor; also defines the slow τ≈101 ms recovery through R1+R2Same loss as R2A leaky/cracked C2 shifts the idle voltage and event widths
R3100 Ω (Yageo RC0603FR-07100RL)Series protection on the module-driven VIB line per the sensor-line rule; also damps U1's 2–2.5 ns output edges into the PMOD cableHost-contention exposure; possible ringing/EMI from very fast edges on an unterminated cableOpen: VIB_CMP toggles but host sees nothing
C1100 nF 16 V X7R (Murata GRM188R71C104KA01D)U1 supply decoupling — mandatory for a 7 ns comparator; TI's layout guidance calls for local bypassing to eliminate output chatterSupply bounce during output switching can retrigger the comparator (self-oscillation bursts)Must be at U1's V+/V− pins in layout — layout review item
#FLG01, #FLG02Power flags (3V3, GND)ERC bookkeeping onlyERC errorsNo physical part

6. Datasheet summary and design interpretation#

DeviceKey manufacturer facts (from the fetched documents)Board-specific interpretation
LMV7219 (TI SNOS458I, fetched and read directly)2.7–5 V recommended (5.5 V abs max); push-pull rail-to-rail output; tPD 12 ns typ at 5 mV overdrive / 10 ns typ, 20 ns max at 50 mV overdrive (2.7 V table); rise 2.5 ns / fall 2 ns; internal hysteresis 7 mV typ (trip points ±3 to ±8 mV); VOS 1 mV typ / 6 mV max; IB 450–500 nA typ, 950 nA max 25 °C, 2 µA max over temp; VCM −0.2 V to VCC−1.2 V (guaranteed CMRR window); output swing within ~200 mV of rails at 4 mA; ISC ±20 mA; IS 0.9–1.1 mA typ; −40 to +85 °C; SOT-23-5 pinout 1=OUT, 2=V−, 3=+IN, 4=−IN, 5=V+Speed is absurd overkill for millisecond signals — the value here is the clean push-pull output and built-in hysteresis. Review finding (calculated): the guaranteed common-mode range tops out at VCC−1.2 ≈ 2.1 V, yet the idle VIB_FILT (~2.8–3.3 V) and any threshold set above 2.1 V sit OUTSIDE it. This does not damage the part (abs max is VCC+0.4 V) and comparators typically still resolve correctly with one input in range, but correct operation up there is not guaranteed by the datasheet. Prefer thresholds ≤2 V; verify idle-state behavior on the bench. Second finding: IB through the 1.01 MΩ source impedance costs ~0.45 V typ of idle droop (up to ~2 V worst over temp) — the setup procedure measures rather than assumes the idle level
TC33X (Bourns TC33 datasheet REV 08/19, fetched and read directly)100 Ω–1 MΩ range (103 = 10 kΩ); ±25% resistance tolerance; absolute minimum (end) resistance for >1 kΩ parts: 2% of total max (= 200 Ω for 10 k); adjustment angle 270°±20°; TC33X-2 = rotational stop; contact resistance variation 5% max; 0.15 W at 70 °C (50 V max); −40 to +100 °C; rotational cycling life 20 cycles TRS ±10%; torque ≤11.76 mN·m; use a 1.7 mm cross-slot toolThe ±25% tolerance is irrelevant to the threshold RATIO (both halves scale together) but changes the 0.33 mA track drain ±25%. End resistance bounds the extreme settings: ~66 mV of unreachable span at each end. Note the 20-cycle rotational life rating: this trimmer is a set-and-forget part, not a user knob — say so on the silkscreen/README, or the teaching use case ("twiddle and observe") will wear it; budget trimmer replacement on lab boards
SW-420 element (no datasheet; MPN TBD)None — generic commodity spring switchAll sensitivity/chatter figures in this guide are UNVERIFIED expectations; the bench characterization (9.D/9.E) produces the real numbers

7. Expected values before bench testing#

All values are calculated design targets on an unbuilt board at 3V3 = 3.30 V.

QuantityDesign target / calculated rangeWhat to measure
Idle VIB_FILT3.3 V minus IB×1.01 MΩ: ~2.85 V typ; worst 25 °C ~2.3 V; worst over temp ~1.3 V (direction of IB unspecified — could also read ~3.3 V)DMM on VIB_FILT, board still
VIB_TH at RV1 full CCW (toward GND end)~0–66 mV (end resistance ≤200 Ω of 10 k)DMM on VIB_TH
VIB_TH at RV1 mid-position~1.65 V (ratio ½; taper linearity not specified — measure, don't trust the dial)Same
VIB_TH at RV1 full CW (toward 3V3 end)~3.23–3.30 VSame
Recommended working threshold0.5–2.0 V (inside U1's guaranteed VCM window, below any plausible idle)Set per 9.C
Idle VIB levelHigh, ≥3.1 V (push-pull swing within 200 mV of rail)DMM/scope on VIB
Active VIB levelLow, ≤200 mVScope during shake
Fall τ (dip)R2×C2 = 1.0 msScope VIB_FILT during tap
Recovery τ(R1+R2)×C2 ≈ 101 ms; e.g. ~70 ms to recross a 1.65 V threshold from a full dipScope VIB_FILT after tap
Output pulse width per tap~10–100 ms class (chatter duration + recovery to threshold; threshold-dependent)Scope/logic analyzer on VIB
Comparator edge speedtPD ~10–12 ns typ; rise 2.5 ns / fall 2 ns — appears instantaneousFast scope on VIB_CMP (informative)
Module supply currentU1 0.9–1.6 mA + RV1 track 0.33 mA (±25%) + leakage ≈ 1.2–2.0 mA idleDMM in series with 3V3
Trimmer track power~1.1 mW (vs 0.15 W rating)— (calculated only)

8. Manual schematic and assembly review checklist#

9. Ordered bench-test procedure#

Test context: either an AruviX ECP5 rev-A / Digilent-compatible 3.3 V PMOD socket, or a bench 3.3 V current-limited supply (≤20 mA) on pins 6/12 (3V3) and 5/11 (GND), plus a DMM, a two-channel oscilloscope (one channel on VIB_FILT, one on VIB), optionally a logic analyzer for pulse counting, and a 1.7 mm cross-slot trimmer tool. Stop at the first abnormal result; record everything per the template.

A. Unpowered inspection and resistance tests#

  1. Visual inspection: U1 orientation, RV1 seated square, R1/R2/R3/C1/C2 values, J2 element joints (element present, not bridged), J1 pin-1 marking.
  2. Ohmmeter, board unpowered: 3V3-to-GND should read ≈10 kΩ (RV1 track; ±25%). VIB_ELEM-to-3V3 ≈1 MΩ. VIB_ELEM-to-GND: open at rest; tap the element and watch for momentary continuity (many DMMs are too slow — absence of a beep is not a fail).
  3. Rotate RV1 gently end to end (counting against the 20-cycle life — use as few sweeps as possible): wiper-to-GND-end resistance should sweep ~0–10 kΩ smoothly with no dead zones.

B. First power-up, static levels#

  1. Apply 3.3 V, current-limited. Expect ~1.2–2.0 mA. Investigate anything above ~5 mA.
  2. DMM checks with the board still: VIB_TH equals the wiper setting; VIB_FILT reads the idle level — RECORD IT (this is the bias-droop measurement from section 3.2; compare against the ~2.85 V typ / ≥2.3 V worst-25 °C expectation, or ~3.3 V if bias flows the other way).
  3. With VIB_TH set clearly below the measured idle VIB_FILT, VIB must read high (≥3.1 V). Rotate RV1 until VIB_TH exceeds idle VIB_FILT: VIB must snap low. This proves the comparator and establishes the usable threshold band. Return the threshold below idle.

C. Threshold-trimmer setup procedure (the calibration recipe)#

  1. Board powered and mechanically still. Clip the DMM between VIB_TH (RV1 wiper) and GND.
  2. Measure idle VIB_FILT once more; call it V_idle.
  3. Set the trimmer to the expected trip points and verify the divider: full CCW ≈ 0–66 mV, mid ≈ 1.65 V, full CW ≈ 3.23–3.30 V. Deviations beyond the end-resistance allowance indicate a miswired trimmer.
  4. For a sensitive setting, set VIB_TH ≈ V_idle − 0.3 V (small dips trip it). For a coarse setting, set VIB_TH ≈ 1.0 V (only deep, sustained chatter trips it). Keep VIB_TH ≤ 2.0 V where possible to stay inside U1's guaranteed common-mode window; if V_idle − 0.3 V is above 2.0 V, note that the sensitive setting operates in the unguaranteed (but functionally expected) region and verify behavior.
  5. Record the final wiper voltage. The threshold is now a documented number, not a dial position — taper linearity is unspecified, so the DMM, not the rotation angle, is the calibration.

D. Tap test (comparator output characterization)#

  1. Scope CH1 on VIB_FILT (DC, 500 mV/div), CH2 on VIB (or VIB_CMP), timebase 20 ms/div, single-shot trigger on VIB falling.
  2. Tap the bench beside the board once, moderately. Expect: VIB_FILT dips with ~1 ms fall segments during chatter, then recovers exponentially (~101 ms τ); VIB drops to ≤0.2 V the instant VIB_FILT crosses VIB_TH and returns high cleanly on the way back — ONE edge each way, no output chatter (that is the 7 mV internal hysteresis at work; propagation delay ~10 ns is invisible at this timebase).
  3. Measure and record: dip depth, VIB low-pulse width, recovery time to threshold. Repeat 10 times for statistics.
  4. Vary tap strength: light finger tap vs firm knuckle knock. Pulse width and dip depth should grade with energy — this is the raw data for the HDL leaky-integrator exercise.
  5. Zoom (10 ns/div class, fast scope, probe on VIB_CMP) on one edge if available: rise/fall in the few-ns range confirms the push-pull stage; check for ringing after R3 on a long PMOD cable — informative for EMC later.

E. Threshold-versus-sensitivity sweep#

  1. Fix a repeatable stimulus (e.g., a pen dropped from 5 cm at a marked spot 10 cm from the module).
  2. For VIB_TH = 0.5, 1.0, 1.5, 2.0 V and V_idle−0.3 V: run 10 stimuli each; count VIB pulses with the logic analyzer or FPGA counter.
  3. Expect a monotonic trend: higher threshold (closer to idle) → more pulses per stimulus; near-zero threshold → few or none. Plot pulses vs threshold; this curve is the module's teaching artifact and the acceptance record for RV1's usable range.
  4. At each setting, also confirm zero pulses over 60 s with the bench undisturbed (false-trigger floor). If the floor is nonzero at high sensitivity, suspect building vibration first (move to a padded surface) before blaming the board.

F. Robustness checks#

  1. Continuous shake for 30 s: VIB should show a dense but bounded pulse train (recovery τ caps the rate at a few Hz); supply current stays ~2 mA; U1 barely warms (push-pull into 100 Ω + CMOS load is µW).
  2. Supply sweep 3.0–3.6 V: verify trip points scale ratiometrically (both VIB_TH and the divider-of-3V3 dip scale together — event behavior should barely change) and record V_idle at each supply.
  3. Power-cycle 10 times: VIB must always come up high with the board still (no stuck-low states).

10. Troubleshooting map#

SymptomFirst measurementsLikely areas
VIB stuck low at restVIB_TH vs VIB_FILT with DMMThreshold set above idle (RV1 position), swapped +IN/−IN, J2 bridged to GND, element jammed closed
VIB stuck high, never triggersVIB_FILT during hard shakeThreshold near 0 V (or wiper open — VIB_TH floating), element open/missing, R2 open
VIB_TH does not follow RV1Ohmmeter on RV1 unpoweredMiswired trimmer (wiper/end swap), broken wiper (forced past stop)
Idle VIB_FILT far below 3.3 VCompare with section 7 bias-droop mathNormal IB droop (verify magnitude); if ≫2 V low: leaky C2, contaminated flux across the 1 MΩ node, damaged U1 input
Output chatters/bursts at threshold crossingsC1 presence, layout proximity to U1Missing/remote decoupling (TI layout note), VIB_CMP coupling back into the high-impedance input nodes
Pulses at host absent, VIB_CMP fineBoth sides of R3R3 open
Nonzero false-trigger floorMove board to padded surface, re-runEnvironmental vibration, threshold too close to idle
Supply current ≫2 mARV1 track resistance, U1 temperatureWrong RV1 value/miswire, damaged U1
Behavior drifts with temperatureRe-measure V_idle warm vs coldIB over temperature through 1 MΩ (expected, documented); re-set threshold or lower R1 in a future rev

11. Bench record template#

FieldRecord
Board revision / serial
Assembly audit (U1/RV1 orientation, R/C values, element MPN/lot)
Host or supply used; current-limit setting
DMM/scope/logic-analyzer IDs and calibration
Ambient temperature
Idle supply current
Measured V_idle (VIB_FILT at rest)
Trimmer verification: V_TH at CCW / mid / CW
Final threshold setting (V) and rationale
Tap-test stats ×10 (dip depth, pulse width, recovery) + captures
Threshold-vs-pulse-count sweep table/plot
False-trigger floor per setting
Continuous-shake and power-cycle results
Supply sweep 3.0–3.6 V result
Deviations, photos, raw-file paths
Reviewer / date / disposition

12. Review conclusion#

The signal chain is sound and well-matched to its lesson: a gentle 1 MΩ bias on a commodity contact, a deliberate fast-attack/slow-release RC that converts chatter into countable, stretched pulses, and a push-pull hysteretic comparator that guarantees clean edges without an output pull-up. The verified LMV7219 facts (push-pull, 7 mV hysteresis, ns-class edges) confirm the part choice over the open-drain LM393 alternative the README records. The principal findings to resolve or verify at first article are: (1) comparator input bias current through the ~1 MΩ source impedance depresses the idle node by an amount that varies part-to-part and with temperature — the calibration procedure therefore measures V_idle instead of assuming 3.3 V, and a future revision may want R1 = 100 kΩ; (2) the idle node and upper trimmer range sit above the LMV7219's guaranteed common-mode window (VCC−1.2 V ≈ 2.1 V) — expected to work, not guaranteed, so keep working thresholds ≤2 V and verify; (3) the TC33X's 20-cycle rotational life makes RV1 a set-and-forget calibration point, in tension with the "twiddle and observe" teaching use — document it; (4) the SW-420 element has no datasheet, so all sensitivity claims are bench-characterization outputs, not specs; and (5) the board remains a paper design with no layout, fabrication, or first-article evidence.