This project is a PCB-based digital hourglass that uses an ESP32-S3 microcontroller, an OLED display, an orientation sensor, and an ambient light sensor. The device displays an hourglass animation, detects when the board is flipped, and automatically adjusts screen brightness based on surrounding light.
SYSTEM BLOCK DIAGRAM
System starts with USB-C power, regulates it to 3.3V, then the ESP32 reads the sensors and drives the OLED display.
The Auto-Dim Digital Hourglass is designed as a compact embedded system that combines sensing, display control, and power regulation on a custom PCB. A BMI270 IMU detects board orientation and flipping behavior, while a VEML7700 ambient light sensor measures room brightness. The ESP32-S3 processes these inputs and controls a 2.42-inch 128×64 OLED display to show the hourglass animation. The board is powered through USB-C, protected using fuse/TVS/ESD components, and regulated from USB 5V down to 3.3V for the ESP32 and sensors.
ESP32-S3-WROOM-1 main microcontroller
2.42-inch 128×64 SSD1309 OLED display
Hourglass animation displayed on OLED
BMI270 IMU for flip/orientation detection
VEML7700 ambient light sensor for auto-dimming
USB-C power input
5V to 3.3V buck regulation using AP63203
PTC resettable fuse for overcurrent protection
TVS diode for USB power-line surge protection
Reset and boot buttons for programming/debugging
Test points for power rails and debugging
Front and back GND copper pours for improved grounding
CIRCUIT CATEGORIES
Compute: ESP32-S3 controls the system and runs the hourglass logic
Power: USB-C input, fuse protection, TVS protection, and 5V-to-3.3V buck regulator
Sensing: BMI270 orientation sensor and VEML7700 ambient light sensor
Actuation / Output: OLED display shows the digital hourglass animation
The board receives 5V from the USB-C connector. The 5V line passes through a PTC resettable fuse and protection circuitry before feeding the buck regulator. The AP63203 buck regulator converts 5V to 3.3V, which powers the ESP32-S3, sensors, and OLED display.
The VEML7700 and BMI270 communicate with the ESP32 through a shared two-wire sensor bus. The OLED display uses a 7-pin SPI-style interface with clock, data, reset, data/command, and chip-select lines. The ESP32 uses the BMI270 readings to detect when the board has been flipped and uses the VEML7700 readings to adjust OLED brightness.
SCHEMATIC
PCB LAYOUT
Front Layout
Back Layout
BILL OF MATERIAL
AUDRINO CODE
Reads BMI270 orientation data
Reads VEML7700 light data
Draws hourglass animation
Resets hourglass when flipped
Adjusts OLED brightness based on light level
ASSEMBLED PCB
EXPECTED OUTCOME
Team Members
Muzhda Mehrzad
UC Berkeley EECS Class of 2027
Brandon Sani
UC Berkeley EECS Class of 2027
Matthew De La Cruz
UC Berkeley EECS Class of 2027
Josh Gonzalez
UC Berkeley EECS Class of 2027
HOPE Advisors
Roman Silivra
HOPE Director - UC Berkeley EECS
Curtis Suero Manacsa
HOPE Co-Director - UC Berkeley EECS