ESP32-DevKitC (ESP32-WROOM-32)
ESP32 Desktop Pet Clock And Timer
Overview
A compact, offline desktop pet companion powered by USB, featuring an ESP32 microcontroller, small display, speaker, and buttons for a functional desk clock, timer, and stopwatch experience with cute animations.
System architecture
- POWER_USB_C → POWER_LDO_3V3PowerFeeds 5V USB power into the linear regulator and audio amplifier
- POWER_LDO_3V3 → MCU_ESP32_DEVKITPowerSupplies regulated 3.3V to ESP32 DevKit
- MCU_ESP32_DEVKIT → DISPLAY_SPI_TFTSPIHigh-speed SPI bus for display frame updates and backlight control
- MCU_ESP32_DEVKIT → RTC_BACKUPI2CI2C communication for time synchronization
- MCU_ESP32_DEVKIT → AUDIO_AMP_SPEAKERPWMPWM audio tone generation fed into Class-D amplifier
- MCU_ESP32_DEVKIT → INPUT_TACTILE_BUTTONSGPIOGPIO input pins with internal pull-ups for tactile buttons
Bill of materials
| Part number | Type | Component | Manufacturer | Package | Qty | Datasheet | Match |
|---|---|---|---|---|---|---|---|
| USB4155-03-C | POWER | USB Type-C Connector & 5V Input Provides constant 5V power supply from external USB adapter | GCT | Tape & Reel (TR) Cut Tape (CT) Digi-Reel® | 1 | Matched | |
| AMS1117 | POWER | AMS1117-3.3 Linear Regulator Steps down 5V USB power to 3.3V for MCU and peripherals | Ams | SOT-223-3 | 1 | Matched | |
1 alternatives consideredAI verified | |||||||
| ESP32-WROOM-32 | MCU | ESP32-DevKitC (ESP32-WROOM-32) Main dual-core microcontroller handling pet animations, UI logic, and peripherals | Espressif Systems | Reel | 1 | Matched | |
4 alternatives consideredAI verified | |||||||
| ST7789V | DISPLAY | 2.0-inch SPI TFT LCD (ST7789 controller) Renders cute animated pet graphics, clock face, and timer interface | Pulse Electronics | — | 1 | Matched | |
1 alternatives consideredAI verified | |||||||
| CR2032 | SENSOR | DS3231M Real-Time Clock Module with CR2032 Battery Maintains accurate timekeeping across power cycles | GC Electronics | — | 1 | Matched | |
| NS8002 | AUDIO | NS8002 Class-D Mono Audio Amplifier with 8-ohm 1W Speaker Drives audio feedback, chimes, and button click sounds | IDCHIP | SOP8 | 1 | Matched | |
| PTS645SK43SMTR92LFS | ACTUATOR | 3-Key Tactile Push Button Array Provides physical tactile control for navigating menus and starting timers | C&K | SW4_6X6MM_SM | 3 | Matched | |
1 alternatives consideredAI verified | |||||||
Build guide
Procurement & Preparation
- Source and inventory all BOM components including USB4155-03-C, AMS1117, ESP32-WROOM-32, ST7789V display, DS3231M RTC with CR2032 battery, NS8002 audio amplifier, 8-ohm 1W speaker, and PTS645SK43SMTR92LFS tactile buttons.
- Prepare the prototyping area, ensuring a clean workbench equipped with a temperature-controlled soldering iron, lead-free solder, flux, and wire strippers.
Hardware Assembly & Wiring
- Assemble the power supply circuit by mounting the USB4155-03-C Type-C connector and wiring its VBUS and GND output to the input pins of the AMS1117-3.3 Linear Regulator.
- Connect the 3.3V regulated output and GND from the AMS1117 regulator to the power input pins (3V3 and GND) of the ESP32-DevKitC.
- Wire the 2.0-inch SPI TFT LCD (ST7789 controller) to the ESP32-DevKitC using SPI interface signals (MOSI, SCLK, CS, DC, RST, BL, VCC, GND).
- Connect the DS3231M Real-Time Clock module and its CR2032 backup battery to the ESP32-DevKitC via the I2C interface signals (SDA, SCL, VCC, GND).
- Wire the NS8002 Class-D Mono Audio Amplifier and 8-ohm 1W speaker to the ESP32-DevKitC using the PWM audio signal (PWM_AUDIO) and GND.
- Integrate the 3-Key Tactile Push Button Array (PTS645SK43SMTR92LFS) to the ESP32-DevKitC GPIO pins, wiring BTN_1, BTN_2, BTN_3, and common GND.
Firmware Setup
- Install the development environment (Arduino IDE or ESP-IDF) and add support libraries for the ST7789 display driver, DS3231 RTC, and audio generation.
- Write and compile the desktop companion firmware featuring animated pet graphics, clock face logic, timer/stopwatch functions, and button input event handlers.
- Connect the assembled circuit to the computer via the USB-C port and flash the compiled firmware binary to the ESP32-DevKitC.
Testing & Calibration
- Power the desktop companion clock via a standard 5V USB adapter and verify that the AMS1117 regulator outputs a stable 3.3V across all active modules.
- Test the 2.0-inch SPI TFT display by checking boot animations, pet graphics, and UI rendering clarity across the ST7789 screen.
- Test the 3-key tactile button array to ensure responsive navigation through the clock, timer, and stopwatch menu modes.
- Verify audio playback on the 8-ohm 1W speaker driven by the NS8002 amplifier, testing button click sounds, alarms, and chimes.
- Perform a power-cycle test on the DS3231M RTC module by unplugging the USB power for 30 seconds to confirm timekeeping is maintained via the CR2032 battery.
Document
ESP32 Desktop Pet Clock And Timer
A compact, offline desktop pet companion powered by USB, featuring an ESP32 microcontroller, small display, speaker, and buttons for a functional desk clock, timer, and stopwatch experience with cute animations.
Design Overview
| Item | Details |
|---|---|
| Product Type | Desktop Companion Clock |
| Key Functions | Real-time clock display, Productivity timer, Stopwatch functionality, Cute animated pet visuals, Audio feedback via small speaker, Tactile button controls |
| Power Source | USB-C 5V |
| Connectivity | |
| Size | 7-10cm width compact desk toy size |
| Environment | indoor |
| Difficulty | Intermediate |
| Est. Time | 3-5 hours |
System Architecture
Power Topology: USB-C 5V enters the device, directly powering the Class-D audio amplifier, while an LDO steps down 5V to 3.3V to power the ESP32 MCU, TFT display, and RTC module.
Module List
| Module ID | Type | Name | Function | Voltage |
|---|---|---|---|---|
| POWER_USB_C | POWER | USB Type-C Connector & 5V Input | Provides constant 5V power supply from external USB adapter | 5V |
| POWER_LDO_3V3 | POWER | AMS1117-3.3 Linear Regulator | Steps down 5V USB power to 3.3V for MCU and peripherals | 3.3V |
| MCU_ESP32_DEVKIT | MCU | ESP32-DevKitC (ESP32-WROOM-32) | Main dual-core microcontroller handling pet animations, UI logic, and peripherals | 3.3V |
| DISPLAY_SPI_TFT | DISPLAY | 2.0-inch SPI TFT LCD (ST7789 controller) | Renders cute animated pet graphics, clock face, and timer interface | 3.3V |
| RTC_BACKUP | SENSOR | DS3231M Real-Time Clock Module with CR2032 Battery | Maintains accurate timekeeping across power cycles | 3.3V |
| AUDIO_AMP_SPEAKER | AUDIO | NS8002 Class-D Mono Audio Amplifier with 8-ohm 1W Speaker | Drives audio feedback, chimes, and button click sounds | 5V |
| INPUT_TACTILE_BUTTONS | ACTUATOR | 3-Key Tactile Push Button Array | Provides physical tactile control for navigating menus and starting timers | 3.3V |
Design Schemes
ESP32 DevKit with SPI TFT and Discrete Audio ★
Utilizes a standard ESP32 development board, connected to a 2.0-inch SPI TFT LCD for animated visuals, a DS3231 RTC module for timekeeping, a Class-D audio amplifier, and tactile buttons.
Trade-offs: Lowest prototype cost and easiest hand-soldering using dev modules, but slightly larger physical footprint than custom single-board designs.
Key IC selection
main MCU and Wi-Fi/BLE processor
- Need: Dual-core processing for real-time UI animation rendering, audio synthesis, and peripheral management with sufficient flash memory for graphic assets.
- Class: 32-bit Tensilica Xtensa Dual-Core Microcontroller Module
- Shortlist: Espressif ESP32-WROOM-32, Raspberry Pi RP2040 (with external Flash)
- Pick: Select ESP32-WROOM-32 module for integrated flash, robust Wi-Fi/BLE stack capability for future NTP time sync, and abundant GPIOs.
voltage regulator
- Need: Step down 5V USB input to clean 3.3V supply for ESP32, display, and audio amplifier with minimal drop-out and thermal overhead.
- Class: Fixed Output Low Dropout Linear Regulator
- Shortlist: Advanced Monolithic Systems AMS1117-3.3, Microchip MCP1700-3.3
- Pick: Select AMS1117-3.3 in SOT-223 package for low-cost, high availability, and up to 1A output capability to handle peak Wi-Fi transmit currents.
real-time clock with battery backup
- Need: Accurate hardware calendar/clock keeping with automatic switchover to coin-cell battery during main 5V power interruption.
- Class: I2C Real-Time Clock with Integrated Crystal and Battery Backup
- Shortlist: Maxim Integrated DS3231M, NXP PCF8563
- Pick: Select DS3231M for its ±5ppm high accuracy over temperature and integrated MEMS resonator, eliminating external crystal matching issues.
audio power amplifier
- Need: Drive an 8-ohm 1W mono speaker efficiently from a 3.3V or 5V rail to produce clear button clicks, chimes, and alert sounds.
- Class: Mono Class-D Audio Power Amplifier
- Shortlist: Nsilicon NS8002, Texas Instruments LM4871
- Pick: Select NS8002 for cost-effective bridged-tied load (BTL) architecture and low quiescent current in small form-factor SOP-8 packaging.
Risk register
| ID | Area | Severity | Detail | Mitigation |
|---|---|---|---|---|
| r1 | thermal | med | The AMS1117-3.3 linear regulator dropping 5V to 3.3V while supplying the ESP32 (especially during Wi-Fi peaks up to 400mA+) will dissipate significant heat (approx 0.68W) in a small enclosed desktop enclosure. | Ensure adequate copper pour (heatsink plane) connected to the thermal tab of the AMS1117, or evaluate a pin-compatible step-down switching regulator (e.g., TSR-1 series) if enclosure ventilation is poor. |
| r2 | emi | med | The high-speed SPI bus running between the ESP32 DevKit and the 2.0-inch TFT LCD can radiate electromagnetic interference, causing audio hum on the NS8002 amplifier or disrupting the nearby I2C RTC lines. | Route SPI traces away from audio input/amplifier traces and analog lines. Add series damping resistors (22-33 ohm) on SPI clock and data lines to reduce high-frequency ringing and edge rates. |
| r3 | power | low | Switching transients from the NS8002 Class-D audio amplifier can inject noise into the 3.3V power rail, causing visual artifacts or reset events on the ESP32-DevKitC. | Place bulk decoupling capacitors (e.g., 10uF ceramic) and high-frequency bypass capacitors (0.1uF) directly adjacent to the power pins of the audio amplifier and ESP32 power entry. |
Key Components
7/7 modules matched to real parts. See the BOM tab for the full component table.
USB Type-C Connector & 5V Input (USB4155-03-C)
The candidate's MPN (USB4155-03-C) matches the primary MPN exactly and is the correct USB Type-C connector component.
AMS1117-3.3 Linear Regulator (AMS1117)
ESP32-DevKitC (ESP32-WROOM-32) (ESP32-WROOM-32)
Candidate 3 (ESP32-WROOM-32) is an exact match for the primary MPN from the original manufacturer (Espressif Systems).
Build Summary
- Difficulty: Intermediate
- Estimated time: 3-5 hours
- Tools required: Soldering iron, Lead-free solder, Solder flux, Wire strippers, Multimeter, Computer with Arduino IDE
See the Build tab for the full step-by-step assembly guide.
*Generated by YuanQi AI Design System · Query: A standalone electronic companion (desktop pet) using an ESP32, featuring a real-time clock, timer, and stopwatch. It combines a small screen, a set of buttons, and a small speaker into a compact desk device powered via standard USB.
User: adjust the first scheme to have 4 tactile buttons instead, and the final product should eventually be soldered onto a perfboard User: im creating a beginner project using an esp32 as the following: The project will deliver a standalone electronic companion designed to sit on the user's desk and function as a real time clock, a timer, and stopwatch, under the pretense of a "desktop pet". Once the product is finalized, it will be a physical hardware build that combines a small screen, a set of buttons, and a little speaker into one compact device that can be placed on any desk. The device will be powered by a standard USB cable User: yes*