Differences

This shows you the differences between two versions of the page.

Link to this comparison view

pm:prj2026:bianca.popa1106:radu_cristin.bigan [2026/05/08 02:09]
radu_cristin.bigan created
pm:prj2026:bianca.popa1106:radu_cristin.bigan [2026/05/09 23:24] (current)
radu_cristin.bigan [Hardware Design]
Line 1: Line 1:
 ====== PianoHand ====== ====== PianoHand ======
-===== Introducere ===== 
  
-<note tip> +  * **AuthorBigan Radu-Cristin** 
-Prezentarea pe scurt a proiectului vostru: +  * **Group: 335CA**
-  ​ce face +
-  ​care este scopul lui +
-  * care a fost ideea de la care aţi pornit +
-  ​de ce credeţi că este util pentru alţii şi pentru voi +
-</​note>​ +
-===== Descriere generală =====+
  
-<note tip> +===== Introduction =====
-O schemă bloc cu toate modulele proiectului vostru, atât software cât şi hardware însoţită de o descriere a acestora precum şi a modului în care interacţionează.+
  
-Exemplu de schemă blochttp://www.robs-projects.com/​mp3proj/​newplayer.html +This project consists of building a robotic hand with 5 fingers, each actuated by a servo motor, placed over 5 piano keys (DO, RE, MI, FA, SOL). The system can detect musical notes from different sources and reproduce them physically on the keys. 
-</note>+ 
 +  * **What it does:** The hand listens to or reads music and plays it back on an electronic keyboard by pressing the keys with servo-driven fingers. It supports three operating modesplaying a hardcoded melody from memory, listening to a short melody through a microphone and reproducing it, or reading a .wav file from an SD card and playing the detected notes. 
 +  * **Purpose:​** The goal is to explore the integration of audio signal processing (FFT-based note detection) with real-time motor control on an embedded platform, while also covering a wide range of communication protocols studied in the PM course. 
 +  * **Starting idea:** The idea came from wanting to build something that bridges digital signal processing and physical actuation — a robot that can actually "​hear"​ music and play it back
 +  * **Why it is useful:** It demonstrates a practical application of FFT on a microcontroller,​ combining audio analysis with mechanical output. 
 + 
 +===== General Description ===== 
 +**System Block Diagram**:​ 
 +{{ :​pm:​prj2026:​bianca.popa1106:​radu_cristin.bigan_schema_bloc.jpg?​500 |}} 
 +The system is centered around an ESP32 DevKit C microcontroller that manages three main tasks: user interaction (buttons + LCD display), audio input/analysis (microphone ADC or SD card SPI), and mechanical output (5 servo motors via PWM). 
 + 
 +The user selects between the three operating modes using two physical buttons, and the current mode and status are shown on an LCD 1602 display. Depending on the selected mode: 
 + 
 +  - **Mode 1 — Hardcoded Melody:** The firmware contains a pre-stored sequence of notes with timing information. The ESP32 iterates through the array and drives the corresponding servo for each note
 +  - **Mode 2 — Microphone Input:** The MAX4466 electret microphone module captures ambient audio. The analog signal is sampled via the ESP32'​s internal ADC, then processed through a 2048-point FFT pipeline to detect the dominant frequency. The detected frequency is matched to the closest musical note using a logarithmic (semitone-based) chromatic scale comparison. A histogram of all detected notes is built automatically,​ and the top 5 most frequent notes are mapped to the 5 fingers. 
 +  - **Mode 3 — WAV File from SD Card:** A .wav file (8-bit mono PCM) stored on a Micro SD card is read over SPI. The same FFT pipeline from Mode 2 is applied to the audio data to extract notes, which are then played on the servos. 
 + 
 +^ Component ^ Protocol ^ Direction ^ Role ^ 
 +| MAX4466 Microphone | ADC (analog) | Microphone → ESP32 | Audio capture for Mode 2 | 
 +| SD Card Module HW-125 | SPI (MISO, MOSI, SCK, CS) | Bidirectional | WAV file storage for Mode 3 | 
 +| LCD 1602 Display | I2C (SDA, SCL) | ESP32 → Display | Shows current mode, active note | 
 +| 5× Servo SG90 | PWM (LEDC channels) | ESP32 → Servos | Actuate fingers on piano keys | 
 +| BTN1 | GPIO (digital input) | Button → ESP32 | Start/Stop playback | 
 +| BTN2 | GPIO (digital input) | Button → ESP32 | Cycle between modes |
  
 ===== Hardware Design ===== ===== Hardware Design =====
  
-<note tip> +**Bill of Materials:** 
-Aici puneţi tot ce ţine de hardware design: + 
-  ​listă de piese +^ Component ^ Quantity ^ Role ^ 
-  ​scheme electrice ​(se pot lua şi de pe Internet şi din datasheet-uri, e.g. http://​www.captain.at/​electronic-atmega16-mmc-schematic.png+| ESP32 DevKit C (WROOM-32) | 1 | Main microcontroller | 
-  * diagrame de semnal ​ +| Servo Motor SG90 | 5 | Finger actuation (one per piano key) | 
-  * rezultatele simulării +| MAX4466 Electret Microphone Module | 1 | Audio capture (Mode 2) | 
-</note>+| SD Card Module HW-125 | 1 | WAV file storage (Mode 3| 
 +| LCD 1602 Display (with I2C backpack) | 1 | User interface display | 
 +| Tact Switch Button 6×6mm | 2 | Mode selection and start/stop | 
 +| 220Ω Resistor | 1 | Current limiting for the LCD backlight | 
 +| Breadboard 830 points | 1 | Solderless assembly | 
 +| External 5V/2A Power Supply | 1 | Servo power | 
 + 
 +**Electrical Diagram:​** 
 +{{ :​pm:​prj2026:​bianca.popa1106:​schemaelectricapm.jpg?​500 |}}
  
 ===== Software Design ===== ===== Software Design =====
pm/prj2026/bianca.popa1106/radu_cristin.bigan.1778195342.txt.gz · Last modified: 2026/05/08 02:09 by radu_cristin.bigan
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0