This shows you the differences between two versions of the page.
pm:prj2025:eradu:mara.fichios [2025/05/23 19:25] mara.fichios [General Description] |
pm:prj2025:eradu:mara.fichios [2025/05/24 16:12] (current) mara.fichios [Results] |
||
---|---|---|---|
Line 6: | Line 6: | ||
**Project Summary:** | **Project Summary:** | ||
- | *PianoBit is a digital mini-piano constructed using an Arduino Uno, a 4x4 matrix of buttons, 16 corresponding LEDs, and an active buzzer. | + | The PianoBit project is an innovative and educational digital mini-piano that utilizes an Arduino Uno as the core control unit. Designed to mimic the functionality of a basic piano, the system includes a 4x4 button matrix, a set of 16 LEDs, an active buzzer, and an LCD screen. The aim of the project is to build a simple, interactive musical instrument while exploring various hardware techniques such as button matrix scanning, LED multiplexing, and sound generation. |
- | *The core objective of the project is to emulate the behavior of a basic electronic piano with 16 keys. It is designed to explore efficient hardware management using direct multiplexing, thus eliminating the need for dedicated shift registers. | + | |
- | *Originally envisioned as an 8-key prototype, the design was expanded to 16 keys in order to mirror the octave structure of a real instrument more closely and to meet the increased complexity requirements specified in the course. The new version also has an LCD which showcases the user the current note that they are playing. | + | |
- | *The system provides a practical and educational platform for understanding key matrix scanning, LED multiplexing, and sound generation, while also working with registers and Arduino. | + | |
===== General Description ===== | ===== General Description ===== | ||
Line 22: | Line 19: | ||
</note> | </note> | ||
+ | |||
{{:pm:prj2025:eradu:schema_bloc_pianobit2.drawio.png?300x350|}} | {{:pm:prj2025:eradu:schema_bloc_pianobit2.drawio.png?300x350|}} | ||
- | {{:pm:prj2025:eradu:lcd_version_piano.png?750x600|}} | ||
- | {{:pm:prj2025:eradu:lcd_version_piano2.png?750x600|}} | ||
- | {{:pm:prj2025:eradu:pianobit_circuit3.png?750x600|}} | ||
- | Here's a breakdown of how the key components are connected: | ||
- | * The matrix is made up of 16 buttons arranged in 4 rows and 4 columns. The row pins are set as outputs and columns as inputs with internal pull-up resistors. The Arduino reads the columns one by one by activating each row. | + | The block diagram illustrates how the core modules of the PianoBit project are functionally interconnected to achieve real-time user interaction. |
- | * The shift registers control the LEDs. The Data Pin (DS) connects to an Arduino pin (e.g., Pin 11), the Clock Pin (SH_CP) connects to Pin 13, and the Latch Pin (ST_CP) connects to Pin 12. We use daisy chaining to connect the second shift register's data input to the first shift register's output. | + | At the center of the system lies the Arduino Uno, which acts as the main control unit. It manages data flow between input and output modules, orchestrating the behavior of the piano. The button matrix connects directly to the Arduino's digital pins, and the Arduino detects exactly which key has been pressed. This key is translated into a musical note. Once a key is identified, the Arduino triggers two parallel outputs: it sends a corresponding frequency signal to the buzzer, generating an audible tone and it lights up the matching LED by transmitting data serially to the shift registers. These convert the serial input into parallel output, illuminating the specific LED assigned to the pressed key. |
- | * The buzzer is connected to a pin on the Arduino (Pin 10). The Arduino will use PWM to control the sound output, and the message is displayed on the LCD that is connected to 5V and GND, while the SDA is connected to the anaolg pin on the Arduino A4 and SCL to A5. | + | |
+ | Simultaneously, the Arduino communicates with the I2C LCD display to visually show the name of the note being played. This communication happens via the I2C protocol using only two data lines (SCL and SDA), allowing the LCD to operate without consuming multiple digital I/O pins.All modules draw power from a shared 5V supply. This architecture ensures that pressing a single key results in synchronized audio, visual, and textual feedback, making the PianoBit both interactive and educational. | ||
===== Hardware Design ===== | ===== Hardware Design ===== | ||
Line 69: | Line 65: | ||
For the LEDs, I used 74HC595 shift registers to control 16 LEDs with only 3 I/O pins (Data, Clock, and Latch). The shift registers are connected in daisy-chain mode, meaning the output of the first shift register is connected to the input of the second. This allows the Arduino to control a total of 16 outputs (8 from each shift register) while only using 3 pins, significantly reducing the number of I/O pins required for controlling the LEDs. | For the LEDs, I used 74HC595 shift registers to control 16 LEDs with only 3 I/O pins (Data, Clock, and Latch). The shift registers are connected in daisy-chain mode, meaning the output of the first shift register is connected to the input of the second. This allows the Arduino to control a total of 16 outputs (8 from each shift register) while only using 3 pins, significantly reducing the number of I/O pins required for controlling the LEDs. | ||
</note> | </note> | ||
+ | |||
+ | Below there are some pictures that showcase the whole circuit: | ||
+ | |||
+ | {{:pm:prj2025:eradu:lcd_version_piano.png?750x600|}} | ||
+ | {{:pm:prj2025:eradu:lcd_version_piano2.png?750x600|}} | ||
+ | {{:pm:prj2025:eradu:pianobit_circuit3.png?750x600|}} | ||
===== Pin Usage ===== | ===== Pin Usage ===== | ||
Line 271: | Line 273: | ||
</note> | </note> | ||
+ | |||
+ | {{:pm:prj2025:eradu:pb_1.jpg?512x382|}}\\ | ||
+ | {{:pm:prj2025:eradu:pb_2.jpg?512x382|}}\\ | ||
+ | {{:pm:prj2025:eradu:pb_3.jpg?382x512|}} {{:pm:prj2025:eradu:pb_4.jpg?382x512|}} {{:pm:prj2025:eradu:pb_5.jpg?382x512|}} {{:pm:prj2025:eradu:pb_6.jpg?382x512|}}\\ | ||
+ | |||
+ | |||
+ | |||
+ | |||
===== Conclusions ===== | ===== Conclusions ===== |