Skip to the content
PCBKitNew board
4 layersWatch, the printed circuit board in 3D

The goal: a compact, wrist-worn device that simultaneously tracks heart rate & SpO₂, motion & orientation, altitude & atmospheric pressure, and GNSS location — all in one tightly integrated system.

Copper layers
4
Thickness
1.6 mm
Parts
121
Nets
120
Pads
473
Tracks, vias
543, 64
Pours
3
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
12 Apr 2026
Updated
23 Apr 2026

Overview

Watch is an open-source printed circuit board by VarunAPatil, from the VarunAPatil/MedSafe repository on GitHub. It is a 4-layer board with 121 parts on 120 nets, routed with 543 tracks and 64 vias.

It is built around the ESP32-PICO-D4, BMP388 and DRV2605LDGS, with the W25Q128JVSIQ, BQ24074RGTR and LSM6DS3 among its other parts. Its parts include 38 capacitors, 37 resistors, 12 ICs, 8 diodes and 5 transistors. It belongs with the wearables boards and the ESP32 and RISC-V boards of this library.

Main components

12

README

README.md
MedSafe PCB
MedSafe Device

🩺 MedSafe

A medically-aware smartwatch built from silicon up

Platform Framework PCB License


🌟 Overview

MedSafe is a custom-designed smartwatch platform engineered for real-time health and environmental monitoring. The project spans the full hardware–firmware stack — from KiCad schematics and custom PCB footprints all the way to a modular, multi-sensor ESP-IDF firmware that runs a synchronized 50 Hz acquisition loop across four independent sensors.

The goal: a compact, wrist-worn device that simultaneously tracks heart rate & SpO₂, motion & orientation, altitude & atmospheric pressure, and GNSS location — all in one tightly integrated system.


✨ Key Features

FeatureDetails
❤️ Heart Rate & SpO₂MAX30102 optical pulse oximeter with AGC and peak-detection
📐 6-DoF IMULSM6DSO accelerometer + gyroscope with tilt computation & sensor fusion
🌡️ Barometric PressureBMP388 barometer with temperature compensation and altitude derivation
🛰️ GNSS NavigationMAX-M10S GPS module via UBX protocol — fix type, coordinates, speed & UTC
⚡ 50 Hz Sensor LoopFreeRTOS task pinned to Core 0, all sensors polled in a tight 20 ms cycle
🔌 Shared I2C BusSingle i2c_manager abstraction used by all four sensor drivers
🔋 Battery ManagementBQ24074RGTR Li-Ion charger with FS8205A battery protection FET
📳 Haptic FeedbackDRV2605L LRA/ERM haptic driver
💾 Flash StorageW25Q128/W25Q64 NOR Flash over SPI

🗂️ Repository Structure

text
MedSafe/
│
├── 📁 Firmware/                  # ESP-IDF firmware projects
│   ├── 📁 Integration/           # ★ Main multi-sensor integration firmware
│   │   └── main/
│   │       ├── main.c            # App entry & 50 Hz sensor loop
│   │       ├── src/              # Sensor driver implementations
│   │       │   ├── i2c_manager.c
│   │       │   ├── bmp388.c
│   │       │   ├── lsm6dso.c
│   │       │   ├── max30102.c
│   │       │   └── max_m10s.c
│   │       └── include/          # Public driver headers
│   │           ├── i2c_manager.h
│   │           ├── bmp388.h
│   │           ├── lsm6dso.h
│   │           ├── max30102.h
│   │           └── max_m10s.h
│   │
│   ├── 📁 Barometer/             # Standalone BMP388 firmware
│   ├── 📁 IMU/                   # Standalone LSM6DSO firmware
│   ├── 📁 PulseSensor/           # Standalone MAX30102 firmware
│   └── 📁 max_m10s/              # Standalone GNSS firmware
│

🔬 Sensors & Hardware

🫀 MAX30102 — Optical Pulse Oximeter

  • Measures raw Red and IR PPG signals via FIFO readout
  • Implements AGC (Automatic Gain Control) to adapt LED power to skin tone and ambient light
  • DC-bias removal, moving-average filtering, and peak-to-peak detection for BPM computation
  • Real-time SpO₂ estimation from the ratio of AC/DC swing between Red and IR channels
  • Graceful finger presence detection with automatic sensor reset on removal

