Skip to the content
2 layers40 × 45 mmSTM32 Watch, the printed circuit board in 3D

A minimalist, bare-metal wristwatch built around an STM32L0 microcontroller. No HAL, no RTOS, no libraries. Just registers.

Size
40 × 45 mm
Copper layers
2
Thickness
1.6 mm
Parts
45
Nets
35
Pads
150
Tracks, vias
214, 153
Pours
7
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
28 Feb 2026
Updated
21 Jun 2026

Overview

STM32 Watch is an open-source printed circuit board by Stachu1, from the Stachu1/STM32_Watch repository on GitHub. It is a 2-layer board of 40 × 45 mm with 45 parts on 35 nets, routed with 214 tracks and 153 vias.

It is built around the LSM6DS3. Its parts include 13 diodes, 11 capacitors, 5 resistors, 2 ICs and 2 switches. It belongs with the wearables boards and the STM32 boards of this library.

Main components

1

README

README.md

STM32 Watch

image

A minimalist, bare-metal wristwatch built around an STM32L0 microcontroller. No HAL, no RTOS, no libraries. Just registers.

This is a fully custom PCB watch powered by a CR2032 coin cell, using 12 discrete LEDs arranged like a traditional analog dial. Time is displayed using LED “hands”, with additional modes for voltage, temperature, time setting, and a physics-based pendulum simulation.

Features

Core

  • Ultra-low-power (STM32 Cortex-M0+)
  • Bare-metal firmware
  • RTC-based timekeeping using LSE (32.768 kHz)
  • 12 discrete LEDs forming a clock dial
  • Time-division multiplexing for LED control
  • Two buttons for mode switching and wake-up from sleep

Optional with IMU

  • Absolute wrist tilt (AWT) wake-up
  • Double tap to change LED brightness
  • Pendulum simulation

Modes

Time display

  • Hour hand: Static LED
  • Minute hand: Slow fade in and out
  • Subminutes (full rotation every 5min) hand: Quick fade in and out

Statistics (Battery voltage, IMU/MCU temperature)

Battery voltage = Hour / 10 + 2V

(If hour hand is at 9 the battery voltage is 0.9V + 2V = 2.9V)

IMU/MCU temperature = Hour * 5°C + Minute * 0.1°C

(If hour hand is at 4 and minute hand is at 35 the temperature is 4 * 5°C + 35 * 0.1°C = 23.5°C)

Time setting

Hour hand running in a circle indicated you are in the time setting mode. Press Upper button to go into hour setting then press lower button to move the hour hand form 12 to 1, 2, 3 up to the current time. Confirm with the Upper button. Reapeat for minutes. After confirming minutes the watch will go back to Time display mode.

Pendulum simulation

If the LEDs at 3 and 9 blink the IMU is disabled. You can enable it by pressing both buttons at once. This will enable the IMU and change mode to Time display.

IF the IMU is enbaled ther hour hand will behave like a pendulum with very low friction. I reacts to the acceleration vector in the XY plane so either tilting or moving the watch arround can cause the hour hand to move.

By double tapping the watch you can add 5 rotations a seconds to the pendulum in the current rotation direction.

If you wanna disalbe the IMU just press both buttons at once. The watch will disable the IMU and go back to the Time display mode.

Mode changing

