Skip to content

garhci9-eng/ulcer-preventing-robot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

README (4).md

๐Ÿฅ CareBot

์š•์ฐฝ ๋ฐฉ์ง€ ์ž์„ธ ๋ณ€ํ™˜ ๋กœ๋ด‡ ํ”Œ๋žซํผ / Pressure Ulcer Prevention Auto-Repositioning Robot Platform

Tests Python Vue License Purpose Idea


๐Ÿ‘ฅ ํ”„๋กœ์ ํŠธ ๊ธฐ์—ฌ / Project Credits

์ด ํ”„๋กœ์ ํŠธ๋Š” ์‚ฌ๋žŒ์˜ ์•„์ด๋””์–ด์™€ Claude AI์˜ ๊ตฌํ˜„์ด ๋™๋“ฑํ•˜๊ฒŒ ๊ฒฐํ•ฉ๋œ ํ˜‘์—… ๊ฒฐ๊ณผ๋ฌผ์ž…๋‹ˆ๋‹ค.
This project is a collaboration where human ideas and Claude AI's implementation contributed equally.

์—ญํ•  / Role ๊ธฐ์—ฌ์ž / Contributor ๊ธฐ์—ฌ๋„ / Contribution
๐Ÿ’ก ์•„์ด๋””์–ด & ๋„๋ฉ”์ธ ์ง€์‹ (Idea & Domain Knowledge) ์‚ฌ๋žŒ (Human) 50%
๐Ÿค– ์ฝ”๋“œ ๊ตฌํ˜„ & ์•„ํ‚คํ…์ฒ˜ (Code & Architecture) Claude AI (Anthropic) 50%

์•„์ด๋””์–ด โ€” ์‚ฌ๋žŒ (Human) 50%:

  • ์š•์ฐฝ ๋ฐฉ์ง€๋ฅผ ์œ„ํ•œ ์ž๋™ ์ž์„ธ ๋ณ€ํ™˜ ํ•„์š”์„ฑ ๋ฐœ๊ฒฌ
  • ๊ฑฐ๋™ ๋ถˆ๋Šฅ ํ™˜์ž๋ฅผ ๋Œ€์ƒ์œผ๋กœ ํ•œ ๋กœ๋ด‡ ๊ฐ„๋ณ‘ ๊ฐœ๋… ์ •์˜
  • 90๋ถ„ ์ฃผ๊ธฐ ์ž์„ธ ๋ณ€ํ™˜์ด๋ผ๋Š” ์˜ํ•™์  ์š”๊ตฌ์‚ฌํ•ญ ์ œ์‹œ
  • ๊ณต์ต ๋ชฉ์  ์˜คํ”ˆ์†Œ์Šค๋กœ ๋ฐฐํฌํ•œ๋‹ค๋Š” ๋ฐฉํ–ฅ ๊ฒฐ์ •
  • Identifying the need for automated repositioning to prevent pressure ulcers
  • Defining the target use case: immobile patients in care settings
  • Specifying the 90-minute medical repositioning requirement
  • Deciding to release as open-source for public benefit only

๊ตฌํ˜„ โ€” Claude AI (Anthropic) 50%:

  • Python ๋น„๋™๊ธฐ ์ œ์–ด ์‹œ์Šคํ…œ (asyncio, Raspberry Pi GPIO)
  • FastAPI REST API + WebSocket ์‹ค์‹œ๊ฐ„ ์„œ๋ฒ„
  • Vue 3 ๋ชจ๋‹ˆํ„ฐ๋ง ๋Œ€์‹œ๋ณด๋“œ ์„ค๊ณ„ ๋ฐ ๊ตฌํ˜„
  • ์•ˆ์ „ ์‹œ์Šคํ…œ ์•„ํ‚คํ…์ฒ˜ (๊ธด๊ธ‰ ์ •์ง€, ์ ์ง„์  ์ด๋™, ์••๋ ฅ ๊ฐ์ง€)
  • ํ”„๋กœ์ ํŠธ ์ „์ฒด ๊ตฌ์กฐ ๋ฐ ๋ฌธ์„œํ™”
  • Python async control system (asyncio, Raspberry Pi GPIO)
  • FastAPI REST API + WebSocket real-time server
  • Vue 3 monitoring dashboard design and implementation
  • Safety system architecture (emergency stop, gradual movement, pressure detection)
  • Overall project structure and documentation

