Contact / Glass-Break Sensor: Hall & Acoustic AFE + ULP Radio
← Back to: Smart Home & Appliances
Contact / Glass-break sensors become reliable when detection is built on measurable evidence: stable contact margins (reed/Hall), explainable acoustic features (two-band + timing), and power/RF proofs (VBAT droop@TX, RSSI/PER). Long battery life comes from managing the current waveform and duty-cycle, while false alarms are reduced by rules that can be traced and validated in production tests.
System Boundary & Sensor Variants
This page treats contact sensing (door/window open–close and tamper) and glass-break detection (event-level) as a single endpoint category because they share the same long-life power, ULP MCU, and Thread/Zigbee radio. The sensor front-end and decision logic are intentionally separated: contact uses magnetic state; glass-break uses acoustic signatures. The goal is a design that is measurable, explainable, and robust against false alarms.
Covers: sensor front-ends (Reed/Hall, mic AFE), wake-on-event logic, false-alarm control, battery-life budgeting,
radio burst side-effects (VBAT droop), and EMC/ESD evidence on the endpoint.
Does not cover: hub/alarm panel architecture, cloud rules, app UX, commissioning flows, or protocol-stack deep dives.
The selector below forces a clean split: pick the user-visible outcome first, then bind to a measurable evidence chain.
Evidence #2: edge behavior at the threshold (single transition vs edge burst).
Evidence #2: event log (time-stamped tamper flags) without increasing sleep current.
Evidence #2: signature order: low-frequency impact followed by high-frequency shatter burst.
- VBAT droop during radio TX burst: measure VBAT with a scope at the moment of transmission; confirm UVLO margin and reset behavior.
- Raw sensor observables: contact edges/time-stamps (Reed) or analog readings (Hall); acoustic two-band envelopes (glass-break).
- Event log: store the last N events with timestamps and key scalars (edge count, peak envelope, noise floor) for field debug.
Event Physics & Signal Signatures
Sensor front-ends must be sized from what the real-world event looks like at the sensor pins. This section defines the minimum signatures needed to build an explainable detector: contact events are dominated by magnetic geometry and threshold crossings; glass-break events are dominated by a two-stage acoustic pattern (impact → shatter burst). Each signature is framed with a measurement plan so thresholds can be tuned without guessing.
- True open/close: a clean transition that crosses the threshold once, with stable settle after closure.
- Chatter near threshold: edge bursts (multiple crossings) caused by door vibration, loose magnet, or insufficient geometry margin.
- Geometry drift: the “closed” state sits too close to the threshold (metal frame, misalignment, door warp), making small motion look like an event.
Minimum proof for contact reliability:
(1) Measure closed-state margin (distance/misalignment window).
(2) Log edge count / time-stamps during a vibration test. A high edge-burst rate indicates chatter, not genuine open/close.
- Stage A — impact energy: a lower-frequency rise from an удар/knock; common in false triggers (slam, thunder, door hit).
- Stage B — shatter burst: a short, high-frequency-rich burst; the most discriminative local evidence.
- Sequence gate: Stage B must follow Stage A within a defined time window; this filters random noise spikes.
Minimum proof for glass-break detection:
(1) Capture two-band envelopes (LF and HF) for background noise to set a stable baseline.
(2) Confirm the event order (LF rise → HF burst) and that the HF burst is not simply steady fan noise.
Prove with: edge time-stamps (Reed) or monotonic reading change (Hall).
Prove with: edge-count rate vs vibration amplitude; adjust hysteresis / debounce window.
Prove with: two-band envelope trace + timing gate (HF burst must be short and strong vs baseline).
Prove with: HF burst duration and energy ratio vs baseline; enforce sequence gate.
Practical rule: if thresholds cannot be explained by the above shapes (edge bursts, two-band timing, baseline ratio), the design is not field-debuggable and will drift into false alarms.
Reference Architecture Block Diagram
A reliable endpoint is defined by a single evidence chain: battery → power tree → wake event → sampling window → local decision → radio burst → event log. This reference diagram prevents scope drift by forcing every design choice to map to a measurable node: VBAT droop, raw sensor observables, and time-stamped decisions.
Figure F3 unifies the shared platform (power, MCU, radio) with two sensing branches (contact and acoustic). Evidence “taps” are explicitly marked so field debug does not depend on guesswork.
Debug discipline: any field failure must map to one of the taps above (VBAT droop, raw signal shape, decision scalars, reset flags). If it cannot be measured, it cannot be stabilized.
Contact Sensing Path A: Reed Switch
A reed switch is the lowest-power contact sensor because it can behave like a near-zero-leakage state input. The engineering challenge is not the switch itself, but magnetic geometry margin and threshold chatter: small vibrations can produce edge bursts that look like multiple opens. A robust design turns those edges into measurable evidence and filters them without hiding real opens.
Symptom: “open” event while the door/window is closed.
First evidence (capture 2 signals): (1) GPIO edge time-stamps / edge count; (2) VBAT waveform aligned to TX marker.
Discriminator:
• Edge bursts correlate with vibration → chatter near threshold (geometry or debounce).
• Edge bursts correlate with TX burst → power/EMI coupling into the input node.
• No edge bursts but state flips → state machine/logging bug or intermittent leakage path.
First fix (highest leverage): increase geometry margin, tune debounce/holdoff, add series-R/Schmitt/RC as needed, then re-measure edge-burst statistics.
- Geometry margin: closed-state distance and misalignment window must sit far from the effective threshold.
- Edge-burst statistics: measure burst length and edge count under controlled vibration; tune debounce to cover typical bursts.
- TX-aligned checks: verify whether false edges cluster at radio transmit moments (VBAT droop or EMI injection).
A reed design is stable only when the closed-state geometry margin is large enough that vibration produces few or no threshold crossings. Debounce should be a measured parameter (burst duration/edge count), not a fixed default.
Contact Sensing Path B: Hall Sensor
Hall sensing turns “magnet geometry” into a measurable signal with tunable thresholds. Compared with a reed switch, Hall enables programmable hysteresis and installation-aware calibration, which directly reduces false opens caused by door vibration, magnet misalignment, and metal door-frame distortion. The design objective is not higher sensitivity, but stable margin: the closed-state reading must remain far from the switching region across temperature and mechanical drift.
Method: build a distance→output curve under worst geometry (offset/tilt), then place thresholds so both states retain margin.
Step 1 — curve capture: sweep magnet distance (and typical misalignment) and log raw codes.
Step 2 — drift envelope: repeat at hot/cold to measure temperature drift and offset shift.
Step 3 — hysteresis width: measure vibration-induced peak-to-peak code swing near the boundary; set hysteresis above that swing plus drift margin.
Step 4 — threshold placement: choose open/close thresholds inside the “safe gap” so closed never sits near the switch region.
- Distance curve: raw Hall code vs distance/offset; confirm the “safe gap” between closed and open distributions.
- Temperature curve: raw code drift vs temperature; verify thresholds remain outside drift envelope.
- Replay buffer: on any false event, store the last N seconds of raw codes + threshold/hysteresis values for replay.
A Hall design is stable when the closed-state distribution (across temperature and alignment) remains well separated from the switching band. Calibration should be bounded and replayable so that false events can be proven with raw data.
Glass-Break AFE: Mic → AFE → ADC/Comparator
Glass-break detection succeeds when the analog front-end preserves the signature without distortion. The key engineering variables are bias stability, gain and dynamic range, band shaping, and clipping avoidance. A practical endpoint can separate noise from true events using two-band energy (LF impact + HF shatter burst) and a time gate, without relying on cloud inference.
- Time-domain snippet: confirm no clipping and that the burst exists (impact + shatter segment).
- Two-band envelopes: LF rises first, HF shows a short burst above baseline, within a defined window.
- Baseline capture: noise floor measured in the installation environment to prevent fan/voice false triggers.
False alarms: LF-heavy noise or bias drift raises the envelope baseline; fix by stabilizing bias, tightening LF threshold, and enforcing HF burst requirement.
Missed events: gain too low hides HF burst, or gain too high clips impact and distorts burst; fix by prioritizing headroom, then re-tuning thresholds to baseline.
Unstable thresholds: noise floor not tracked locally; fix by storing baseline scalars and using ratio-based triggers.
Priority order for stable detection: prevent clipping first, then set ratio-based thresholds to the local baseline, and finally enforce LF→HF timing. This keeps the decision explainable and field-debuggable without complex models.
Local Classification & False-Alarm Control (Explainable)
False-alarm control must be explainable on the endpoint. A robust local decision uses two-band energy (LF impact + HF shatter burst), duration limits, and a time gate (LF → HF order) with thresholds referenced to an adaptive noise floor. Each report should carry a compact “why” record: Rule ID, thresholds, baseline, and feature snapshots.
Update only in quiet windows: baseline_LF/HF moves slowly when no event is suspected.
Freeze on triggers: when any pre-trigger condition occurs, freeze baseline to avoid “learning” a real event.
Ratio triggers: compare envelopes to baseline (k·baseline) to stay stable across night/AC/rain changes.
- Rule ID hit list: which rules fired (e.g., R1+R3 but missing R2).
- Baseline snapshot: Baseline_LF/HF at trigger time (night/AC/rain drift visibility).
- Feature snapshot: LF_peak, HF_peak, HF_dur, Δt, ratio — logged for replay.
A stable endpoint report is one that can be replayed and explained: which rules fired, what baseline was assumed, and what feature values crossed thresholds.
Long-Life Power Architecture (Current Waveform Managed)
Long battery life is achieved by managing the current waveform, not by slogans. The lifetime loop closes only when sleep current, wake sampling window, TX burst peak, and battery internal resistance (especially at low temperature) are measured together. The critical failure mode is VBAT droop during peaks crossing BOR/UVLO, causing resets and missed events.
- Sleep current (S0): measure nA/µA-class current after stabilization.
- TX peak & VBAT droop (S3): scope VBAT and tag the TX moment; verify droop margin vs BOR/UVLO.
- Low-temp reproduction: repeat bursts at low temperature to reveal increased internal resistance and deeper droop.
Domain gating: power the mic/AFE only during the sampling window to shrink duty cycle.
Peak awareness: align TX scheduling to safe VBAT conditions; log BOR flags for forensics.
Headroom first: ensure TX peaks do not cross BOR/UVLO across temperature; validate by VBAT waveform, not averages.
A credible lifetime claim requires replacing all placeholders with measured currents, measured durations, measured event rates, and scoped VBAT droop under worst temperature.
Thread/Zigbee Radio Coexistence (Power + Antenna Evidence)
Endpoint radio stability is determined by two measurable chains: TX burst → VBAT droop (and possible BOR) and antenna efficiency under metal/battery shielding. Coexistence here focuses on hardware evidence only: align the TX moment to VBAT waveform and correlate packet performance statistics with distance and installation geometry.
- Keepout: reserve a no-metal/no-battery region around the antenna area; avoid screws and large copper islands in the near-field.
- Ground reference: provide a controlled ground reference; avoid “floating” grounds that make tuning unstable across units.
- Metal proximity risk: door frame and battery can detune and block radiation; validate by rotating/offsetting a few centimeters and re-logging RSSI/LQI.
Peak dominates: verify TX peak does not pull VBAT below BOR/UVLO across temperature.
Shared impedance: avoid RF bursts modulating AFE/MCU rails; correlate baseline jumps with TX marker.
Low-temp repeat: internal resistance rises at low temperature, deepening droop and shortening usable range.
- VBAT waveform aligned to TX marker: droop depth + recovery time + BOR flag correlation.
- Packet performance vs distance: simplified PER curve and RSSI/LQI distribution; compare “near metal” vs “free-space.”
A “range drop” is not a protocol mystery until VBAT droop and antenna shielding have been ruled out with aligned evidence.
Ruggedness: ESD/EMC/Tamper (Minimum Set + Local Flags)
Endpoint sensors most often fail from the real environment: ESD from touch and door frames, EFT-like fast transients from long leads, and repeated coupling into sensitive inputs. Ruggedness is achieved by a minimum protection set (TVS + series-R + RC where needed) and by verifying return paths. Tamper mechanisms must remain local and evidence-based: case-open and magnet interference should set local flags and freeze adaptive learning.
Case-open: a local switch/optical/capacitive indicator sets tamper_flag and records a timestamp.
Magnet attack: Hall saturation or abnormal direction/level patterns set a local magnet_tamper flag.
After tamper: freeze baseline learning and store a compact evidence snapshot (raw value + thresholds + time).
- Sleep current drift: rising sleep current indicates leakage damage; compare pre/post stress measurements.
- GPIO behavior: input threshold/leakage changes show up as unstable levels or abnormal edge counts.
- AFE baseline drift: mic/AFE bias shift raises noise floor and increases false triggers; log baseline before/after.
- Separate power vs input damage: if sleep current rises immediately, suspect leakage; if only triggers rise, suspect input baseline shift.
- Check return-path effectiveness: repeat stress while observing baseline and droop; improvements should be visible in waveforms/logs.
- Freeze learning on instability: prevent adaptive baselines from masking damage and making faults non-replayable.
Many “passing” units still degrade: higher sleep current, unstable GPIOs, or elevated AFE noise floors. Logging these before/after stress is the fastest proof of damage.
Validation & Production Test Plan (Manufacturable, Reproducible)
A sensor is manufacturable only when failure modes are caught by a minimum, repeatable test set. This chapter defines a 3-layer closure loop: EOL (factory) → Sampling (QA) → Field repro. Every test has: pass criteria + failure code + next evidence to isolate the root cause.
DMM sleep current + static VBAT
Scope VBAT droop aligned to TX marker + input/AFE baselines
PSU/Battery jig repeatable supply and series-R insertion (IR simulation)
Audio playback fixed-distance replay for glass-break scenario set (speaker/phone + simple stand)
| Function | Example MPNs | Why it appears in the test plan |
|---|---|---|
| Hall switch | TI DRV5032 (e.g., DRV5032FADBZR) | Contact path B validation (distance curve, temp drift, hysteresis window). |
| Reed contact | Littelfuse 59025 series (e.g., 59025-1-S-02-A) | Contact path A validation (mechanical bounce, placement tolerance). |
| Analog MEMS mic | SPU0410LR5H-QB (-7) | Glass-break AFE validation (noise floor, clipping risk, scenario replay). |
| Nanopower comparator | TI TLV3691 | Low-power trigger stage for envelope/threshold gating (baseline + hysteresis check). |
| Thread/Zigbee SoC | Silicon Labs EFR32MG21 (e.g., EFR32MG21A010F512IM32) | TX burst droop test (VBAT_min@TX, BOR flags, PER vs distance evidence). |
| ESD diode | Nexperia PESD5V0S1UL | Post-ESD degradation checks (sleep current, GPIO leakage, AFE bias drift). |
| Load switch | TI TPS22910A | Power isolation for repeatable droop capture and controlled rail sequencing in test. |
- EOL (End-of-Line): fast screens for assembly, thresholds, and gross defects (minutes, not hours).
- Sampling (QA): stress the corner conditions (distance/angle/temp, noise scenes, IR simulation) to catch systematic drift.
- Field repro: minimum evidence capture with aligned markers: VBAT_min@TX + rule_id + PER/RSSI stats.
The goal is not to test “everything”, but to lock a repeatable tolerance window for installation. The same matrix structure works for reed and Hall; only the logged fields differ.
| Tier | Distance & Angle | Temp | Procedure (minimal) | Log fields (evidence) | Pass / Fail code |
|---|---|---|---|---|---|
| D1 | Near / aligned | RT | 10 open/close cycles; hold closed 60s; repeat. |
Reed edge_count_after_debounce, false_edges_60s Hall raw_code, threshold, hysteresis, drift_60s |
Pass: 0 false triggers; ≥99% correct cycles Fail: F-C1 / F-C2 |
| D2 | Mid / aligned | RT | Repeat D1; add light vibration (door shake) 10s. | jitter_count, min/max raw, event timestamps | Fail: F-C2 / F-C3 |
| D3 | Far / aligned | RT | Repeat D1; verify margin at the far limit. | missed_events, raw_margin_to_threshold | Fail: F-C1 |
| A1 | Mid / off-axis | RT | Offset magnet/actuator; 10 cycles; hold 60s. | raw_vs_angle snapshot, edge bounce density | Fail: F-C2 / F-C4 |
| T1 | Mid / aligned | Cold | Cold soak; repeat D2; check drift and margin. | raw_vs_temp, baseline shift, missed/false events | Fail: F-C3 / F-C5 |
Glass-break validation must stay locally explainable: two-band energy + duration + time order + adaptive noise floor. The scenario set focuses on “looks similar but should not trigger”.
| Scenario | Playback setup | Expected rule behavior | Log fields (evidence) | Pass / Fail code |
|---|---|---|---|---|
| S1 HVAC wind noise | Fixed distance (e.g., 1 m), 60s | No trigger; baseline adapts upward without “event latch”. | noise_floor, LF_energy, HF_energy, rule_id (if any) | Pass: 0 triggers Fail: F-G1 |
| S2 Door slam | Impulse + decay, repeat ×10 | LF spike allowed; must fail HF/time-order condition. | LF_peak, HF_dur, time_gate_hit, rule_id | Fail: F-G2 |
| S3 Metal clank / keys | Sharp HF, repeat ×10 | HF spike alone must not pass “LF→HF order”. | HF_peak, LF_energy, order_check, rule_id | Fail: F-G2 |
| S4 Target glass-break sample | Replay ×10, same volume step | Trigger with consistent rule path; no clipping. | rule_id, feature_snapshot, clipping_flag, threshold | Pass: ≥99% trigger Fail: F-G3 |
| S5 Robustness sweep | Gain: low/nom/high | No false triggers at high gain; no missed at low gain. | gain_setting, noise_floor, clipping_flag | Fail: F-G4 |
“Range drop” and “random reset” often collapse to one measurable chain: TX burst → VBAT droop → BOR. IR simulation uses a series resistor to emulate battery internal resistance rise at low temperature or aging.
| IR step | Temp | Action | Measure (aligned) | Pass / Fail code |
|---|---|---|---|---|
| R0 (0Ω) | RT | TX burst ×N; event detect ×N; repeat. | VBAT_min@TX, recovery_time, BOR_flag, PER/RSSI | Fail: F-P1 |
| R1 (small) | RT | Repeat; confirm margin and no silent resets. | VBAT droop depth vs BOR line; reset counter | Fail: F-P2 |
| R2 (large) | Cold | Cold soak; repeat; log PER vs distance point. | aligned TX marker + VBAT; PER curve snapshot | Fail: F-P3 |
| Fail code | What it means (most likely) | Next evidence to capture | First fix direction |
|---|---|---|---|
| F-C1 Contact missed | Threshold window too tight at far distance / off-axis | raw_margin_to_threshold + repeat at D3/A1 | Adjust threshold/hysteresis or tighten installation window |
| F-C2 Contact false trigger | Bounce/vibration or coupled noise into GPIO/ADC | edge_count_after_debounce + timestamps under shake | Debounce/time gate; improve input RC and return path |
| F-C3 Cold drift | Hall offset/temp drift or mechanical tolerance shift | raw_vs_temp curve + drift_60s snapshot | Re-center thresholds; local install calibration window |
| F-C4 Metal sensitivity | Door frame detunes magnetic path / shifts curve | raw_vs_angle + raw_vs_distance near metal | Change magnet orientation/spacing; add tamper heuristic |
| F-C5 Leakage after stress | ESD/EFT damage elevates leakage and noise floor | sleep current pre/post + GPIO leakage check | Strengthen TVS/series-R placement and return path |
| F-G1 Baseline not stable | Noise floor estimator too slow/too fast | noise_floor trend + rule_id trace | Tune baseline time constant; clamp adaptation rate |
| F-G2 False glass trigger | Rule gating incomplete (order/duration) | LF/HF energies + order_check + time_gate flags | Strengthen LF→HF order and duration constraints |
| F-G3 Missed glass | Gain too low / threshold too high / mic placement | feature snapshot + threshold at failure | Increase gain margin or lower threshold within false rate |
| F-G4 Clipping | AFE saturates → distorted features | clipping_flag + waveform peak stats | Reduce gain or add attenuation; protect headroom |
| F-P1 Droop near BOR | Insufficient decoupling / shared impedance | VBAT droop depth + recovery_time aligned to TX | Improve power path, decoupling, or burst scheduling |
| F-P2 BOR resets | VBAT crosses BOR during TX or event | BOR_flag + reset counter + VBAT_min@TX | Raise droop margin: reduce peak, add capacitance, optimize rails |
| F-P3 Range collapse under IR | Power collapse masquerading as RF issue | PER vs distance + VBAT_min@TX at same points | Fix power chain first; then re-check antenna keepout |
A test is only “production-ready” when a failure automatically produces: (1) a code, (2) a minimum evidence snapshot, and (3) a deterministic next step.
FAQs (Answers + On-page Accordions + Structured Data)
Rule trace VBAT droop @ TX RSSI/LQI/PER Edge/bounce counters Noise floor Post-ESD drift
1) Door is closed but “open alarm” appears sometimes. Check reed debounce or magnet geometry first?
Start with two captures: (1) false_edges_60s and edge_count_after_debounce while the door is static, and (2) contact margin (Hall raw_margin_to_threshold or reed stable level dwell time) across small door vibrations. High edge counts indicate bounce/EMI; a near-zero margin indicates geometry/offset. First fix: tighten debounce/holdoff, then reposition magnet or widen hysteresis.
2) Sensing range drops a lot after mounting on a metal door frame. Magnetic path or antenna detune—what two measurements first?
Measure (1) the Hall raw curve versus distance near the metal frame (raw_vs_distance, same fixture) and (2) RSSI/LQI plus simplified PER vs distance in the same orientation. If the magnetic curve shifts (offset/slope change) while RF stats remain stable, it’s magnetic-path distortion. If Hall remains normal but PER collapses, it’s antenna detune/shielding. First fix: adjust magnet orientation/spacing or enforce antenna keepout.
3) Battery drains faster in cold weather. Internal resistance rise or more wakeups—what two current evidences distinguish?
Capture (1) VBAT_min@TX (and recovery time) at cold temperature and (2) daily wake_count/tx_count (or rule-trigger count) from the event log. Deep VBAT droop with higher PER/retries points to internal resistance and peak-current stress. A stable droop but exploding wake_count points to more triggers (noise floor or contact chatter). First fix: run series-R IR simulation and update the duty-cycle budget with measured counts.
4) Device reboots or drops link right when it transmits. Measure VBAT droop first or redesign the power tree first?
Measure first. Align a TX marker with scope captures of VBAT droop and read BOR_flag/reset_counter. If VBAT crosses the BOR/UVLO line or BOR flags increment, the root cause is power-path impedance or insufficient decoupling, not RF. If droop is small yet PER/RSSI spikes at the same distance/orientation, suspect antenna detune or metal shielding. First fix: reduce peak current / improve decoupling, then re-check keepout and ground reference.
5) No glass breaks, but thunder or door slams trigger alarms. Which band rule was breached, and how to tune without missing true events?
Inspect the trigger record: rule_id, LF/HF energy, order_check, and time_gate. If triggers show strong LF energy with weak HF burst, the LF threshold/duration gate is too permissive—tighten LF duration or raise LF threshold while keeping HF/order constraints. If triggers come from isolated HF spikes, strengthen LF→HF sequence and HF_dur limits. After tuning, regress against the noise scenario set to preserve true-event detection probability.
6) False alarms increase when HVAC fan runs. Structure-borne sound or power noise into AFE—how to separate with evidence?
Use two tracks: (1) noise_floor trend (LF/HF) over minutes during fan on/off and (2) an electrical sanity check: AFE baseline shift and sleep-current stability (AFE_bias_shift, sleep_current). A smooth noise_floor rise that follows fan states points to structure-borne acoustics; a step-like baseline jump or higher sleep current points to injected noise/ESD damage or return-path issues. First fix: tune baseline estimator time constant, then verify protection/return path and input RC if electrical symptoms exist.
7) Microphone path saturates easily. Reduce gain first or adjust bandpass/AGC? How to prove clipping-driven misclassification?
Check (1) a clipping_flag (or peak-histogram showing flat-topped samples) and (2) the feature snapshot: HF/LF ratio and burst duration at trigger. If clipping is present, reduce analog gain or add attenuation/headroom first; clipped waveforms create artificial HF energy and break time-order logic. If clipping is absent but HF energy is dominated by non-target bands, tighten bandpass and duration gates before lowering thresholds. Re-validate with the scenario sweep across gain steps.
8) Same product behaves differently in different rooms. Different noise floor or mounting orientation—how to quick re-test?
Run a quick A/B: (1) record the room’s noise_floor baseline (LF/HF) and (2) replay the same scenario sample at a fixed distance and compare trigger probability plus rule_id path. A high baseline that pushes features near thresholds indicates environment-noise dominance; similar baseline but large differences across small rotations indicates mounting orientation and reflections shaping LF/HF energy. First fix: refresh baseline adaptation after installation, and define a mounting window validated by the scenario set.
9) Door contact bounce causes multiple reports. Mechanical bounce or EMI—how to distinguish?
Compare (1) edge_count_after_debounce during a controlled open/close cycle and during a static 60-second hold, and (2) post-stress electrical health: sleep_current and GPIO leakage/threshold stability after ESD/EFT exposure. Bounce that appears only during motion is mechanical; edges that appear while static, especially after stress, indicate EMI coupling or leakage. First fix: increase debounce/holdoff for mechanical bounce; for EMI, add series-R/RC at the input and confirm the ESD return path does not traverse sensitive reference nodes.
10) Battery-life estimate is off by 2×. Which duty-cycle assumption is most likely wrong?
Validate two realities: (1) tx_count and wake_count per day (from logs) and (2) the measured current waveform segments (sleep, wake-sample, compute, TX burst) to build mAh/day from real durations. If counts are far above the model, the event/trigger frequency assumption is wrong. If counts match but VBAT droop causes retries or resets, the peak-current and internal-resistance assumption is wrong. First fix: replace every “typical” number with measured values.
11) After ESD it still works, but draws more current and false alarms rise. Where to suspect bias drift first?
Capture (1) sleep_current_pre/post and (2) AFE bias/noise_floor and threshold margins under the same quiet condition. A large sleep-current increase suggests leakage in input protection or GPIO structures. A noise_floor step-up or baseline shift suggests mic/AFE bias drift or front-end damage, which pushes features across thresholds. First fix: inspect the minimal protection set (TVS placement, series-R, return path), then re-run EOL quick screens and update fail codes for post-ESD degradation.
12) Want both contact and tamper without increasing sleep current. How to design it safely?
Prove it with (1) measured sleep current in “tamper enabled” mode and (2) a tamper_flag trace that shows triggers only during real events. A tamper design that continuously biases sensors will inevitably raise sleep current; prefer event-gated approaches (threshold comparator, intermittent sampling, or a low-power Hall state machine). On tamper detection, freeze self-learning and log evidence (rule_id/baseline) rather than increasing sampling permanently. First fix: move tamper sensing to a gated domain.