1deefb1d70
Initial commit including source code, readme, and license.
115 lines
3.4 KiB
Markdown
115 lines
3.4 KiB
Markdown
# 60Hz Heartbeat Presence
|
|
|
|
An ESPHome configuration for the **Seeed Studio MR60BHA2 mmWave Sensor Kit** — a contactless vital signs and human presence detection device running on the XIAO ESP32C6.
|
|
|
|
## Overview
|
|
|
|
This device uses 60GHz millimeter-wave radar to detect human presence and monitor vital signs without physical contact. It integrates directly with Home Assistant and supports Thread mesh networking.
|
|
|
|
**Monitored metrics:**
|
|
- Human presence (occupancy)
|
|
- Heart rate (BPM)
|
|
- Respiratory rate (breaths/min)
|
|
- Distance to detected person (cm)
|
|
- Number of targets detected
|
|
- Ambient illuminance (lux)
|
|
|
|
## Hardware
|
|
|
|
| Component | Description |
|
|
|-----------|-------------|
|
|
| **MCU** | Seeed Studio XIAO ESP32C6 |
|
|
| **mmWave Sensor** | Seeed Studio MR60BHA2 (60GHz) |
|
|
| **Light Sensor** | BH1750 (I²C, 0x23) |
|
|
| **LED** | WS2812 RGB LED (single, GPIO1) |
|
|
|
|
### Pin Assignments
|
|
|
|
| Interface | Signal | GPIO |
|
|
|-----------|--------|------|
|
|
| UART (MR60BHA2) | RX | 17 |
|
|
| UART (MR60BHA2) | TX | 16 |
|
|
| I²C (BH1750) | SDA | 22 |
|
|
| I²C (BH1750) | SCL | 23 |
|
|
| LED Strip | Data | 1 |
|
|
|
|
UART: 115200 baud, 8N1
|
|
|
|
## Features
|
|
|
|
**Presence-gated vital signs** — Heart rate and respiratory rate sensors only publish data when a person is detected. Values reset to zero automatically when the area is vacant, preventing stale readings.
|
|
|
|
**Non-invasive detection** — The 60GHz radar works through non-conductive materials and requires no skin contact. Suitable for discreet installation behind walls or panels.
|
|
|
|
**Thread / OpenThread support** — Mesh networking capable for resilient home automation networks.
|
|
|
|
**OTA updates** — Firmware can be updated over-the-air via the ESPHome dashboard.
|
|
|
|
**RGB status LED** — Single addressable WS2812 LED, controllable from Home Assistant.
|
|
|
|
## Requirements
|
|
|
|
- [ESPHome](https://esphome.io) ≥ 2024.3.2
|
|
- Home Assistant (for API integration)
|
|
- `secrets.yaml` with the following keys:
|
|
|
|
```yaml
|
|
wifi_ssid: "YourNetwork"
|
|
wifi_password: "YourPassword"
|
|
api_encryption_key: "<base64-encoded 32-byte key>"
|
|
ota_password: "your-ota-password"
|
|
openthread_dataset: "<Thread TLV dataset>" # optional
|
|
```
|
|
|
|
## External Component
|
|
|
|
The MR60BHA2 UART driver is sourced from:
|
|
|
|
> [limengdu/MR60BHA2_ESPHome_external_components](https://github.com/limengdu/MR60BHA2_ESPHome_external_components)
|
|
|
|
ESPHome fetches this automatically at build time — no manual installation required.
|
|
|
|
## Installation
|
|
|
|
1. Clone this repository.
|
|
2. Create `secrets.yaml` with the values above.
|
|
3. Flash the device via USB:
|
|
```bash
|
|
esphome run heartbeat60hz.yaml
|
|
```
|
|
4. Subsequent updates can be done OTA through the ESPHome dashboard or CLI.
|
|
|
|
After flashing, the device will appear in Home Assistant via mDNS auto-discovery.
|
|
|
|
## Home Assistant Entities
|
|
|
|
Once adopted, the following entities are available:
|
|
|
|
| Entity | Type | Unit |
|
|
|--------|------|------|
|
|
| Occupancy | Binary Sensor | — |
|
|
| Heart Rate | Sensor | BPM |
|
|
| Respiratory Rate | Sensor | BPM |
|
|
| Distance | Sensor | cm |
|
|
| Target Count | Sensor | — |
|
|
| Illuminance | Sensor | lx |
|
|
| RGB LED | Light | — |
|
|
|
|
## Fallback Access Point
|
|
|
|
If Wi-Fi is unavailable, the device broadcasts a fallback hotspot:
|
|
|
|
- **SSID:** `seeedstudio-mr60bha2`
|
|
- **IP:** `192.168.4.1`
|
|
|
|
Use this to reconfigure Wi-Fi credentials via the ESPHome captive portal.
|
|
|
|
## Project Info
|
|
|
|
| Field | Value |
|
|
|-------|-------|
|
|
| Device name | `heartbeat60hz` |
|
|
| ESPHome project | `seeedstudio.mr60bha2_kit` v3.5 |
|
|
| Framework | ESP-IDF |
|
|
| Min ESPHome | 2024.3.2 |
|