Magic Mirror Buddy

by starsthatshine56 in Circuits > Robots

70 Views, 2 Favorites, 0 Comments

Magic Mirror Buddy

微信图片_20250511173853.jpg

Meet MagicMirror Buddy, a touch-enabled AI companion, inspired by the talking mirrors often seen in fairytales. This project integrates the DeepSeek language model with ESP32-S3-Touch-LCD hardware, offering not just answers but companionship. Built with 3D-printed enclosure and interactive features, Magic Mirror Buddy responds to your questions, learns your preferences, and even cracks jokes—like a true friend! It is a device that’s as helpful as it is charming.

What can it do?

The Magic Mirror Buddy embodies connection and utility by blending AI-driven dialogue, touch interaction, and emotive design. Unlike generic smart devices, this mirror becomes a personalized companion that:

  1. Remembers Your Preferences: Learns your daily routines and adapts responses.
  2. Offers Emotional Support: Detects mood through conversational cues and responds empathetically.
  3. Acts as a Helper: Manages tasks like weather updates, reminders, and trivia.

By combining ESP32 programming, 3D design, and AI integration, this project reimagines what a "robot friend" can be—a mirror that listens, learns, and grows with you.

Skills Involved:

  1. Emotive UI Design: Use LVGL to animate friendly faces and dynamic icons.
  2. Context-Aware AI: Implement conversation memory using DeepSeek’s session tokens.
  3. Personalization: Save user preferences to a local JSON file on ESP32.
  4. 3D Aesthetics: Design an enclosure with playful curves and LED accents for a "living" feel.

Supplies

微信图片_20250511155314.png

Supplies

Hardware

  1. ESP32-S3-Touch-LCD (4-inch, 480×800, capacitive touch)
  2. 3D Printer (PLA filament, 0.2mm layer height recommended)
  3. Acrylic Mirror Sheet (2mm thickness, cut to screen size)
  4. NeoPixel RGB LED Strip (12 LEDs, WS2812B)
  5. Buzzer Module (for audio feedback)
  6. Lithium Battery (18650, 3.7V with charging circuit)
  7. Micro-USB Breakout Board (for power management)

Software

  1. Arduino IDE (with ESP32 board support)
  2. Python 3.10+ (with requests, pyserial, json libraries)
  3. LVGL Graphics Library (v8.3+)
  4. DeepSeek API Key (Register here)
  5. Fusion 360 (for 3D modeling)

Hardware Assembly

微信图片_20250511143513.png
微信图片_20250511143653.png

Assembly Guide

  1. Mount the Touchscreen:
  2. Secure the ESP32-S3-Touch-LCD to the front frame using M2 screws.
  3. Attach the acrylic mirror behind the screen .
  4. Install LEDs:
  5. Embed the NeoPixel strip into the front frame’s LED slots.
  6. Solder wires to the ESP32’s IO4 pin with a 470Ω resistor.
  7. Power Management:
  8. Connect the 18650 battery to a TP4056 charging module.
  9. Wire the module’s output to the ESP32’s 5V pin.

Safety Note: Add a 1A fuse between the battery and ESP32 to prevent overcurrent.

Arduino Firmware

微信图片_20250511162336.png
微信图片_20250511162621.png

Introduction to Development Tools:

The ESP32-S3-Touch-LCD-1.46 currently supports two development tools and frameworks: Arduino IDE and ESP-IDF, offering versatile development choices. You can select the appropriate tool according to your project needs and personal workflow. In this project, the author has chosen Arduino IDE.

Arduino IDE is a convenient and flexible open-source electronics prototyping platform. It is beginner-friendly, allowing users to start developing quickly after minimal learning. Additionally, Arduino boasts a vast global user community that provides an abundance of open-source code, project examples, tutorials, and rich library resources. These libraries encapsulate complex functionalities, enabling developers to implement various features rapidly.

Install Dependencies:

  1. In Arduino IDE: Tools > Manage Libraries > Search "LVGL" > Install v8.3.
  2. Add TFT_eSPI library and configure User_Setup.h for your LCD.

Code: Interactive UI with Animations

Python Backend (DeepSeek API + Serial Communication)

微信图片_20250511162917.png

DeepSeek builds powerful foundation models capable of advanced text generation and comprehension, and provides developers with API access to its sophisticated AI systems, offering both cloud-based solutions and potential edge computing implementations. What sets DeepSeek apart is its exceptional bilingual capabilities in Chinese and English, along with industry-leading performance in language understanding and logical reasoning. These models are particularly well-suited for creating conversational AI applications like the Magic Mirror Buddy, as well as various content generation and knowledge management systems.

API Integration

1、Install Required Libraries

2、Code: Context-Aware Chat with Error Handling


3D Design & Printing

微信图片_20250511165843.jpg
微信图片_20250511170410.jpg
微信图片_20250511170420.jpg

The Magic Mirror's design blends functionality with artistic appeal, building upon a fairytale-inspired silhouette while incorporating contemporary technological elements. The housing features curvilinear surfaces ensure structural integrity without compromising aesthetic elegance.

Design Details

  1. Front Frame:
  2. Cutout for the touchscreen and acrylic mirror.
  3. Integrated slots for LED strip mounting.
  4. A subtle "smiling mouth" shape beneath the mirror for hidden LEDs.
  5. Back Panel:
  6. Compartment for ESP32, battery, and wiring.
  7. Ventilation holes for heat dissipation.
  8. Mounting Brackets:
  9. Magnetic latches for easy disassembly.

Printing Instructions

  1. Material: PLA .
  2. Settings:
  3. Nozzle: 0.4mm
  4. Infill: 20% (structural parts), 15% (decorative parts).
  5. Support: Enable for overhangs (e.g., LED slots).

Conclusion

The Magic Mirror Buddy combines AI, artistry, and empathy. By following this guide, you’ve built not just a device, but a companion that grows with you.