๐ŸŽฏ ๋ฌธ์ œ ์ •์˜ / The Problem

ํ•œ๊ตญ์–ด:
๊ฑฐ๋™์ด ๋ถˆํŽธํ•œ ํ™˜์ž๋Š” ์žฅ์‹œ๊ฐ„ ๊ฐ™์€ ์ž์„ธ๋ฅผ ์œ ์ง€ํ•  ๊ฒฝ์šฐ ์š•์ฐฝ(์••๋ฐ• ๊ถค์–‘) ์ด ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค. ์˜๋ฃŒ ์ง€์นจ์— ๋”ฐ๋ฅด๋ฉด 2์‹œ๊ฐ„๋งˆ๋‹ค ์ž์„ธ๋ฅผ ๋ณ€ํ™˜ํ•ด์•ผ ํ•˜์ง€๋งŒ, ๊ฐ„ํ˜ธ ์ธ๋ ฅ ๋ถ€์กฑ์œผ๋กœ ์ด๋ฅผ ์ง€ํ‚ค์ง€ ๋ชปํ•˜๋Š” ๊ฒฝ์šฐ๊ฐ€ ๋งŽ์Šต๋‹ˆ๋‹ค. ํŠนํžˆ ์•ผ๊ฐ„์— ์ด ๋ฌธ์ œ๊ฐ€ ์‹ฌ๊ฐํ•ฉ๋‹ˆ๋‹ค.

English:
Immobile patients develop pressure ulcers when kept in the same position for too long. Medical guidelines recommend repositioning every 2 hours, but understaffed care facilities often cannot maintain this schedule โ€” especially overnight.

"์••๋ฐ• ๊ถค์–‘์˜ 93%๋Š” ์˜ˆ๋ฐฉ ๊ฐ€๋Šฅํ•˜๋‹ค" โ€” ํ•œ๊ตญ๊ฐ„ํ˜ธํ•™ํšŒ (2022)
"93% of pressure ulcers are preventable" โ€” Korean Nursing Association (2022)


๐Ÿ’ก ์†”๋ฃจ์…˜ / The Solution

CareBot์€ ์นจ๋Œ€์— ์žฅ์ฐฉ๋œ ๋ฆฌ๋‹ˆ์–ด ์•ก์ถ”์—์ดํ„ฐ๋ฅผ ํ†ตํ•ด 90๋ถ„๋งˆ๋‹ค ์ž๋™์œผ๋กœ ํ™˜์ž ์ž์„ธ๋ฅผ ๋ณ€ํ™˜ํ•ฉ๋‹ˆ๋‹ค.
CareBot uses linear actuators mounted to the bed to automatically reposition patients every 90 minutes.

์ž์„ธ ์ˆœํ™˜ / Position Rotation:

์•™์™€์œ„ (Supine)
  โ†’ ์ขŒ์ธก์™€์œ„ (Left Lateral 30ยฐ)
    โ†’ ์•™์™€์œ„ (Supine)
      โ†’ ์šฐ์ธก์™€์œ„ (Right Lateral 30ยฐ)
        โ†’ ๋ฐ˜๋ณต (Repeat)

โœจ ์ฃผ์š” ๊ธฐ๋Šฅ / Key Features