📐 LSM6DSO — 6-Axis IMU

  • Reads 3-axis accelerometer and 3-axis gyroscope at configurable ODRs
  • Computes roll and pitch tilt angles from accelerometer via atan2
  • Factory calibration routine averages N samples at rest to zero out bias
  • Dual I2C address support (0x6A / 0x6B) with automatic fallback

🌡️ BMP388 — Barometric Pressure Sensor

  • High-accuracy temperature-compensated pressure readings
  • Converts raw pressure to altitude above sea level using the international barometric formula
  • Normal mode with oversampling and IIR filter for stable atmospheric data

🛰️ MAX-M10S — GNSS Module

  • Communicates via UBX binary protocol over I2C
  • Polls UBX-NAV-PVT messages for:
    • Latitude / Longitude (1e-7 degree precision)
    • Altitude (MSL), speed, horizontal accuracy
    • Fix type (None / Dead Reckoning / 2D / 3D / GNSS+DR / Time)
    • Satellite count, UTC date & time
  • Polled at ~1 Hz from within the main 50 Hz sensor loop

⚙️ Firmware Architecture

text
app_main()
    │
    ├── i2c_manager_init()        ← Shared bus (GPIO 8 SDA / GPIO 9 SCL)
    ├── bmp388_init()
    ├── lsm6dso_init() + calibrate()
    ├── max30102_init()
    ├── max_m10s_init()
    │
    └── xTaskCreatePinnedToCore()
            │
            └── sensor_integration_task()   [Core 0 @ 50 Hz]
                    │
                    ├── bmp388_read_temperature_pressure()
                    ├── lsm6dso_read_data() → lsm6dso_compute_tilt()
                    ├── max30102_read_fifo() → AGC / BPM / SpO₂
                    ├── max_m10s_read_nav_pvt()   [every 50 loops ≈ 1 s]
                    └── printf() combined report   [every 5 loops ≈ 100 ms]

The i2c_manager is a thin singleton that wraps ESP-IDF's i2c_master with mutex-protected register read/write helpers. All four sensor drivers call into it exclusively — no direct I2C calls exist in driver code.


🛠️ Building & Flashing

Prerequisites

Build the Integration Firmware

bash
cd Firmware/Integration

# Set the target
idf.py set-target esp32

# Configure (optional)
idf.py menuconfig

# Build, flash, and monitor
idf.py build flash monitor

Build a Standalone Driver

Each sensor subdirectory (Barometer/, IMU/, PulseSensor/, max_m10s/) is an independent ESP-IDF project and can be built identically:

bash
cd Firmware/Barometer
idf.py set-target esp32
idf.py build flash monitor

🔌 Pin Configuration

SignalGPIO
I2C SDAGPIO 8
I2C SCLGPIO 9

All four sensors share the same I2C bus. Sensor I2C addresses:

SensorI2C Address
BMP3880x77 (secondary)
LSM6DSO0x6A / 0x6B
MAX301020x57
MAX-M10S0x42 (default)

📦 Bill of Materials (Highlights)

ComponentPartFunction
MCUESP32-PICO-D4Dual-core 240 MHz with integrated antenna
IMULSM6DSO3-axis accel + gyro
BarometerBMP388Pressure + temperature
Pulse OximeterMAX30102PPG / SpO₂ / HR
GNSSMAX-M10SMulti-band GNSS receiver
Battery ChargerBQ24074RGTR1A Li-Ion charger
Battery ProtectFS8205ADual-FET protection
Haptic DriverDRV2605LLRA/ERM haptic feedback
FlashW25Q128 / W25Q64128/64 Mbit NOR Flash
CrystalECS-400-10-37B232.768 kHz RTC crystal

Full BOM available at PCB_Files/watch.csv.


📐 PCB & Schematics

