safeeyes
Protect your eyes from eye strain using this simple and beautiful, yet extensible break reminder
翻訳待ち
No updates detected yet. GitHub releases will appear here.
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗Capstone Project C-251 · DTETI, Fakultas Teknik UGM
Sistem skrining pendengaran non-invasif yang merekam Auditory Brainstem Response (ABR): ESP32 membangkitkan stimulus tone burst lewat DAC, merekam respons EEG dari elektroda kepala, lalu men-stream sinyalnya ke backend Go untuk difilter, di-epoch, dan dirata-ratakan sampai gelombang Wave V muncul dan bisa dibaca di dashboard web.
┌─────────────────────────────────────────────┐
│ ESP32 │
EEG ──▶│ ADS1299/ADS1115 (SPI/I2C) ── akuisisi │
│ PCM5102A (I2S) ────────────── tone burst │──┐
└─────────────────────────────────────────────┘ │ WebSocket (JSON)
▼
┌─────────────────────────────────────────────────────────┐
│ Backend Go (:8080) │
│ ring buffer → Butterworth BPF → epoching → averaging │
│ → deteksi Wave V (latency + amplitude) │
│ ── worker Python untuk DSP berat, MongoDB untuk sesi │
└─────────────────────────────────────────────────────────┘
│ REST + SSE
▼
┌─────────────────────────────────────────────────────────┐
│ Frontend Next.js — live waveform, riwayat scan, hasil │
└─────────────────────────────────────────────────────────┘
| Folder | Isi | Status |
|---|---|---|
neurosound-backend/ | Backend utama. Go + worker Python DSP, MongoDB opsional, REST + SSE + WebSocket | aktif |
frontend/ | Dashboard utama. Next.js 16 + React 19 + Tailwind 4 | aktif |
esp/ | Firmware aktif. ESP-IDF: ADS1299 16 kSPS (CH1 Cz-A1, CH2 Cz-A2) + stimulus ABR tersinkron, mode tes audio, baterai, WiFi AP + captive portal, WSS ke backend | aktif |
archive/ | Kode lama yang sudah tidak dipakai, disimpan sebagai riwayat (lihat bawah) | arsip |
schematic-fix/ | Skematik final Board 1 (analog, ADS1299) dan Board 2 (digital, ESP32 + PCM5102A) | aktif |
3d-new/ | Model 3D enclosure terbaru (Blender + Bambu) | aktif |
Dokumen/ | Laporan LaTeX terbaru (tidak di-push) | aktif |
archive/ads1115/ | Firmware ABR ESP32 + ADS1115, akuisisi + stimulus + streaming WS | arsip |
archive/backend/ | Backend generasi pertama (Go). Referensi pipeline ABR awal | arsip |
archive/Capstone/ | Firmware awal — WiFi provisioning, captive portal, I2S audio | arsip |
archive/ads-only/ | Eksperimen ESP-IDF: driver ADS1299 murni (C), tanpa Arduino | arsip |
archive/ads1299/ | Iterasi ADS1299 di PlatformIO/Arduino + datasheet & catatan wiring | arsip |
archive/esp32-dummy.py | Simulator ESP32 — kirim frame WS palsu tanpa hardware | arsip |
archive/html/ | index.html, sim-*.html, ws-frame-simulation.html: simulasi interaktif (Butterworth, tone burst, epoching, SNR/Pearson, evolusi ABR) | arsip |
archive/capstone-3d/ | Model enclosure headphone lama (Blender) + script generator | arsip |
archive/schematic/ | Rebuild KiCad ESP-EEG v1 (Cerelog), bukan desain board yang dipakai | arsip |
archive/c251/ | Versi lama laporan LaTeX (10 Agustus); versi terbaru di Dokumen/ | arsip |
archive/data/ | Rekaman sesi lama | arsip |
PROMPT_BAB*.md | Draft/outline bab laporan | — |
Beberapa folder sengaja tidak ikut ke repo ini — lihat Yang tidak di-push.
Butuh: Go 1.22+, Node 20+, Python 3.10+, dan PlatformIO (untuk firmware).
cd neurosound-backend
./scripts/setup.sh # bikin .venv + install dependensi Python
go mod tidy
cp .env.example .env # sesuaikan PORT / MONGO_URI kalau perlu
go run . # listen di :8080
MongoDB opsional (kalau mau simpan riwayat sesi):
docker compose up -d mongo
cd frontend
npm install
npm run dev # http://localhost:3000
Default backend URL sudah http://localhost:8080, jadi tidak perlu env tambahan.
python archive/esp32-dummy.py # nyambung ke ws://localhost:8080/ws sebagai device palsu
cd esp
pio run -e esp32dev # build
pio run -e esp32dev -t upload # flash
pio device monitor -b 115200 # serial monitor (ketik ? untuk daftar perintah)
Konfigurasi ada di src/net.h (NET_DEVICE_ID, NET_WS_URI). WiFi diisi lewat captive portal:
tanpa kredensial tersimpan, device membuka AP ESP32-Setup / 12345678, portal di http://4.3.2.1/.
Reset kredensial WiFi: tahan tombol BOOT (GPIO 0) saat device menyala, atau ketik wifi reset.
Saat boot firmware masuk mode abr kalau ADS1299 (Board 1) terdeteksi, selain itu mode tone
(tes audio). Perintah serial utama: abr, tone, on/off, db <dB>, st click|burst, rate,
pol, ads (status akuisisi), ads test on (sinyal uji internal), ? (semua perintah).
Sampel EEG dikirim sebagai pesan WebSocket biner (format di esp/src/ads1299.h).
Pengukuran output audio pakai osiloskop: esp/docs/ukur-osiloskop.md.
Firmware ABR lama (ADS1115) ada di archive/ads1115/.
ESP32 → backend (ws://<host>:8080/ws?id=<device_id>):
{ "ch1": 12345, "ch2": -4321, "ts": 1234567890, "stim": true }
ch1/ch2 = nilai ADC mentah, ts = timestamp mikrodetik, stim = penanda onset tone burst
(dipakai backend sebagai trigger epoching).
Endpoint backend utama:
This is the beginning of the README. Read the rest at the original. Read the full README ↗