Simple Arduino Sound Board (Arduino Leonardo)

by tanyaa_wuu in Circuits > Arduino

368 Views, 1 Favorites, 0 Comments

Simple Arduino Sound Board (Arduino Leonardo)

UNADJUSTEDNONRAW_thumb_1b8d.jpg
UNADJUSTEDNONRAW_thumb_1b6e.jpg
4nN4O0HIQ96SMb59qwDL2g_thumb_1b6f.jpg

This project teaches you how to make a simple Arduino sound board, using three buttons and a buzzer. Each button will have a corresponding note and the buzzer will play three different notes. In the end, you can also make a melody using the 3 notes C,D & E to play the first 2 bars of "Butterfly", a Mandarin nursery rhyme. This project is useful as the buttons can help you model piano keyboards and you can learn to play a simple rhythm or song.

Inspiration for This Project

I got the inspiration for this project on:

https://www.instructables.com/Simple-Arduino-Sound...

Materials You Will Need

  • an Arduino board
  • a breadboard
  • an USB Cable
  • 10 x Jumper wires
  • 3 x Buttons
  • 3 x blue ohm resistors
  • 1x buzzer
  • Your laptop (to connect to Arduino)

How to Make This Project

%a+1AkZNRbabT5+mgFe24Q_thumb_1b80.jpg
UNADJUSTEDNONRAW_thumb_1b6e.jpg
J1RTCKqfTjC7urFBhdLY+g_thumb_1b71.jpg
4nN4O0HIQ96SMb59qwDL2g_thumb_1b6f.jpg

Follow the images to connect the jumper wires and ohm resistor with the buttons and buzzer. The three buttons are connected the same way (one button is connected to digital pin 2, one is connected to digital pin 3~ and one is connected to digital pin 4) After you finished making your product, plug the USB cable to the laptop so your Arduino board gets the code and the project should work.

Note: You should prepare more jumper wires just incase

Uploading and Changing My Code

The modified code (that you can copy and paste):

https://create.arduino.cc/editor/tanyaaaaa/86510ce...

What I modified: I changed each individual tone in the code to change the pitch of each note to create the notes for the song, for example:

Original code: tone(buzzPin, 1000, 300)

Changed code: tone(buzzPin, 300, 300)

This makes the modified code have a lower pitch than the original code and all 3 buttons now have different pitches than the original.

tone(buzzPin, 300, 300)= note C (Do)

tone(buzzPin, 400, 300)= note D (Re)

tone(buzzPin, 500, 300)= note E (Mi)

Done :)

UNADJUSTEDNONRAW_thumb_1b8d.jpg

Find a shoebox to put your finished Arduino product inside (optional)

How to make the box: Cut a hole on top on the lid of the box so that the buzzer and the 3 buttons can poke through

Final Product (Playing "Butterfly"):