An interactive, character-driven smart alarm clock built with the Seeed Studio XIAO ESP32C3. This project brings a standard clock to life using procedural OLED eye animations and coordinated servo-driven arms to express different moods based on the time of day or user interaction.
- Procedural Eye Animations: Uses geometric masking on an SSD1306 OLED to create smooth, expressive eyes without consuming excess memory with image files.
- Coordinated Arm Movements: Two micro-servos act as arms that react alongside the facial expressions.
- Dynamic Moods: Transitions seamlessly between states like Happy, Tired, Sleepy, Stretching, and an active Alarm sequence.
- Custom Enclosure: Physical housing and mounting brackets designed entirely in Solidworks.
- Microcontroller: Seeed Studio XIAO ESP32C3
- Display: 0.96" I2C OLED Display (SSD1306)
- Actuators: 2x Micro Servos (e.g., SG90)
- Power: 3.3V supply (via power bank)
The physical enclosure and servo mounts were modeled using Solidworks.
- The CAD files (including native
.SLDPRT/.SLDASMand.STLfiles for 3D printing, which are not included here) can be found in the/housingdirectory of this repository. Previous versions of the arm are still in the repository, with V2 files being the most up to date. - The Arduino files were .ino and relate to the
/expressions-programV2and/brain-programfiles in the repository.
Ensure your components are wired exactly as follows before connecting power:
| Component | Pin Name | XIAO Pin (Label) | ESP32 GPIO |
|---|---|---|---|
| OLED SDA | SDA | D4 | GPIO 6 |
| OLED SCL | SCL | D5 | GPIO 7 |
| Left Arm Servo | Signal | D0 | GPIO 2 |
| Right Arm Servo | Signal | D1 | GPIO 3 |
| All Components | VCC | 3V3 | - |
| All Components | GND | GND | - |
This project is programmed using the Arduino IDE.
- Download and install the Arduino IDE.
- Add ESP32 Support:
- Go to File > Preferences.
- Add
https://espressif.github.io/arduino-esp32/package_esp32_index.jsonto the Additional Boards Manager URLs. - Go to Tools > Board > Boards Manager, search for
esp32by Espressif Systems, and install it (Version 3.0.0 or higher required).
- Select your board: Go to Tools > Board > esp32 and select XIAO_ESP32C3.
Open the Arduino Library Manager (Sketch > Include Library > Manage Libraries...) and install the following:
Adafruit_GFXby AdafruitAdafruit_SSD1306by AdafruitESP32Servoby Kevin Harrington (StandardServo.hwill not work on the ESP32 chip).
- Connect the XIAO ESP32C3 to your computer via USB-C.
- Select the correct COM port under Tools > Port.
- Open the
expressions-programV2.inosketch. - Click the Upload arrow.
This project was made possible by several excellent open-source tools, libraries, and community inspirations:
- Adafruit Industries: For the
Adafruit_GFXandAdafruit_SSD1306libraries that drive the OLED display. - Kevin Harrington: For the
ESP32Servolibrary, allowing standard PWM servo control on the ESP32 architecture. - Espressif Systems & Seeed Studio: For the ESP32 core board definitions and the XIAO hardware.
- Design Inspiration: The procedural masking logic for the eye expressions was heavily inspired by the "Vinny" robot eye designs and various open-source animated OLED eye projects found across the maker community.
- Solidworks: Used for all 3D mechanical design, part modeling, and assembly testing.
- AI & LLM policy: Used to generate only code and execute ideas we had as a team.