Skip to the content
2 layers57.8 × 48.6 mmCompact sensor module, the printed circuit board in 3D

Compact sensor module

liebe1127/HP028_RailTwin1

해운물류ICT멘토링 HP028 팀 프로젝트입니다.

Size
57.8 × 48.6 mm
Copper layers
2
Thickness
1.6 mm
Parts
12
Nets
31
Pads
61
Tracks, vias
92, 4
Pours
2
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
17 Jul 2026
Updated
7 Nov 2026

Overview

Compact sensor module is an open-source printed circuit board by liebe1127, from the liebe1127/HP028_RailTwin repository on GitHub. It is a 2-layer board of 57.8 × 48.6 mm with 12 parts on 31 nets, routed with 92 tracks and 4 vias.

It is built around the MT3608, ADS1115 and MPU-6050. Its parts include 1 IC and 1 inductor. It belongs with the sensors and measurement boards and the ESP32 and RISC-V boards of this library.

Main components

3

README

README.md

가변 계측–레일 이상 구간 디지털 트윈 기반 갠트리 크레인 안전관리 시스템

하부 주행 레일 이상 구간 디지털 트윈 4단계 개발 로드맵

프로젝트 소개

본 프로젝트는 대형 갠트리 크레인이 하부 주행 레일을 따라 이동할 때 생기는 간격·충격·기울기·위치 데이터로, 이음부 단차·수직 변형·좌우 높이차를 구분해 웹 대시보드와 Unity WebGL에 표시하는 디지털 트윈입니다. 정상·주의·위험에 따라 평속·감속·정지를 정합니다. RBF는 쓰지 않습니다.

핵심 타겟: 센서가 기록하는 이름은 수직 변형을 포함한 레일 기하입니다. 거더 변형·기초 침하·받침 열화는 그 원인입니다.

팀원 및 담당 역할

  • 배용진: SENSOR & EDGE (센서 데이터 획득, 교정, 축 정의)
  • 배준호: BACKEND & RULE ENGINE (비동기 수집, 4분류 규칙 판정)
  • 김병서: WEB & UNITY WEBGL (대시보드, 레일 3D)
  • 김정우: 조립·시험 (축소 모형, 반복 주행)

사용 하드웨어 및 기술 스택

  • 현재 하드웨어 (Edge): ESP32-S3-DevKitC-1 N16R8 1장. 좌·우 각 LR18-08U, MPU-6050, ADS1115, L298N, JGB37-520. 상세는 docs/hardware-configuration-history.md.
  • 하드웨어 이력: ESP32-C3 두 노드 펌웨어와 ESP32-S3-WROOM-1·ADXL345·HC-SR04 초기 스케치는 저장소에서 뺐다. 조립 실물에 올리는 코드는 firmware/esp32_s3_rail_node/이다.
  • 백엔드 & 스트림: Python, FastAPI, InfluxDB, ESP32 MQTT 업링크, 웹·Unity 다운링크 WebSocket.
  • 판정: 구간 특징 여섯 개로 이음부 단차·수직 변형·좌우 높이차. 웨이블릿·파고율·RBF는 쓰지 않음.
  • 프론트엔드: HTML/Vanilla JS, Tailwind CSS, Unity WebGL(레일만).

시스템 아키텍처 및 개발 로드맵

프로젝트는 총 4개의 Phase로 나뉩니다. 서버의 4분류 규칙 판정, InfluxDB 저장, 시연용 더미 스트리머와 웹·Unity 레일 뷰가 구현되어 있습니다. 조립 실물에 올리는 스케치는 firmware/esp32_s3_rail_node/이다.

Phase 1: Sensor & Edge (실물 조립 완료)

  • 실물 MCU는 ESP32-S3-DevKitC-1 1장이다. 좌·우 I2C 버스에 LR18-08U, MPU-6050, ADS1115를 각 1개 연결한다.
  • firmware/esp32_s3_rail_node/는 가속도 3축, 자이로 3축, 칩 온도, 간격, 엔코더를 읽는다. 주행 중일 때만 MQTT 배치를 보낸다. BOOT는 전진 25초 후 정지한다.
  • ESP32-S3-WROOM-1·ADXL345·HC-SR04 초기 스케치는 저장소에서 뺐다. 현재 보드와 다른 구성이다.

Phase 2: Backend & Real-Time Data Stream (프로토타입 완료, 고도화 예정)

  • 센서 업링크: Wi-Fi MQTT QoS 1 → NCP Mosquitto → FastAPI 구독 → 비동기 Queue. 배치는 주행 중일 때만 온다.
  • 분석 다운링크: FastAPI → /ws → 웹 대시보드 / Unity WebGL.
  • 시연: DEMO_MODE=true일 때 1m 더미 레일의 2025cm, 4570cm, 80~90cm에 세 결함을 넣는다. 화면에는 시뮬레이션이라고 표시한다.

Phase 3: Rule-Based Zone Detection (진행 중)

  • 원시 간격을 구간 특징 m, Δ, dm/dx, dΔ/dx, apeak, φ로 만들어 defects[]와 단계 색 rail_risk를 낸다.
  • 주의는 감속, 위험은 진입 전 정지. 정지 명령은 MQTT .../command이고, ESP32는 세로 충격만으로도 멈춘다.
  • PyTorch RBF·PRED_RAIL_DEFORM·파고율은 목표 스택에서 제외.

