Kids Piano Circuit – 8 Keys Version Using Arduino Uno (Tinkercad Project)

 Introduction

In this beginner-friendly project, we will build a Kids Piano Circuit with 8 Keys using an Arduino Uno and simulate it in Tinkercad.

Each push button acts as a piano key. When pressed, it plays a musical note through a piezo buzzer. This is a perfect school project to introduce children to:

  • Basic electronics

  • Digital input using push buttons

  • Sound generation using a buzzer

  • Music and frequency concepts


 Components Required

  • Arduino UNO

  • 8 × Push Buttons

  • 8 × 10kΩ Resistors (pull-down)

  • Piezo Buzzer

  • Breadboard

  • Jumper wires


 Circuit Connections

Buttons

  • Connect one side of each button to 5V

  • Connect the other side to Arduino digital pins:

    • Button 1 → D2

    • Button 2 → D3

    • Button 3 → D4

    • Button 4 → D5

    • Button 5 → D6

    • Button 6 → D7

    • Button 7 → D8

    • Button 8 → D9

  • Add 10kΩ resistor from each button pin to GND (pull-down)

Buzzer

  • Positive → D10

  • Negative → GND

⚠ Avoid using D0 and D1 because they are used for serial communication.


 Notes and Correct Frequencies

ButtonArduino PinNoteFrequency (Hz)
1D2C4262
2D3D4294
3D4E4330
4D5F4349
5D6G4392
6D7A4440
7D8B4494
8D9C5523

(These are standard piano note frequencies.)

 Arduino Code

const int buzzer = 10;

int buttons[8] = {2,3,4,5,6,7,8,9};
int notes[8] = {262,294,330,349,392,440,494,523};

void setup() {
for(int i=0; i<8; i++){
pinMode(buttons[i], INPUT);
}
pinMode(buzzer, OUTPUT);
}

void loop() {

for(int i=0; i<8; i++){
if(digitalRead(buttons[i]) == HIGH){
tone(buzzer, notes[i]);
}
}

if(
digitalRead(2)==LOW &&
digitalRead(3)==LOW &&
digitalRead(4)==LOW &&
digitalRead(5)==LOW &&
digitalRead(6)==LOW &&
digitalRead(7)==LOW &&
digitalRead(8)==LOW &&
digitalRead(9)==LOW
){
noTone(buzzer);
}
}

 How It Works

  • Each push button sends a HIGH signal when pressed.

  • The Arduino reads the button input.

  • The tone() function generates a square wave at a specific frequency.

  • The buzzer converts this electrical signal into sound.

When children press different buttons, they hear different musical notes — just like a mini piano 🎹


 Learning Outcomes

This project helps students understand:

  • Digital input/output

  • Arrays in Arduino

  • Sound frequency basics

  • Interactive electronics design


 Applications

  • DIY kids piano toy

  • STEM classroom activity

  • School exhibition project

  • Beginner Arduino music project

Circuit diagram:

When a child presses any of the 8 buttons, the piezo buzzer plays a corresponding note (C4 to C5), making it a simple, interactive piano toy. It's a great way to introduce kids to electronics and music!

CODE:


Try this using tinkercad:


BEGINNER PROJECTS (Foundation Skills)

  1. Ultrasonic Distance Measurement
  2. Traffic Light Simulation with 7-Segment Display
  3. 7-Segment Display Counter
  4. Kids Piano Circuit (8-Key Version)
  5. 16×2 LCD Display with Text Output
  6. LCD I2C to Arduino UNO
  7. Temperature Measurement using Arduino UNO
  8. LDR Controlled Street Light

INTERMEDIATE PROJECTS (Build Your Skills)

  1. Servo Motor Control Using Potentiometer
  2. DC Motor Speed Control
  3. Temperature Controlled Fan
  4. PIR Based Theft Alert System
  5. LPG Gas Leakage Detection System
  6. Automatic Door Locking System
  7. Soil Moisture Based Automatic Watering System
  8. Simple Digital Clock using Arduino UNO
  9. Automatic Voting Machine (EVM)
  10. Joystick Control using Arduino Uno
  11. RGB Lamp Control using Arduino Uno

    ADVANCED PROJECTS (Master Level)

    1. Home Automation Using Arduino UNO
    2. Bluetooth RC Car using Arduino Uno
    3. Obstacle Avoiding Robot
    4. Line Follower Robot
    5. Radar System Using Arduino UNO
    6. Automatic Parking System
    7. Bi-Directional People Counter using Arduino Uno 
    8. Automatic Plant Watering System
    9. NeoPixel LED Ring Control using Arduino Uno
    10. Smart Gloves for Bedridden People

      ROBOTICS & MOTION PROJECTS

      1. RC Car Using L293D Motor Driver
      2. Robot Arm and Leg Control Using Servo
      3. Smart Irrigation System using Arduino Uno



      Comments

      try for free