
Lamp v1
trsh-mn/smart-home-iot
라즈베리파이 5 + ESP32 기반 스마트홈 IoT: AI 음성대화봇 · 음악 스피커 · 스마트 전등 (펌웨어, 서버, KiCad PCB)

라즈베리파이 5 + ESP32 기반 스마트홈 IoT: AI 음성대화봇 · 음악 스피커 · 스마트 전등 (펌웨어, 서버, KiCad PCB)
Lamp ver2 is an open-source printed circuit board by trsh-mn, from the trsh-mn/smart-home-iot repository on GitHub. It is a 2-layer board of 30 × 74.5 mm with 46 parts on 41 nets, routed with 198 tracks and 15 vias.
It is built around the 74AHCT1G126GV, ESP32-C3-WROOM-02-H4 and MT3608, with the ME6211C33M5G-N, TP4056-42-ESOP8 and TPS22919DCK among its other parts. Its parts include 6 ICs, 5 resistors, 5 connectors, 3 diodes and 1 inductor. It belongs with the lEDs and displays boards and the ESP32 and RISC-V boards of this library.
라즈베리파이 5를 두뇌로, AI 음성대화봇 · 음악 스피커 · 스마트 전등 세 기기가 하나의 시스템으로 동작합니다. 무거운 판단(음성인식 · LLM · TTS)은 Pi가, 입출력은 각 기기의 ESP32가 맡도록 역할을 나눴습니다.
flowchart TB
PI["<b>Raspberry Pi 5</b><br/>Gemini · edge-tts · mosquitto(MQTT)"]
BOT["<b>AI 음성대화봇</b><br/>ESP32-WROOM-32E"]
SPK["<b>음악 스피커</b><br/>ESP32-WROOM-32E"]
LAMP["<b>스마트 전등</b><br/>ESP32-C3"]
PHONE["휴대폰"]
BOT -- "UDP 5005 · 마이크 PCM" --> PI
PI -- "UDP 6000 · 음성 응답 PCM" --> BOT
PI -- "TCP 6001 · 음악 스트림" --> SPK
PHONE -. "Bluetooth A2DP" .-> SPK
PI -- "MQTT · 전원/색상/밝기" --> LAMP
PI <-- "MQTT · 상태 · 볼륨" --> BOT
PI <-- "MQTT · 모드 · 볼륨" --> SPK| 데이터 | 방식 | 이유 |
|---|---|---|
| 상태 전환 · 제어 명령 | MQTT | 작고 가벼운 메시지 |
| 짧은 음성 (마이크 · 응답) | UDP | 지연이 적음 |
| 긴 음악 스트림 | TCP | 손실 없이 순서 보장 |
firmware/
├── voice_bot/ AI 음성대화봇 (Arduino)
├── music_speaker/ Wi-Fi · Bluetooth 음악 스피커 (Arduino)
└── smart_lamp/ 스마트 전등 (ESP-IDF)
server/ 라즈베리파이 코드 (Python)
hardware/
├── lamp_v1/ 전등 PCB v1 — KiCad 원본, 거버, BOM, CPL
└── lamp_v2/ 전등 PCB v2 (진행 중) — KiCad 원본
docs/images/ 사진 · 회로도 · PCB 이미지firmware/voice_botidle · listening · thinking · speaking · playing_music)는 MQTT, 음성은 16-bit / 16kHz mono PCM을 UDP로 전송| 부품 | 연결 (ESP32 GPIO) |
|---|---|
| INMP441 마이크 (I2S) | SCK 32 · WS 33 · SD 34 |
| MAX98357A 앰프 (I2S) | BCLK 26 · LRC 25 · DIN 22 |
| 스피커 | 8Ω 3W |
firmware/music_speakermusic/mode ← bt / wifi| 부품 | 연결 (ESP32 GPIO) |
|---|---|
| MAX98357A 앰프 (I2S) | BCLK 26 · LRC 25 · DIN 22 |
| 모드 전환 버튼 | BOOT (GPIO 0) |

