Skip to the content
4 layers62 × 105 mmPT100 Datalogger, the printed circuit board in 3D

This application turns an ESP32-S3 N8R2 into a UTC-centric PT100 data logger with FRAM-first buffering, SD-card CSV batching/verification, DS3231 RTC support, mesh streaming, and serial-console calibration.

Size
62 × 105 mm
Copper layers
4
Thickness
1.6 mm
Parts
139
Nets
109
Pads
512
Tracks, vias
1,042, 246
Pours
2
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
17 Dec 2025
Updated
2 Jul 2026

Overview

PT100 Datalogger is an open-source printed circuit board by rasusmilch, from the rasusmilch/PT100_Mesh_Datalogger repository on GitHub. It is a 4-layer board of 62 × 105 mm with 139 parts on 109 nets, routed with 1,042 tracks and 246 vias.

It is built around the ESP32-S3-WROOM-1-N8R2, SN74LVC245APW and ZP05S0500WB, with the MCP9601-E/MX, MAX7219M and MSD-4-A among its other parts. Its parts include 36 resistors, 29 capacitors, 27 diodes, 14 connectors and 11 ICs. It belongs with the sensors and measurement boards and the ESP32 boards of this library.

Main components

12

README

README.md

PT100 + MAX31865 Temperature Data Logger (ESP32-S3, ESP-IDF)

This application turns an ESP32-S3 N8R2 into a UTC-centric PT100 data logger with FRAM-first buffering, SD-card CSV batching/verification, DS3231 RTC support, mesh streaming, and serial-console calibration.

Hardware / wiring

All signal pins are configurable under idf.py menuconfig -> PT100 Logger:

  • Shared SPI bus: MOSI, MISO, SCLK
  • Chip-selects: MAX31865 CS, FRAM CS, SD CS
  • DS3231 I2C: SDA, SCL (address selectable)

Configure mesh root/leaf role and Wi-Fi credentials in the same menu.

Build / flash

bash
idf.py set-target esp32s3
idf.py menuconfig   # configure pins, mesh role, batch sizes, flush thresholds
idf.py build flash monitor

Logging pipeline (FRAM → SD with verification)

  • Sensor task samples MAX31865 at log interval (NVS-backed).
  • Each record is appended as a fixed-size binary struct (with CRC) to a FRAM ring buffer; the persistent header tracks read/write indices and the next sequence number.
  • The SD task builds large CSV batches (~64–256 KB, configurable) from FRAM without consuming it, then:
    1. Appends the batch to the daily CSV file (YYYY-MM-DD.csv) with setvbuf buffering.
    2. fflush() + fsync().
    3. Reads back the appended region and checks SHA-256.
    4. On mismatch: truncates to the original size and leaves FRAM untouched.
    5. On success: consumes the matching FRAM records.
  • CSV header (written once per day):
    schema_ver,record_id,seq,epoch_utc,iso8601_local,raw_rtd_ohms,raw_temp_c,cal_temp_c,flags,node_id
  • FRAM is limited (default 32 KB); when it fills, logging pauses (no overwrite) until a flush frees space. A fram_full flag surfaces via status.

Resume / crash safety

  • On boot or day rollover the logger:
    1. Opens today’s file, truncates to the last newline if the tail was partial.
    2. Scans the tail to find the last written seq.
    3. Drops any FRAM records with seq <= last_sd_seq to guarantee no duplicates.
  • If FRAM corruption is detected, consumption stops and the corrupted record can be skipped explicitly (see logs).

Timekeeping

  • DS3231 is treated as UTC and seeds system time at boot.
  • Mesh root uses SNTP, updates DS3231, and broadcasts time over the mesh; leaves can request/broadcast time updates.

Serial console commands

  • status
  • raw (one sample: raw/calibrated temp + resistance)
  • log interval <ms>
  • log watermark <records> (FRAM flush high-water mark)
  • log flush_period <ms> (periodic SD flush interval)
  • log batch <bytes> (target SD batch size)
  • log show
  • cal clear
  • cal add <raw_c> <actual_c>
  • cal list
  • cal apply (1 point = offset-only; 2–4 points fit deg1–deg3)
  • flush (best-effort FRAM→SD flush with verification)
  • diag check (diagnostics mode only; sensor/FRAM/SD/mesh/time quick health check)

All configuration changes persist to NVS.

Mesh / host streaming

Mesh mode (leaf → root → broker/serial)

  • Leaf nodes publish samples into the mesh; logging to FRAM continues if the mesh or upstream network is down.
  • The root bridges mesh records to the MQTT broker and/or the DATA UART (CSV), and these exports are best-effort only.