๊ธฐ๋Šฅ / Feature ์„ค๋ช… / Description
โฑ๏ธ ์ž๋™ ์ž์„ธ ๋ณ€ํ™˜ / Auto Repositioning 90๋ถ„๋งˆ๋‹ค ์•™์™€์œ„ โ†” ์ธก์™€์œ„ ์ž๋™ ์ˆœํ™˜ / Rotates supine โ†” lateral every 90 min
๐Ÿฆพ ์•ก์ถ”์—์ดํ„ฐ ์ œ์–ด / Actuator Control Raspberry Pi GPIO โ†’ L298N โ†’ ๋ฆฌ๋‹ˆ์–ด ์•ก์ถ”์—์ดํ„ฐ / GPIO PWM control
๐Ÿ›ก๏ธ ๋‹ค์ค‘ ์•ˆ์ „ ์‹œ์Šคํ…œ / Multi-layer Safety ๊ธด๊ธ‰ ์ •์ง€, ์••๋ ฅ ๊ฐ์ง€, ์ ์ง„์  ์ด๋™ / Emergency stop, pressure detection, gradual movement
๐Ÿ“Š ์‹ค์‹œ๊ฐ„ ๋Œ€์‹œ๋ณด๋“œ / Real-time Dashboard Vue 3 + WebSocket ์‹ค์‹œ๊ฐ„ ์ƒํƒœ ๋ชจ๋‹ˆํ„ฐ๋ง / Live status monitoring
๐Ÿค– AI ์ƒํƒœ ๋ถ„์„ / AI Analysis Claude API ๊ธฐ๋ฐ˜ ๋ณดํ˜ธ์ž ์•ˆ๋‚ด ์š”์•ฝ / Caregiver summaries powered by Claude
๐Ÿ“ฑ ๋ณดํ˜ธ์ž ์•Œ๋ฆผ / Caregiver Alerts ๋ณ€ํ™˜ ์™„๋ฃŒ ๋ฐ ์ด์ƒ ๊ฐ์ง€ ์‹œ ์ฆ‰์‹œ ์•Œ๋ฆผ / Instant alerts on completion or anomaly

๐Ÿ—๏ธ ์‹œ์Šคํ…œ ๊ตฌ์กฐ / System Architecture

CareBot System
โ”‚
โ”œโ”€โ”€ ๐Ÿ”ง carebot_core/          # ๋กœ๋ด‡ ์ œ์–ด / Robot Control (Python + asyncio)
โ”‚   โ””โ”€โ”€ main.py               # GPIO ์ œ์–ด, 90๋ถ„ ์Šค์ผ€์ค„๋Ÿฌ, ์•ˆ์ „ ์‹œ์Šคํ…œ
โ”‚                             # GPIO control, 90-min scheduler, safety system
โ”‚
โ”œโ”€โ”€ ๐ŸŒ carebot_api/           # ๋ฐฑ์—”๋“œ ์„œ๋ฒ„ / Backend Server (FastAPI)
โ”‚   โ”œโ”€โ”€ main.py               # REST API + WebSocket ์—”๋“œํฌ์ธํŠธ
โ”‚   โ””โ”€โ”€ services/
โ”‚       โ””โ”€โ”€ ai_service.py     # Claude API ์—ฐ๋™ / Claude API integration
โ”‚
โ”œโ”€โ”€ ๐Ÿ–ฅ๏ธ  carebot_dashboard/    # ํ”„๋ก ํŠธ์—”๋“œ / Frontend (Vue 3 + Tailwind)
โ”‚   โ””โ”€โ”€ src/App.vue           # ์‹ค์‹œ๊ฐ„ ๋ชจ๋‹ˆํ„ฐ๋ง UI / Real-time monitoring UI
โ”‚
โ”œโ”€โ”€ ๐Ÿงช tests/                 # ๋‹จ์œ„ ํ…Œ์ŠคํŠธ / Unit Tests (pytest)
โ”œโ”€โ”€ ๐Ÿ“– docs/                  # ์กฐ๋ฆฝ ๊ฐ€์ด๋“œ, ํšŒ๋กœ๋„ / Assembly guide, circuit diagram
โ”œโ”€โ”€ .env.example              # ํ™˜๊ฒฝ๋ณ€์ˆ˜ ์˜ˆ์‹œ / Environment variable template
โ””โ”€โ”€ requirements.txt          # Python ์˜์กด์„ฑ / Python dependencies

