Skip to the content
2 layers69.9 × 35.6 mmRotary compression tester, the printed circuit board in 3D

Rotary compression tester

bilka00/rotary_compression_tester

A Wi-Fi compression tester for Wankel (rotary) engines, built on a LOLIN D1 mini (ESP8266) and an ADS1115 ADC. The device raises its own access point and serves a single-page web UI, so any phone or laptop becomes the…

Size
69.9 × 35.6 mm
Copper layers
2
Thickness
1.6 mm
Parts
24
Nets
27
Pads
80
Tracks, vias
58, 63
Pours
2
Routed
Yes
KiCad
KiCad 8.0 (file 20240108)
Created
27 Jul 2026
Updated
27 Jul 2026

Overview

Rotary compression tester is an open-source printed circuit board by bilka00, from the bilka00/rotary_compression_tester repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 69.9 × 35.6 mm with 24 parts on 27 nets, routed with 58 tracks and 63 vias.

It is built around the AMS1117-5.0 and ADS1115. Its parts include 9 connectors, 8 resistors, 4 capacitors and 2 ICs.

Main components

2

README

README.md

RECT — Rotary Engine Compression Tester

A Wi-Fi compression tester for Wankel (rotary) engines, built on a LOLIN D1 mini (ESP8266) and an ADS1115 ADC. The device raises its own access point and serves a single-page web UI, so any phone or laptop becomes the display — no screen, no buttons, no app.

Unlike a piston-engine gauge, a rotary tester has to report three separate peaks per rotor revolution — one per rotor face — plus the cranking RPM they were taken at. RECT captures all three in one crank, logs them, and draws the pressure trace.

RECT carrier board, front


Features

  • Automatic trigger — a run starts by itself once pressure rises above the trigger threshold; no button to press while cranking.
  • Per-face peaks — three independent peak detectors with hysteresis, running at the full ADC sample rate (860 SPS).
  • Cranking RPM — derived from the interval between peaks.
  • Face spread — the difference between best and worst face as a percentage; highlighted when it exceeds 10%.
  • Pressure trace — a 500 Hz oscillogram of the whole run, plotted in the browser with peaks marked, exportable as CSV.
  • Run log — the last 16 runs kept in RAM.
  • Bilingual UI — English / Ukrainian, toggled in the header, remembered in localStorage.
  • Captive portal — connect to the AP and the page opens on its own.

Hardware

PartNotes
LOLIN D1 mini (ESP8266)Any ESP8266 board with 3.3 V I²C works
ADS1115 16-bit ADCI²C address 0x48 (ADDR → GND)
Pressure sensor0…1.2 MPa (174 PSI), 0.5…4.5 V ratiometric output
Resistor divider5.11 kΩ series + 10 kΩ shunt
AdapterSpark-plug-hole compression adapter for your engine

The sensor is 5 V-referenced and swings up to 4.5 V, which the ADS1115 cannot see at a 3.3 V supply. The divider scales it by 10k / (5.11k + 10k) = 0.6618, so the full 0.5…4.5 V span lands at 0.331…2.978 V — comfortably inside the ±4.096 V range of GAIN_ONE.

Wiring

text
ADS1115            D1 mini
  VDD  ───────────  3V3
  GND  ───────────  GND
  SCL  ───────────  D1 (GPIO5)
  SDA  ───────────  D2 (GPIO4)
  ADDR ───────────  GND          (address 0x48)

Sensor
  +5V  ───────────  5V
  GND  ───────────  GND
  OUT  ──[5.11k]──┬── ADS1115 A3 (Sen3 / J9)
                  │
               [10k]
                  │
                 GND

Resolution works out to ≈121.7 ADC counts per PSI — roughly 0.008 PSI per count, far finer than the sensor itself.


PCB

A carrier board (pcb/, KiCad 8) ties the modules together so the whole tester is one rigid assembly rather than a nest of jumper wires. It carries no MCU or ADC of its own — the D1 mini and the ADS1115 plug into headers.

