Skip to the content
PCBKitNew board
2 layers25.9 × 19.3 mmUart data logger, the printed circuit board in 3D

UART data logger to SD card using CH32V003

Size
25.9 × 19.3 mm
Copper layers
2
Thickness
1.6 mm
Parts
14
Nets
29
Pads
65
Tracks, vias
98, 8
Pours
1
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
3 Feb 2026
Updated
1 Apr 2026

Overview

Uart data logger is an open-source printed circuit board by 123swk123, from the 123swk123/uart_data_logger repository on GitHub, published under the MIT licence. It is a 2-layer board of 25.9 × 19.3 mm with 14 parts on 29 nets, routed with 98 tracks and 8 vias.

It is built around the CH32V003F4P6 and AZ1117CH-3.3TRG1. Its parts include 5 capacitors, 4 connectors, 2 resistors, 2 ICs and 1 switch. It belongs with the interfaces and adapters and sensors and measurement boards and the RISC-V boards of this library.

Main components

2

README

README.md

UART data logger to SD card

[!NOTE] Work in progress...

This is a simple UART data logger, logger saves the data to FAT(12/16/32) formatted SD card.

Schematic

Schematic PCB Front PCB Back

Preparations

  • Any SDHC card should work, but I have tested them upto 8GB
  • Format the card as FAT12/16/32
  • copy the config.txt and head to root of the SD card

How to use the logger

  • After power-on the status LED will be OFF
  • start/stop button is a simple toggle switch
    • press once to start logging
    • press again to stop logging
  • Always remove the card when status LED is OFF.
Status LEDRemarks
OFFLogger stopped, free to remove the SD card after powering down
ONLogger running, do not remove the card
Constant blinkingLogger error
Brief pulsingActively logging the received UART data

config.txt

first 2 lines are comment and they are skipped during the configuration process

3rd line describes the serial port configuration.

s<no>:baud rate,data bits<8,9>,parity<0,1,2>,stop bits<1,2>,output formatter<c,d,x,X>,seq start char,seq end char

text
s<no>:    Serial port number, starting from 1
range:    1 to Maximum no.of UART HW supported by the controller, in case of CH32V003 its just 1.
Example:  s1
text
baud rate:  UART logger baud rate
range:      1200 ~ 300000 (check CH32v003 reference manual to calculate the percentage error due to divider round off)
Example:    115200
text
data bits:  UART logger data bits per frame
range:      8, 9
Example:    8
text
parity:   UART data partiy enable/disable
range:    0 - No parity (disabled)
          1 - odd parity
          2 - even parity
Example:  0
text
stop bits:  No.of stop bits per frame
range:      1, 2
Example:    1
text
output formatter: logger output encode format
range:            c - store the UART data in a transparent 8-bit ASCII raw
                  u - store the UART data as unsigned decimal value
                  x - store the UART data as hexadecimal value
                  X - store the UART data as hexadecimal value (all caps)
Example:          x
text
seq start char: a 9-bit unsigned integer. Upon reciving this character logger notes the event time stamp at start of the row/line
                and the logger continues to log the sub-sequent received data in the same row/line as per the output format
                Note: This seq start character will not be logged.
                      time stamp format: hour.minute.seconds.milli second (resolution: 100milli)
range:          0 ~ 511
Example:        13 (\r)
text
seq stop char:  a 9-bit unsigned integer. Upon reciving this character logger closes the current row/line with \r\n and
                creates a new row/line, then the logger waits for seq start character.
                Note: seq stop character will not be logged; Seq start and stop char can be the same.
range:          0 ~ 511
Example:        10 (\n)

4th line describes the time offset information.

t:year,month,day,hour,minute

text
t:  start of time offset definition

year:     unsigned 16bit integer
range:    > 1980
Example:  2026

month:    unsigned 16bit integer
range:    1 ~ 12
Example:  2

day:      unsigned 16bit integer
range:    1 ~ 31
Example:  10

hour:     unsigned 16bit integer
range:    0 ~ 23
Example:  22

minute:   unsigned 16bit integer
range:    0 ~ 59
Example:  0

Reasons for logger error

  1. SD card not present
  2. SD card format not recognized, so unable to mount
  3. missing config.txt in the root of SD card
  4. missing head in the root of SD card
  5. Invalid / Un-recognizable contents in config.txt or head

