← AXS-038

Circuit review & bench-test guide

AXS-038 — TTP223 capacitive-touch PMOD module

Design-stage — board not yet fabricated

Document purpose#

This document explains the axs-038-touch capacitive-touch 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, rev 0.1-schematic), the module README, and the Tontek datasheet cited in section 6.

The board is a design-stage prototype: the schematic is generated and ERC is clean (0/0), but PCB layout has not started and no first article has been fabricated or assembled. Capacitive-touch behavior is dominated by layout, electrode geometry, and overlay — exactly the things that do not exist yet — so every threshold, timing, and sensitivity statement below is a design target to verify, not proof of behavior. The consulted TTP223-BA6 datasheet is itself marked "Preliminary" (V2.1), and the datasheet URL embedded in generate_design.py currently returns 404; both facts are flagged honestly in section 6.

1. What the board does#

The board is the simplest sensor in the AruviX line: a Tontek TTP223-BA6 single-key capacitive touch detector (U1) whose debounced output Q drives one PMOD GPIO (TOUCH, J1 pin 1) through a 100 Ω series resistor (R1). The sense electrode attaches at J2 (a 1×1 pin-header pad on net TOUCH_PAD, wired to U1 pin 3). A DNP capacitor C2 (10 pF placeholder, 0–50 pF usable) desensitizes the input when fitted. Two open solder jumpers strap the TTP223's power-on-sampled option pins to 3V3: JP1 → AHLB (output polarity) and JP2 → TOG (momentary vs toggle). Both pins have internal pull-downs, so the open-jumper default is momentary, active-high output.

The teaching goals are FPGA input synchronizers, debouncing, edge detection, and toggle logic — plus, on the hardware side, what a capacitive electrode actually is.

Functional block diagram#

3V3 (J1 pin 6/12) ──┬── C1 100 nF ── GND
                    │
                    v VDD (pin 5)
J2 TOUCH PAD ──── I (pin 3)  U1 TTP223-BA6  Q (pin 1) ── R1 100 Ω ── TOUCH (J1 pin 1)
      │                        AHLB (pin 4) ──[JP1 open]── 3V3
   C2 10 pF (DNP)              TOG  (pin 6) ──[JP2 open]── 3V3
      │                        VSS  (pin 2) ── GND
     GND            (AHLB/TOG have internal ~28 kΩ pull-downs,
                     sampled/latched at power-on)

2. Safety and scope boundaries#

3. Power and control sequence#

  1. The host (PMOD socket or bench supply) provides 3.3 V/GND; C1 decouples U1 VDD locally.
  2. At power-on, U1 latches AHLB and TOG (internal pull-downs read 0 unless the corresponding jumper is bridged to 3V3), then runs a ~0.5 s stabilization during which it calibrates its no-touch baseline and detection is disabled. Per the datasheet: "After power-on have about 0.5sec stable-time, during the time do not touch the key pad." Touching (or holding) the electrode during this window is captured into the baseline and mis-calibrates the key.
  3. In idle the device sits in low-power mode (typ 1.5 µA at 3 V), waking ~every 160 ms to sample. A detected touch switches it to fast mode; after release it stays in fast mode for ~12 s before returning to low-power mode.
  4. Auto-recalibration runs for life: in low-power mode the re-calibration period is about 4.0 s; after a touch is detected and released, re-calibration resumes about 16 s after release. Slow environmental drift (humidity, temperature) is absorbed; a permanently-present "touch" is eventually calibrated out.
  5. Q drives the latched mode's output through R1 to the host. Response time is max 220 ms in low-power mode and max 60 ms in fast mode (both at VDD = 3 V), so the first touch after idle can take up to ~220 ms while repeated touches respond faster.

4. Interfaces, jumpers, and usage contexts#

PMOD pin123456789101112
NetTOUCHNCNCNCGND3V3NCNCNCNCGND3V3

Mode-jumper truth table (per datasheet output-mode table)#

JP2 (TOG)JP1 (AHLB)Latched modeQ behavior
open (0)open (0)Direct, CMOS active-highBoard default: Q high only while touched
open (0)bridged (1)Direct, CMOS active-lowQ low while touched, high idle
bridged (1)open (0)Toggle, power-on state = 0Each touch flips Q; starts low
bridged (1)bridged (1)Toggle, power-on state = 1Each touch flips Q; starts high

Notes: on the BA6 variant Q is CMOS push-pull in all four modes; open-drain outputs exist only on other TTP223 family variants (pad/bonding options), so do not expect wired-OR behavior from this part. The option pins are latch-type: strapping them to 3V3 through a jumper causes no static current per the datasheet, and changes take effect only at the next power-on — re-jumpering a powered board does nothing until power cycles.