๐Ÿ”ง ํ•˜๋“œ์›จ์–ด ์š”๊ตฌ์‚ฌํ•ญ / Hardware Requirements

๋ถ€ํ’ˆ / Part ์ˆ˜๋Ÿ‰ / Qty ์—ญํ•  / Role ์˜ˆ์ƒ ๊ฐ€๊ฒฉ / Est. Cost
Raspberry Pi 4 (4GB) 1 ๋ฉ”์ธ ์ปจํŠธ๋กค๋Ÿฌ / Main controller โ‚ฉ65,000
12V ๋ฆฌ๋‹ˆ์–ด ์•ก์ถ”์—์ดํ„ฐ (200mm) 4 ์นจ๋Œ€ ํŒจ๋„ ๊ตฌ๋™ / Bed panel actuation โ‚ฉ40,000 ร— 4
L298N ๋ชจํ„ฐ ๋“œ๋ผ์ด๋ฒ„ 2 PWM ์ œ์–ด / PWM control โ‚ฉ3,000 ร— 2
FSR400 ์••๋ ฅ ์„ผ์„œ 4 ํ™˜์ž ๊ฐ์ง€ / Patient detection โ‚ฉ8,000 ร— 4
ADS1115 ADC (I2C) 1 ์•„๋‚ ๋กœ๊ทธโ†’๋””์ง€ํ„ธ / Analogโ†’Digital โ‚ฉ5,000
๊ธด๊ธ‰ ์ •์ง€ ๋ฒ„ํŠผ (์ ์ƒ‰) 1 ๋น„์ƒ ์ •์ง€ / Emergency stop โ‚ฉ5,000
12V 20A ์ „์› ๊ณต๊ธ‰๊ธฐ 1 ์•ก์ถ”์—์ดํ„ฐ ์ „์› / Actuator power โ‚ฉ30,000

์˜ˆ์ƒ ์ด ๋น„์šฉ / Estimated Total: โ‚ฉ340,000 ~ โ‚ฉ500,000 (ํ”„๋ ˆ์ž„ ์ œ์™ธ / excluding frame)

์ž์„ธํ•œ ์กฐ๋ฆฝ ๊ฐ€์ด๋“œ โ†’ docs/hardware_guide.md


โšก ๋น ๋ฅธ ์‹œ์ž‘ / Quick Start

1. ์„ค์น˜ / Installation

git clone https://github.com/YOUR_ID/carebot.git
cd carebot

# Python ๊ฐ€์ƒํ™˜๊ฒฝ / Python virtual environment
python3 -m venv venv
source venv/bin/activate   # Windows: venv\Scripts\activate
pip install -r requirements.txt

# ํ™˜๊ฒฝ ์„ค์ • / Environment setup
cp .env.example .env
# .env ํŒŒ์ผ์—์„œ ANTHROPIC_API_KEY ์ž…๋ ฅ / Set ANTHROPIC_API_KEY in .env

2. ์‹œ๋ฎฌ๋ ˆ์ด์…˜ ๋ชจ๋“œ (ํ•˜๋“œ์›จ์–ด ์—†์ด ํ…Œ์ŠคํŠธ) / Simulation Mode (Test without hardware)

# ํ„ฐ๋ฏธ๋„ 1 โ€” ๋กœ๋ด‡ ์ œ์–ด / Terminal 1 โ€” Robot control
SIMULATION_MODE=true python carebot_core/main.py

# ํ„ฐ๋ฏธ๋„ 2 โ€” API ์„œ๋ฒ„ / Terminal 2 โ€” API server
uvicorn carebot_api.main:app --host 0.0.0.0 --port 8000 --reload

# ํ„ฐ๋ฏธ๋„ 3 โ€” ๋Œ€์‹œ๋ณด๋“œ / Terminal 3 โ€” Dashboard
cd carebot_dashboard && npm install && npm run dev
# โ†’ http://localhost:5173

3. ํ…Œ์ŠคํŠธ / Run Tests

SIMULATION_MODE=true pytest tests/ -v

