Hardware: Omi Glass Firmware (ESP32)
Relevant source files
The following files were used as context for generating this wiki page:
Omi Glass is an open-source smart glasses hardware platform designed to provide AI capabilities, specifically focusing on long battery life and audio/visual capture. The firmware is built for the XIAO ESP32S3 Sense microcontroller, which integrates a powerful ESP32-S3 chip with a camera and digital microphone. The firmware enables the glasses to interact with the Omi mobile application, providing real-time audio and image data to a secondary AI "brain."
The firmware manages core hardware operations including audio capture via digital microphones, photo intervals for visual documentation, BLE (Bluetooth Low Energy) connectivity for data streaming, and power management. It is designed to outperform commercial alternatives like Meta Ray-Bans by providing up to 6x the battery life through optimized standby and active modes.
Sources: omiGlass/README.md:1-15, omiGlass/firmware/readme.md:160-185
Architecture and Core Components
The firmware is structured to handle concurrent tasks such as media capture, data encoding (e.g., Opus for audio), and wireless transmission.
Hardware Specifications
| Component | Specification |
|---|---|
| Microcontroller | Seeed XIAO ESP32S3 Sense |
| Microphone | On-board digital mic |
| Camera | Plug-in camera module for XIAO ESP32S3 |
| PSRAM | OPI PSRAM (Required for camera/processing) |
| Battery | Dual 250mAh Li-ion (500mAh total) |
| ADC Pin | A0 (for battery monitoring) |
Sources: omiGlass/README.md:5-15, omiGlass/firmware/readme.md:120-140
System Data Flow
The following diagram illustrates the high-level data flow from the hardware sensors to the Omi ecosystem.
The firmware captures raw sensor data, processes/compresses it (using Opus for audio), and transmits it over BLE to the mobile application.
Sources: omi/firmware/omi/README.md:25-45, omiGlass/README.md:55-65
Power and Battery Management
A critical feature of the Omi Glass firmware is its sophisticated power management and battery monitoring system. The system uses a voltage divider connected to ADC pin A0 to measure battery levels.
Usage Profiles
The firmware is optimized for different runtimes based on usage intensity:
- Heavy Use: Continuous photo capture (~6-7 hours).
- Normal Use: Mixed active/standby (~8-10 hours).
- Light Use: Mostly idle/connected (~12-15 hours).
Sources: omiGlass/firmware/readme.md:175-200
Monitoring Commands
The firmware provides a serial interface (115200 baud) for hardware verification and monitoring:
status: Displays current battery level and connection state.charging: Samples voltage over 20 seconds to determine trend.runtime: Calculates estimated remaining life based on current capacity.monitor: Continuous 5-second interval logging.
Sources: omiGlass/firmware/readme.md:148-170
Firmware Build and Installation
The Omi Glass firmware supports multiple build environments and flashing methods to accommodate different developer workflows.
Build Environments
| Environment | Description |
|---|---|
seeed_xiao_esp32s3 | Standard development build. |
seeed_xiao_esp32s3_slow | Reduced upload speed for unstable connections. |
uf2_release | Optimized for production with better battery performance. |
Sources: omiGlass/firmware/readme.md:23-32
Flashing Procedures
The easiest method for non-developers is the UF2 drag-and-drop method, while PlatformIO and Arduino-CLI are preferred for active development.
Sources: omiGlass/firmware/readme.md:5-22, omiGlass/firmware/v2.3.2/README.md:15-25
Audio and Connectivity
The firmware implements Opus support for efficient audio streaming. This requires two specific libraries: arduino-libopus and arduino-audio-tools.
Streaming Logic
- Active Mode: Audio is captured, encoded in Opus, and streamed immediately if a BLE connection is active.
- Connection Interval: Optimized for mobile platforms (e.g., ~15ms for iOS compliance).
- Storage Fallback: The firmware can create files on local storage when BLE is disconnected, which are then synced upon reconnection.
Sources: omiGlass/firmware/readme.md:95-105, omi/firmware/omi/README.md:35-42, omi/firmware/readme.md:45-55
Troubleshooting and Verification
The firmware includes built-in verification steps to ensure hardware integrity, particularly for the voltage divider and sensor connections.
| Problem | Potential Cause | Verification Step |
|---|---|---|
| Always 0% or 100% | Loose voltage divider | Use status to check for <2V or >5V |
| No charging progress | Cable or charger failure | Use charging command to monitor trend |
| Unsafe Voltage | Critical hardware fault | Check if voltage is <3.5V |
Sources: omiGlass/firmware/readme.md:225-250
Summary
The Omi Glass firmware for the ESP32-S3 Sense is a specialized implementation focused on long-duration wearable AI capture. By balancing high-speed audio/visual streaming with aggressive power management, it serves as the foundational interface between the physical smart glasses and the Omi AI ecosystem. Its support for multiple flashing methods and detailed serial monitoring makes it accessible for both end-users and hardware developers.
Sources: omiGlass/README.md:1-20, omiGlass/firmware/readme.md:300-310