The hardware design lives in PCB_Files/ and is a complete KiCad 7 project:

  • watch.kicad_sch — Full hierarchical schematic
  • watch.kicad_pcb — Routed PCB layout with 3D model references
  • watch.kicad_pro — Project configuration and design rules
  • footprints_schematics/ — Custom footprint libraries for non-standard packages (e.g., MAX-M10S, MAX30102, FS8205A)

Open in KiCad 7+ for schematic review or PCB manufacturing export (Gerbers, drill files).


🗺️ Roadmap

  • OLED display integration (SSD1306 / SH1106)
  • BLE data streaming to companion mobile app
  • On-device SpO₂ alert thresholds with haptic notification
  • GPS track logging to SPI flash
  • Low-power sleep / wake-on-motion using LSM6DSO interrupt
  • Production enclosure & strap design

📄 License

This project is licensed under the MIT License. See LICENSE for details.


Built with ❤️ using ESP-IDF, KiCad, and a lot of patience debugging I2C.

Parts

121
QtyValueFootprintReferences
1610kResistor_SMD:R_0603_1608MetricR2, R4, R5, R7, R11, R12, R22, R23, R29, R31, R32, R38, R39, R40, R41, R43
140.1 uFCapacitor_SMD:C_0603_1608MetricC1, C8, C10, C11, C13, C14, C17, C22, C27, C28, C29, C34, C37, C39
8TestPointTestPoint:TestPoint_Pad_D1.0mmTP1, TP2, TP3, TP4, TP5, TP6, TP7, TP8
51 uFCapacitor_SMD:C_0603_1608MetricC2, C9, C24, C25, C32
44.7kResistor_SMD:R_0603_1608MetricR18, R19, R20, R21
4LEDLED_SMD:LED_0603_1608MetricD2, D4, D7, D8
31uFCapacitor_SMD:C_0603_1608MetricC23, C30, C31
333Resistor_SMD:R_0603_1608MetricR26, R27, R28
3BC847Package_TO_SOT_SMD:SOT-23Q1, Q2, Q8
20RResistor_SMD:R_0603_1608MetricR1, R8
21.5kResistor_SMD:R_0603_1608MetricR25, R42
210 uFCapacitor_SMD:C_0603_1608MetricC19, C21
212.5pFCapacitor_SMD:C_0603_1608MetricC4, C7
222uFCapacitor_SMD:C_0603_1608MetricC15, C16
25.1kResistor_SMD:R_0603_1608MetricR3, R33
2Antenna_Shieldfootprints:XCVR_NN03-320AE1, AE2
2BSS138Package_TO_SOT_SMD:SOT-23Q4, Q5
2SW_PushButton_Switch_SMD:SW_Push_SPST_NO_Alps_SKRKSW1, SW2
10 FCapacitor_SMD:C_0603_1608MetricC12
10.1uFCapacitor_SMD:C_0603_1608MetricC38
10.3kResistor_SMD:R_0603_1608MetricR6
11.13kResistor_SMD:R_0603_1608MetricR24
11.18kResistor_SMD:R_0603_1608MetricR10
11.2 pFCapacitor_SMD:C_0603_1608MetricC35
11.5 pFCapacitor_SMD:C_0603_1608MetricC36
11.8 nHInductor_SMD:L_0603_1608MetricL2
1100 pFCapacitor_SMD:C_0603_1608MetricC3
110pFCapacitor_SMD:C_0603_1608MetricC6
11kResistor_SMD:R_0603_1608MetricR37
12 nHInductor_SMD:L_0603_1608MetricL1
122Resistor_SMD:R_0603_1608MetricR36
122.1kResistor_SMD:R_0603_1608MetricR34
14.12kResistor_SMD:R_0603_1608MetricR9
14.7 uFCapacitor_SMD:C_0603_1608MetricC18
14.7uFCapacitor_SMD:C_0603_1608MetricC33
147 pFCapacitor_SMD:C_0603_1608MetricC26
147.5kResistor_SMD:R_0603_1608MetricR35
18pFCapacitor_SMD:C_0603_1608MetricC5
1APS6404L-3SQRx-ZRPackage_SON:Winbond_USON-8-1EP_3x2mm_P0.5mm_EP0.2x1.6mmU1
1BMP388footprints:PQFN50P200X200X80-10NU9
1BQ24074RGTPackage_DFN_QFN:VQFN-16-1EP_3x3mm_P0.5mm_EP1.6x1.6mmU15
1CP2102N-Axx-xQFN28Package_DFN_QFN:QFN-28-1EP_5x5mm_P0.5mm_EP3.35x3.35mmU3
1Conn_01x02_PinDiode_SMD:D_0603_1608MetricJ3
1Conn_01x02_PinConnector_PinHeader_1.00mm:PinHeader_1x02_P1.00mm_VerticalJ1
1Conn_01x14_MountingPinfootprints:HRS_FH34SRJ-14S-0.5SH_50_J2
1DRV2605LDGSPackage_SO:VSSOP-10_3x3mm_P0.5mmU13
1ECS-400-10-37B2-CKY-TRfootprints:ECX-1637B2_ECSXTAL1
1ESP32-PICO-D4Package_DFN_QFN:QFN-48-1EP_7x7mm_P0.5mm_EP5.3x5.3mmU2
1FC-135R 32.7680KA-A3footprints:XTAL_KA-A3_EPSXTAL2
1FerriteBeadInductor_SMD:L_0603_1608MetricFB1
1LSM6DS3Package_LGA:LGA-14_3x2.5mm_P0.5mm_LayoutBorder3x4yU10
1MAX-M10SRF_GPS:ublox_MAXU11
1MAX30105EFD_Tfootprints:14-OESIPU7
1MCP1700x-120xxMBPackage_TO_SOT_SMD:SOT-89-3U12
1NCCapacitor_SMD:C_0603_1608MetricD1
1PESD0402-0402TDiode_SMD:D_SOD-923D6
1SP0503BAHTPackage_TO_SOT_SMD:SOT-143D13
1SS14FLfootprints:SOD-123FLD9
1TLV75533PDBVPackage_TO_SOT_SMD:SOT-23-5U14
1USB_C_Plug_USB2.0Connector_USB:USB_C_Receptacle_GCT_USB4105-xx-A_16P_TopMnt_HorizontalP1
1W25Q128JVSfootprints:SOIC-8_5.23x5.23mm_P1.27mmU8

