# The 4.2″ display and restart after power loss

## Identifying the display panel

Order the display separately: **Waveshare 13186, 4.2-inch e-Paper, black/white variant, panel without PCB, revision V2 with SSD1683**. The product page showed it in stock on November 15, 2026. On receipt, record the SKU, rear V2 label and serial number or flex marking. Photograph both sides. The V2 drawing specifies the SSD1683 controller, resolution of 400 × 300, pixel pitch of 0.212 mm, and active area of 84.80 × 63.60 mm. V1 editions and those with additional pigments have different electrical requirements or different waveform characteristics. [Product Waveshare](https://www.waveshare.com/4.2inch-e-paper.htm) · V2 Drawing, page 4 · Purchase sheet dated

## Board interface

J301 is **Hirose FH12-24S-0.5SH(55)**, part number C202112, bottom contact, front ZIF latch with horizontal insertion. J301, Q301, D301–D303, and L301 have been cross-checked against manufacturers' drawings. The assembly inventory retains both availability values returned by JLCPCB for each part number C. Fit the display glass and battery by hand during assembly. [Hirose Datasheet](https://www.hirose.com/en/product/p/CL0586-0521-0-55) · JLCPCB stock snapshot

| J301 pins | Function checked against the panel drawing and pin table | Connection |
|---|---|---|
| 1, 4 | NC | Isolate individually |
| 2, 3 | GDR, RESE | Q301 gate and Q301 source, with current shunt R302 |
| 5 | VSH2 | C303 to ground |
| 6, 7 | TSCL, TSDA | Unconnected. Firmware selects the internal temperature sensor with 18h = 80h |
| 8, 9, 10 | BS1, BUSY active high, reset active low | Ground for four-wire SPI; BUSY input and RESET output at the MCU |
| 11, 12, 13, 14 | D/C, CS active low, SCL, SDA | Command/data, select, SCK, MOSI |
| 15, 16, 17 | VDDIO, VCI, VSS | Switched 3.3 V VMAIN to both supply pins; ground on 17 |
| 18, 19 | VDD, VPP | C305, C306 to ground. VDD is the output of the internal regulator at approximately 1.8 V. In normal operation, VPP connects only to its bypass capacitor. |
| 20, 21, 22, 23, 24 | VSH1, VGH, VSL, VGL, VCOM | C307…C311 respectively. TP301 accesses VGH, TP302 accesses VGL |
| MP1, MP2 | Metal anchors | Ground |

Generic diagram on page 32 labels some contacts differently. For pins 1/4/5, the two consistent sources from the exact V2 manual, drawing page 4 and table pages 5–6, take precedence. Pin 4 remains isolated. External pull-up inputs CS and RESET use exclusively VMAIN. The 100 kΩ resistor to ground maintains BUSY low in the absence of FPC. Firmware requires both the active edge and the return edge to confirm display. Waveshare V2 Manual · [Circuit editable data](../hardware/display.json)

Viewed from the component side with the connector in its design orientation, pin 1 is on the left, the cable input is toward the bottom edge of the board, and the insertion movement is in the +Y direction. Insert the flex with the gold contacts facing the PCB and the stiffener facing up. The pitch is 0.50 mm, distance between centers 1 and 24 is 11.50 mm, and the tip thickness is 0.30 ±0.03 mm. The display drawing specifies a flex width of 12.50 ±0.10 mm. Hirose recommends 12.50 ±0.07 mm for the FH12. On the prototype, measure the flex and accept widths of 12.43…12.57 mm. With power off, insert it straight to the stop, then close the latch. Waveshare · Catalog FH12, lands and flex

The glass measures 91 × 77 × 1.2 mm. The center of the tail is located at 23.05 mm from the left edge of the glass, according to dimension 16.80 + 12.50/2. The tip extends beyond the glass edge by 18.50 ±0.50 mm. The Hirose cross-section indicates 3.1 mm from entry to contact and 1.3 mm from contact to tip. This results in a nominal insertion depth of 4.4 mm. Relative to the center of J301, in the CAD fit check with the flex straight, the glass occupies X = −23.05…+67.95 mm and Y = −93.90…−16.90 mm, with the display surface facing −Z. From the specified cross-section, the contact plane is estimated at Z ≈ 0.55 mm, the center of the locked end at ≈ 0.70 mm, and the rigidizer surface at ≈ 0.85 mm above the PCB. This estimation uses the 3.1 mm segment scale and assumes the terminal is mounted on the PCB. The manufacturer does not publish the vertical tolerance of the assembly with flex. The closed connector has a height of 2.0 mm, and the lid opening requires approximately 4.8 mm of service space. The glass is supported independently. Hirose section, page 12 · [Mounting position, panel_pose field](../hardware/display.json) · Measurement of the STEP contour and PDF cross-section

The STEP model of the connector is the parametric model provided by the KiCad community for FH12-24S-0.5SH. Its origin requires a local translation (0, +1.6, 0) mm to align with the center of the body used here. The simplified body and contacts describe the closed connector. In the mating zone, the closed state without cable may differ in shape from the actual flex introduced. STEP file · [KiCad Source](https://gitlab.com/kicad/libraries/kicad-packages3D/-/blob/master/Connector_FFC-FPC.3dshapes/Hirose_FH12-24S-0.5SH_1x24-1MP_P0.50mm_Horizontal.step) · Library License

## Bipolar converter and capacitors

SSD1683 commands Q301 via GDR and measures the voltage drop across R302, 3 Ω. R301, 10 kΩ, discharges the gate. L301, 10 µH, connects VMAIN to the SW node. D303 rectifies the positive peaks toward VGH. C301 and D301 set the pump node level during the positive phase, then D302 charges the negative reservoir at VGL. At D301 the cathode is at ground, at D302 the cathode is at the pump node, and at D303 the cathode is at VGH. The band on the diode corresponds to pad 1. Q301 has 1 = G, 2 = S, 3 = D. The local schematic directly connects the nine components of the stage. The inductor has a DCR of a maximum of 180 mΩ, 1.3 A RMS and 1.4 A at 30% inductance drop. Panel schematic, page 32 · BSS138L · MBR0530 · SRN4018

The high-voltage capacitors use larger packages to retain capacitance under DC bias. The values below are obtained from interpolation of the typical DC curves for the exact series and selected dielectric. The sensitivity column multiplies the result by 0.90 for initial tolerance and by 0.85 for thermal variation. It illustrates a sizing case. The published curve does not establish a guaranteed limit for each lot. Samsung data and the two interpolation points for each reference point.

| Position | Nominal value | Analyzed voltage | Typical capacitance | Sensitivity ×0.765 |
|---|---:|---:|---:|---:|
| C301, flying capacitor | 4.7 µF / 50 V, 1210 | 20 V | 3.630 µF | 2.777 µF |
| C302, input reservoir | 4.7 µF / 25 V, 0805 | 3.3 V | 3.942 µF | 3.016 µF |
| C308 and C310, the VGH and VGL decoupling capacitors | 1 µF / 100 V, 1206 | 20 V | 0.839 µF | 0.642 µF |
| C303/C306/C307/C309/C311, analog bypasses | 1 µF / 50 V, 0805 | 15 V | 0.796 µF | 0.609 µF |

Ngspice 47 performed a transient simulation using the SPICE3 models published by ONSEMI, connected according to the physical pad number from the electrical worksheet. The simulated drive pulse lasts 0.8 µs every 7 µs, with an artificial limit of 20.2 V, 20 Ω at the gate, and a 100 kΩ load on each rail. The source rises through 50 mΩ in one millisecond. The semiconductor model temperature is 25 °C. The models reproduce the external converter stage. GDR timing, SSD1683 regulation, pixel loading and optical response time still require hardware measurements. Ngspice increased the internal numerical resistance in the MOS model from 10⁻¹⁵ to 10⁻¹² Ω, with the message preserved in the log. [ONSEMI MOS model](https://www.onsemi.com/download/models/sp3/bss138lt1.sp3) · [ONSEMI Schottky model](https://www.onsemi.com/download/models/sp3/mbr0530t1.rev0.sp3) · SPICE files and results

| Case at 39.98 ms | VGH | VGL | Maximum current through L301 | Average power in R302 |
|---|---:|---:|---:|---:|
| Input 3.3 V, L = 10 µH | +20.126 V | −20.646 V | 204 mA | 5.29 mW |
| Input 3.1 V, L = 12 µH, R = 3.03 Ω, capacitors ×0.765 | +20.127 V | −20.647 V | 167 mA | 3.53 mW |
| Defect injected, D302 mounted backwards | +20.133 V | +0.124 V | 219 mA | 4.79 mW |

In the nominal simulation, the maximum reverse voltage across the three diodes was 20.95 V compared to a limit of 30 V. Q301 reached 20.43 V drain-to-source compared to a limit of 50 V. Simulated drain current reached 275 mA at the impulse front, below the 800 mA limit for impulses ≤10 µs. The average power drain-to-source was 9.73 mW. With a reference thermal resistance of 556 °C/W, a steady-state temperature rise of approximately 5.4 °C at the same average power is expected. Halving the maximum integration step from 100 to 50 ns caused a change of 0.1 mV in VGH and 0.3 mV in VGL. The checker rejected the reversed-D302 simulation because VGL had the wrong polarity. The replay command is `python3 verification/display/boost.py`. The script downloads models to a temporary directory and verifies SHA-256 prior to use. Script and test conditions · Nominal log · Defect injection log

On the traces extracted from the native board, the distance between D303.1–C308.1 measures 22.978 mm, while D302.2–C310.1 measures 14.516 mm. Both traces are on the top layer, with no via. At 35 µm copper and 20 °C, the calculated resistances from each segment's width are 62.88 and 39.72 mΩ. The total branch lengths for nodes SW and PUMP are 8.60 and 4.19 mm, respectively, on the top layer. The separation between pad 2 of L301 and the body of Q301 is 0.375 mm at nominal dimensions and 0.305 mm with the maximum ONSEMI 3.04 × 1.40 mm package envelope. The pin 1 marking on Q301 has a minimum distance of 0.220 mm to the verified mask openings. Gerber geometry audit · Critical board traces

A fifth case introduces between rectifiers and the reservoir capacitors on the PCB a hypothetical series impedance of 30 nH + 80 mΩ toward VGH and 20 nH + 60 mΩ toward VGL. Capacitor ESR values are 30…40 mΩ. These values define a sensitivity test, without electromagnetic extraction from the manufactured board. The first test, using an artificial linear limiter over segments and ideal capacitors, resulted in integration stopping at 34.218 ms. With a smoothly tapered artificial limiting characteristic and finite ESR, the simulation concluded at 40 ms. The reservoir voltages reached +20.100 V and −20.600 V, and the maximum instantaneous absolute difference between the rectifier terminal and reservoir was 1.127 V. The most stressed rectifier reached 20.994 V reverse. On the actual board, voltages are directly measured at the diode terminals using a shorted probe loop and compared against a 30 V limit. The reproduction uses `python3 verification/display/interconnect.py`. Conditions and results · Final log · Test stop log

## Refreshing the display after a full VMAIN power-down

SSD1683 maintains the physical image through the bistability of the pigment. The internal RAM must be reloaded after power supply interruption. In the black/white mode, controller table 6-5 indexes four transitions from the bits of the two memories. The Waveshare driver uses 21h = 00h, 00h, edge 3Ch = 80h, followed by 22h = FFh and 20h for partial update. Sections 6.6 and 7 of the controller describe the OTP LUT and mode 2 selection. The public GxEPD2 implementation for an SSD1683 panel of the same resolution confirms explicitly the association of memory 26h with the previous image and 24h with the new image. The waveform used by the Astra board is that from the Waveshare V2 panel's OTP. SSD1683 rev. 1.0, table 6-5 and commands · [Original Waveshare V2 driver, revised version](https://github.com/waveshareteam/e-Paper/blob/d28b3c4cfc78eef1c6cd6e6e3013654e449d2864/Arduino/epd4in2_V2/epd4in2_V2.cpp) · [Memory identification in GxEPD2](https://github.com/ZinggJM/GxEPD2/blob/master/src/gdey/GxEPD2_420_GDEY042T81.cpp)

After each power-up, firmware waits for power supply, generates a physical reset by pulling the reset pin low, sends a software reset at 12h, and selects the internal sensor. The window covers the X = 0…49 bytes and Y = 0…299 lines, with the origin reset to the front of each frame. A confirmed scene from RRAM enables exact regeneration of the 15,000 bytes of the old image. Firmware writes the old frame to 26h and the new frame to 24h. Everywhere the image remains identical, the pair is white–white or black–black. At 2 MHz, the two transmissions require at least 120 ms, plus initialization, commands, and waveform overhead. [Electrical implementation of the sequence](../firmware/src/panel.c) · [Scene and journal structure](../firmware/src/state.h)

A prepared transaction is durably written prior to the start of command 20h. Confirmation is allowed only after BUSY is active and returns to low. Distinct thresholds exist for BUSY onset, 250 ms, and for termination, 25 s. An interrupted transaction, a corrupted CRC, or a different version of the renderer requires a full resynchronization at the next eligible cycle. Full mode uses 21h = 40h,00h, 3Ch = 05h, 22h = F7h, and 20h. Firmware limits the sequence to five partial updates between two full updates and to a minimum of 180 s between waveforms. Partial operation is accepted between 15…35 °C and full operation within the 0…50 °C range, if the battery allows. The software criterion of 0…50 °C uses the BME280 on the PCB. The internal sensor of SSD1683 selects the waveform. On the prototype, measure the glass temperature and its difference from the BME280 reading in direct sun and in the cold to establish the enclosure’s operating margin. Once 24 h have elapsed since the last full update, the next eligible refresh must be full. Sequence termination transmits 10h = 01h, waits 100 ms, and allows the main power rail to switch off. Test logs with injected interruptions and two verified image planes · [Firmware Policy](../firmware/src/state.c) · [Waveshare Guide](https://www.waveshare.com/wiki/4.2inch_e-Paper_Module_Manual)

At room temperature, the manual specifies 0.42 s typical for the partial waveform, 3 s typical for the full waveform, and 18.48 mW typical. The product page lists 0.4 s, 5 s, and 26.4 mW. At 26.4 mW, the estimated energy for the waveform is 10.6 mJ for partial and 132 mJ for full. The actual energy of the cycle includes boot, SPI transfer, RRAM writes, radio system operations, and power supply losses. Manual V2, page 8 · [Display panel specifications](https://www.waveshare.com/4.2inch-e-paper.htm)

For the delivered revision, native audits, five electrical cases, and numerical verification of synthetic photographs were repeated. The restart sheet identifies inputs and outputs via SHA-256. Runs on the final revision

## Optical and electrical acceptance tests

**Physical tests pending.** For each prototype, keep the raw measurements with its identifier, supply voltage, temperature, reference image and time since the last update. Procedures D01–D03 from the common plan define the stop/start and transaction interruption tests. [Complete prototype plan](qualification.en.md) · Binary frames and firmware procedure for D01–D03

1. At 25 ±2 °C, the orientation of pin 1, the band on pad 1 of each rectifier, and the parallel alignment of the flex are inspected under magnification. Hirose recommends a 0.15 mm stencil with apertures of 0.25 × 1.30 mm for contacts. At a local thickness of 0.15 mm, the geometric volume is 0.04875 mm³. A 0.10 mm foil in the same slots provides 0.03250 mm³. For a process with a different thickness, the inspection of the paste, the fillets of the 24 contacts, and continuity after mounting is recorded. Hirose Landings · Assembly Process
2. Apply power with the display panel connected. Monitor VMAIN at C304, RESET, CS, D/C, SCK, MOSI, BUSY, and TP301/TP302 using high-impedance probes. For D01, separately measure the contrast after a full waveform ≥8:1 and white reflectance ≥30% using a photometric standard, under 45° illumination and perpendicular detection, in accordance with §8 Waveshare, page 28. Decode the 2 MHz SPI bus at a sampling rate of at least 20 MS/s. During refresh, require VMAIN to stay between 3.05 V and 3.55 V, with VGH positive and VGL negative. Check each component against its absolute maximum ratings. For explicit static command verification at ±20 V with no load, the SSD1683 outputs 19.5…20.5 V for VGH when VCI = 3.0 V and under the conditions specified in Table 11-1. Record the timings, ripple, and actual energy of the lot's waveforms. Solomon Systech characteristics, page 43–44
3. Display the full asymmetric test pattern and photograph it with fixed exposure and lighting. Disconnect SWD and switch off VMAIN. Probe VCI/VDDIO at C304 and the panel’s internal VDD at C305. Both must remain below 0.30 V for at least 60 s, and the analyzer lines must exhibit high impedance. Record the discharge of VGH and VGL before handling the flex. After a minimum of 180 s from the last waveform, the board is woken up and a region is changed, preserving white and black reference zones. Use the SPI capture to check both 15,000 B image planes, the 26h/24h assignments and FFh activation. Run five cycles at each of 15, 25 and 35 °C, then verify full resynchronization with one additional cycle. Under fixed illumination and linearized luminance, the average variation of unmodified zones must be ≤5% of the reference white–black difference. At 25 °C, white-to-black contrast ≥6:1 is required in the photograph following the fifth partial update, without global flash during partial updates and with correct transitions: white→black, black→white, white→white, black→black. For pixels that must change color, at least 70% of the optical reference interval in the correct direction must be achieved.
4. Interrupt VMAIN at three points: before command 20h, while BUSY is high, and after BUSY returns but before the RRAM commit. At the next eligible update, an incomplete journal must trigger a full F7h refresh. Disconnect the display with power off, then restart with BUSY pulled low by R305. The scene must remain unconfirmed and the wait must time out. Automated coverage of these software paths is recorded separately from observations on the display glass. Firmware tests

For numerical evaluation of D02, record and align the complete white and complete black reference images in the same position and exposure conditions. Geometrically align the four photographs to the active area of 400 × 300 px. Save the two commanded rasters on the bus as PBM monochrome or PNG binary. In RAM SSD1683, bit 1 indicates white; in PBM P4 format, bit 1 indicates black. The Pillow conversion `Image.frombytes("1", (400, 300), payload).save("old.pbm")` preserves colors and performs the required conversion for writing. The script linearizes sRGB, normalizes locally using the two reference images, and excludes a 1 px margin from each transition. For raw grayscale images already linearized, use `--linear`. Python, Pillow, and NumPy are required. Pauses at the beginning and end of the video recording allow separate verification of global flash. Prototype photo analyzer · Numeric autotest with synthetic images

```sh
python3 verification/display/score_optics.py --old-bits old.pbm --new-bits new.pbm \
  --before before.png --after after.png --white white.png --black black.png --temperature-c 25 --partial-count 5 --output D02.json
```

For the full-white and full-black reference patterns, the normal executable exports the `render_frame` function. During a fixture session on a **full** update, the SRAM raster can be temporarily replaced after rendering. Prepare two files of exactly 15,000 bytes, all bytes set to 0xFF for white and all bytes set to 0x00 for black. Place a hardware breakpoint at the very first instruction of the function. AAPCS uses R1 for the second argument, the raster address. During a complete update, the same memory is written to both planes. Repeat for the second color, ensuring a minimum time of 180 seconds. Finally, perform a **normal full update**, using the raster produced by the renderer, so that the observed pigment matches the persistent scene prior to differential tests. The fixture sequence is documented at the ELF level and has not been executed on a physical board. Firmware and J-Link connection

```sh
python3 -c "from pathlib import Path; Path('white.raw').write_bytes(bytes([255])*15000); Path('black.raw').write_bytes(bytes(15000))"
```

```gdb
hbreak *render_frame
set $raster_break = $bpnum
continue
set $raster = (unsigned char *)$r1
finish
restore white.raw binary $raster
disable $raster_break
continue
```