How to build

Tested features

[!WARNING] Not all aspects of the functionality was tested (This was a side project)

  • SDHC card upto 8GB
  • Tested baud
    • 115200
    • 750000
    • 921600
  • Data bits
    • 8
    • 9
  • Parity
    • None
  • Stop bits
    • 2
  • Logging format
    • c - ASCII characters
    • u - unsigned decimal
    • x/X - Hexadecimal
  • Seq start/Seq stop
    • \r
    • 0xFF
    • 0x1CC

Sample log output

Test log results

Thanks to various open source code base helped realizing the project

Parts

14
QtyValueFootprintReferences
20.1uCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC2, C4
2Conn_01x02swk:1x02_THT_P2.54mmJ3, J4
1100Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR1
1100uFCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC1
110uFCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC5
11kResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR2
147uFCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC3
1AZ1117CH-3.3TRG1Package_TO_SOT_SMD:SOT-223-3_TabPin2U3
1CH32V003F4P6swk:TSSOP20U1
1Conn_01x03swk:1x03_THT_P2.54mmJ2
1Micro_SD_CardConnector_Card:microSD_HC_Hirose_DM3AT-SF-PEJM5J1
1SW_Push_LEDswk:SW_Push_LED_AK104238SW2

Questions

How big is the Uart data logger PCB?

It measures 25.9 × 19.3 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Uart data logger use?

14 parts, built around the CH32V003F4P6 and AZ1117CH-3.3TRG1. 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 Uart data logger KiCad files?

From the 123swk123/uart_data_logger repository on GitHub, at the commit this page was made from: the board is schematics/uart_data_logger.kicad_pcb and its schematic schematics/uart_data_logger.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Uart data logger design in my own project?

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

Similar boards

  • 2 layers36.1 × 21 mmLinux ch32v003, the printed circuit board in 3D

    Linux ch32v003

    tvlad1234/linux-ch32v003

    Linux on a $0.15 RISC-V microcontroller

    16 parts289MIT
  • 2 layers32 × 35 mmCh32v003-usbpd, the printed circuit board in 3D

    Ch32v003-usbpd

    eeucalyptus/ch32v003-usbpd

    Use the ch32v003 as a usb pd controller

    22 parts56MIT
  • 2 layers50.5 × 94.7 mmSwordOfSecretsUSBProd, the printed circuit board in 3D

    SwordOfSecretsUSBProd

    gili-yankovitch/SwordOfSecrets

    To solve the challenge you will need to discover a series of flags, hidden inside the sword. Each one will help you unlock the next step in the challenge, to finally reveal the ultimate secret the sword holds.

    16 parts47MIT
  • 4 layers44.8 × 76 mmTiny scarab, the printed circuit board in 3D

    Tiny scarab

    Embeetle/tiny-scarab

    Tiny beetle board based on the CH32V003 10-cent chip.

    147 parts24MIT
  • 2 layers52.3 × 16.3 mmGeneric TSSOP20, the printed circuit board in 3D

    Generic TSSOP20

    dwillmore/TSSOP20_breakout

    A generic breakout board for TSSOP20 chips to a SIP header meant for breadboard use

    45 parts18CERN-OHL-W-2.0
  • 2 layers65.4 × 133.6 mmBSidesTLV2025GloveBadge, the printed circuit board in 3D

    BSidesTLV2025GloveBadge

    bsidestlv/bsidestlv-2025-badge

    To solve the challenge you will need to discover a series of flags, hidden inside the badge. Each one will help you unlock the next step in the challenge, to finally reveal the ultimate secret the badge holds.

    35 parts13MIT
  • 4 layers22 × 22 mmFrekLedMini, the printed circuit board in 3D

    FrekLedMini

    Drewbi/frekmini

    Mini version of the IKEA Frekvens

    25 parts10
  • 2 layers92 × 63.4 mmBsidesorl v1, the printed circuit board in 3D

    Bsidesorl v1

    bsidesorlando/2026-badge

    The electronic badge for BSides Orlando 2026, themed around retro-futurism: a 1960s World's Fair vision of tomorrow, with Lil Chompy the alligator at the wheel of a flying car.

    39 parts5