Skip to main content
Version: ACS CC

Smart Mirror

info

Author: Patricia-Elena Crăciun
GitHub Project Link: https://github.com/UPB-PMRust-Students/proiect-patriciacraciun

Description

The idea of the project is to build a smart mirror that can play music over Bluetooth and has LED lighting with adjustable brightness. The mirror can be controlled using an IR remote and a mobile phone. All functionality is implemented on an ESP32 board, programmed entirely in Rust.

Motivation

I chose this project because I've always wanted a smart mirror, especially because I'm really passionate about makeup. Having good lighting and music while getting ready is something I’ve always dreamed of. This project lets me combine something I’d actually use every day with the skills I learned this semester.

Architecture

block

Main components:

  • User – interacts using an IR remote or a phone (Bluetooth)
  • IR Receiver – sends commands to the ESP32
  • ESP32 – controls the whole system (LED brightness, Bluetooth, audio)
  • LED Strip – controlled via PWM from ESP32
  • Bluetooth Audio – receives audio from phone
  • Amplifier – amplifies signal for the speakers
  • Speakers – play the music
  • Power Supply – powers everything with 12V and a step-down to 5V for ESP32

Log

Week 5 – 11 May

Connecting the hardware components

Week 12 – 18 May

Week 19 – 25 May

Hardware

The smart mirror uses an ESP32 development board, a TPA3116D2 amplifier module, an IR receiver, a 12V LED strip, and a pair of speakers. The system is powered by a 12V/5A adapter and uses an LM2596 step-down converter to supply 5V to the ESP32 and other components.

Schematics

kicad

Bill of Materials

DeviceUsagePrice
ESP32 DevKitMicrocontroller35 RON
TPA3116D2 AmplifierDrives speakers53 RON
2x Speakers (60W, 4Ω)Play music60 RON
LED Strip 2835 12VMirror lighting37 RON
LM2596 Step-down ConverterPower ESP3213 RON
12V 5A Power AdapterMain power32 RON
IR Remote + ReceiverRemote control11 RON
MOSFET IRFZ44NControls LED brightness5 RON
2x Breadboard + Jumper WiresPrototypig44 RON

Software

LibraryDescriptionUsage
esp-idf-halHardware interface for ESP32This is used for controlling GPIOs, PWM, and other peripherals on the ESP32.
embedded-halEmbedded abstraction layerThis is used to provide a standard interface for embedded hardware components.
infraredDecode IR remote inputThis is used to decode signals from the IR remote control.
smart-ledsLED strip controlThis is used to manage the brightness of the LED strip.
heaplessData structures without heapThis is used to manage data without dynamic memory allocation.
esp-idf-svcBluetooth A2DP profile supportThis is used to handle Bluetooth audio streaming and other services.
panic-haltPanic handlerThis is used to halt the system in case of a panic, useful for debugging.