Phase 4: Web Dashboard & Unity Rails (진행 중)

  • WebSocket 연동 실시간 웹 대시보드.
  • Unity WebGL에 레일만 띄운다. 각 줄은 25×25 mm, 60 cm 아연 각파이프 3개를 이은 180 cm이다. 이상 구간 색과 갠트리 위치를 같은 좌표로 표시한다. 크레인 메시는 넣지 않는다.

프로토타입 실행 방법 (Getting Started)

  1. 펌웨어: firmware/esp32_s3_rail_node/에서 secrets.h.example을 secrets.h로 복사하고 와이파이와 MQTT 비밀번호를 넣는다. secrets.h는 커밋하지 않는다. 보드 ESP32S3 Dev Module, USB CDC로 업로드한다.
  2. 환경 설정: .env.example을 .env로 복사합니다. 실물 입력은 DEMO_MODE=false, 시연은 DEMO_MODE=true입니다.
  3. 백엔드 가동: uvicorn main:app --host 0.0.0.0 --port 8000
  4. 센서/화면 접속: ESP32는 mqtt://223.130.128.198:1883, 웹 대시보드는 https://223.130.128.198:8000/dashboard (/ws로 Unity·표가 같은 데이터를 받습니다).
  5. Unity WebGL (선택): Mac 온보딩은 docs/mac-m5-unity-onboarding.md입니다. 빌드는 unity/RailTwinRails/README.md대로 한 뒤 scripts/sync_unity_webgl.sh로 frontend/unity/Build에 복사합니다. 빌드 전에는 대시보드가 브라우저 레일 뷰를 씁니다.

개발보고서 및 AI 인계

Parts

12
QtyValueFootprintReferences
2I2C AddrTestPoint:TestPoint_Pad_D2.0mmAD0, Addr
110kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal10k
120kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal20k
1ADS1115footprints:MODULE_ZC261500ADS 1115
1BATTERY PINConnector_Wire:SolderWire-0.5sqmm_1x02_P4.8mm_D0.9mm_OD2.3mmBATTERY
1ESP32-C3_SUPERMINI_THfootprints:MODULE_ESP32-C3_SUPERMINI_THESP32
1GTRIC SENSOR PINConnector_Wire:SolderWire-0.5sqmm_1x03_P4.8mm_D0.9mm_OD2.3mmGTRIC SENSOR PIN
1L298N PINConnector_Wire:SolderWire-0.5sqmm_1x04_P4.8mm_D0.9mm_OD2.3mmL298N PIN
1MPU-6050footprints:MODULE_OC09600MPU 6050
1MT3608footprints:MODULE_MT3608_DC-DC_STEP_UP_CONVERTER_2A_BOOSTER_MODULEU2
1Motor Encoder PinConnector_Wire:SolderWire-0.5sqmm_1x04_P4.8mm_D0.9mm_OD2.3mmMOTOR PIN

Similar boards

  • 2 layers61 × 61 mmESP32 FC, the printed circuit board in 3D

    ESP32 FC

    MAATHES-THILAK-K/ESP32-S3_FLIGHT_CONTROLLER

    A custom-designed flight controller based on the ESP32-S3 module, built for compatibility with the esp-fc firmware and Betaflight-like configuration.

    69 parts7Apache-2.0
  • 2 layers150 × 40 mmBicopter, the printed circuit board in 3D

    Bicopter

    InputBlackBoxOutput/Bicopter

    Design files for a PCB Bicopter

    79 parts1MIT
  • 2 layers113.5 × 64 mmMiniRC, the printed circuit board in 3D

    MiniRC

    Apole-dev/mini-rc-kicad

    92 parts
  • 4 layers100 × 80 mmHackathon board v2, the printed circuit board in 3D

    Hackathon board v2

    Brian-Nziza/ESP32-Hackathon-Board

    KiCad 10 project. Board is 100 × 80 mm, four layers, fabricated by JLCPCB.

    75 parts
  • 2 layers61 × 61 mmVael, the printed circuit board in 3D

    Vael

    dialgorithm/vael

    esp32s3 flight controller

    66 parts
  • 2 layers50 × 50 mmPCB DRONE, the printed circuit board in 3D

    PCB DRONE

    shreejita56/XiZi-PCB-DRONE

    So I made a custom PCB based on Esp32 . It holds an IMU and a Barometer for control . It has a normal 4 Motor Layout 2 motors will move clock wise and 2 will be anti-clock wise direction.

    68 parts
  • 4 layers89.8 × 41.5 mmBldcDriver, the printed circuit board in 3D

    BldcDriver

    dwanpo/balancer

    187 parts1
  • 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

Questions

How big is the Compact sensor module PCB?

It measures 57.8 × 48.6 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Compact sensor module use?

12 parts, built around the MT3608, ADS1115 and MPU-6050. 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 Compact sensor module KiCad files?

From the liebe1127/HP028_RailTwin repository on GitHub, at the commit this page was made from: the board is ECAD/compact-sensor-module/compact-sensor-module.kicad_pcb and its schematic ECAD/compact-sensor-module/compact-sensor-module.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Compact sensor module design in my own project?

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