firmware/smart_lampserver/lamp/core.py로 모아 Gemini · 알람 · (향후) 앱이 같은 함수를 호출| 항목 | 내용 |
|---|---|
| MCU | ESP32-C3 |
| LED | WS2812B 30구 · GPIO 4 · RMT 제어 |
| 전원 | 18650 셀 · 5V 부스트 |
| 레벨 시프터 | 74AHCT125 (3.3V → 5V) |
| v1 (제작 완료) | v2 (아트웍 진행 중) | |
|---|---|---|
| PCB | ![]() | ![]() |
| MCU | 개발보드를 꽂아서 사용 | ESP32-C3-WROOM-02 모듈 직접 실장 |
| 전원 | 외부 부스트 모듈 사용 | 충전(TP4056) · 부스트(MT3608) · LDO(ME6211) 내장 |
| 레벨 시프터 | 74AHCT125 (4채널) | 74AHCT1G125 (1채널) |
| LED 전원 | 항상 공급 | 로드 스위치(TPS22919)로 펌웨어가 켜고 끔 |
| 펌웨어 업로드 | 개발보드 USB | ESP32-C3 내장 USB (USB-C) |
| 토픽 | 값 | 보내는 쪽 → 받는 쪽 |
|---|---|---|
lamp/power | on / off | Pi → 전등 |
lamp/brightness | 0 ~ 100 | Pi → 전등 |
lamp/color | [r, g, b] 또는 r,g,b | Pi → 전등 |
device/state | idle / thinking / speaking … | Pi → |
music/state | playing / stopped | Pi → 음성대화봇 (VAD 역치 조절) |
speaker/volume | 0 ~ 100 | → 음성대화봇 |
music/volume | 0 ~ 100 | → 음악 스피커 |
music/mode | bt / wifi | → 음악 스피커 |
ESP_ERROR_CHECK(esp_wifi_set_max_tx_power(34));Wi-Fi · MQTT 계정과 API 키는 GitHub에 올리지 않습니다. 각 폴더의 예시 파일을 복사해 값을 채우세요.
| 위치 | 복사할 파일 → 만들 파일 |
|---|---|
firmware/voice_bot/ | secrets.example.h → secrets.h |
firmware/music_speaker/ | secrets.example.h → secrets.h |
firmware/smart_lamp/main/ | secrets.example.h → secrets.h |
server/ | .env.example → .env |
PubSubClient, 음악 스피커는 추가로 ESP32-A2DPcd firmware/smart_lamp
idf.py set-target esp32c3
idf.py build flash monitorMQTT 브로커 주소는 idf.py menuconfig → Example Configuration → Broker URL에서 설정합니다.
sudo apt install mosquitto ffmpeg
cd server
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
set -a; source .env; set +a # .env 의 값을 환경변수로 불러오기
python assistant.pyESP32 기기들의 IP 주소는 server/audio_client.py 상단의 VOICE_IP, MUSIC_IP에 입력합니다.
lamp/core.py 함수 재사용)| Qty | Value | Footprint | References |
|---|---|---|---|
| 5 | 10k | Resistor_SMD:R_0603_1608Metric | R_boot1, R_btn1, R_en1, R_IO2, R_IO8 |
| 4 | 10u | Capacitor_SMD:C_0805_2012Metric | C_in1, C_out1, C_out3, C_vdd2 |
| 3 | 0.1u | Capacitor_SMD:C_0603_1608Metric | C_IO1, C_level1, C_vdd1 |
| 2 | 1k | Resistor_SMD:R_0603_1608Metric | R_led1, R_led2 |
| 2 | 1u | Capacitor_SMD:C_0603_1608Metric | C_en1, C_in3 |
| 2 | 22 | Resistor_SMD:R_0603_1608Metric | R_usb_dm1, R_usb_dp1 |
| 2 | 22u | Capacitor_SMD:C_1206_3216Metric | C_in2, C_out2 |
| 2 | 5.1k | Resistor_SMD:R_0603_1608Metric | R1, R2 |
| 2 | Conn_01x02 | Connector_JST:JST_XH_B2B-XH-A_1x02_P2.50mm_Vertical | J2, J5 |
| 2 | Conn_01x03 | Connector_JST:JST_XH_B3B-XH-A_1x03_P2.50mm_Vertical | J3, J4 |
| 2 | SW_Push | Button_Switch_SMD:SW_SPST_SKQG_WithStem | SW_boot1, SW_rst1 |
| 1 | 1.2k | Resistor_SMD:R_0603_1608Metric | R_prog1 |
| 1 | 100 | Resistor_SMD:R_0603_1608Metric | R_TPS1 |
| 1 | 100k | Resistor_SMD:R_0603_1608Metric | R_IO1 |
| 1 | 22k | Resistor_SMD:R_0603_1608Metric | R3 |
| 1 | 330 | Resistor_SMD:R_0603_1608Metric | R5 |
| 1 | 3k | Resistor_SMD:R_0603_1608Metric | R4 |
| 1 | 4.7uH | Inductor_SMD:L_Cenker_CKCS5040 | L1 |
| 1 | 470uf / 10V | Capacitor_THT:CP_Radial_D6.3mm_P2.50mm | C_led1 |
| 1 | 74AHCT1G126 | Package_TO_SOT_SMD:SOT-23-5 | U5 |
| 1 | ESP32-C3-WROOM-02 | RF_Module:ESP32-C3-WROOM-02 | U6 |
| 1 | LED_chrg | LED_SMD:LED_0603_1608Metric | D1 |
| 1 | LED_done | LED_SMD:LED_0603_1608Metric | D2 |
| 1 | ME6211C33M5 | Package_TO_SOT_SMD:SOT-23-5 | U4 |
| 1 | MT3608 | Package_TO_SOT_SMD:SOT-23-6 | U3 |
| 1 | SS34 | Diode_SMD:D_SMA | D3 |
| 1 | TP4056-42-ESOP8 | Package_SO:SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.41x3.3mm_ThermalVias | U1 |
| 1 | TPS22919DCK | Package_TO_SOT_SMD:SOT-363_SC-70-6 | U2 |
| 1 | USB_C_Receptacle_USB2.0_16P | Connector_USB:USB_C_Receptacle_HRO_TYPE-C-31-M-12 | J1 |

