> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omi.me/llms.txt
> Use this file to discover all available pages before exploring further.

# Hardware & Assembly

> Open source smart glasses with 6x the battery life of Meta Ray-Bans. Build your own AI-powered glasses with the XIAO ESP32 S3 Sense.

<Frame>
  <img src="https://github.com/user-attachments/assets/848f664b-183e-4df5-8928-f16f00ff144b" alt="omiGlass Front View" style={{ maxWidth: '500px', margin: '0 auto' }} />
</Frame>

## Overview

omiGlass is an open-source smart glasses project that gives you AI capabilities with exceptional battery life.

<CardGroup cols={3}>
  <Card title="6x Battery Life" icon="battery-full">
    Longer lasting than Meta Ray-Bans
  </Card>

  <Card title="ESP32 S3 Sense" icon="microchip">
    Powerful XIAO microcontroller with camera
  </Card>

  <Card title="Fully Open Source" icon="code-branch">
    Hardware, firmware, and software
  </Card>
</CardGroup>

<Info>
  Watch the [announcement video](https://x.com/kodjima33/status/1911852469329727811) to see omiGlass in action.
</Info>

***

## How to Get It

<CardGroup cols={2}>
  <Card title="Pre-built Kit" icon="box" href="https://omi.me/glass">
    Order a limited pre-built DevKit from Based Hardware
  </Card>

  <Card title="Build Your Own" icon="screwdriver-wrench">
    Follow the guide below to build from scratch
  </Card>
</CardGroup>

***

## Prerequisites

<CardGroup cols={3}>
  <Card title="Ollama" icon="robot" href="https://github.com/ollama/ollama">
    Local AI model hosting
  </Card>

  <Card title="Arduino IDE" icon="code" href="https://www.arduino.cc/en/software">
    For firmware upload
  </Card>

  <Card title="3D Printer" icon="cube">
    For hardware components
  </Card>
</CardGroup>

***

## Hardware Components

| Component           | Description                      | Link                                                                               |
| ------------------- | -------------------------------- | ---------------------------------------------------------------------------------- |
| XIAO ESP32 S3 Sense | Main microcontroller with camera | [Amazon](https://www.amazon.com/dp/B0C69FFVHH/ref=dp_iou_view_item?ie=UTF8\&psc=1) |
| 6x 150mAh batteries | Main power supply                | [Option 1](https://a.co/d/i17DjOr) or [Option 2](https://a.co/d/bbFdkic)           |
| 1x 250mAh battery   | Additional power                 | [Amazon](https://a.co/d/2xheiFC)                                                   |
| Wires               | For connections                  | [Amazon](https://a.co/d/ah98wY0)                                                   |
| Hinges              | For frame assembly               | Standard glasses hinges                                                            |

<Note>
  The current design does not include a switch. See the contribution section for how you can help improve this.
</Note>

***

## Software Setup

<Steps>
  <Step title="Clone the Repository">
    ```bash theme={null}
    git clone https://github.com/BasedHardware/omi.git
    cd omi/OmiGlass
    npm install
    ```

    Or with yarn:

    ```bash theme={null}
    yarn install
    ```
  </Step>

  <Step title="Configure API Keys">
    Copy the template and add your keys:

    ```bash theme={null}
    cp .env.template .env
    ```

    Edit `.env` and add:

    * [Groq API key](https://console.groq.com/keys)
    * [OpenAI API key](https://platform.openai.com/api-keys)
    * Ollama URL (default: `http://localhost:11434/api/chat`)
  </Step>

  <Step title="Install Ollama Model">
    ```bash theme={null}
    ollama pull moondream:1.8b-v2-fp16
    ```
  </Step>

  <Step title="Start the Application">
    ```bash theme={null}
    npm start
    ```

    Or with yarn:

    ```bash theme={null}
    yarn start
    ```

    <Tip>
      This is an Expo project. Open the localhost link displayed after starting to access the web version.
    </Tip>
  </Step>
</Steps>

***

## Hardware Assembly

<Steps>
  <Step title="3D Print the Case">
    Print the glasses mount case using the STL files in the `hardware` folder.
  </Step>

  <Step title="Assemble Components">
    Wire the batteries and XIAO board according to the assembly diagram.

    <Frame>
      <img src="https://github.com/user-attachments/assets/45ef303b-0f92-43eb-bfad-1b20a86e948c" alt="omiGlass Assembly" style={{ maxWidth: '400px', margin: '0 auto' }} />
    </Frame>
  </Step>

  <Step title="Final Assembly">
    Mount all components into the 3D printed case and attach hinges.
  </Step>
</Steps>

***

## Firmware Installation

<Steps>
  <Step title="Open the Firmware">
    Open the [firmware folder](https://github.com/BasedHardware/omi/tree/main/omiGlass/firmware) and load the `.ino` file in Arduino IDE.

    <Tip>
      Alternatively, follow the [firmware readme](https://github.com/BasedHardware/omi/tree/main/omiGlass/firmware/readme.md) to build using `arduino-cli`.
    </Tip>
  </Step>

  <Step title="Configure Arduino IDE">
    Add the ESP32 board package:

    1. Go to **File → Preferences**
    2. Add to "Additional Boards Manager URLs":
       ```
       https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
       ```
    3. Go to **Tools → Board → Boards Manager**
    4. Search for `esp32` and install the latest version
  </Step>

  <Step title="Select Board and Port">
    1. Select port (likely COM3 or higher) at the top of Arduino IDE
    2. Search for `xiao` in the board selector
    3. Select **XIAO\_ESP32S3**
  </Step>

  <Step title="Configure PSRAM">
    Go to **Tools** dropdown and set **PSRAM** to **OPI PSRAM**.

    <Frame>
      <img src="https://mintcdn.com/omi/kuqgaBKwHOGhyCBK/images/docs/hardware/images/image.png?fit=max&auto=format&n=kuqgaBKwHOGhyCBK&q=85&s=28d24e696ef313ef120df94b193449f8" alt="PSRAM Settings" width="586" height="79" data-path="images/docs/hardware/images/image.png" />
    </Frame>
  </Step>

  <Step title="Upload Firmware">
    Click the Upload button to flash the firmware to your XIAO ESP32S3 board.
  </Step>
</Steps>

***

## Contributing

Help improve omiGlass!

### Software

| Task                            | Status     |
| ------------------------------- | ---------- |
| Connect glasses with Omi AI app | ✅ Complete |

### Hardware

| Task                                 | Status     |
| ------------------------------------ | ---------- |
| Redesign legs/sides for bigger heads | ⬜ Open     |
| Add switch to design                 | ✅ Complete |

<Card title="Join the Community" icon="discord" href="http://discord.omi.me">
  Get help with setup, contribute to the project, and connect with other builders
</Card>

***

## License

This project is licensed under the MIT License.

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Omi Consumer" icon="circle-dot" href="/doc/hardware/OmiConsumer">
    Production Omi wearable
  </Card>

  <Card title="DevKit 2" icon="microchip" href="/doc/hardware/DevKit2">
    Necklace form factor DevKit
  </Card>

  <Card title="Build Guide" icon="screwdriver-wrench" href="/doc/assembly/Build_the_device">
    General assembly instructions
  </Card>

  <Card title="App Setup" icon="mobile" href="/doc/get_started/introduction">
    Get started with the Omi app
  </Card>
</CardGroup>