The bench plan covers two usage contexts; every powered test states which applies:

5. Component-by-component review#

Every reference designator in generate_design.py appears below. #FLG01 and #FLG02 are ERC power-flag directives on 3V3 and GND, not physical parts.

Ref.Part / datasheet summaryFunction and why neededIf absent/openIf shorted, wrong, or misassembled
U1Tontek TTP223-BA6, SOT-23-6 single-key detector; 2.0–5.5 V; 1.5 µA typ low-power at 3 V; 60/220 ms max response fast/low-powerWhole sensing function: oscillator-based capacitance detection, auto-calibration, debounce, mode logicNo module functionRotated package maps VDD onto Q/AHLB — likely fatal; TTP223N-BA6 substitution changes sensitivity/stability trade (N is more sensitive, less stable per datasheet)
J112-pin PMOD plug (Type 1 GPIO)Power and the single TOUCH output to the hostNo module function3V3/GND swap on jumper wires can destroy U1; only pin 1 carries signal, so mis-mapping shows as a dead input
J2Generic 1×1 pin header, 2.54 mm (MPN TBD)Electrode attachment point (wire, foil, or PCB pad) on TOUCH_PAD to U1 pin 3Bare pin still works as a tiny electrode, but usable sensitivity needs an attached electrodeSolder bridge to nearby ground reads as permanent capacitance (desensitized or stuck); a huge electrode without C2 false-triggers
C1100 nF 16 V X7R (Murata GRM188R71C104KA01D)U1 VDD decoupling; datasheet requires it "routed with very short tracks" to VDD/VSS and warns that supply drift/shift causes "sensitivity anomalies or false detections"False triggers and calibration instability, especially on long supply leadsShort kills the rail; placement far from U1 defeats it — layout review item
C210 pF C0G, DNP (Murata GRM1885C1H100JA01D)Sensitivity trim from TOUCH_PAD to GND; datasheet range 0 ≤ Cs ≤ 50 pF, "the value of Cs use smaller, then the sensitivity will be better"; 0 pF (unfitted) = maximum sensitivityNothing — absent is the deliberate default (max sensitivity)Fitted when the electrode is small makes the key dead/insensitive; X7R substitution drifts sensitivity with temperature (datasheet explicitly recommends NPO/C0G)
R1100 Ω (Yageo RC0603FR-07100RL)Series protection/damping between Q and the host pinDirect pin-to-pin: no contention limit, more ringing on long leadsOpen reads as a floating host input (random levels); grossly large value plus cable capacitance slows edges, though at 60–220 ms response this is rarely functional
JP1Open solder jumper (AHLB → 3V3), not in BOM/posSelects output polarity; open = active-high (internal pull-down), bridged = active-lowOpen is the default mode, so "absent" is normalUnintended solder bridge silently inverts the output — the classic "touch reads inverted" fault; see section 10
JP2Open solder jumper (TOG → 3V3), not in BOM/posSelects momentary vs toggle; open = direct/momentary, bridged = toggle (power-on state 0)Open is the default modeUnintended bridge makes the output latch on alternate touches — looks like a "stuck" or "missed release" fault
#FLG01, #FLG02ERC power flags (3V3, GND)Schematic-only ERC directivesNot physicalConfirm they did not enter the BOM

6. Datasheet summary and design interpretation#

DeviceKey manufacturer facts used hereBoard-specific interpretation
TTP223-BA6 / TTP223N-BA6 (Tontek, V2.1, 2009-11-30, marked Preliminary)Operating voltage 2.0–5.5 V; low-power current 1.5 µA typ / 3.0 µA max at 3 V no load; response time max 60 ms (fast) / 220 ms (low-power) at 3 V; Cs range 0–50 pF, smaller = more sensitive, NPO recommended; ~0.5 s power-on stable time with detection disabled — do not touch during it; low-power re-calibration ~4.0 s, re-calibration ~16 s after key release; fast mode retained ~12 s after release; pins: 1 Q, 2 VSS, 3 I, 4 AHLB, 5 VDD, 6 TOG; AHLB/TOG are latch-type inputs with ~28 kΩ typ pull-downs, initial state 0; TOG/AHLB mode table as in section 4; Q CMOS, IOL 8 mA / IOH −4 mA at 3 V; ESD 4 kV HBM; −40 to +85 °CThe board's defaults (both jumpers open, C2 DNP) give momentary active-high output at maximum sensitivity, which is correct for a bare pin/short-wire electrode. PCB application notes in the datasheet — sense line as short as possible, not parallel/crossing other lines, no metal in the overlay panel, C1 tight to the pins — are all layout requirements still to be executed. Maximum-on-time: this datasheet defines none for the BA6 (a touch held forever is only removed by the normal re-calibration mechanism); some other TTP223 family variants and module boards document a bounded maximum output-on time (commonly quoted around 100 s). That spec is variant-dependent and was not verified for BA6 — treat any max-on-time assumption as unconfirmed

