

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
2AMS1117-5.0
SOT-223-40℃~+125℃ 1 1.3V 15V 1A 5V 60dB Fixed Positive Short Circuit Protection、Thermal shutdown SOT-223 Voltage Regulators - Linear, Low Drop Out (LDO) Regulators ROHSAdvanced Monolithic SystemsVoltage Regulators - Linear, Low Drop Out (LDO) RegulatorsADS1115
UncategorisedTexas Instruments
README
README.mdRECT — 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.

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
| Part | Notes |
|---|---|
| LOLIN D1 mini (ESP8266) | Any ESP8266 board with 3.3 V I²C works |
| ADS1115 16-bit ADC | I²C address 0x48 (ADDR → GND) |
| Pressure sensor | 0…1.2 MPa (174 PSI), 0.5…4.5 V ratiometric output |
| Resistor divider | 5.11 kΩ series + 10 kΩ shunt |
| Adapter | Spark-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
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]
│
GNDResolution 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.
| Position | Part |
|---|---|
| J2, J3 | LOLIN D1 mini headers (2 × 8 pin) |
| J1 | ADS1115 module header (10 pin) |
| J4, J5 | USB Type-C PD/QC trigger module |
| U2 | Mini560 step-down module |
| U1 | AMS1117-5.0 LDO + 10 µF / 100 nF decoupling |
| J6…J9 | Sensor connectors Sen0…Sen3 |
| R1…R8 | Four 5.11 kΩ / 10 kΩ divider pairs |
| JP1 | BPWR solder jumper |

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.jsonto 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
- 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.
- 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.
- Connect to Wi-Fi
RECT, password12345678, and open http://192.168.4.1 (the captive portal usually opens it for you). - 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.
- 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
| Button | Action |
|---|---|
| Zero | Re-run the zero calibration (engine must be at rest) |
| Reset peak | Clear the live peak-hold reading |
| Clear log | Empty the run log and discard the stored trace |
| CSV | Download 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:
| Constant | Default | Meaning |
|---|---|---|
ROTOR_FACES | 3 | Faces per rotor |
SENSOR_CHANNEL | 3 | ADS1115 input (A3 / Sen3 / J9) |
ADS_ADDRESS | 0x48 | I²C address |
AP_SSID / AP_PASS | RECT / 12345678 | Access point (password ≥ 8 chars) |
TRIGGER_PSI | 10.0 | Capture threshold above zero |
HYSTERESIS_PSI | 5.0 | Peak detector hysteresis |
CAPTURE_TIMEOUT_MS | 4000 | Bail-out if cranking stops |
TRACE_INTERVAL_US | 2000 | Trace step (500 Hz) |
TRACE_MAX | 2000 | Trace depth (4 s) |
RUN_LOG_SIZE | 16 | Runs kept in RAM |
SENSOR_PSI_MAX | 174.05 | Sensor full scale (1.2 MPa) |
R_SERIES / R_SHUNT | 5110 / 10000 | Divider 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.
| Endpoint | Response |
|---|---|
GET / | The single-page UI |
GET /api/state | {"psi":..,"pk":..,"raw":..,"draw":..,"runs":..,"busy":0|1,"zero":..} |
GET /api/state?rst=1 | Same, and resets the live peak-hold |
GET /api/runs | Array 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/zero | Re-runs zero calibration |
GET /api/clear | Clears 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
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 rendersSafety
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| Qty | Value | Footprint | References |
|---|---|---|---|
| 4 | 10K | Capacitor_SMD:C_0805_2012Metric | R2, R4, R6, R8 |
| 4 | 5.11K | Capacitor_SMD:C_0805_2012Metric | R1, R3, R5, R7 |
| 2 | 100nF | Capacitor_SMD:C_0805_2012Metric | C2, C4 |
| 2 | 10uF | Capacitor_SMD:C_0805_2012Metric | C1, C3 |
| 2 | LOLIN D1 mini | Connector_PinHeader_2.54mm:PinHeader_1x08_P2.54mm_Vertical | J2, J3 |
| 2 | Type-C PD/QC | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J4, J5 |
| 1 | ADS1115 | Connector_PinHeader_2.54mm:PinHeader_1x10_P2.54mm_Vertical | J1 |
| 1 | AMS1117-5.0 | Package_TO_SOT_SMD:SOT-223-3_TabPin2 | U1 |
| 1 | BPWR | Jumper:SolderJumper-2_P1.3mm_Open_TrianglePad1.0x1.5mm | JP1 |
| 1 | Mini560 | Library:Mini560 | U2 |
| 1 | Sen0 | TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-3-5.08_1x03_P5.08mm_Horizontal | J6 |
| 1 | Sen1 | TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-3-5.08_1x03_P5.08mm_Horizontal | J7 |
| 1 | Sen2 | TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-3-5.08_1x03_P5.08mm_Horizontal | J8 |
| 1 | Sen3 | TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-3-5.08_1x03_P5.08mm_Horizontal | J9 |
Similar boards
- 4 layers104 × 41.8 mm

- 2 layers168.9 × 123.3 mm

OEM ECU
aeonSolutions/AeonLabs-AI-Volvo-MKII-Open-Hardware
Volvo MKII Open Hardware
296 parts161CC0-1.0 - 2 layers94 × 79 mm

- 2 layers54.6 × 33 mm

JuntekOnSteroidsTTGO
rin67630/Drok-Juntek-on-steroids
Extend the possibilities of cheap digital power supplies with a WiFi module
35 parts62 - 2 layers155 × 70 mm

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 mm

- 2 layers33.9 × 90 mm

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 mm

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).