Direct Wi-Fi leaf mode (leaf → broker)

  • Leaves can bypass the mesh and publish directly to the broker when configured for direct Wi-Fi.

FRAM/SD logging plus the DATA UART output never depend on network availability.

  • Leaf nodes send samples upstream; logging to FRAM continues if mesh is down.
  • Root node prints one CSV row per record over UART (after the CSV header).

Root upstream router credentials can be provided via the wifi_ssid / wifi_pass NVS settings (from your console tooling or provisioning flow). If those are not set, the root falls back to CONFIG_APP_WIFI_ROUTER_SSID / CONFIG_APP_WIFI_ROUTER_PASSWORD in Kconfig.

Test plan

  1. Calibration persistence: Add points, apply, reboot, and confirm status shows the same coefficients and calibrated readings remain adjusted.
  2. Batching size: Monitor SD writes (logic analyzer or debug prints) to confirm large buffered writes (64–256 KB) rather than per-sample writes.
  3. Crash during flush: Pull power mid-flush; on reboot confirm the CSV tail is repaired and no duplicated seq appears on SD after FRAM drains.
  4. Tail repair: Manually append a partial line to a CSV, reboot, and confirm it is truncated to the last newline automatically.
  5. Mesh resilience: Run leaves with the root powered off; verify local FRAM accumulation and later FRAM→SD flush when root/SD returns.
  6. SD removal: Unmount/remove SD, ensure FRAM continues to grow; remount and verify backlogged records flush with verified appends.

Parts

139
QtyValueFootprintReferences
22100nFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC1, C10, C11, C12, C13, C16, C18, C20, C21, C22, C23, C24, C25, C26, C27, C28 +6
16ESD5Z3V3Diode_SMD:D_SOD-523D1, D12, D13, D15, D16, D17, D18, D19, D22, D23, D24, D25, D28, D29, D34, D35
12100RResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR7, R8, R15, R16, R18, R25, R26, R27, R28, R29, R53, R56
1010KResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR1, R2, R3, R4, R5, R6, R10, R11, R13, R17
6SolderJumper_3_Bridged12Jumper:SolderJumper-3_P1.3mm_Bridged12_RoundedPad1.0x1.5mmJP1, JP2, JP3, JP4, JP5, JP6
5SW_Push_ShieldedButton_Switch_SMD:SW_SPST_B3U-1100PSW3, SW4, SW5, SW6, SW7
410uFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC2, C17, C19, C29
4MountingHole_PadMountingHole:MountingHole_3.2mm_M3_PadH1, H2, H3, H4
31KResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR9, R12, R14
3B5819WDiode_SMD:D_SOD-123D5, D7, D20
3ESD5Z12T1GDiode_SMD:D_SOD-523D8, D9, D11
3TSD05CDYFRDiode_SMD:D_SOD-323_HandSolderingD2, D3, D14
2220RResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR54, R55
222uFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC14, C15
22MResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR19, R52
24K7Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR41, R42
25k1Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR23, R24
2LEDLED_SMD:LED_0603_1608Metric_Pad1.05x0.95mm_HandSolderD4, D21
2SolderJumper_2_OpenJumper:SolderJumper-2_P1.3mm_Open_TrianglePad1.0x1.5mmJP8, JP9
2TPD2E001Package_TO_SOT_SMD:SOT-553U5, U6
11MResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR20
1330RResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR22
1391KD07-TRVaristor:RV_Disc_D7mm_W5.4mm_P5mmRV2
1BH-49A-5-T-BKPersonal:BH-49A-5-T-BK_ADMBT1
1CU3216SASBLR004-NHPersonal:CONN_CU3216SASBLR004-NH_CVIJ5
1CY15B104QN-50SXIPackage_SO:SOIC-8_5.3x5.3mm_P1.27mmU7
1Conn_01x04Connector_Molex:Molex_KK-254_AE-6410-04A_1x04_P2.54mm_VerticalJ2
1DE1B3RA471KN4AP01FCapacitor_THT:C_Disc_D7.5mm_W5.0mm_P10.00mmC6
1DIG1Connector_Molex:Molex_KK-254_AE-6410-03A_1x03_P2.54mm_VerticalJ8
1DIG2Connector_Molex:Molex_KK-254_AE-6410-03A_1x03_P2.54mm_VerticalJ9
1DIG3Connector_Molex:Molex_KK-254_AE-6410-03A_1x03_P2.54mm_VerticalJ10
1DIG4Connector_Molex:Molex_KK-254_AE-6410-03A_1x03_P2.54mm_VerticalJ11
1DIG5Connector_Molex:Molex_KK-254_AE-6410-03A_1x03_P2.54mm_VerticalJ12
1DIG6Connector_Molex:Molex_KK-254_AE-6410-03A_1x03_P2.54mm_VerticalJ13
1ESP32-S3-WROOM-1-N8R2RF_Module:ESP32-S3-WROOM-1U1
1FuseFuse:Fuseholder_Clip-5x20mm_Littelfuse_111_Lateral_P18.80x5.00mm_D1.17mm_HorizontalF1
1LDL212PV33RPersonal:SON50P200X200X80-7NU4
1MAX31865xAPPackage_SO:SSOP-20_5.3x7.2mm_P0.65mmU3
1MAX7219Connector_Molex:Molex_KK-254_AE-6410-05A_1x05_P2.54mm_VerticalJ7
1MCP9601Package_DFN_QFN:Texas_RGW0020A_VQFN-20-1EP_5x5mm_P0.65mm_EP3.15x3.15mm_ThermalViasU13
1MSD-4-APersonal:CUI_MSD-4-AJ4
1PCF2131Personal:16-HLSONU8
1PWRConnector_Molex:Molex_KK-254_AE-6410-02A_1x02_P2.54mm_VerticalJ1
1PWRConnector_JST:JST_VH_B3P-VH_1x03_P3.96mm_VerticalJ14
1RN73H1JTTD3920A05Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR21
1RTDConnector_Molex:Molex_KK-254_AE-6410-05A_1x05_P2.54mm_VerticalJ6
1SHT45Sensor_Humidity:Sensirion_DFN-4_1.5x1.5mm_P0.8mm_SHT4x_NoCentralPadU10
1SN74LVC245APWPackage_SO:TSSOP-20_4.4x6.5mm_P0.65mmU2
1SolderJumper_3_Bridged12Jumper:SolderJumper-3_P1.3mm_Bridged12_Pad1.0x1.5mmJP7
1TCPersonal:TerminalBlock_Onshore-3_P2.54mmJ3
1TPD6E05U06RVZPackage_SON:Texas_R-PUSON-N14U9
1ZP05S0500WBPersonal:ZP05S0500WBPS1