Sources actually consulted: TTP223-BA6/TTP223N-BA6 datasheet V2.1 (Components101 mirror) and the LCSC-hosted copy. The Tontek URL recorded in generate_design.py (https://www.tontek.com.tw/uploads/product/106/TTP223-BA6_V1.0_EN.pdf) returned 404 at review time and references an older V1.0 — update the schematic Datasheet field to a live link before release.

7. Expected values before bench testing#

QuantityDesign target (datasheet, VDD = 3 V unless noted)What to measure
Idle supply current~1.5 µA typ, 3.0 µA max (low-power, no load)Bench µA meter after ≥12 s idle, context B
Q idle level (default mode)~0 V (active-high momentary)DMM on TOUCH
Q touched level~3.3 V railDMM on TOUCH during firm pad touch
First-touch latency from idle≤220 msScope: finger-contact vs Q edge (approximate)
Repeated-touch latency (within ~12 s)≤60 msScope, second touch shortly after first
Power-on stabilization~0.5 s, detection disabled, hands offScope Q from power rise; no touch response in window
Recovery of a mis-calibrated pad~4 s recal period (idle); ~16 s after releasePhase C.4 experiment
Sensitivity vs Csmonotonically decreasing over 0–50 pF; 0 pF = maxPhase D tuning ladder
Option-pin pull-downs~28 kΩ typ to GND on AHLB/TOGDMM resistance, power off, jumpers open
Q drive8 mA sink / 4 mA source class at 3 VOnly if driving anything besides a host input

8. Manual schematic and assembly review checklist#

9. Ordered bench-test procedure#

Stop at the first abnormal result. Every jumper or Cs change requires a power cycle (option pins latch at power-on; calibration baseline is also rebuilt then). Keep hands clear of the electrode for ~1 s at each power-up.

A. Unpowered inspection and resistance tests#

  1. Complete the section 8 checklist under magnification.
  2. Measure 3V3-to-GND in both polarities; investigate hard shorts first.
  3. Measure TOUCH_PAD-to-GND: should be high impedance (no C2, no bridge).
  4. Verify JP1/JP2 open and record AHLB/TOG-to-GND readings.

B. First power-up and default-mode check (context B)#

  1. Bench supply 3.30 V, 20 mA limit. Power up with nothing near J2.
  2. After the ~0.5 s stabilization, TOUCH must idle low. Record idle supply current after ≥12 s (fast-mode hold expiry); expect µA-class.
  3. Touch the J2 pin (or a small attached pad) firmly: TOUCH goes high for the duration of the touch and returns low on release — momentary, active-high. Latency up to ~220 ms on the first touch is normal.
  4. Repeat several touches; within ~12 s of activity responses should feel near-instant (≤60 ms).

C. Power-on calibration behavior (context B)#

  1. Power off. Hold a finger on the electrode, power on, keep holding ~2 s, then release. Expected mis-calibration signature: the touch present at power-up is baked into the baseline, so it is not reported, and behavior immediately after release may be inverted or dead.
  2. Hands off, wait and observe: auto-recalibration (~4 s period idle, ~16 s after a release event) should restore normal behavior without a power cycle. Record how long recovery actually takes.
  3. Power cycle cleanly (hands off) and confirm normal behavior returns immediately after the 0.5 s window.
  4. Slow-drift check: rest a grounded metal object near (not touching) the electrode for >30 s — the device should calibrate it out; removing it may cause a brief anomaly that self-heals within the recal period.

D. Sensitivity (Cs) tuning ladder (context B)#

Per the datasheet, sensitivity depends on electrode size, overlay/panel thickness, and Cs; only Cs is tuned here, 0–50 pF, larger = less sensitive.

  1. Start at the board default: C2 DNP (0 pF, maximum sensitivity) with the intended electrode attached. Characterize: minimum finger pressure/area for detection, detection-through-overlay (add plastic sheets of known thickness), and false-trigger behavior when a hand hovers.
  2. If the key is too sensitive (hover-triggers, or cabled electrode false-fires): power off, fit C0G/NPO capacitance at C2, power on hands off, re-test. Suggested ladder: 5 pF → 10 pF (board's placeholder value) → 22 pF → 33 pF → 47 pF. Stay ≤50 pF.
  3. At each step record: fitted Cs, detects-firm-touch (Y/N), detects-light-touch (Y/N), hover false-trigger (Y/N), works through intended overlay (Y/N). Choose the smallest Cs that kills false triggers while keeping the intended press reliable.
  4. If even 47 pF is too sensitive, the electrode is too large or the wire too long — fix the electrode, not the capacitor.

E. Electrode (pad-wire) experiments (context B)#

  1. Wire length: attach 5 cm, 20 cm, 50 cm wires to J2 with a 15 mm foil pad at the end. Longer wire = more baseline capacitance and more pickup: expect reduced margin and eventually false triggers; note where each configuration lands and whether Cs re-tuning is needed (every change: power cycle, hands off).
  2. Ground proximity: run the electrode wire flat against a grounded plane vs suspended in air. Adjacent ground raises baseline capacitance (less sensitive) but improves noise immunity — record both effects.
  3. Overlay thickness: stack 1–5 mm of plastic/glass (no metal — the datasheet forbids metal or conductive paint in the panel) over the foil pad; find the thickness where a firm press stops being detected at the chosen Cs. Thinner panel = more sensitive.
  4. Record the final chosen electrode/Cs combination as the layout requirement for the shipped board (README open item: on-board copper pad vs J2 wire).

F. Mode-jumper matrix and host integration#

  1. Context B, all four jumper combinations (power off, re-solder, power on hands off, test, record): verify each row of the section 4 truth table — default momentary active-high; JP1 only → momentary active-low (idle high); JP2 only → toggle starting low; both → toggle starting high. Confirm a jumper change while powered has no effect until the next power cycle.
  2. Context A (ULX3S-class PMOD host): with the chosen electrode and mode, run the FPGA design (2-FF synchronizer, debounce, edge detect). Confirm clean single events per touch, no double-edges, and that FPGA configuration-time pin states do not disturb the module (TOUCH is module-driven; the host pin must be a plain input, no pull fighting R1).
  3. In context A, repeat a power-on-while-touched test — the host powers the module at configuration time, so a user resting a finger on the pad during board power-up is the realistic mis-calibration scenario. Verify self-recovery.

10. Troubleshooting map#

SymptomFirst measurementsLikely areas
Never detectsVDD at U1 pin 5, C2 unintentionally fitted?, TOUCH_PAD-to-GNDMissing power, C2/solder bridge loading the pad, U1 rotated
Output inverted (idle high)JP1 continuity to 3V3Unintended AHLB bridge, or intentional mode not power-cycled in
Output latches / misses releasesJP2 continuity to 3V3Unintended TOG bridge (toggle mode)
Dead right after power-up then recoverstiming vs the 0.5 s window and recal periodsNormal calibration behavior — touched during power-up
False triggers, hover triggerselectrode size/wire length, supply ripple at C1Over-sensitive: fit/raise Cs, shorten wire; unstable supply (datasheet warns drift causes false detection)
Insensitive, needs hard pressC2 value/dielectric, overlay thicknessCs too large, overlay too thick, electrode too small
Sensitivity drifts with temperatureC2 dielectric markingX7R fitted where C0G/NPO required
Works standalone, flaky on FPGA hosthost 3V3 quality, pin constraint, host pullsContext A rail/grounding, wrong pin mapping, host pull-down on TOUCH
No signal at host though Q toggles at U1 pin 1R1 both ends, J1 pin 1 continuityR1 open, connector/wiring fault

11. Bench record template#

FieldRecord
Board revision / serial
U1 marking (223B vs 223NB) and lot
JP1 / JP2 state (verified by ohmmeter)
C2 fitted value and dielectric (or DNP)
Electrode description (pad size, wire length, overlay)
Supply / host identity, DMM/scope IDs
Idle current after 12 s
Default-mode touch/release result
Power-on-while-touched recovery time
Cs tuning ladder table (file/notes path)
Electrode experiment results
Four-mode truth-table verification
Context A (FPGA) integration result
Deviations, photos, raw-file paths
Reviewer / date / disposition

12. Review conclusion#

The circuit is a faithful minimal implementation of the datasheet's application circuit: decoupled TTP223-BA6, high-impedance electrode node with an optional 0–50 pF trim, series-protected CMOS output, and latch-type option straps correctly drawn as passive jumpers to 3V3 against the internal pull-downs. The design decisions that matter — electrode geometry, sense trace routing, overlay, and the final Cs value — are all deferred to layout and bench tuning, which is appropriate but means essentially nothing about real-world sensitivity is verified today. The principal open risks are: no fabricated first article; a dead datasheet URL in the generator (and a "Preliminary"-status datasheet generally); the unresolved on-board-pad vs wire electrode decision; the variant-dependent, unverified maximum-on-time behavior; and the human-factors trap that both mode changes and calibration are power-on events — a lesson the bench plan makes explicit rather than hides.