In development. It changes without notice.
The bench rig's schematic
rig.kicad_sch is the normative wiring of the INA228 bench rig: what is soldered to what, which terminal carries which signal, and why the sense point is where it is. Its second sheet, rig-calibration.kicad_
The generator is deterministic: run twice, it writes the same bytes. rig.pdf (both sheets, a bookmark each), rig.svg (sheet 1) and rig-calibration.svg (sheet 2) are committed renders, exported in KiCad 10.0.8's container (kicad/
The Kleidos KiCad style
The drawing follows the style every Kleidos schematic is drawn to, the boards' included, owned by the brand repository (its kicad/
The parts are this project's own symbols (rig.kicad_sym, written by the generator; no KiCad library is read): boxes with their pins on the pitch and their names inside, the boards' resistor, capacitor, ground and power flag, the relay drawn released, the Relay 2 Click a box with its RL1 drawn open between its two terminals. Where the wire is the point (the current path, the Kelvin sense, the leads a relay opens) the drawing connects by wire; where a net only has to reach another block it connects by a global label of its name (+3V3, SDA, SCL, ALERT, BYPASS, JD-VCC, K1_DRV to K4_DRV); the nets of the current path are named on their wires (VBUS, VIN+, VIN-, DUT+, 5V, and sheet 2's REF+); the grounds are ground symbols, one with the power flag ERC needs. A remark is text, never a label. The notes and the revision history are panels on the page.
The renders carry the organization's metadata profile (scripts/
What the drawing is for
A wiring guide in prose can drift from the bench without anyone noticing, and this one did: it described one pigtail where the rig has three, and put the shunt inside the INA228 block as if it were a property of the part rather than the component the whole measurement rests on. The schematic exists so that a disagreement between the drawing and the bench is visible rather than implicit.
Two things it records that a photograph would not:
- R100 is the measurement. The part is marked only R100; its value is measured against the VPG 100 Ω reference (sheet 2) and filed in the calibration registry (calibration/, calibration/
README.md), which the Kleidos QA harness reads. The drawing names the part and how it is calibrated; it never states the value, so a new calibration changes the registry and nothing here. - Where the voltage is sensed, which decides what the reported voltage means. It is not the same node as the cell, and the difference is the pigtails.
Rev C: the relay module
Rev C (2026-10-30) added the HW-316 four-relay module the meter drives (docs/
Rev D: the rig as it stands (2026-11-20)
Rev D draws the bench as verified on 2026-11-20 (calibration/
- The bypass is U4, a MikroE Relay 2 Click (MIKROE-1899): two IXYS LCA717 PhotoMOS relays, normally open, 0.15 Ω at most when on (0.083 Ω typical, at 1 A) and 3 ms at most to turn on or off at 5 mA of LED current (IXYS DS-LCA717-R04). The drawing shows RL1: its terminals from the VIN+ node to K1's NC (across the shunt and K1 together), its control on the mikroBUS PWM position (16), which is relay 1 in the MikroE SDK (relay2.c) and RL1 on the Click's silkscreen, driven by GPIO15 (T8), active high. The Click's +3.3V (7) and GND (8) go to the carrier's 3V3 and G. RL2, its control on the AN position (1), is drawn no-connect.
- The bench uses RL2 instead: the GPIO15 wire on the AN-position pin, the bypass on RL2's terminals. The two channels are the same circuit, so the netlist is the same; the sheet's notes say so, and the registry's configuration mjkdz-r100-relay2click names the channel fitted. The owner's second Click is not used (no soldering on the boards under test).
- The HW-316 keeps only K1, the lead, and keeps it mechanical: its NC is closed at rest, so the DUT stays powered when the meter is off, and no PhotoMOS on-resistance sits in series with the DUT. It is used as a single-relay module: only IN1 is wired, to GPIO7; IN2, IN3 and IN4 are not wired at all (a floating input is off), so K2, K3 and K4 never energize and every one of their contacts is flagged no-connect. The carrier's GPIO16 (T9) and GPIO17 (T10) reach nothing: the firmware never drives them (the spares k3 and k4 read unwired, firmware/
src/ relay.h kChannels) and from 0.16.6 parks both as inputs with the internal pull-down (kParkedPins). The sheet's note still says the firmware drives them, from before 0.13.0; it changes with the next export of the drawing. - Pigtail 2 lands on the breakout's VBUS screw, and JP2, a short wire, joins VBUS to VIN+, so VBUS reads the cell's side (CALibration:VBUSside SOURce).
- The null path (ROUTe:NULLpath ON, firmware image meter from 0.8.0, meter_relay2 before) closes RL1, then opens K1; OFF recloses K1, then opens RL1. With every relay released the drawing is still rev B: K1's NC keeps the DUT on the shunt and RL1 leaves nothing across it.
Sheet 2, the calibration (rig-calibration.kicad_
Where the parts sit, which the drawing does not show
The schematic draws connections, not placement, and one placement matters: the INA228 breakout (U1) sits about 5 cm from the ESP32-S3 carrier (U2), beside it and never stacked under the module's PCB antenna. Stacked, as it was until 2026-11-21, it picked up the meter's own radio on a radio image (an impulse of about −25 µV on every SoftAP beacon, the floor's sd doubled, the null moved by −2.97 µV under traffic); 5 cm away none of that could be seen. Moving it changed no wire, so the drawing and its revision stay as they are. The measurements and the procedure are in docs/
How the drawing is checked
By export, not by looking: the first version of this drawing looked right and connected nothing. export_rig.py runs ERC on both sheets (the style allows no message, error or warning, and the project ignores no rule) and compares the drawn netlist with EXPECTED in the same script, the rig as wired:
- 50 nets and 118 pins. Sheet 2's named nets carry its name (/calibration/VIN+); the global nets (GND, +3V3, SDA, SCL, ALERT, BYPASS, JD-VCC, K1_DRV) are one net across both sheets, as they are on the bench, so sheet 2's U101, U104 and K101 sit on them beside U1, U4 and K1. The single-pin nets are exactly the pins flagged no-connect: K1 NO, U4's AN-position pin and RL2's two terminals (and the same three of U104 and K101's NO on sheet 2), every contact of K2, K3 and K4, U3 IN2, IN3 and IN4, and U2's GPIO16 (T9) and GPIO17 (T10).
- The measurement path: VBUS = RW2.2, JP2.1, U1 VBUS; VIN+ = JP2.2, R100.1, U1 IN+, U4 RL1 A; VIN- = R100.2, U1 IN-, K1.COM; DUT+ = K1.NC, RW3.1, U4 RL1 B.
- The calibration: /calibration/VIN+ = RW102.2, R200.1, U101 IN+, U104 RL1 A; /calibration/VIN- = R200.2, U101 IN-, K101.COM; /calibration/DUT+ = K101.NC, RW103.1, U104 RL1 B; /calibration/REF+ = RW103.2, R4.1, U101 VBUS; R4.2 on GND.
- The control: BYPASS = U2 GPIO15 and the Click's PWM position (16); GPIO7 to U3 IN1, the one input wired; 5V = U2 5V (T21), U3 VCC, JP1.1; JD-VCC = JP1.2, U3 JD-VCC, the A1 of every relay; K<n>_DRV = U3 DRV<n> and K*n*'s A2.
tests/