Similar boards

  • 2 layers200 × 120 mmPlytka v2, the printed circuit board in 3D

    Plytka v2

    tmierzwa/WICI

    Otwarty system łączności awaryjnej (Reticulum/LXMF, 869 MHz)

    152 parts4
  • 2 layers34.2 × 19 mmPCF2131-breakout, the printed circuit board in 3D

    PCF2131-breakout

    rroels/PCF2131-breakout

    Small breakout board for the NXP PCF2131 RTC

    9 parts2
  • 4 layers90 × 60 mmBetter lamp controller, the printed circuit board in 3D

    Better lamp controller

    super-cow-powers/better-lamp-controller

    A custom lamp controller with audio, controlled with an RP2040

    103 partsBSD-3-Clause
  • 4 layers129 × 104.6 mmPC-1100X, the printed circuit board in 3D

    PC-1100X

    zscircuits/zs1100a

    All files hardware and software related to the zs1100a

    528 parts76
  • 4 layers481.3 × 23.7 mmFaraday rescue bms, the printed circuit board in 3D

    Faraday rescue bms

    nhallsny/faraday-rescue

    Open source battery for e-bikes made by the now-defunct Faraday Bicycles

    155 parts8CERN-OHL-P-2.0
  • 6 layers60 × 100 mmBasic DSP V0 1, the printed circuit board in 3D

    Basic DSP V0 1

    CoderCallender/DSP_Projects

    Digital Signal Processing Hardware and Firmware

    165 parts
  • 2 layers60 × 111.3 mmSilkscreen pcb, the printed circuit board in 3D

    Silkscreen pcb

    iandchasse/silkscreen-pcb

    Silkscreen: open-hardware ESP32-S3 e-paper reader mainboard (KiCad 9). Formerly the de-link hub.

    189 parts589CERN-OHL-S-2.0

Questions

How big is the PT100 Datalogger PCB?

It measures 62 × 105 mm and has 4 copper layers, 1.6 mm thick.

What parts does the PT100 Datalogger use?

139 parts, built around the ESP32-S3-WROOM-1-N8R2, SN74LVC245APW, ZP05S0500WB and MCP9601-E/MX. 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 PT100 Datalogger KiCad files?

From the rasusmilch/PT100_Mesh_Datalogger repository on GitHub, at the commit this page was made from: the board is KiCad/PT100_Datalogger/PT100_Datalogger.kicad_pcb and its schematic KiCad/PT100_Datalogger/Connectors.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the PT100 Datalogger design in my own project?

Its repository states no licence, so its author keeps all rights: ask rasusmilch before reusing the design.