RotaryCompressionTester v1.0 — two-layer, 69.85 × 35.56 mm, all modules through-hole on headers, only the regulator and the passives are SMD.

PositionPart
J2, J3LOLIN D1 mini headers (2 × 8 pin)
J1ADS1115 module header (10 pin)
J4, J5USB Type-C PD/QC trigger module
U2Mini560 step-down module
U1AMS1117-5.0 LDO + 10 µF / 100 nF decoupling
J6…J9Sensor connectors Sen0…Sen3
R1…R8Four 5.11 kΩ / 10 kΩ divider pairs
JP1BPWR solder jumper

RECT carrier board, back

Power. The Type-C trigger negotiates 9 V from a PD/QC charger. That rail splits two ways: the Mini560 buck drops it to 3.3 V for the ADS1115 and the D1 mini, and the AMS1117-5.0 drops it to 5 V for the sensors. Bridging BPWR ties the 5 V rail to the D1 mini's VBUS pin, so the board can feed the module through its own regulator instead of a USB cable — which is also why the firmware brings the access point up before calibrating: with BPWR closed, the ESP's transmit current lands on the same AMS1117 that references the ratiometric sensor.

Sensor channels. All four connectors are identical — GND / +5 V / signal — and each has its own 5.11 kΩ + 10 kΩ divider feeding one ADS1115 input, A0…A3. The firmware currently reads Sen3 (J9 → A3) only; the other three are wired and usable, and switching to one of them is a one-line change to SENSOR_CHANNEL. (The silkscreen rounds the series resistor to 5.1K; the fitted value is 5.11 kΩ, which is what the firmware's scaling assumes.)

Fabrication

Gerbers and drill files for a standard 2-layer process are in pcb/Production/ — ready to upload to any fab as-is. To regenerate or modify, open pcb/RotaryCompressionTester.kicad_pro in KiCad 8.


Build and flash

Board support and libraries:

  • ESP8266 core — add https://arduino.esp8266.com/stable/package_esp8266com_index.json to Preferences → Additional Board Manager URLs, then install esp8266 in the Boards Manager.
  • Adafruit ADS1X15 — install from the Library Manager (pulls in Adafruit BusIO).

Open RotaryCompressionTester_AP/RotaryCompressionTester_AP.ino, select LOLIN(WEMOS) D1 R2 & mini, and upload. Serial monitor runs at 115200 baud and prints the calibrated zero and counts/PSI on boot.


Usage

  1. Prepare the engine. Disable fuel and ignition, remove all spark plugs, and hold the throttle wide open. Fit the compression adapter to the leading plug hole of the rotor you want to test.
  2. Power up RECT with the adapter connected but the engine at rest. It brings up the access point first, then calibrates its zero over 16 samples — do not crank during this.
  3. Connect to Wi-Fi RECT, password 12345678, and open http://192.168.4.1 (the captive portal usually opens it for you).
  4. Crank the engine for two to three seconds. Capture starts on its own at 10 PSI and stops as soon as all three faces are recorded.
  5. Read the results. The table shows the three face pressures, the spread, and the RPM. The chart shows the trace with peaks marked; CSV downloads it.

Buttons

ButtonAction
ZeroRe-run the zero calibration (engine must be at rest)
Reset peakClear the live peak-hold reading
Clear logEmpty the run log and discard the stored trace
CSVDownload the current trace as rect_trace.csv

Reading the numbers

Rotary compression is strongly RPM-dependent — the same engine reads lower when cranked slower, because more pressure leaks past the seals per revolution. This is why RECT reports RPM alongside every run: a pressure figure without its cranking speed is meaningless. Factory specifications are quoted at a specific cranking speed (commonly 250 rpm), so compare like with like, or use a converter for the RPM you actually measured.

The spread between faces is often the more useful diagnostic. Three even but mediocre faces suggest general wear; one face well below the others points at a specific apex seal.


How it works

Capture state machine. In ST_IDLE the sketch tracks a slow EMA for the live readout and waits for the reading to cross the trigger level. It then enters ST_PEAK_UP, following the rising pressure and recording the maximum. When pressure falls more than the hysteresis below that maximum, the face is closed out and the state machine moves to ST_PEAK_DOWN to ride the valley between faces. After the third face the run finishes immediately — there is no reason to wait for a fourth stroke. A run that stalls mid-way is abandoned after the capture timeout.

Re-arming is deliberate: after a run the trigger stays disabled until pressure drops a full hysteresis band below the trigger level, so a single crank produces exactly one logged run.

RPM. The mean interval between consecutive peaks times the number of faces gives one rotor revolution. The eccentric shaft turns three times per rotor revolution, hence the factor of three in calculateRPM().

Timing discipline. The HTTP server and DNS are serviced only in the idle state. During a capture (under two seconds) the device deliberately stops answering requests so that Wi-Fi work cannot distort peak timing — the browser shows cranking… for the duration and resumes on its own. yield() on every sample keeps the watchdog and the Wi-Fi stack alive.

Why the AP starts before calibration. The sensor is ratiometric and the transmitter adds roughly 100 mA of load to the AMS1117 regulator. A zero taken with the radio off would drift the moment Wi-Fi came up, so the AP is raised first and the rails are given time to settle.

Trace memory. The oscillogram is 2000 samples of int16_t (4 s at 500 Hz) held in a static buffer. It is far too large to serialize into a String, so /api/trace streams it in chunks with an unknown content length.


Configuration

All tunables sit at the top of the sketch:

ConstantDefaultMeaning
ROTOR_FACES3Faces per rotor
SENSOR_CHANNEL3ADS1115 input (A3 / Sen3 / J9)
ADS_ADDRESS0x48I²C address
AP_SSID / AP_PASSRECT / 12345678Access point (password ≥ 8 chars)
TRIGGER_PSI10.0Capture threshold above zero
HYSTERESIS_PSI5.0Peak detector hysteresis
CAPTURE_TIMEOUT_MS4000Bail-out if cranking stops
TRACE_INTERVAL_US2000Trace step (500 Hz)
TRACE_MAX2000Trace depth (4 s)
RUN_LOG_SIZE16Runs kept in RAM
SENSOR_PSI_MAX174.05Sensor full scale (1.2 MPa)
R_SERIES / R_SHUNT5110 / 10000Divider resistors

Using a different sensor or divider only means changing SENSOR_PSI_MAX, SENSOR_V, and the two resistor values — COUNTS_PER_PSI is derived from them at compile time.


HTTP API

All responses are JSON. Requests are answered only while the device is idle.

EndpointResponse
GET /The single-page UI
GET /api/state{"psi":..,"pk":..,"raw":..,"draw":..,"runs":..,"busy":0|1,"zero":..}
GET /api/state?rst=1Same, and resets the live peak-hold
GET /api/runsArray of runs, newest first: {"n":..,"t":..,"rpm":..,"psi":[..]}
GET /api/trace{"dt":2,"peaks":[i,i,i],"v":[..]} — dt in ms, v in deci-PSI, peaks are indices into v
GET /api/zeroRe-runs zero calibration
GET /api/clearClears the run log and trace

psi is the smoothed live reading, pk the peak-hold, raw the EMA in ADC counts, draw the offset from zero in counts, and zero the calibration value.


Repository layout

text
RotaryCompressionTester_AP/
  RotaryCompressionTester_AP.ino   Main firmware (UI embedded in PROGMEM)
pcb/
  RotaryCompressionTester.kicad_*  KiCad 8 project, schematic and board
  Production/                      Gerbers and drill files
img/                               Board renders

Safety

Cranking an engine with a compression adapter fitted is an ignition and fuel hazard. Disable the fuel pump and ignition before testing, keep hands and tools clear of the belts and pulleys, and never leave the adapter fitted when the engine is started. The sensor is rated to 1.2 MPa (174 PSI); do not expose it to a running engine.

This is a hobby instrument, not a certified measuring device. Treat it as a comparative tool.


License

Not yet licensed — add a LICENSE file before publishing if you want reuse terms to be explicit.

Parts

24
QtyValueFootprintReferences
410KCapacitor_SMD:C_0805_2012MetricR2, R4, R6, R8
45.11KCapacitor_SMD:C_0805_2012MetricR1, R3, R5, R7
2100nFCapacitor_SMD:C_0805_2012MetricC2, C4
210uFCapacitor_SMD:C_0805_2012MetricC1, C3
2LOLIN D1 miniConnector_PinHeader_2.54mm:PinHeader_1x08_P2.54mm_VerticalJ2, J3
2Type-C PD/QCConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ4, J5
1ADS1115Connector_PinHeader_2.54mm:PinHeader_1x10_P2.54mm_VerticalJ1
1AMS1117-5.0Package_TO_SOT_SMD:SOT-223-3_TabPin2U1
1BPWRJumper:SolderJumper-2_P1.3mm_Open_TrianglePad1.0x1.5mmJP1
1Mini560Library:Mini560U2
1Sen0TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-3-5.08_1x03_P5.08mm_HorizontalJ6
1Sen1TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-3-5.08_1x03_P5.08mm_HorizontalJ7
1Sen2TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-3-5.08_1x03_P5.08mm_HorizontalJ8
1Sen3TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-3-5.08_1x03_P5.08mm_HorizontalJ9

Similar boards

  • 4 layers104 × 41.8 mmEbikeMainBOARD, the printed circuit board in 3D

    EbikeMainBOARD

    mateuszpiwowarski/Prywatne

    111 parts
  • 2 layers168.9 × 123.3 mmOEM ECU, the printed circuit board in 3D

    OEM ECU

    aeonSolutions/AeonLabs-AI-Volvo-MKII-Open-Hardware

    Volvo MKII Open Hardware

    296 parts161CC0-1.0
  • 2 layers94 × 79 mm5 - Lizard Car, the printed circuit board in 3D

    5 - Lizard Car

    TRD-B/Lizard

    3D printed RC race car with custom electronics

    54 parts129CC-BY-4.0
  • 2 layers54.6 × 33 mmJuntekOnSteroidsTTGO, the printed circuit board in 3D

    JuntekOnSteroidsTTGO

    rin67630/Drok-Juntek-on-steroids

    Extend the possibilities of cheap digital power supplies with a WiFi module

    35 parts62
  • 2 layers155 × 70 mmPayphone v1, the printed circuit board in 3D

    Payphone v1

    sdylewski/Analog-Redial

    A circuit board for old telephones to come back to life. Plug one or two phones in, and you can call the other phone, use bluetooth, connect to others via voip, and do a variety of other things with a plain old rotary…

    137 parts46
  • 2 layers32.4 × 33 mmOpenXsensor, the printed circuit board in 3D

    OpenXsensor

    Ingwie/OpenAVRc_Hw

    OpenAVRc Hardware and addons

    40 parts26
  • 2 layers33.9 × 90 mmBiasPro InputProtection v3, the printed circuit board in 3D

    BiasPro InputProtection v3

    ToneAlchemy/BiasPro

    A professional-grade, dual-probe Arduino Bias Meter for guitar tube amplifiers. Open source hardware & firmware

    18 parts16MIT
  • 4 layers52.5 × 59.7 mmESPHome Indoor Multi Sensor, the printed circuit board in 3D

    ESPHome Indoor Multi Sensor

    mikelawrence/esphome-indoor-multi-sensor-hardware

    ESPHome Indoor Multi-Sensor hardware. This design supports Radar/PIR Presence, Temperature, Humidity, Pressure, Light, CO2, CO, VOC, NOX and PM sensors.

    113 parts14CERN-OHL-P-2.0

Questions

How big is the Rotary compression tester PCB?

It measures 69.9 × 35.6 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Rotary compression tester use?

24 parts, built around the AMS1117-5.0 and ADS1115. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Rotary compression tester KiCad files?

From the bilka00/rotary_compression_tester repository on GitHub, at the commit this page was made from: the board is pcb/RotaryCompressionTester.kicad_pcb and its schematic pcb/RotaryCompressionTester.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Rotary compression tester design in my own project?

Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).