Smart Mirror
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
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
Bill of Materials
Device | Usage | Price |
---|---|---|
ESP32 DevKit | Microcontroller | 35 RON |
TPA3116D2 Amplifier | Drives speakers | 53 RON |
2x Speakers (60W, 4Ω) | Play music | 60 RON |
LED Strip 2835 12V | Mirror lighting | 37 RON |
LM2596 Step-down Converter | Power ESP32 | 13 RON |
12V 5A Power Adapter | Main power | 32 RON |
IR Remote + Receiver | Remote control | 11 RON |
MOSFET IRFZ44N | Controls LED brightness | 5 RON |
2x Breadboard + Jumper Wires | Prototypig | 44 RON |
Software
Library | Description | Usage |
---|---|---|
esp-idf-hal | Hardware interface for ESP32 | This is used for controlling GPIOs, PWM, and other peripherals on the ESP32. |
embedded-hal | Embedded abstraction layer | This is used to provide a standard interface for embedded hardware components. |
infrared | Decode IR remote input | This is used to decode signals from the IR remote control. |
smart-leds | LED strip control | This is used to manage the brightness of the LED strip. |
heapless | Data structures without heap | This is used to manage data without dynamic memory allocation. |
esp-idf-svc | Bluetooth A2DP profile support | This is used to handle Bluetooth audio streaming and other services. |
panic-halt | Panic handler | This is used to halt the system in case of a panic, useful for debugging. |