Camera (visual record)
Specimen
Dimensions (mm) — leave blank to skip
Measurement device — spare ESP32 over USB
Put a spare ESP32 to work: it sends each reading straight into the log, so you don't type. Needs Chrome or Edge served from https or localhost (file:// and other browsers can't open USB serial — you can still type by hand). Wiring and firmware are on the Breadboard tab.
Logged rows
Give the spare ESP32 a job
With the servo gone, a spare ESP32 is free. Use it as the measurement station: it reads the caliper or a gauge and sends each number straight into the logger over USB (the "Connect ESP32" button on tab 1, via Web Serial). You press one button on the bench, the number lands in the CSV, and the optional QAPASS 16×2 LCD shows it. Less typing, fewer transcription mistakes.
Option A — potentiometer / linear gauge (reliable)
A linear slide potentiometer is a cheap position gauge: easy to wire and always works, but lower precision than your digital caliper and it must be calibrated. Good for a second axis (say height) or as a backup. It reuses the repo's existing potentiometer_to_mm() in qualityrelay17/hardware_ingest.py and the /hardware/caliper-reading endpoint.
| from | to | why |
|---|---|---|
| pot outer pin 1 | ESP32 3V3 | top of the divider |
| pot outer pin 2 | ESP32 GND | bottom of the divider |
| pot wiper (middle) | ESP32 GPIO34 (ADC, input-only) | the position voltage |
| button leg 1 | ESP32 GPIO32 | "send reading" button (INPUT_PULLUP) |
| button leg 2 | ESP32 GND | pressed = LOW |
| QAPASS LCD VCC / GND | ESP32 5V (VIN) / GND | power the 16×2 display (optional) |
| QAPASS LCD SDA / SCL | ESP32 GPIO21 / GPIO22 | I²C data / clock (optional) |
ADC_MIN/ADC_MAX and MM_MIN/MM_MAX in the sketch. Without that the millimetres are meaningless.Firmware: firmware/measurement_station/esp32_measurement_station.ino (default mode). GPIO34 is input-only and ADC-safe.
Wire it and test (USB unplugged while wiring)
- Wire the three pot pins, then the button. The LCD is optional — skip it for the first test.
- Multimeter across the pot: wiper (GPIO34 wire) should read 0 → 3.3 V as you slide it. If it does not, swap pin1/pin2.
- Plug in USB. Flash
esp32_measurement_station.inowithREAD_SOURCE = SOURCE_POT. Open Serial Monitor at 115200; you should see# QRM ready. - Press the button. A number prints each press. Slide the gauge, press again: the number changes.
- Calibrate: at ≥ 5 known caliper positions, note the printed raw/number, then set
ADC_MIN/ADC_MAXandMM_MIN/MM_MAXin the sketch and reflash. - In this page (tab 1) click Connect ESP32, pick the port, then press the button — the value lands in the focused field. Click "Add specimen to log".
Option B — digital caliper data port (precise, advanced)
If your caliper has a 4-pad data port under a cover, the ESP32 can read the exact number it shows. Precise, but the logic is ~1.5 V and the frame format varies by brand, so this is experimental and untested here.
How the ESP32 talks to the logger
The sketch prints at 115200 baud, one reading per button press. The logger (tab 1 → Connect ESP32) reads each line and either fills the field you are on or appends a row.
| ESP32 prints | the logger does |
|---|---|
20.01 (a bare number) | fills the dimension field you have selected — use it like a numeric keypad, then click "Add specimen to log" |
QRM,width,mid,20.01 | appends a full row (feature, location, value) with method = the "source" you picked |
# QRM ready | ignored (banner / comment) |
Device rows are tagged evidence_tier = PHYSICAL_CAPTURE; typed rows are OPERATOR_CONFIRMED. Confirm device readings against the display when it matters.
CSV columns (tidy / long format)
One row per individual reading. This is the format the Export button writes and that docs/engineering/templates/specimen_measurements.csv documents. Excel opens it directly; use a pivot table to view width-per-position etc.
| column | meaning |
|---|
Handoff to a later agent (not run here)
This page and the summarizer only record and describe the measurements. They do not change code. A later agent (your "CMC agent") could read this CSV and propose updates, for example:
- group rows by
specimen_idandfeature, then compare the measured mean againstnominal_mm; - flag critical features (
width,slot_inner_width) whose deviation exceeds the chosen tolerance; - propose new nominal/tolerance constants or decision thresholds for review.
Summarize a CSV now, without any agent: python3 scripts/summarize_measurements.py your_file.csv prints per-specimen min/max/mean/spread and deviation from nominal, and can write a JSON summary with --json out.json.