๐Ÿ“ก API ์—”๋“œํฌ์ธํŠธ / API Endpoints

Method Endpoint ์„ค๋ช… / Description
GET /api/status ํ˜„์žฌ ์ž์„ธ & ์ƒํƒœ / Current position & status
POST /api/position/rotate ์ˆ˜๋™ ์ž์„ธ ๋ณ€ํ™˜ / Manual rotation
POST /api/emergency-stop ๐Ÿšจ ๊ธด๊ธ‰ ์ •์ง€ / Emergency stop
POST /api/scheduler/pause ์Šค์ผ€์ค„ ์ผ์‹œ์ •์ง€ / Pause schedule
POST /api/scheduler/resume ์Šค์ผ€์ค„ ์žฌ๊ฐœ / Resume schedule
GET /api/logs ์ž์„ธ ๋ณ€ํ™˜ ๊ธฐ๋ก / Change history
GET /api/ai/summary AI ์ƒํƒœ ์š”์•ฝ / AI status summary
WS /ws ์‹ค์‹œ๊ฐ„ WebSocket / Real-time WebSocket

๐Ÿ›ก๏ธ ์•ˆ์ „ ์‹œ์Šคํ…œ / Safety System

  • ๐Ÿ”ด ๋ฌผ๋ฆฌ์  ๊ธด๊ธ‰ ์ •์ง€ ๋ฒ„ํŠผ / Physical Emergency Stop โ€” ๋ˆ„๋ฅด๋ฉด ๋ชจ๋“  ์•ก์ถ”์—์ดํ„ฐ ์ฆ‰์‹œ ์ •์ง€ / Instantly halts all actuators
  • ๐Ÿ“ˆ ์ ์ง„์  ์ด๋™ / Gradual Movement โ€” 30๋‹จ๊ณ„ ์ฒœ์ฒœํžˆ ๋ณ€ํ™˜, ๊ธ‰๊ฒฉํ•œ ์›€์ง์ž„ ์—†์Œ / 30-step gradual transition
  • โš–๏ธ ์••๋ ฅ ์„ผ์„œ ํ™•์ธ / Pressure Verification โ€” ์ด๋™ ์ „ ํ™˜์ž ๊ฐ์ง€ ํ•„์ˆ˜ / Verifies patient presence before movement
  • โšก ๊ณผ๋ถ€ํ•˜ ๊ฐ์ง€ / Overload Detection โ€” ๋น„์ •์ƒ ์ „๋ฅ˜ ๊ฐ์ง€ ์‹œ ์ž๋™ ์ •์ง€ / Auto-stop on abnormal current
  • ๐Ÿ“ข ๋ณดํ˜ธ์ž ์ฆ‰์‹œ ์•Œ๋ฆผ / Instant Alerts โ€” ์ด์ƒ ์‹œ SMS/์•ฑ ์•Œ๋ฆผ / SMS/app alert on anomaly
  • ๐Ÿ“ ์ „์ฒด ๊ฐ์‚ฌ ๋กœ๊ทธ / Full Audit Log โ€” ์‹œ๊ฐ, ์ž์„ธ, ๊ฒฐ๊ณผ ์ „๋ถ€ ๊ธฐ๋ก / All actions logged with timestamp

โš ๏ธ ์ค‘์š” ๊ณต์ง€ / Important Notice

์ด ์†Œํ”„ํŠธ์›จ์–ด๋Š” ๊ณต์ต ๋ชฉ์ ์œผ๋กœ๋งŒ ์‚ฌ์šฉ๋˜์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
This software must be used for public benefit purposes only.

