Skip to content

feat(toolbox): M5Paper RTC power-off preset (sensor type 8, PCF8563/BM8563) - #188

Open
gcormier wants to merge 6 commits into
OpenDisplay:mainfrom
gcormier:greg/awesome-dijkstra-5pq3ha-rtc
Open

gcormier wants to merge 6 commits into
OpenDisplay:mainfrom
gcormier:greg/awesome-dijkstra-5pq3ha-rtc

Conversation

@gcormier

Copy link
Copy Markdown

Stacked on #187. This branch includes #187's commits. The changes specific to this PR are in git diff greg/awesome-dijkstra-5pq3ha...greg/awesome-dijkstra-5pq3ha-rtc.

Adds RTC power-off sleep to the M5Paper preset. Requires OpenDisplay/Firmware#176 (sensor type 8 and RTC power-off).

Changes

  • config.yaml: add sensor type 8, pcf8563_rtc.
  • simple-config-presets.json: the m5-paper device preset gets a PCF8563 sensor block (I2C 0x51, no MSD data). It defaults to a new m5paper-1150 power option: battery, 1150 mAh, 20 s advertising window, 900 s asleep.
  • simple-config-id-registry.json: register power option 12.

Testing

On an original M5Paper running OpenDisplay/Firmware#176, with this sensor block and power option written over BLE using tools/od-device-cli.py write-config, on battery:

  • Repeated RTC power-off sleeps and wakes, with uploads in the wake windows.
  • A one-time 16000 s sleep, which woke on time.

The tests used a 120 s sleep rather than the preset's 900 s. 900 s takes the same RTC path as 600 s (the 1/60 Hz countdown), which was tested on USB.

Not tested: the toolbox UI flow, and current draw (no meter).

gcormier and others added 6 commits October 26, 2026 00:56
Adds the M5Paper (classic ESP32 + IT8951, 4.7" ED047TC1 960x540) as a
driverBoard plus mono and 4bpp-gray display entries, reusing the
existing esp32-wrover-e-N4R8_full.json manifest (same env as the
Inkplates).

- simple-config-presets.json: m5-paper (index 33), m5-paper-960x540 (47),
  m5-paper-960x540-4gray (48, color_scheme 6)
- simple-config-id-registry.json: matching id -> index appends
- config.yaml: panel_ic_type 3005 (m5paper_960x540)

Board: IT8951 SPI MOSI 12 / MISO 13 / SCK 14 / CS 15 / BUSY 27, reset
23 (IT8951 supply gate); MOSFET latch on GPIO2 (device_flags 0x8);
battery ADC GPIO35; rocker buttons 37/38/39; GT911 on I2C 21/22, INT 36.
Partial updates off for now. Default power is USB until the firmware's
RTC power-off wake lands. Voltage scaling and touch orientation still
need checking on hardware.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KZwG6PyfGku5uKoVTyB9MC
- config.yaml: sensor_type 8 pcf8563_rtc
- m5-paper board: sensorData BM8563 (bus 0, 0x51, no MSD publish);
  defaultPower -> new m5paper-1150 power option (index 12): battery,
  1150 mAh, 15 min deep sleep, 20 s wake advertising window

Requires the firmware's RTC power-off support.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KZwG6PyfGku5uKoVTyB9MC
The M5Paper GT911 reports in portrait coordinates (540 wide, 960 tall). With
flags 0x0 the firmware clamps Y to 539 and taps land in the wrong place. Taps
at the four corners and the centre, logged on an original M5Paper with
SWAP_XY only, gave x correct and y inverted. 0x6 (SWAP_XY | INVERT_Y)
matches M5EPD's landscape (ROTATE_0) mapping.
Measured on hardware (original M5Paper, after a night on USB): the ESP32's
eFuse-calibrated reading (analogReadMilliVolts, temporary debug build) on
GPIO35 was 2.101 V, against a raw count of 2416. That is exactly 2:1 for a
charged 4.20 V cell, so the sense divider is 2:1 (as M5EPD assumes), not
the R83 3k / R86 11k on the schematic, which would put the cell at 2.67 V.
0xa1 reported 3.89 V; 0xae reports 4.20 V at this point.

Not verified: the cell voltage with a multimeter, and accuracy lower in the
discharge curve. The firmware scales the uncalibrated ADC count linearly,
so expect it to read slightly low near 3.3-3.7 V (estimate, not measured).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant