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
CartYou'll need
Raspberry Pi 5 8GB Board Only$175.00
Vilros Raspberry Pi 5 Basic Starter Kit4GB / Aluminum Alloy W/ Passive+ Active Cooling$179.99
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.
- Choose a sturdy safety glasses frame.
- Plan component placement: display on one lens, camera on bridge, Pi on temple.
- Use hot glue or small screws to mount components securely.
- 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.
- Connect OLED VCC to Pi 3.3V.
- Connect OLED GND to Pi GND.
- Connect OLED SCL to Pi GPIO 3 (SCL).
- Connect OLED SDA to Pi GPIO 2 (SDA).
- 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.
- Install required libraries: sudo apt-get install python3-pil python3-pip && sudo pip3 install adafruit-circuitpython-ssd1306
- Run a test script to display text on the OLED.
- 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.
- Connect Pi Camera to the CSI port or USB camera to USB port.
- Enable camera: sudo raspi-config → Interface Options → Camera → Enable.
- Test: raspistill -o test.jpg
You should see
Camera captures images.
Create AR application
About 30 minutes
Display information on glasses.
- Write Python script to show time, notifications, or camera feed on OLED.
- Implement basic AR features like text overlay or object detection.
- Optimize for low power consumption.
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.
- Connect a small LiPo battery or USB power bank to the Pi.
- Secure battery to temple arm of glasses.
- 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.