Initial commit

This commit is contained in:
2026-04-24 10:52:47 +09:00
commit 1707dc6349
1423 changed files with 1161776 additions and 0 deletions
+100
View File
@@ -0,0 +1,100 @@
# Medithings VesiScan BASIC
nRF52840 기반 초음파(Piezo) 방광 모니터링 패치 펌웨어
## Version
VBTFW0111
VesiScan-Basic Tester Ver1.2.2
## Overview
VesiScan BASIC은 피에조 초음파 트랜스듀서와 IMU 센서를 이용하여 방광 상태를 측정하고, BLE를 통해 모바일 클라이언트로 데이터를 전송하는 웨어러블 패치 디바이스 펌웨어입니다.
## Hardware
| 구분 | 칩/센서 | 사양 | 인터페이스 |
|------|--------|------|-----------|
| MCU | nRF52840 | ARM Cortex-M4, SoftDevice S140 | - |
| Piezo TX | MD1822K6-G + TC7920K6-G | MOSFET Driver, +/-20V | GPIO (Timer+PPI) |
| Piezo MUX | 8ch MUX (MUXA/MUXB) | 채널 선택 (CH0~CH7) | GPIO |
| Echo AFE | ADA2200 | Lock-in Amplifier | SPI |
| Echo ADC | ADC121S051 | 12-bit, Echo 신호 샘플링 | SPI |
| DAC | MCP4725 | 12-bit, 바이어스 전압 | I2C (SW) |
| DigiPot | AD5272 | 가변저항, AGC 제어 | I2C (SW) |
| IMU | ICM42670P | 6축 가속도/자이로 | I2C (HW) |
### Piezo 주파수 옵션
| freq | 주파수 |
|------|--------|
| 0 | 1.8 MHz |
| 1 (기본) | 2.1 MHz |
| 2 | 2.0 MHz |
| 3 | 1.7 MHz |
| 4 | 2.2 MHz |
### 8채널 MUX 매핑
| Channel | MUX | SEL1 | SEL0 | EN_MUXA | EN_MUXB |
|---------|-----|------|------|---------|---------|
| CH0 | A0 | 0 | 0 | 1 | 0 |
| CH1 | A2 | 0 | 1 | 1 | 0 |
| CH2 | A1 | 1 | 0 | 1 | 0 |
| CH3 | A3 | 1 | 1 | 1 | 0 |
| CH4 | B0 | 1 | 1 | 0 | 1 |
| CH5 | B1 | 0 | 1 | 0 | 1 |
### Echo 수신 체인
```
Piezo → MUX(8ch) → ADA2200(AFE) → ADC121S051 → nRF52840
MCP4725(Bias) + AD5272(AGC)
```
### IMU 사양
| 항목 | 설정 |
|------|------|
| 센서 | ICM42670P (6축: 3축 가속도 + 3축 자이로) |
| 인터페이스 | I2C (HW) |
| 모드 | Low-Noise Mode |
| 해상도 | 16-bit |
## Build
- **IDE**: Keil uVision5 (ARM5)
- **SDK**: nRF5 SDK + SoftDevice S140
## Project Structure
```text
project/
|-- ble_peripheral/
| `-- ble_app_bladder_patch/
| |-- main.c / main.h # Application entry, BLE init, main loop
| |-- command/ # Command parser, command table, handlers
| | `-- handlers/ # Device / sensor / piezo command handlers
| |-- measurement/ # Sensor and acquisition modules
| | |-- piezo/ # Piezo TX driver and mux channel control
| | |-- adc121s051/ # Echo ADC sampling / acquisition
| | |-- imu/ # ICM42670P support and motion libraries
| | |-- battery/ # Battery voltage measurement
| | `-- temperature/ # TMP235-Q1 temperature sensing
| |-- hal/
| | |-- i2c/ # Shared I2C manager
| | `-- fds/ # Flash data storage helpers
| |-- system/
| | |-- power/ # Power control
| | |-- led/ # LED control
| | |-- security/ # BLE security / bonding
| | `-- main_timer.c # Periodic timing / scheduler logic
| |-- pca10056/s140/arm5_no_packs/ # Keil project files and local build output
| `-- download/ # Flashing / DFU scripts and generated images
`-- dfu/
`-- secure_bootloader/ # BLE DFU bootloader project
```
## License
Proprietary - Medithings Co., Ltd.