Circuit review & bench-test guide
AXS-002 — Hall-effect + reed switch PMOD module
Document purpose#
This document explains the axs-002-hall-reed 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. Every voltage, current, distance, and timing figure below is a design target to verify on a first article, not proof that a board works.
1. What the board does#
Two magnetic detectors sit side by side on one 3.3 V PMOD Type 1 (GPIO) module: a Diodes AH1806 solid-state omnipolar hall-effect switch and a Coto CT10 mechanical reed switch. The same hand-held magnet exercises both. Each detector pulls its line low while a magnet is present; both lines idle high through 10 kΩ pull-ups. The teaching point is the contrast: the hall switch gives a bounce-free (but sampled) edge, while the reed contact bounces and motivates the FPGA debounce exercise.
The module has no other function: no ADC, no configuration, no interrupts beyond the two level-type lines themselves.
Functional block diagram#
3V3 (PMOD pins 6/12)
│
┌─────────────┼───────────────┬────────────┐
│ │ │ │
R1 10k C1 100nF R3 10k │
│ │ (U1 bypass) │ │
│ GND │ │
v v
HALL_OUT ── R2 100R ── HALL REED_SENSE ── R4 100R ── REED
^ (PMOD pin 1) ^ (PMOD pin 2)
│ open-drain │ contact to GND
U1 AH1806-W SW1 CT10 reed switch
omnipolar hall switch │
│ GND
GND
Magnet present → HALL low (clean, sampled ~every 75 ms)
Magnet present → REED low (immediate, but bouncy)
2. Safety and scope boundaries#
- This is a 3.3 V logic module; there are no hazardous voltages. The main risks are to the hardware, not the operator.
- Power it only from a Digilent-compatible 3.3 V PMOD host (AruviX ECP5 rev-A or equivalent) or a bench 3.3 V supply with the current limit set low (10–20 mA is ample; the whole module draws well under 1 mA).
- Do not exceed 3.6 V. The AS-FETCHED AH1806 datasheet revision (DS36104 Rev 2-2) specifies a 2.5–3.6 V operating range with a 5 V transient-only absolute maximum. The schematic description claims "2.5-5.5 V", which matches newer datasheet revisions' marketing text but was NOT verified here — treat 3.6 V as the ceiling until the current revision is checked.
- The reed switch capsule inside the CT10 molding is glass. Do not flex the board near SW1, drop the module, or exceed the 10 G vibration / 100 G shock ratings; a cracked capsule can fail open or closed permanently.
- Never switch an inductive or mains load through SW1's line — the reed contact rating (10 W, 500 mA max switched) is irrelevant here because the contact only pulls a 10 kΩ pull-up, and nothing else may be wired to it.
- Strong test magnets (neodymium) damage magnetic media, mechanical watches, and pacemakers, and can slam together and shatter. Handle deliberately.
- Do not hot-plug the PMOD connector at odd angles; a shifted plug can short 3V3 to a driven line. Align pin 1 before applying power.
- A working bench result is not EMC, ESD, or environmental qualification.
3. Theory of operation and signal sequence#
- At power-up, C1 stabilizes U1's supply. Per the fetched datasheet, U1's output state is valid after its second internal operating cycle, typically ~150 ms after power-on; ignore both lines for the first 250 ms.
- With no magnet, U1's open-drain output is off and SW1 is open, so R1 and R3 hold HALL_OUT and REED_SENSE at 3.3 V. HALL and REED read high at the host through the 100 Ω series resistors R2/R4.
- U1 is a micropower duty-cycled part: it wakes for ~75 µs every ~75 ms (max 125 ms), samples the field, and latches the result. When the magnitude of the flux through the package exceeds the operate point (Bop, either pole — omnipolar), the output MOSFET turns on and HALL_OUT is pulled low. It releases only when the field falls below the release point (Brp): built-in magnetic hysteresis, so the edge cannot chatter.
- SW1's ferromagnetic reeds close directly under the applied field — response is immediate (sub-millisecond) but the contact physically bounces on closure, producing a burst of edges before settling low.
- Consequence for the lesson: the hall line changes state cleanly but only at sample instants (a magnet transit faster than one ~75–125 ms period can be missed entirely); the reed line responds instantly but dirtily.
4. Interfaces#
PMOD Type 1 (GPIO) per Digilent Pmod Interface Specification 1.2.0. Pin 1 is the rightmost pin of the upper row viewed from the module top with the connector toward you (verified in ../../pmod-common/PMOD-SPEC-NOTES.md).
| PMOD pin | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Net | HALL | REED | NC | NC | GND | 3V3 | NC | NC | NC | NC | GND | 3V3 |
Both signals are module-driven inputs to the host, active low, idle high. On an AruviX ECP5 rev-A standard socket they additionally pass the host's 200 Ω series resistors and ESD diodes (per the adopted Pmod spec practice).
There are no dedicated test points in the schematic. Useful probe nodes: HALL_OUT (R1/R2 junction, before the series resistor), REED_SENSE (R3/R4 junction), 3V3 and GND at C1's pads.
5. Component-by-component review#
5.1 Detectors and connector#
| Ref. | Part / datasheet summary | Function and why needed | If absent/open | If shorted, wrong, or misassembled |
|---|---|---|---|---|
| J1 | 12-pin right-angle PMOD plug, 2×6, 2.54 mm | Sole power and signal interface; carries 3V3/GND on pins 5/6/11/12 and the two sensor lines on pins 1/2 | No function at all | Misaligned mating can short 3V3 to a signal; swapped pin-1 orientation reverses power onto the module |
| U1 | Diodes AH1806-W (SC-59), micropower omnipolar hall switch, open-drain output | Solid-state magnet detector; either pole exceeding Bop pulls HALL_OUT low, releasing below Brp — the "clean edge" half of the lesson | HALL never asserts; line sits high forever | Wrong orientation swaps VDD/OUTPUT/GND and can destroy the part; a damaged output stage can hold HALL low permanently; VDD above 3.6 V is out of the fetched revision's operating range |
| SW1 | Coto CT10-1540-G4, molded SPST-NO reed switch, SMD gull-wing | Mechanical magnet detector; contact closes to GND under field — the "bouncy contact" half of the lesson | REED never asserts | A cracked glass capsule (overheating in reflow beyond 226 °C/1 min, board flex) can weld or open the contact; solder bridging pulls REED_SENSE hard low permanently |
5.2 Pull-ups, series protection, decoupling#
| Ref. | Value / part | Purpose | What is lost if omitted | Important failure/review point |
|---|---|---|---|---|
| R1 | 10 kΩ (Yageo RC0603FR-0710KL) | Pull-up for U1's open-drain output; sets the ~0.33 mA sink current when active | HALL_OUT floats; the host reads noise or a stuck level | Within the datasheet's recommended 10–100 kΩ RL window; short to 3V3 would fight U1's output at 330 µA — survivable (2.5 mA abs max) but wrong |
| R2 | 100 Ω (Yageo RC0603FR-07100RL) | Series protection on the module-driven HALL line per the sensor-line design rule; limits fault current if the host drives against the module | Miswiring the host pin as an output can source unlimited contention current | Open makes HALL float at the host while HALL_OUT looks fine — probe both sides |
| R3 | 10 kΩ (Yageo RC0603FR-0710KL) | Pull-up for the reed contact; sets ~0.33 mA through SW1 when closed | REED_SENSE floats when the contact is open | Contact wetting current is tiny (0.33 mA) and well under the 500 mA rating; dry-circuit reliability of ruthenium contacts at microamp scale is acceptable but worth noting for long-life use |
| R4 | 100 Ω (Yageo RC0603FR-07100RL) | Series protection on the module-driven REED line | Same contention exposure as R2 | Open shows bounce on REED_SENSE but a dead line at the host |
| C1 | 100 nF 16 V X7R (Murata GRM188R71C104KA01D) | U1 supply decoupling and noise immunity; the datasheet recommends 10–100 nF at CIN specifically to strengthen noise immunity of the duty-cycled sampler | U1 may false-trigger or mis-sample on supply noise | Must sit close to U1's VDD/GND pins at layout time — a layout review item, since no layout exists yet |
| #FLG01, #FLG02 | Power flags (3V3, GND) | ERC bookkeeping symbols only; declare the PMOD pins as the power source | ERC errors | No physical part; nothing to assemble |
6. Datasheet summary and design interpretation#
| Device | Key manufacturer facts (from the fetched documents) | Board-specific interpretation |
|---|---|---|
| AH1806 (DS36104 Rev 2-2, July 2013, fetched via RS mirror; the generator's diodes.com PDF link returned HTTP 403 at review time) | Operating 2.5–3.6 V; abs max VDD 5 V (transient only); open-drain, IOUT abs max 2.5 mA, VOL 0.1 V typ / 0.3 V max at 1 mA; duty-cycled: awake 75 µs typ / 125 µs max, period 75 ms typ / 125 ms max, IDD(avg) 8 µA typ / 16 µA max at 3 V; output valid after 2nd cycle (~150 ms typ); Bops +15/+30/+45 G (min/typ/max), Bopn −45/−30/−15 G, Brps +10/+20/+40 G, Brpn −40/−20/−10 G, hysteresis Bhy 5 G min / 10 G typ; −40 to +85 °C; SC59 pinout 1=VDD, 2=GND, 3=OUTPUT | 3.3 V operation sits inside the verified range. The wide Bop tolerance (15–45 G) means operate DISTANCE varies strongly between units and magnets — measure, don't predict. The ~75–125 ms sampling period bounds response latency and can miss fast transits: state this in the HDL exercise. Open item: the schematic's "2.5-5.5 V" description matches newer-revision marketing text (a Rev 8 exists on distributor sites) but was not verified here — pull the current diodes.com revision before release |
| CT10 series (Coto datasheet pages 92–93, fetched via Octopart mirror; the generator's cotorelay.com link returned HTTP 403 at review time) | Molded SPST-NO dry reed, ruthenium contacts, SMD; part numbering: CT10-XXXX-YY where XXXX is the pull-in AT band (datasheet example: 1030 = 10–30 AT) and G4 = gull-wing version 2; G4 column: operate range 10–30 AT, release range 3–25 AT; 10 W max switched, 200 V DC / 500 mA max switched, 0.5 A carry; contact resistance 100 mΩ typ / 150 mΩ initial max; breakdown 230 V min; −40 to +125 °C; G4 soldering limit 226 °C max, 1 min dwell | The contact's job here is trivial (0.33 mA resistive), so all electrical ratings have huge margin. Two open items found: (a) the schematic describes SW1 as "10-15 AT sensitivity", but per Coto numbering CT10-1540 reads as a 15–40 AT pull-in band — the description and MPN disagree; (b) the G4 lead form's listed operate range tops out at 30 AT, so confirm CT10-1540-G4 is actually orderable, or pick e.g. CT10-1530-G4. Operate/release TIMES and bounce duration are not specified in this datasheet — the ~0.1–1 ms bounce class used below is an industry-typical, UNVERIFIED figure to be measured, not assumed |
7. Expected values before bench testing#
All values are design targets on an unbuilt board.
| Quantity | Design target / calculated range | What to measure |
|---|---|---|
| Idle level, both lines | 3.3 V (high) | DMM on HALL/REED at the host socket |
| Asserted level, HALL | ≤0.3 V max, ~0.1 V typ at the 0.33 mA pull-up load (datasheet VOL at 1 mA) | DMM on HALL_OUT with magnet held |
| Asserted level, REED | Near 0 V; contact drop ≈ 0.33 mA × ≤150 mΩ ≈ 50 µV — unmeasurably small | DMM on REED_SENSE with magnet held |
| Module supply current, idle | ~10–20 µA (U1 IDD(avg) 8 µA typ/16 µA max, plus leakage) | µA-range DMM in series with 3V3 |
| Module supply current, both asserted | ~0.7 mA (two 0.33 mA pull-up paths + U1) | Same |
| U1 power-on valid time | ~150 ms typ (second sample cycle) | Scope HALL from power-up |
| U1 response latency | One sample period: 75 ms typ, 125 ms max | Scope: field step (fast magnet approach) to HALL edge |
| Hall hysteresis | Bop 30 G typ vs Brp 20 G typ (Bhy ≥5 G): release distance measurably LARGER than operate distance | Ruler jig, section 9.C |
| Omnipolar behavior | Both magnet poles trip HALL at similar (not identical) distances | Flip the magnet, repeat 9.C |
| Reed operate/release | Pull-in inside the part's AT band; release at lower AT → release distance larger than operate distance | Ruler jig, section 9.C |
| Reed bounce duration | ~0.1–1 ms class, several edges — UNVERIFIED, not in the CT10 datasheet; measure it | Scope single-shot, section 9.D |
| Hall bounce | None (latched, hysteretic) — but edges quantized to sample instants | Scope single-shot |
8. Manual schematic and assembly review checklist#
- Confirm J1 pin-1 orientation against the Pmod-spec recipe (rotation, square pad top-right) before layout sign-off; a mirrored plug puts 3V3 on a signal pin.
- Verify U1 orientation: SC59 pin 1 = VDD, 2 = GND, 3 = OUTPUT. A rotated part reverse-powers the die.
- Confirm the branded-face/marking side of U1 versus the intended magnet approach direction: Bops is defined for a south pole facing the part MARKING side. Document which board face the user should present the magnet to.
- Resolve the CT10 part-number/sensitivity discrepancy (schematic says 10–15 AT, MPN decodes as 15–40 AT) and confirm G4 orderability.
- Check the reflow profile against the CT10-G4 limit (226 °C max on the leads, 1 min) — stricter than a standard lead-free profile peak.
- Confirm C1 is placed within a few mm of U1 VDD in layout.
- Measure R1–R4 values in-circuit before first power (10 k / 100 / 10 k / 100 Ω).
- Verify the schematic's AH1806 supply-range note (2.5–5.5 V) against the latest diodes.com datasheet revision; the fetched Rev 2-2 says 2.5–3.6 V.
- Confirm silkscreen carries module name, Type 1 badge, pin-1 marker.
9. Ordered bench-test procedure#
Test context: either an AruviX ECP5 rev-A / Digilent-compatible 3.3 V PMOD socket (host FPGA pins configured as inputs, or simply unconfigured), or a bench 3.3 V current-limited supply (≤20 mA limit) on pins 6/12 (3V3) and 5/11 (GND) with a DMM, an oscilloscope, and optionally a logic analyzer. You also need: one small neodymium or alnico test magnet (pole faces identifiable), a non-magnetic ruler or caliper jig, and non-magnetic tweezers. Stop at the first abnormal result. Record board serial, magnet identity, equipment, ambient, and operator with every capture.
A. Unpowered inspection and resistance tests#
- Visual inspection under magnification: U1 orientation, SW1 body intact (no molding cracks), R1–R4/C1 values and fillets, J1 pin-1 marking.
- With no magnet near the board, measure resistance: 3V3-to-GND (expect high, ≥100 kΩ class), HALL-to-3V3 (≈10.1 kΩ via R2+R1), REED-to-3V3 (≈10.1 kΩ via R4+R3), REED-to-GND (open).
- Hold the magnet on SW1 and re-measure REED-to-GND: ≈100 Ω (R4 plus ≤0.15 Ω contact). Confirms the reed closes before any power is applied.
B. First power-up, static levels#
- Apply 3.3 V with the current limit set. Confirm supply current is in the tens-of-µA range at idle. Investigate anything above ~1 mA.
- After ≥250 ms, confirm HALL and REED both read ~3.3 V.
- Bring the magnet to U1: HALL drops low (≤0.3 V at HALL_OUT). Remove it: HALL returns high. Repeat on SW1 for REED.
- If on a PMOD host, run a trivial FPGA design that mirrors pins 1/2 onto LEDs and confirm both channels end-to-end.
C. Magnet approach/release hysteresis test (both detectors)#
This is the core characterization. Fix the board flat; slide the magnet toward each sensor along a ruler at a constant height and orientation.
- Hall operate/release distance. Approach U1 slowly (well under 1 cm/s, so the ~75–125 ms sampling adds <1 mm of error). Record the distance at which HALL asserts (operate). Withdraw slowly; record where it releases. Because Brp (20 G typ) < Bop (30 G typ), the release distance must be larger than the operate distance — that gap is the built-in hysteresis. Repeat 5 times; distances should repeat tightly (solid-state, no wear).
- Omnipolar check. Flip the magnet to present the opposite pole and repeat step 1. Both poles must trip the output (Bops/Bopn are symmetric ±15–45 G bands). Operate distances for the two poles will be similar but not identical — the min/typ/max bands are wide; record both.
- Reed operate/release distance. Repeat the slow approach along SW1's long axis (reeds respond to axial field). Record operate and release distances; release distance should again exceed operate distance (release AT band is lower than pull-in). Note the reed is NOT omnipolar in the hall sense — either pole closes it, but sensitivity depends strongly on magnet orientation relative to the reed axis; record the orientation used.
- Compare: expect the hall's trip distances to repeat more cleanly than the reed's (mechanical parts show more spread), and expect BOTH devices to show operate < release distance.
- Fast-transit contrast (optional but instructive). Sweep the magnet past both sensors quickly (<50 ms transit). The reed will emit a pulse burst; the hall may miss the event entirely if the transit falls between ~75–125 ms samples. Capture both lines simultaneously.
D. Bounce capture and edge-quality contrast#
- Scope REED_SENSE (or REED), single-shot, falling-edge trigger, 1 ms/div then zoom. Snap the magnet onto SW1. Capture the closure: expect a burst of make/break edges settling low. Measure total bounce duration over 10 closures; the ~0.1–1 ms class expectation is UNVERIFIED (the CT10 datasheet publishes no operate/release times) — whatever you measure is the number the HDL debouncer must beat. Also capture release (opening); reed opening typically bounces less — verify.
- Scope HALL the same way. Expect exactly one clean falling edge per assert event (fall time limited by R1×line capacitance, order of µs on a bench setup), with NO bounce, but with up to ~125 ms latency from the field crossing. This side-by-side pair of captures is the module's teaching artifact — save both.
- With a logic analyzer at ≥1 MHz sample rate, count bounce edges per closure across 20 closures for the debounce-exercise dataset.
E. Supply-margin and idle-current sweep (bench supply only)#
- Sweep 3V3 from 3.0 to 3.6 V; confirm both channels still operate and idle current stays in range. Do NOT sweep above 3.6 V (fetched-revision operating limit).
- At 3.3 V, log idle current for 10 minutes; a slow upward drift may indicate a stressed U1 or contaminated flux residue leaking across R1/R3.
10. Troubleshooting map#
| Symptom | First measurements | Likely areas |
|---|---|---|
| Both lines dead low | 3V3 at pins 6/12, GND continuity | No power, J1 misalignment, 3V3-GND short |
| Both lines dead high, no response | Magnet strength/approach face | Too-weak magnet, wrong board face, U1/SW1 unpopulated |
| HALL never asserts | HALL_OUT vs HALL, U1 pinout, VDD at U1 | U1 orientation/damage, R1 open (floating line may read high via scope loading), magnet under Bop min (45 G worst) |
| HALL stuck low | Remove magnet, measure HALL_OUT | U1 output damaged, solder short to GND, residual magnetized fixture nearby |
| HALL asserts late/randomly | Scope with slow approach | Normal sampling latency (75–125 ms); if worse, check C1 presence/placement |
| REED never asserts | Resistance test 9.A.3, magnet axis | Cracked capsule (open), wrong magnet orientation vs reed axis, R3 open |
| REED stuck low | REED_SENSE resistance to GND unpowered | Welded/stuck contact, solder bridge at SW1 |
| Line high at sensor node but dead at host | Both sides of R2/R4 | R2 or R4 open |
| Excess idle current | Current at 3.3 V, thermal check | U1 damage, flux contamination, wrong R values |
| Bounce lasts ≫1 ms or contact chatters at rest | Repeat capture, mechanical inspection | Marginal magnet distance (hovering at the AT threshold), damaged reed |
11. Bench record template#
| Field | Record |
|---|---|
| Board revision / serial | |
| Assembly audit (U1/SW1 orientation, R/C values) | |
| Host or supply used; current-limit setting | |
| Magnet identity (type, size, pole marking) | |
| DMM/scope/logic-analyzer IDs and calibration | |
| Ambient temperature | |
| Idle levels and idle current | |
| Hall operate / release distances (pole A), ×5 | |
| Hall operate / release distances (pole B), ×5 | |
| Reed operate / release distances, orientation, ×5 | |
| Reed bounce duration stats (10 closures) + capture files | |
| Hall edge capture (clean, latency) + capture files | |
| Fast-transit contrast result | |
| Supply sweep 3.0–3.6 V result | |
| Deviations, photos, raw-file paths | |
| Reviewer / date / disposition |
12. Review conclusion#
The circuit is minimal and coherent: two independent active-low channels, each with the line rules the sensor family mandates (10 kΩ pull-up, 100 Ω series element, local decoupling), on a correctly-typed PMOD Type 1 pin map. The AH1806's open-drain output, recommended pull-up range, and bypass capacitor usage all match the fetched datasheet. The principal open items before release are: (1) the CT10 sensitivity discrepancy — the MPN CT10-1540-G4 decodes as a 15–40 AT band while the schematic claims 10–15 AT, and the G4 lead form's published operate range ends at 30 AT, so the exact orderable part must be re-selected or the description corrected; (2) the AH1806 supply-range note (2.5–5.5 V) disagrees with the fetched Rev 2-2 datasheet (2.5–3.6 V) and must be checked against the current revision; (3) reed bounce timing is unpublished and must be measured, not assumed; and (4) everything here remains a paper design — no layout, fabrication, or first-article evidence exists yet.