Questions

What parts does the Watch use?

121 parts, built around the ESP32-PICO-D4, BMP388, DRV2605LDGS and W25Q128JVSIQ. 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 Watch KiCad files?

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

Can I use the Watch design in my own project?

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

Similar boards

  • 2 layers60.1 × 60 mmAdhdv1.00, the printed circuit board in 3D

    Adhdv1.00

    Maxwell-Khor/adhd-medication-reminder

    Custom embedded medication reminder device with PCB design and firmware development for improving medication adherence

    82 parts
  • 8 layers22.3 × 77.5 mmTinker mantis, the printed circuit board in 3D

    Tinker mantis

    Tinkerbug-Robotics/TinkerRocket

    Model rocket flight computer, ground station, iOS app, and simulation

    279 parts1GPL-3.0
  • 2 layers20.3 × 24.5 mmExamples, the printed circuit board in 3D

    Examples

    Luos-io/luos_engine

    Open-source and real-time orchestrator for cyber-physical-systems, to easily design, test and deploy embedded applications and digital twins.

    46 parts546MIT
  • 2 layers65 × 30 mmNoisesource psu, the printed circuit board in 3D

    Noisesource psu

    dkozel/noisesource-psu

    USB powered and controlled supply for RF Noise Sources

    45 parts3
  • 2 layersProduction, the printed circuit board in 3D

    Production

    lod/lca2020

    Tutorial - Kicad for Software Engineers

    51 parts3CC0-1.0
  • 4 layers65 × 26 mmShémas, the printed circuit board in 3D

    Shémas

    CarlDominicA/Projet_Module_CAN

    CA

    43 parts
  • 4 layers37.5 × 36 mmTD M10S LSM, the printed circuit board in 3D

    TD M10S LSM

    Paschalis/fc-plus-sensor-module

    FC Plus is a modular add-on board for UAV flight controllers, providing advanced telemetry, GPS, object avoidance (ToF, Sonar, IR), and LED indicators for status feedback.

    85 parts1GPL-3.0