Current ModeActionEffect
Time displayUpper buttonChange brightness
Time displayDouble tapChange brightness (if IMU enabled)
Time displayLower buttonChange mode to Stats (battery voltage)
StatisticsUpper buttonCycle stats (voltage/temperature)
StatisticsLower buttonChange mode to Time setting
Time settingUpper buttonSet hour/minute or confirm and change mode to Time display
Time settingLower buttonChange mode to Pendulum simulation or increment hour/minute hand
Pendulum simulationUpper buttonChange brightness
Pendulum simulationDouble tapAdd +/- 5 rotations/second to the pendulum speed
Pendulum simulationUpper & Lower buttonsEnable/Disable IMU (All the IMU features won't work if the IMU is disabled)
Pendulum simulationLower buttonChange mode to Time display

Power Consumption

Tested on a CR2032 @ ~2.9V

ModeCurrentWakeup
Active (display on)~3mA-
Stop mode (sleep)22uAAWT or Buttons
Ultra low power (IMU off)5.5uAButtons
Stop mode, no IMU mounted2.3uAButtons

Hardware

  • MCU: STM32L031
  • IMU: LSM6DSM
  • Timekeeping: built-in RTC with an external 32.768 kHz crystal
  • Ambient light sensor (reverse-biased LED)
  • Time display: 12 discrete LEDs
  • Two push buttons
  • Powered by a CR2032 battery
image IMG_4101 IMG_4097 IMG_4099 IMG_4100

All LEDs are connected to ground through a single 100 Ω resistor, which is acceptable because only one LED is on at a time.

The RST pin has a single 100 nF capacitor, as there is an internal pull-up (~40 kΩ).

The I2C lines have external 10 kΩ pull-ups, but it would likely be possible to use weaker internal pull-ups if the frequency were reduced (not tested).

On the back side of the PCB, there are test points for SWD programming and UART debugging.

Firmware

This project is intentionally low-level:

  • Direct register access only
  • No abstraction layers
  • Tight control over timing and power
  • Interrupt-driven architecture
  • Fixed-point arithmetic (Q16.16)

LED Driving

LEDs are updated in the IRQ handler, which runs every 100 µs. If a hand is to be shown, the LED is turned on at the beginning of its time slot and turned off when local_step reaches the hand’s brightness or at the end of the time slot. This approach ensures that only one LED is on at a time, limiting peak current and reducing battery voltage drop.

Timekeeping

The STM32’s RTC runs on the low-speed external oscillator, and the time can be set by the user. Due to the high ESR of the crystal, the LSE drive strength had to be set to medium-high (LSEDRV in RCC_CSR).

Sensors

The two interrupt pins on the LSM6DSM are used to detect double tap and absolute wrist tilt. Double tap is only available when the watch is awake, as it requires a significantly higher sampling rate.

Battery voltage is measured by reading the internal voltage reference and calculating the supply voltage. This works well, but due to the high internal resistance of the battery, the measured value is about 100 mV lower than the actual open-circuit voltage.

Temperature is measured using the IMU if it is enabled, or the internal temperature sensor of the MCU otherwise.

Ambient light sensing is not currently used, but it can be implemented by setting the pin connected to a reverse-biased LED high and then switching it to high-impedance input. The brighter it is, the faster the pin returns to a low state. Unfortunately, in very dark conditions this can take hundreds of milliseconds, which is why it is not used.

Build System

This project uses a minimal build setup based on build.c and a nobuild-style workflow: https://github.com/tsoding/nob.h


Build

bash
cd firmware
clang build.c -o build
./build build

Build & Flash (ST-LINK + OpenOCD)

Solder ST-LINK SWD connections to the test points on the back. (Or just hold a pinheader on them)

bash
./build flash

You can also flash the firmware using STM32CubeProgrammer.


Firmware Size

text
text    data     bss     dec     hex filename
10304     56    4160   14520    38b8 firmware.elf

Parts

45
QtyValueFootprintReferences
13LEDLED_SMD:LED_0603_1608MetricD1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13
8TestPoint_SmallTestPoint:TestPoint_Pad_D1.5mmTP1, TP2, TP3, TP4, TP5, TP6, TP7, TP8
6100nCapacitor_SMD:C_0603_1608MetricC1, C4, C5, C6, C10, C11
310kResistor_SMD:R_0603_1608MetricR1, R3, R4
2100uCapacitor_SMD:C_1206_3216MetricC8, C9
218pCapacitor_SMD:C_0603_1608MetricC2, C3
2MountingHoleSTM32_Watch:StrapsConnection_20mmH1, H2
2SW_PushSTM32_Watch:SHOU_HAN_TS24CASW1, SW2
1100Resistor_SMD:R_0603_1608MetricR2
110uCapacitor_SMD:C_0805_2012MetricC7
11MResistor_SMD:R_0603_1608MetricR5
132.768kCrystal:Crystal_SMD_3215-2Pin_3.2x1.5mmX1
1Battery_CellBattery:BatteryHolder_Renata_SMTU2032-LF_1x2032BT1
1LSM6DS3Package_LGA:LGA-14_3x2.5mm_P0.5mm_LayoutBorder3x4yU2
1STM32L031K6UxPackage_DFN_QFN:QFN-32-1EP_5x5mm_P0.5mm_EP3.1x3.1mm_ThermalViasU1

Similar boards

  • 2 layers63.5 × 63.5 mmMain pcb, the printed circuit board in 3D

    Main pcb

    peterkrull/quad

    Firmware, hardware and documentation for my autonomous quad copter project

    45 parts210GPL-3.0
  • 2 layers158.1 × 124.5 mmUsb1, the printed circuit board in 3D

    Usb1

    neuroidss/FreeEEG32-beta

    as FreeEEG32 plus alpha1.5 test passed, FreeEEG32 project changed to beta version

    213 parts166AGPL-3.0
  • 2 layers168.9 × 123.3 mmOEM ECU, the printed circuit board in 3D

    OEM ECU

    aeonSolutions/AeonLabs-AI-Volvo-MKII-Open-Hardware

    Volvo MKII Open Hardware

    296 parts161CC0-1.0
  • 2 layers43 × 34.3 mmEspway, the printed circuit board in 3D

    Espway

    espway/espway

    Segway-like robot implemented on ESP8266

    37 parts122LGPL-3.0
  • 2 layers57.2 × 35.1 mmMainBoard Rev2, the printed circuit board in 3D

    MainBoard Rev2

    lzrtag/LZRTag

    AVR-Based easily modifyable DIY Lasertag!

    70 parts111GPL-3.0
  • 2 layers59.2 × 41 mmBluey, the printed circuit board in 3D

    Bluey

    electronut/ElectronutLabs-bluey

    Nordic nRF52832 BLE development board with sensors.

    79 parts96
  • 4 layers69.8 × 69.8 mmFreeEEG32, the printed circuit board in 3D

    FreeEEG32

    neuroidss/FreeEEG32-alpha1.0

    ALPHA1.0 TEST FAILED, USE NEW VERSION INSTEAD FreeEEG32 alpha1.0 32 channels mobile electroencephalography under GNU AGPL 24 bits, 4kSPS ADCs 4x AD7770 MCU STM32F427ZI WIFI ESP-12F (ESP8266) USB CP2102N Accel & hyro…

    217 parts39AGPL-3.0
  • 4 layers70 × 70 mmFreeEEG32-alpha1.5, the printed circuit board in 3D

    FreeEEG32-alpha1.5

    neuroidss/FreeEEG32-alpha1.5

    4xAD7771BCPZ 64 kSPS, ADR4525BRZ 2.5V REF +-0.02%, STM32H743ZIT6 MCU 1027 DMIPS

    198 parts24AGPL-3.0

Questions

How big is the STM32 Watch PCB?

It measures 40 × 45 mm and has 2 copper layers, 1.6 mm thick.

What parts does the STM32 Watch use?

45 parts, built around the LSM6DS3. 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 STM32 Watch KiCad files?

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

Can I use the STM32 Watch design in my own project?

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