Skip to content

DIY Smart Glasses

Build augmented reality smart glasses using Raspberry Pi Zero with a small display and camera.

  • Raspberry Pi
  • Advanced
  • 120 minutes
  • 6 steps

Shop this project

Cart

You'll need

Prices from vilros.com. Tax and shipping at checkout.

Before you start, you'll need

  • Raspberry Pi Zero W
  • Mini OLED display (0.96 inch)
  • Pi Camera or USB camera
  • Battery pack (small/portable)
  • Safety glasses frame
  • Hot glue and mounting materials

Prepare the glasses frame

About 20 minutes

Mount components on glasses.

  1. Choose a sturdy safety glasses frame.
  2. Plan component placement: display on one lens, camera on bridge, Pi on temple.
  3. Use hot glue or small screws to mount components securely.
  4. Ensure display is at a comfortable viewing angle.

You should see

Components are securely mounted on frame.

Connect the OLED display

About 25 minutes

Wire display to Pi via I2C.

  1. Connect OLED VCC to Pi 3.3V.
  2. Connect OLED GND to Pi GND.
  3. Connect OLED SCL to Pi GPIO 3 (SCL).
  4. Connect OLED SDA to Pi GPIO 2 (SDA).
  5. Enable I2C: sudo raspi-config → Interface Options → I2C → Enable.

You should see

Display is wired and I2C is enabled.

Test the display

About 15 minutes

Verify OLED works.

  1. Install required libraries: sudo apt-get install python3-pil python3-pip && sudo pip3 install adafruit-circuitpython-ssd1306
  2. Run a test script to display text on the OLED.
  3. Verify text is visible and clear.

You should see

The OLED displays text successfully.

Connect the camera

About 20 minutes

Add camera for AR features.

  1. Connect Pi Camera to the CSI port or USB camera to USB port.
  2. Enable camera: sudo raspi-config → Interface Options → Camera → Enable.
  3. Test: raspistill -o test.jpg

You should see

Camera captures images.

Create AR application

About 30 minutes

Display information on glasses.

  1. Write Python script to show time, notifications, or camera feed on OLED.
  2. Implement basic AR features like text overlay or object detection.
  3. Optimize for low power consumption.
python
import board
import busio
from PIL import Image, ImageDraw, ImageFont
import adafruit_ssd1306
import time

i2c = busio.I2C(board.SCL, board.SDA)
display = adafruit_ssd1306.SSD1306_I2C(128, 64, i2c)

display.fill(0)
display.show()

image = Image.new('1', (display.width, display.height))
draw = ImageDraw.Draw(image)
font = ImageFont.load_default()

while True:
    draw.rectangle((0, 0, display.width, display.height), outline=0, fill=0)
    
    current_time = time.strftime("%H:%M:%S")
    draw.text((10, 10), current_time, font=font, fill=255)
    draw.text((10, 30), "Smart Glasses", font=font, fill=255)
    
    display.image(image)
    display.show()
    time.sleep(1)

Extend with notifications, weather, navigation, or object recognition.

You should see

AR app displays information on glasses.

Make it portable

About 10 minutes

Power with battery.

  1. Connect a small LiPo battery or USB power bank to the Pi.
  2. Secure battery to temple arm of glasses.
  3. Test runtime (expect 2-4 hours depending on battery).

You should see

Glasses run on battery power.

What to do next

Stuck? Contact Vilros Support with your board model and what you see on screen.