trsh-mn/smart-home-iot
라즈베리파이 5 + ESP32 기반 스마트홈 IoT: AI 음성대화봇 · 음악 스피커 · 스마트 전등 (펌웨어, 서버, KiCad PCB)


kothanikhil9/Environmental-Monitoring-Node
The system continuously measures environmental temperature using a digital sensor and processes the data through a microcontroller.

andrewinsidelazarev/VDAC4
Графический сопроцессор + HDMI конвертер для ZX Evolution / TS-Config + сетевая карта + звуковой модуль


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.

nikolaus018/dji-fcc-esp32
ESP32-S3 firmware that switches a DJI N1 remote to FCC mode over USB (replaces the Android app)

devKOff/pcb-lipo-power-management-system
An integrated PCB power management system for single-cell Li-Po batteries featuring onboard charging, circuit protection, and a DC-DC boost converter with selectable 5V and 12V DC outputs.

alex1klimovich/nrf52840-macro-controller
Custom nRF52840 productivity controller for digital artists — PCB, BLE/USB firmware, OLED, haptics, RGB, and enclosure CAD.
It measures 30 × 74.5 mm and has 2 copper layers, 1.6 mm thick.
46 parts, built around the 74AHCT1G126GV, ESP32-C3-WROOM-02-H4, MT3608 and ME6211C33M5G-N. 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.
From the trsh-mn/smart-home-iot repository on GitHub, at the commit this page was made from: the board is hardware/lamp_v2/lamp_ver2.kicad_pcb and its schematic hardware/lamp_v1/전등.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask trsh-mn before reusing the design.