Circuit review & bench-test guide
AXA-003 — Motor encoder interface PMOD module
Document purpose#
This document explains the axa-003-encoder PMOD module at component level and turns the design evidence into a practical manual-review and bench-test plan. It is based on the generated schematic (generate_design.py), the module README, and the actuator-line overview in ../README.md.
This is an unfabricated prototype design. Status on record: schematic generated, ERC clean (0/0), netlist reviewed, PCB layout not started, no board built, no BOM purchased, and no bench evidence of any kind exists. Every voltage, frequency, and threshold below is a design target derived from the schematic and manufacturer datasheets — a plan for what to verify, not proof that an assembled board works or is safe. Where a number could not be confirmed from a fetched datasheet, that is stated explicitly.
1. What the board does#
The board is a six-channel digital input conditioner on the PMOD form factor (target outline 20 × 40 mm, 2-layer, 0603 passives). It accepts two quadrature encoder pairs (E1A/E1B and E2A/E2B) from N20/JGA25-class gearmotor encoders plus two spare hall/limit inputs (H1/H2). Each channel is pulled up 10 kΩ to 3V3 (encoder outputs are often open-collector), low-pass filtered by 1 kΩ + 10 nF (fc ≈ 16 kHz, to strip motor-wire noise), squared up by one gate of a Nexperia 74HC14 hex inverting Schmitt trigger, and driven to the PMOD through a 100 Ω series resistor. The FPGA host performs quadrature decode in fabric.
The board has no microcontroller, no motor driver, and no motor power path: per the actuator-line rule, motor power never flows through the PMOD — this module carries 3.3 V logic only. The motor that spins the encoder is driven by a separate board (e.g. AXA-001) or a separate bench supply.
Every channel is inverted by the Schmitt stage. Quadrature decoding is insensitive to A/B inversion, but level-sensitive uses of H1/H2 (hall, limit switch, index) must invert in fabric, and the inversion interacts with the perceived rotation direction (Section 10.E).
Functional block diagram#
Encoder 1 ──> J2 (3V3/GND/A/B) ──┐
Encoder 2 ──> J3 (3V3/GND/A/B) ──┤ per channel, x6:
Hall/limit ─> J4 (H1/H2/GND) ───┤
v
3V3 ──10k (R1-R6)──> <CH>_RAW
│
1k (R7-R12) series
│
<CH>_F ── 10nF (C1-C6) to GND fc ~16 kHz
│
v
74HC14 U1 gate (INVERTS)
│
100R (R13-R18) series
│
v
PMOD J1: 1 E1A 2 E1B 3 E2A 4 E2B 7 H1 8 H2
(all module-driven, all = NOT(input))
3V3/GND from PMOD J1 pins 5/6/11/12; C7 100nF decouples U1
2. Safety and scope boundaries — bench testing with a spinning motor#
This is an encoder interface board, but it cannot be meaningfully bench tested without a motor spinning the encoder shaft. Moving-machinery rules apply even though the board itself only carries logic signals.
- First power-up is always on a current-limited bench supply. Set the 3V3 logic supply limit to 50 mA or less for the first application of power; the expected quiescent draw of this board is microamps (Section 7).
- The motor has stall and shorted-rotor current far above its running current. Typical estimates (verify against your motor's datasheet, do not trust these numbers for a specific unit): N20-class gearmotors stall at roughly 0.36–1.6 A depending on winding and voltage; JGA25-class motors can stall at up to about 4 A. Set the motor supply current limit accordingly and never power the motor from an unlimited supply on the bench.
- Never hot-plug encoder or motor leads while powered. Plugging J2/J3 hot can momentarily short 3V3 to GND through misaligned pins, and hot motor leads arc and inject inductive kickback into the wiring bundle shared with the encoder signals.
- Rail sequencing: apply the 3.3 V logic rail (board + encoder supply) before the motor rail, and remove the motor rail first. The encoder hall sensors are powered from this board's 3V3; spinning them unpowered is harmless, but powering the motor first means the shaft is already moving when you start handling logic connections.
- "Hands clear" convention: before commanding the motor that drives the encoder shaft (from the FPGA, a driver board, or by connecting the motor supply), announce/confirm hands, probes, and loose wires are clear of the shaft, coupler, and gearbox. Gearmotor output shafts produce high torque; loose scope leads wrap around shafts. Secure the motor mechanically before any powered test — a motor spinning free on the bench walks and falls.
- Encoder socket miswiring kills hall sensors. J2/J3 pin order is 3V3 / GND / A / B. N20/JGA25 encoder breakout wire orders vary between vendors; swapping 3V3 and GND destroys the encoder's hall ICs. Buzz out the harness against the encoder breakout silkscreen before first connection.
- A clean quadrature waveform is not EMC, safety, or environmental qualification. Passing every test in this guide proves signal conditioning behavior on one bench, nothing more.
3. Signal path and conditioning behavior#
- With nothing connected to J2/J3/J4, each 10 kΩ pull-up (R1–R6) holds its
<CH>_RAWnet at 3V3. The Schmitt inputs sit high, so all six PMOD lines idle low (inverted). - An open-collector encoder output pulls
<CH>_RAWlow; a push-pull encoder output drives it both ways. Either is compatible with the pull-up. - The 1 kΩ series resistor (R7–R12) and 10 nF capacitor (C1–C6) form the noise filter, fc = 1/(2π·1 kΩ·10 nF) ≈ 15.9 kHz.
- The filter is asymmetric with open-collector encoders. Falling edge: the encoder discharges the capacitor through 1 kΩ only (τ ≈ 10 µs). Rising edge: the capacitor charges through the pull-up plus the series resistor, 10 kΩ + 1 kΩ = 11 kΩ (τ ≈ 110 µs). Reaching a typical 3.3 V VT+ (~55% of rail, Section 7) takes roughly 0.8·τ ≈ 90 µs, so the usable channel frequency with a true open-collector encoder is on the order of 5 kHz with significant duty-cycle distortion, not the filter's 16 kHz corner. With push-pull encoder outputs both edges see ~10 µs and the corner frequency governs. This must be measured (Section 10.D); the README's "MHz edge rates" refers to what the fabric decoder can accept, not what this analog front end passes.
- The 74HC14 gate converts the slow RC edge into a clean, jitter-free, inverted logic edge (the whole reason a Schmitt part is used: its input tolerates unlimited rise/fall times, which an ordinary CMOS gate does not).
- The 100 Ω series resistor (R13–R18) damps the trace/cable to the PMOD and limits fault current if a PMOD pin is misdriven from the host side.
4. Interfaces and pin maps#
| Reference | Pins/signals | Intended use |
|---|---|---|
| J1 | PMOD 2x6, Type 1 GPIO | Host FPGA connection; all six signal lines are module-driven outputs |
| J2 | 1x04 socket: 1 3V3, 2 GND, 3 A, 4 B | Motor 1 encoder (nets E1A_RAW/E1B_RAW) |
| J3 | 1x04 socket: 1 3V3, 2 GND, 3 A, 4 B | Motor 2 encoder (nets E2A_RAW/E2B_RAW) |
| J4 | 1x03 header: 1 H1, 2 H2, 3 GND | Spare conditioned inputs (hall, limit switch, index) |
PMOD J1 pin map (all lines inverted relative to the connector inputs):
| PMOD pin | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Net | E1A | E1B | E2A | E2B | GND | 3V3 | H1 | H2 | NC | NC | GND | 3V3 |
Channel-to-gate assignment inside U1 (74HC14, SOIC-14):
| Channel | U1 gate unit | Input pin | Output pin | Pull-up | Series R | Filter C | Output R |
|---|---|---|---|---|---|---|---|
| E1A | 1 | 1 | 2 | R1 | R7 | C1 | R13 |
| E1B | 2 | 3 | 4 | R2 | R8 | C2 | R14 |
| E2A | 3 | 5 | 6 | R3 | R9 | C3 | R15 |
| E2B | 4 | 9 | 8 | R4 | R10 | C4 | R16 |
| H1 | 5 | 11 | 10 | R5 | R11 | C5 | R17 |
| H2 | 6 | 13 | 12 | R6 | R12 | C6 | R18 |
U1 power: pin 14 = 3V3, pin 7 = GND (unit 7 in the schematic generator). There are no test points defined in the current schematic; adding TPs for 3V3, GND, one _RAW, one _F, and one PMOD-side net per encoder is a layout recommendation, because every measurement below otherwise requires probing component pads.
5. Component-by-component review#
5.1 Active conditioning#
| Ref. | Part / datasheet summary | Function and why needed | If absent/open | If shorted, wrong, or misassembled |
|---|---|---|---|---|
| U1 | Nexperia 74HC14D,653, hex inverting Schmitt trigger, SOIC-14, VCC 2.0–6.0 V | One gate per channel converts the slow, noisy RC-filtered edge into a clean inverted logic edge; hysteresis rejects noise riding on the transition; the datasheet explicitly permits unlimited input rise/fall times | No conditioned outputs at all; a single lifted pin kills one channel (stuck PMOD line at the 100 Ω resistor's idle level) | Rotated package swaps power and I/O and will destroy the part; the HCT variant (74HCT14) has TTL thresholds and is not interchangeable at 3.3 V — VCC(min) for HCT is 4.5 V; a solder bridge between adjacent gate pins cross-couples two channels, which corrupts quadrature subtly rather than obviously |
74HC14 numbers used in this review (Nexperia datasheet Rev. 10, 2024-02-29): VCC operating 2.0–6.0 V; absolute maximum VCC 7 V, input clamp current ±20 mA, output clamp current ±20 mA, output current ±25 mA per pin, ICC/IGND 50 mA total, Ptot 500 mW. Thresholds are only specified at VCC = 2.0, 4.5, and 6.0 V — there is no 3.3 V column:
| VCC | VT+ min/typ/max | VT− min/typ/max | Hysteresis VH min/typ/max |
|---|---|---|---|
| 2.0 V | 0.7 / 1.18 / 1.5 V | 0.3 / 0.52 / 0.9 V | 0.2 / 0.66 / 1.0 V |
| 4.5 V | 1.7 / 2.38 / 3.15 V | 0.9 / 1.4 / 2.0 V | 0.4 / 0.98 / 1.4 V |
At 3.3 V, interpolation suggests VT+ ≈ 1.8 V typical and VT− ≈ 0.9–1.0 V typical, but these are estimates, not datasheet guarantees — measure them (Section 10.C) and treat only the 2.0/4.5 V rows as manufacturer-backed. Propagation delay at VCC = 4.5 V is 15 ns typical / 25 ns max (slower at lower VCC: 41 ns typical at 2.0 V); quiescent ICC is 2.0 µA max at 25 °C.
5.2 Per-channel passives (one set per channel; see table in Section 4 for assignment)#
| Refs. | Value / part | Purpose | What is lost if omitted/open | Important failure/review point |
|---|---|---|---|---|
| R1–R6 | 10 kΩ, Yageo RC0603FR-0710KL | Pull the channel to 3V3 so open-collector encoder outputs have a defined high level and unplugged channels idle deterministically | Channel floats when the encoder output is open-collector or unplugged: the Schmitt input drifts through the threshold region and the PMOD line can chatter or stick | Shorted (0 Ω) fights the encoder's low drive and can exceed the encoder output's sink rating; wrong high value slows the rising edge further (Section 3.4) and worsens duty-cycle distortion |
| R7–R12 | 1 kΩ, Yageo RC0603FR-071KL | Series element of the noise filter; also limits current into U1's input clamp diodes during transients on the encoder cable | Filter degenerates to the capacitor loading the encoder directly; cable transients hit U1's input clamps with no limiting | Shorted removes the filter (fc → very high, wire noise passes); wrong high value shifts fc down and increases the RC delay/distortion; the 74HC14 clamp rating is ±20 mA, so 1 kΩ keeps clamp current safe for excursions up to roughly ±20 V beyond the rails |
| C1–C6 | 10 nF 50 V X7R, Murata GRM188R71H103KA01D | Filter capacitor; with 1 kΩ, fc ≈ 16 kHz, sized to strip motor-brush and wiring noise while passing encoder edge rates | Noise on long motor/encoder harnesses reaches the Schmitt input; hysteresis alone may not reject fast bursts, producing spurious counts | Shorted grounds the channel permanently (PMOD line stuck high after inversion); wrong large value (e.g. 100 nF fitted by mixup with C7) drops the usable channel frequency ~10x and can make high-RPM counting silently lossy |
| R13–R18 | 100 Ω, Yageo RC0603FR-07100RL | Series damping/protection between U1 outputs and the PMOD; limits current if the host misconfigures a pin as an output | Direct gate-to-connector connection: ringing on the PMOD stub and no current limit in a driver-vs-driver conflict | Open kills the channel at the PMOD only (gate side still toggles — a useful diagnostic split); shorted merely removes protection; a driver conflict at 3.3 V through 100 Ω is ~33 mA, above the 74HC14's ±25 mA output rating, so a misconfigured host pin can still damage U1 over time |
5.3 Power, decoupling, and connectors#
| Refs. | Value / part | Purpose | If omitted or wrong |
|---|---|---|---|
| C7 | 100 nF 16 V X7R, Murata GRM188R71C104KA01D | U1 supply decoupling adjacent to pin 14 | Supply bounce during simultaneous gate switching; can manifest as spurious edges on otherwise-quiet channels while the motor runs |
| J1 | PMOD 2x6 plug (footprint from pmod-common template) | Host connection: 3V3 and GND in, six conditioned signals out | Reversed/offset insertion into the host swaps 3V3 and GND or drives host outputs into module outputs — inspect keying and alignment before every insertion |
| J2, J3 | Generic 1x04 2.54 mm pin sockets, MPN TBD | Encoder connections; sockets (not headers) so the live 3V3 contacts are shrouded | Pin-order mismatch with the encoder breakout is the highest-probability assembly error on this board; 3V3/GND swap destroys encoder halls (Section 2) |
| J4 | Generic 1x03 2.54 mm pin header, MPN TBD | Spare conditioned inputs H1/H2 plus GND | Exposed header pins carry no supply (H1/H2/GND only), so a probe slip here is benign to the board — but H1/H2 are inverted at the PMOD, so a normally-closed limit switch reads with opposite polarity in fabric |
| #FLG01, #FLG02 | ERC power flags on 3V3 and GND | Schematic-only artifacts; not physical parts | Not applicable — confirm they never appear in a BOM or placement file |
Note: J2/J3/J4 MPNs are recorded as TBD in the schematic. They must be selected and the footprints verified before layout; this guide cannot review parts that have not been chosen.
6. Datasheet summary and design interpretation#
| Device | Key manufacturer facts used here | Board-specific interpretation |
|---|---|---|
| 74HC14 (Nexperia, datasheet Rev. 10, 2024-02-29) | 2.0–6.0 V supply; Schmitt inputs with unlimited rise/fall time; VT+/VT−/VH specified only at 2.0/4.5/6.0 V (see Section 5.1 table); abs max: VCC 7 V, I/O clamp ±20 mA, output ±25 mA, ICC 50 mA; tpd 15 ns typ at 4.5 V; ICC(quiescent) 2 µA max at 25 °C; input clamp diodes to both rails | 3.3 V operation is inside the operating range but between specified threshold columns — measure VT+/VT− per Section 10.C and record them as the board's real switching window. The 1 kΩ series resistors keep cable-transient clamp current within ±20 mA for realistic excursions. Slow RC edges cause extra supply current during the transition (datasheet Section 13); C7 covers this, but it is another reason not to remove the Schmitt stage |
| Yageo RC-series 0603 resistors (manufacturer series page, as recorded in the BOM fields) | General-purpose thick film, 1% (RC0603FR) | Values 10 k / 1 k / 100 Ω are uncritical at 1%; no derating concern at logic levels. Series page cited as recorded in the design; individual part drawings were not fetched for this review |
| Murata GRM188R71H103KA01D (10 nF 50 V X7R) and GRM188R71C104KA01D (100 nF 16 V X7R) | MPNs as recorded in the BOM fields | X7R at 3.3 V bias has negligible DC-bias derating at these voltages; 50 V rating on the filter caps gives headroom against cable transients. Murata part detail pages were not fetched for this review — confirm capacitance/voltage codes against Murata's site at BOM time |
Encoder and motor figures used in this guide (N20/JGA25 stall currents, typical CPR values) are class-typical estimates, not datasheet values — the specific encoder/motor chosen for the bench must be looked up and its numbers substituted in Section 8 before testing.
7. Expected values before bench testing#
All values are design targets for a board that does not yet exist.
| Quantity | Design target / calculated | What to measure |
|---|---|---|
| 3V3 quiescent current, no encoders | ~2 µA (U1) + 0 (no other loads); call it < 1 mA pass threshold including leakage | Bench supply readout at first power-up |
| 3V3 current, two encoders attached | Encoder hall boards typically draw a few mA each — class estimate only, check the encoder datasheet | Supply readout before/after plugging encoders (unpowered plug, then power) |
| Idle level, each PMOD signal | Logic low (~0 V through 100 Ω, unloaded): inputs pulled high, gates invert | DMM on PMOD pins 1–4, 7, 8 |
<CH>_RAW idle | 3.3 V (pull-up, nothing sinking) | DMM on the R7–R12 pad nearest the connector |
| Filter corner | fc ≈ 15.9 kHz (1 kΩ + 10 nF) | Function generator sweep on one channel (Section 10.C) |
| Rising-edge time constant, open-collector source | ~110 µs (11 kΩ · 10 nF); ~10 µs falling | Scope on <CH>_F with a signal source in open-drain mode |
| VT+ at 3.3 V | ≈ 1.8 V typical (interpolated — not a datasheet guarantee) | Slow-ramp test, Section 10.C |
| VT− at 3.3 V | ≈ 0.9–1.0 V typical (interpolated — not a datasheet guarantee) | Slow-ramp test, Section 10.C |
| Channel frequency vs RPM | f = (RPM/60) × PPR per channel; e.g. 7 PPR motor-shaft encoder at 15 000 RPM → 1.75 kHz per phase, 7 k counts/s at 4x decode | Scope frequency vs commanded/tachometer RPM, Section 10.D |
| A/B phase relationship | 90° ± encoder tolerance, constant sign for one rotation direction | Two-channel scope capture, Section 10.D |
| Output high/low levels | VOH ≥ ~3.2 V, VOL ≤ ~0.1 V at the light PMOD load (datasheet gives 4.4 V min VOH / 0.1 V max VOL at 4.5 V, 20 µA; 3.3 V values scale but are not tabulated — verify) | DMM/scope on PMOD pins |
8. Manual schematic and assembly review checklist#
- Confirm U1 is the HC part (74HC14D,653), not 74HCT14 — the HCT variant is out of spec below 4.5 V supply. Check pin-1 orientation against the SOIC-14 footprint.
- Verify the six-gate channel assignment against Section 4 (unit 4 uses input pin 9 / output pin 8 — the pin order reverses on that side of the package; a netlist error here swaps input and output on one channel).
- Confirm no value mixups between the three resistor values (10 k / 1 k / 100 Ω) and between C1–C6 (10 nF) and C7 (100 nF); all share the 0603 footprint and are trivially interchangeable by a placement error.
- Measure R1–R18 in circuit before first power where practical (10 k pull-ups read near 10 k against an unpowered CMOS input; 1 k and 100 Ω read true).
- Buzz J2 and J3 pin 1 to the 3V3 net and pin 2 to GND; then buzz the mating encoder harness against the encoder breakout's silkscreen. Do this for every new encoder/harness, not once.
- Confirm J1 orientation and that pins 9/10 are genuinely unconnected.
- Confirm C7 lands adjacent to U1 pin 14 in layout review (layout does not exist yet — carry this item forward).
- Confirm #FLG01/#FLG02 do not appear in BOM/placement outputs.
9. Bench contexts and grounding#
Two setups are covered; the procedure in Section 10 states which applies.
(a) PMOD host context. The module plugs into an FPGA host board (AruviX ECP5 or any PMOD host). 3V3 and GND come from the host; the host's supply current limit protects the module. The motor is driven from a separate current-limited motor supply (directly, or through a driver module). Ground is shared through the PMOD connector; the motor supply return must be joined to that same ground at one point (at the driver module or host ground post), or encoder signals will ride on whatever offset the motor return develops. Scope ground clips go to the host/module GND only.
(b) Standalone bench context. The module's 3V3 comes from a lab supply (set 3.3 V, current limit ≤ 50 mA) wired to the PMOD 3V3/GND pins via a breakout; a second, separate current-limited supply drives the test motor (limit per Section 2 stall estimates). The two supplies are floating relative to each other until you deliberately join their returns at the module GND — do so with one wire, at one point. An earth-referenced scope ground clip defines earth for the whole setup the moment it touches module GND; connect it only to GND and never to a motor lead.
In both contexts: logic rail on first, motor rail second; motor rail off first, logic rail off last.
10. Ordered bench-test procedure#
Stop at the first abnormal result. Record every measurement with board serial, encoder/motor identity (with their real datasheet numbers substituted into Section 8), equipment IDs, and operator.
A. Unpowered inspection and resistance tests#
- Nothing connected: no host, no supplies, no encoders, no motor, no scope.
- Complete the Section 8 checklist under magnification.
- Measure 3V3-to-GND resistance at J1 in both meter polarities. A CMOS part plus pull-ups should read high (tens of kΩ or more, settling as meter capacitance charges); investigate anything under ~1 kΩ before power.
- Measure each PMOD signal pin to GND and to 3V3: no hard shorts.
- Buzz each J2/J3/J4 contact to its net (Section 4 tables). Verify J2/J3 pin 1 = 3V3, pin 2 = GND — this is the encoder-killing swap.
- Buzz the encoder harness separately, then the harness plus encoder breakout documentation. Do not trust wire colors.
B. First power-up, no encoders, no motor#
- Standalone context (9b): 3.3 V, current limit 50 mA, nothing in J2/J3/J4.
- Apply power. Supply current must be well under 1 mA (target: µA-level). Higher current means a short, a reversed U1, or a wrong part — stop.
- Verify 3.3 V at U1 pin 14 relative to pin 7.
- Verify each
<CH>_RAWnode reads ~3.3 V and each PMOD signal pin reads logic low (inverted idle). Any channel idling high has an open pull-up, a solder problem at its gate, or a swapped gate pin assignment — stop.
C. Schmitt threshold and filter verification (one channel, then spot-check the rest)#
- Still no motor. Drive one channel's connector input (e.g. J2 pin 3, E1A_RAW) from a function generator or a bench supply through a 1 kΩ protective resistor.
- Slow-ramp threshold test: ramp the input slowly (≤ 1 V/s) from 0 V to 3.3 V and back while watching the corresponding PMOD output. Record the input voltage at which the output falls (that is VT+) and at which it rises again (VT−). Expect roughly 1.8 V and 1.0 V per the interpolated estimates, and require the measured window to sit between the datasheet's 2.0 V-column and 4.5 V-column limits (Section 5.1); anything outside that envelope means a wrong or damaged part. There must be exactly one clean output transition per threshold crossing — chatter here indicates a damaged gate or an open filter capacitor.
- Filter test: apply a 3.3 Vpp square wave in push-pull mode; confirm the PMOD output follows (inverted) at 1 kHz, and observe attenuation and delay growing toward the ~16 kHz corner. Then, if the generator supports open-drain mode (or via a small-signal NPN/NMOS pulling the node low), repeat and record the duty-cycle distortion caused by the asymmetric 10 µs / 110 µs time constants. Record the maximum frequency at which the output still toggles rail-to-rail — this is the board's real channel bandwidth for open-collector encoders and must be compared against the Section 8 frequency-vs-RPM math for your motor before any speed test.
- Spot-check at least one more channel per group (one of E2A/E2B, one of H1/H2) at a single frequency.
D. Quadrature capture with the encoder spun at speed#
- Attach encoder(s) to J2/J3 (power off, Section 2). Power the logic rail; record the new supply current (encoder hall draw).
- Mount the motor securely. Connect the motor to its current-limited supply (or driver module). Hands clear. Apply the motor rail at low voltage.
- Phase relationship: two-channel scope capture of E1A and E1B at the PMOD at a steady low speed. Verify square waves at the same frequency with approximately 90° phase offset. Record the actual phase error — cheap magnetic encoders can deviate noticeably, and the fabric decoder's glitch filter budget depends on it.
- Edge cleanliness, before vs after conditioning: capture the same edge simultaneously at
<CH>_RAW(or<CH>_F) and at the PMOD pin. The raw node shows the RC-rounded, possibly noisy edge; the PMOD side must show a single monotonic fast edge (74HC14 transition time is nanoseconds) with no double-triggering. Any extra PMOD edges per raw edge means noise exceeding the hysteresis window — investigate wiring/grounding before blaming parts. - Frequency vs RPM math: at two or three known speeds (from a tachometer or the driver's commanded speed), measure the channel frequency and check f = (RPM/60) × PPR using your encoder's real pulses-per-revolution at the shaft the encoder observes (motor shaft, not gearbox output — a 7 PPR motor-shaft encoder behind a 100:1 gearbox gives 700 PPR at the output shaft). Then sweep to maximum motor speed and confirm the frequency stays below the bandwidth limit measured in step C.3; if it does not, counts will be silently lost and closed-loop control built on this board will be wrong at speed.
- Repeat 3–5 for the second encoder channel pair on J3.
E. Direction convention and inversion check#
- The Schmitt stage inverts both A and B, which preserves the quadrature sequence — but the apparent direction seen by the fabric decoder depends on the A/B lead-lag convention, the encoder vendor's phase assignment, the harness wiring, and this inversion. None of these can be assumed.
- Rotate the shaft in a physically documented direction (e.g. clockwise viewed from the gearbox output face) by hand or at low motor voltage. Record which channel leads at the PMOD (E1A leading E1B, or the reverse).
- Document this as the module's direction convention: "physical CW at the output shaft = <A leads B / B leads A> at the PMOD, for encoder model X wired per harness Y". Any change of encoder model or harness invalidates the record.
- For H1/H2 only: verify polarity explicitly with a static test (hold the limit switch closed / magnet present, read the PMOD pin). These lines are level-sensitive and the inversion is not self-cancelling as it is for quadrature — fabric must invert them.
F. PMOD host integration#
- Move to context 9a. With the host unpowered, plug the module; inspect alignment (offset-by-one insertion is the classic PMOD failure).
- Power the host; confirm the host 3V3 rail is healthy and the module idles per step B.4.
- Configure the six FPGA pins as inputs only. Confirm in constraints before loading a bitstream — a host pin misconfigured as an output fights U1 through 100 Ω at ~33 mA, beyond the gate's ±25 mA rating.
- Run the
quad_decoderfabric core (when it exists — the HDL deliverable is still open per the README) against a slow hand-rotation and verify the count direction matches the Section 10.E convention. - Repeat the D.5 speed sweep while comparing fabric counts against scope-measured edge counts over a fixed gate time.
11. Troubleshooting map#
| Symptom | First measurements | Likely areas |
|---|---|---|
| High supply current at first power | U1 pin 14/7 voltage, U1 temperature, board short check | Reversed/wrong U1 (HCT at 3.3 V draws through-current on slow edges), solder bridge, C7 or C1–C6 short |
| One channel idles high, rest low | <CH>_RAW, then the gate input pin, then the gate output pin | Open pull-up (R1–R6), open at the gate input, shorted filter cap pulling the input low, swapped in/out pins on unit 4 |
| Channel dead at PMOD but gate output toggles | Both ends of the 100 Ω (R13–R18) | Open series resistor or PMOD solder joint — the split diagnostic this resistor provides |
| Output chatters on slow input | Slow-ramp test on that channel; compare hysteresis window to Section 5.1 | Damaged gate, open C1–C6 (no filtering plus marginal noise), ground bounce from missing C7 |
| Extra counts only while motor runs | Simultaneous raw vs PMOD capture; check motor-return grounding (Section 9) | Motor supply return not joined at one point, encoder harness bundled with motor leads, filter cap open/wrong value |
| Counts lost at high RPM | Frequency at PMOD vs C.3 bandwidth record; duty cycle | Open-collector rise-time limit (Section 3.4) — expected physics, not a defect; document the speed ceiling |
| Direction reads backwards in fabric | Section 10.E capture | Harness A/B swap, encoder vendor phase convention, or decoder polarity assumption — fix in fabric or documentation, not by resoldering |
| Encoder dead after connection | 3V3/GND order at J2/J3 vs harness | Miswired harness has destroyed the encoder halls; replace the encoder, fix the harness, re-run Section 10.A.5–6 |
| H1/H2 logic sense wrong | Static level test at J4 and PMOD | Inversion not accounted for in fabric (expected — every channel is inverted) |
12. Bench record template#
| Field | Record |
|---|---|
| Board revision / serial | |
| U1 date code and marking (confirm HC, not HCT) | |
| Encoder model(s), PPR, shaft observed, harness ID | |
| Motor model, gearbox ratio, stall current (from its datasheet) | |
| Supplies (logic and motor), current limits, equipment/calibration | |
| Bench context used (9a host / 9b standalone), grounding scheme | |
| Unpowered resistance results | |
| First power-up current (bare / with encoders) | |
| Measured VT+ / VT− / hysteresis per tested channel | |
| Filter response and open-collector bandwidth ceiling | |
| Quadrature phase error at speed, per encoder | |
| Frequency-vs-RPM check results and maximum verified RPM | |
| Direction convention statement (Section 10.E.3) | |
| H1/H2 polarity verification | |
| Fabric count cross-check result | |
| Deviations, photos, raw-capture file paths | |
| Reviewer / date / disposition |
13. Review conclusion#
The architecture is simple and appropriate: passive pull-up and RC filtering per channel feeding a hex Schmitt inverter is the standard, robust front end for open-collector encoder outputs, and the 100 Ω series resistors give both protection and a useful diagnostic split point. The design's honesty about inversion (every channel is NOT(input)) is carried through the schematic comments and must be carried through fabric code and direction documentation.
The principal open risks, in order: (1) nothing has been built — there is no layout, no BOM buy, and no bench evidence, so everything in this guide is untested; (2) the asymmetric open-collector rise path (11 kΩ · 10 nF ≈ 110 µs) plausibly caps usable channel frequency near single-digit kHz, which may conflict with high-RPM motor-shaft encoders and must be measured against the chosen motor before the "MHz-rate decode" lesson is demonstrated at real speed; (3) the 74HC14's thresholds are not specified at 3.3 V and must be measured, not assumed; (4) J2/J3/J4 connector MPNs are TBD, and the 3V3/GND pin order at J2/J3 is an encoder-destroying miswire hazard that only harness discipline mitigates; (5) the fabric quad_decoder core, its glitch filter, and the direction convention record do not yet exist, and the board cannot be called verified until fabric counts have been cross-checked against scope edge counts with a real motor spinning the encoder.