Giter Club home page Giter Club logo

arduino-piano's Introduction

Arduino Piano with recording and playback

piano

About The Project

My course project on circuit engineering. I always wanted to try programming microcontrollers and design and assemble electronic circuits by hand. From a circuitry point of view, the project is quite simple: a couple of buttons and resistors used in a voltage divider. The project does not use third-party libraries, so there should be no problems with compiling and loading into the Arduino Uno board.

Components

The device consists of several logical modules, the description of which is given below.

Analog keyboard

Analog keyboard for playing notes of one octave is represented by the S2-S8 buttons. To play sharps (black keys on the piano), you must simultaneously press adjacent buttons (for example, S2 and S3). The buttons control the inclusion of resistors R2-R8 to the voltage divider circuit. I chose 560Om, 1.3kOm, 2.7kOm, 3.9kOm, 5.6kOm, 7.5kOm and 10kOm resistors but this is not strictly necessary. You can use other similar values for resistors, but then you will have to change the corresponding values in the arduino-piano.ino file.

Buzzer

The sound is generated by the SG1 buzzer. Volume and sound quality may vary by model.

Octave switch

Buttons S14 and S13 are used to switch between octaves. Piano middle octave is initially selected. Pressing S14 will lower the octave, and pressing S13 will raise the octave.

Recorder

Button S12 is used to control the recording of the melody. The first press starts recording. After that, all clicks on the analog keyboard will be recorded in the device's memory, taking into account delays. Pressing again ends the recording of the melody. You can record several melodies of different lengths. If the device runs out of memory for recording a melody, a specific sound signal will be played and subsequent recording attempts will have no result.

Player

Buttons S9 and S10 are used to select recorded tunes for playback. The mechanism for controlling them is similar to switching between octaves. Pressing the S11 button will start playback of the currently selected melody.

Arduino Uno

Arduino Uno board reads user input from the buttons and processes it. It also feeds the entire circuit through the corresponding pins. All key functions of the device are logged via the Serial port and transmitted to the PC via a USB cable, which also powers the board itself.

Note

If you find a bug or have a question, feel free to leave an issue.

arduino-piano's People

Contributors

amateomi avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

lancelot-prime

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.