How do we make a circuit to make music?
- How can we use a microcontroller to make music?
- Why do we need to make circuits to build instruments or interfaces?
You will need the following materials to build a circuit to make an instrument:
- a Microcontroller (we suggest using an Arduino)
- a piezo buzzer (these come in many varieties)
- A USB cable
Watch this video to start making a circuit. Directions are also available in text form below:
Step 1: Checking your Arduino
Take a look at your Arduino. This is one type of microcontroller
Look at the black rectangles with small holes. The holes are called pins or pin sockets.
You should see different types of pins “Digital” “Power” and “Analog in.”
You can plug wires into the pin sockets to connect things to the Arduino to make it do things.
In this case, we will use the pins to build an instrument!
Step 2: Checking your wires
Take a look at the wires on your piezo buzzer.
Identify the red wire. (This is the positive wire)
Identify the black wire. (This is the negative wire)
If the wires won’t fit all the way into the pin sockets on your microcontroller you will need wires and alligator clips. (The photos will show a combination of alligator clips and wires)
Step 3: Watch this video to continue building your circuit. Directions are also available in text form below:
Step 4: Plugging your wires into the microcontroller
Option 1: Using the wires from the piezo buzzer direct into pin sockets
- Plug the positive (red) wire of the piezo buzzer into pin 7 (on the Digital pin side).
- Plug the negative (black) wire of the piezo buzzer into the pin marked GND (or ground) (on the Power pin side).
Option 2: Using wires and alligator clips
- Plug the wires into pin 7 and GND
- Attach an alligator clip to each wire
- DO NOT CONNECT THEM TOGETHER – this will break your microcontroller
- Attach the alligator clip plugged into pin 7 to the positive (red) wire of the piezo buzzer
- Attach the alligator clip plugged into GND to the negative (black) wire of the piezo buzzer
Step 5: Plug the Microcontroller into your computer
Now that you have completed a circuit plug your microcontroller into your computer using a USB cable!
You are on your way to building an instrument!
Share What you Learned
If you are using the LRNG platform:
- You do not need to submit anything for this XP
- You should be able to complete the circuit and show someone that it is complete
If you are not using the LRNG platform:
- Continue below and share with your teacher or organization:
Sharing What You Learned
- Share a picture or short video of your completed circuit.
Return to the XP How can I create instruments and interfaces with microcontrollers? (continue to the next XP in the mini-playlist)