์ด ์†Œํ”„ํŠธ์›จ์–ด๋Š” ์˜๋ฃŒ๊ธฐ๊ธฐ๊ฐ€ ์•„๋‹™๋‹ˆ๋‹ค.
This software is NOT a certified medical device.

  • ์‹ค์ œ ํ™˜์ž์—๊ฒŒ ์‚ฌ์šฉํ•˜๊ธฐ ์ „ ๋ฐ˜๋“œ์‹œ ์˜๋ฃŒ ์ „๋ฌธ๊ฐ€์˜ ๊ฐ๋… ํ•˜์— ๊ฒ€์ฆํ•˜์‹ญ์‹œ์˜ค
    Always validate under medical supervision before use on real patients
  • ์ด ์‹œ์Šคํ…œ์€ ๊ฐ„ํ˜ธ ์ธ๋ ฅ์„ ๋ณด์กฐํ•˜๋Š” ๋„๊ตฌ์ด๋ฉฐ, ์™„์ „ํžˆ ๋Œ€์ฒดํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค
    This system supplements nursing care โ€” it cannot fully replace it

๐Ÿ“– ๋ฌธ์„œ / Documentation

๋ฌธ์„œ / Document ์„ค๋ช… / Description
docs/hardware_guide.md ํ•˜๋“œ์›จ์–ด ์กฐ๋ฆฝ ๊ฐ€์ด๋“œ & ํšŒ๋กœ๋„ / Assembly guide & circuit diagram
docs/safety_protocol.md ์•ˆ์ „ ํ”„๋กœํ† ์ฝœ / Safety protocol
docs/api.md API ์ „์ฒด ๋ช…์„ธ / Full API specification
docs/medical_disclaimer.md ์˜๋ฃŒ ๋ฉด์ฑ… ๊ณ ์ง€ / Medical disclaimer

๐Ÿค ๊ธฐ์—ฌํ•˜๊ธฐ / Contributing

์ด ํ”„๋กœ์ ํŠธ๋Š” ๊ณต์ต์„ ์œ„ํ•œ ์˜คํ”ˆ์†Œ์Šค์ž…๋‹ˆ๋‹ค.
์˜๋ฃŒ์ง„, ๊ฐœ๋ฐœ์ž, ๊ฐ„๋ณ‘์ธ, ๋ณต์ง€ ์—ฐ๊ตฌ์ž ๋ชจ๋‘ ํ™˜์˜ํ•ฉ๋‹ˆ๋‹ค!
This is an open-source project for public benefit.
Medical professionals, developers, caregivers, and welfare researchers are all welcome!

git checkout -b feat/๊ธฐ๋Šฅ์ด๋ฆ„
git commit -m "feat: ์„ค๋ช… / description"
# Pull Request ์ œ์ถœ / Submit Pull Request

๐Ÿ“œ ๋ผ์ด์„ ์Šค / License

GPL-3.0 โ€” ์†Œ์Šค ๊ณต๊ฐœ ๊ฐ•์ œ, ๊ณต์ต์  ํ™œ์šฉ ์žฅ๋ ค
GPL-3.0 โ€” Requires source disclosure, encourages public benefit use
์ƒ์—…์  ์ด์šฉ ์‹œ ๋ณ„๋„ ๋ฌธ์˜ / Contact for commercial use


๐Ÿ™ ๊ฐ์‚ฌ์˜ ๋ง / Acknowledgments

์ด ํ”„๋กœ์ ํŠธ๋ฅผ ๊ฐ€๋Šฅํ•˜๊ฒŒ ํ•ด์ค€ ๋ชจ๋“  ๊ฐ„๋ณ‘์ธ๊ณผ ์˜๋ฃŒ ์ข…์‚ฌ์ž๋ถ„๋“ค๊ป˜ ๊ฐ์‚ฌ๋“œ๋ฆฝ๋‹ˆ๋‹ค.
์š•์ฐฝ์œผ๋กœ ๊ณ ํ†ต๋ฐ›๋Š” ๋ชจ๋“  ํ™˜์ž๋ถ„๋“ค์„ ์œ„ํ•ด ์ด ํ”„๋กœ์ ํŠธ๋ฅผ ๋ฐ”์นฉ๋‹ˆ๋‹ค.

Dedicated to all caregivers working tirelessly to prevent pressure ulcers,
and to every patient who deserves dignity and comfort in their care.

About

a pressure ulcer-preventing robot

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors