This shows you the differences between two versions of the page.
|
pm:prj2026:vlad.radulescu2901:andrei.giurgiu0801 [2026/05/09 23:16] andrei.giurgiu0801 [General description] |
pm:prj2026:vlad.radulescu2901:andrei.giurgiu0801 [2026/05/16 15:30] (current) andrei.giurgiu0801 [Demos] |
||
|---|---|---|---|
| Line 42: | Line 42: | ||
| === Component Pinout === | === Component Pinout === | ||
| - | ^ Component ^ Pin Name ^ Connected To ^ | + | ^ Component ^ Pin Name ^ Connected To ^ Reason ^ |
| - | | **ESP32-DEVKITC-32D** | 3V3 | Potentiometer (Top Pin) | | + | | **ESP32-DEVKITC-32D** | 3V3 | MB102 (VCC2 @ 3.3V) & Potentiometer (Top Pin) | Receives stable 3.3V power from the external supply (standalone mode) and provides the 3.3V reference voltage for the volume potentiometer. | |
| - | | ::: | IO34 | Potentiometer (Wiper) | | + | | ::: | IO34 | Potentiometer (Wiper) | ADC input to read the analog voltage (0-3.3V) to adjust the software volume. | |
| - | | ::: | IO27 | PLAY/PAUSE BUTTON | | + | | ::: | IO27 | PLAY/PAUSE BUTTON | GPIO input with internal pull-up activated to control the playback state. | |
| - | | ::: | IO14 | UP BUTTON | | + | | ::: | IO14 | UP BUTTON | GPIO input with internal pull-up activated to navigate up in the song list. | |
| - | | ::: | IO13 | DOWN BUTTON | | + | | ::: | IO13 | DOWN BUTTON | GPIO input with internal pull-up activated to navigate down in the song list. | |
| - | | ::: | GND | Common GND | | + | | ::: | GND | Common GND | Essential common ground reference for all power and data signals across the entire system. | |
| - | | ::: | 5V | MB102 (VCC2) | | + | | ::: | 5V | Not Connected | Left disconnected because the ESP32 is powered directly via the 3.3V rail from the MB102. | |
| - | | ::: | IO23 | Micro SDHC reader (MOSI) | | + | | ::: | IO23 | Micro SDHC reader (MOSI) | SPI Master Out Slave In: Sends read commands to the SD card. | |
| - | | ::: | IO22 | PCF8574 (SCL) | | + | | ::: | IO22 | PCF8574 (SCL) | I2C Clock line to synchronize data transfers to the LCD. | |
| - | | ::: | IO21 | PCF8574 (SDA) | | + | | ::: | IO21 | PCF8574 (SDA) | I2C Data line to display menus and lyrics on the LCD. | |
| - | | ::: | IO19 | Micro SDHC reader (MISO) | | + | | ::: | IO19 | Micro SDHC reader (MISO) | SPI Master In Slave Out: Stream audio (.mp3) and lyrics (.lrc) data to the ESP32. | |
| - | | ::: | IO18 | Micro SDHC reader (SCK) | | + | | ::: | IO18 | Micro SDHC reader (SCK) | SPI Clock line generated by the ESP32 to sync SD card communication. | |
| - | | ::: | IO5 | Micro SDHC reader (CS) | | + | | ::: | IO5 | Micro SDHC reader (CS) | SPI Chip Select: Enables the SD card reader during data transfers. | |
| - | | ::: | IO16 | MAX98357A (DIN) | | + | | ::: | IO16 | MAX98357A (DIN) | I2S Data Line (DOUT): Sends the raw digital audio stream to the amplifier. | |
| - | | ::: | IO26 | MAX98357A (BCLK) | | + | | ::: | IO26 | MAX98357A (BCLK) | I2S Bit Clock: Dictates the timing and speed of individual audio data bits. | |
| - | | ::: | IO25 | MAX98357A (LRC) | | + | | ::: | IO25 | MAX98357A (LRC) | I2S Left/Right Clock (Word Select): Syncs the audio channels for the DAC. | |
| - | | **MB102 Power Supply** | VCC2 | ESP32 (5V), MAX98357A (Vin), PCF8574 (VCC), Micro SDHC reader (VCC) | | + | | **MB102 Power Supply** | VCC1 (Set to 5V) | MAX98357A (Vin), PCF8574 (VCC), Micro SDHC reader (VCC) | Provides heavy-duty 5V power to power-hungry and 5V-logic components to ensure maximum volume, clear LCD contrast, and stable SD card reads. | |
| - | | ::: | GND | Common GND | | + | | ::: | VCC2 (Set to 3.3V) | ESP32 (3V3) | Supplies a clean, regulated 3.3V directly to the ESP32 power rail for safe, standalone operation. | |
| - | | ::: | VCC1 | Not Connected | | + | | ::: | GND | Common GND | Central grounding hub for the breadboard circuit. | |
| - | | **MAX98357A** | LRC | ESP32 (IO25) | | + | | **MAX98357A** | LRC | ESP32 (IO25) | Receives the audio channel sync timing. | |
| - | | ::: | BCLK | ESP32 (IO26) | | + | | ::: | BCLK | ESP32 (IO26) | Receives the digital audio bit timing. | |
| - | | ::: | DIN | ESP32 (IO16) | | + | | ::: | DIN | ESP32 (IO16) | Receives the digital I2S audio data stream. | |
| - | | ::: | GAIN | Not connected | | + | | ::: | GAIN | Common GND | Anchors the pin to GND to set a 12dB gain and prevents it from floating like an antenna, **eliminating background hiss**. | |
| - | | ::: | SD | Not Connected | | + | | ::: | SD | Not Connected | Left floating to keep the amplifier always active. | |
| - | | ::: | GND | Common GND | | + | | ::: | GND | Common GND | Completes the power loop and provides audio ground reference. | |
| - | | ::: | Vin | MB102 (VCC2) | | + | | ::: | Vin | MB102 (VCC1 @ 5V) | Power input to drive the audio speaker at full efficiency. | |
| - | | ::: | + | Speaker (+) | | + | | ::: | + | Speaker (+) | Positive terminal for the amplified analog audio output. | |
| - | | ::: | - | Speaker (-) | | + | | ::: | - | Speaker (-) | Negative terminal for the amplified analog audio output. | |
| - | | **PCF8574** | VCC | MB102 (VCC2) | | + | | **PCF8574** | VCC | MB102 (VCC1 @ 5V) | Power supply for the I2C backpack and the LCD backlight. | |
| - | | ::: | GND | Common GND | | + | | ::: | GND | Common GND | Completes the power circuit for the display interface. | |
| - | | ::: | SDA | ESP32 (IO21) | | + | | ::: | SDA | ESP32 (IO21) | I2C data interface for text communication. | |
| - | | ::: | SCL | ESP32 (IO22) | | + | | ::: | SCL | ESP32 (IO22) | I2C clock interface for text communication. | |
| - | | **Micro SDHC reader** | CS | ESP32 (IO5) | | + | | **Micro SDHC reader** | CS | ESP32 (IO5) | Listens for the SPI activation signal from the microcontroller. | |
| - | | ::: | SCK | ESP32 (IO18) | | + | | ::: | SCK | ESP32 (IO18) | Receives the SPI bus clock signal. | |
| - | | ::: | MOSI | ESP32 (IO23) | | + | | ::: | MOSI | ESP32 (IO23) | Receives instructions from the ESP32. | |
| - | | ::: | MISO | ESP32 (IO19) | | + | | ::: | MISO | ESP32 (IO19) | Transmits the requested files back to the processor. | |
| - | | ::: | VCC | MB102 (5V) | | + | | ::: | VCC | MB102 (VCC1 @ 5V) | Safe 5V source to handle transient current spikes during SD card read operations. | |
| - | | ::: | GND | Common GND | | + | | ::: | GND | Common GND | Completes the power loop for the reader module. | |
| - | | **Potentiometer** | Top Pin | ESP32 (3V3) | | + | | **Potentiometer** | Top Pin | ESP32 (3V3) | Connects to the safe 3.3V rail to set the upper limit of the voltage divider. | |
| - | | ::: | Wiper | ESP32 (IO34) | | + | | ::: | Wiper | ESP32 (IO34) | Delivers a variable voltage (0-3.3V) to the ADC pin based on the knob position. | |
| - | | ::: | Bottom Pin | Common GND | | + | | ::: | Bottom Pin | Common GND | Connects to ground to set the lower limit of the voltage divider. | |
| - | | **PLAY/PAUSE BUTTON** | Pin 1 | ESP32 (IO27) | | + | | **PLAY/PAUSE BUTTON** | Pin 1 | ESP32 (IO27) | Interconnects the button to the hardware interrupt pin on the ESP32. | |
| - | | ::: | Pin 2 | Common GND | | + | | ::: | Pin 2 | Common GND | Pulls the GPIO to LOW when pressed, fighting the internal pull-up resistor to register a click (active-LOW logic). | |
| - | | **UP BUTTON** | Pin 1 | ESP32 (IO14) | | + | | **UP BUTTON** | Pin 1 | ESP32 (IO14) | Interconnects the button to the track navigation system. | |
| - | | ::: | Pin 2 | Common GND | | + | | ::: | Pin 2 | Common GND | Pulls the GPIO to LOW when pressed, fighting the internal pull-up resistor (active-LOW logic). | |
| - | | **DOWN BUTTON** | Pin 1 | ESP32 (IO13) | | + | | **DOWN BUTTON** | Pin 1 | ESP32 (IO13) | Interconnects the button to the track navigation system. | |
| - | | ::: | Pin 2 | Common GND | | + | | ::: | Pin 2 | Common GND | Pulls the GPIO to LOW when pressed, fighting the internal pull-up resistor (active-LOW logic). | |
| - | | **Speaker** | + | MAX98357A (+) | | + | | **Speaker** | + | MAX98357A (+) | Connects to the positive terminal of the audio transducer. | |
| - | | ::: | - | MAX98357A (-) | | + | | ::: | - | MAX98357A (-) | Connects to the negative terminal of the audio transducer. | |
| ==== Electrical Scheme ==== | ==== Electrical Scheme ==== | ||
| - | {{ pm:prj2026:vlad.radulescu2901:schematic_karaoke_machine_2026-05-08.png?700}} | + | {{ pm:prj2026:vlad.radulescu2901:schematic_karaoke_machine_2026-05-12.png?700}} |
| ===== Software Design ===== | ===== Software Design ===== | ||
| - | ** Under construction while I think about using State Machine or FreeRTOS. ** | + | ** Under construction. ** |
| + | This project will be developed using the PlatformIO extension in Visual Studio Code. | ||
| + | I will use Arduino for the main framework. | ||
| + | Other libraries that will be included are: | ||
| + | * **ESP32-AudioI2S**, this library abstracts the interaction with the amplifier via I2S and the decoding of the ''.mp3'' files | ||
| + | * **LiquidCrystal_I2C**, this library abstracts the interaction with the LCD display's control module, PCF8574 | ||
| + | |||
| + | In order to not have glitching or interrupting music, I decided to use **FreeRTOS** tasks for my project. There will be three main tasks: | ||
| + | * The menu task, where the user views the available songs and picks one. | ||
| + | * The lyric task, where the text is sent to the LCD at the correct timestamps and button state is monitored. | ||
| + | * The audio task, which will be the task with the highest priority, since sound quality is crucial. | ||
| + | |||
| + | More details after I finish implementing the firmware. | ||
| ===== Results ===== | ===== Results ===== | ||
| Line 117: | Line 129: | ||
| * 05.05.2026: Partial creation of the technical documentation, which contains the project theme, block diagram and list of components. | * 05.05.2026: Partial creation of the technical documentation, which contains the project theme, block diagram and list of components. | ||
| * 08.05.2026: Add the electrical scheme of the project. | * 08.05.2026: Add the electrical scheme of the project. | ||
| + | * 09.05.2026: Add the component pinout and refined the general description section. | ||
| + | * 12.05.2026: Refine the electrical scheme and add a short description of the software. | ||
| + | * 16.05.2026: Add simple demo. | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ===== Demos ===== | ||
| + | {{ pm:prj2026:vlad.radulescu2901:circuit.jpg?500 | Physical circuit }} | ||
| + | |||
| + | {{https://drive.google.com/file/d/1OYpMS8L2arQ9ElOX3gjKkMVgnoy5mhVk/view?usp=sharing | Demo video}} | ||
| + | |||
| + | I did a small demo, where I just played the audio to see if the ESP32 can read the microSD card and if the speaker works. Also, in the video, you can see that the I2C module is connected and gets the text from the ESP32 that says "SD card mounted successfully". | ||
| ===== Resources ===== | ===== Resources ===== | ||