This Instructible is a tutorial to making a little musical instrument using multiple sensors and the Arduino-Uno.
What you will need for this Instructible :
- Arduino Uno
- Piezo buzzer (or a speaker)
- 3 Push buttons
- Wires ( I use black(Ground), red(5V) and yellow(Input) )
- Some 220-Ohm resistors
- Rotary potentiometer
Step 1: Start With a Speaker and a Photosensor.
Lets start with the speaker and change the pitch with the photo sensor.
Step 2: Adding a Force Sensor and the Volume Library.
Now for the second step we'll add a force sensor to control the volume of the piezo buzzer or speaker with.
The way this works, the more preasure you apply to the sensor the louder the sound will be.
For this you need to attach the force sensor and import the Arduino-Volume1 library to your arduino.
This library was made by Connor Nishijima and a lot of thanks to him for making this really easy to me and anyone using this library.
To add this library, go to your Arduino sketch :
- Go to Sketch
- Include Library
- Manage Libraries
- Type 'Volume' in the search bar
- Install the first Library that comes up. (Volume by Connor Nishijima)
You can find his github on the Arduino-Volume1 here: https://github.com/connornishijima/arduino-volume1
Step 3: Adding Pitch Buttons and Making an Instrument.
Lastly we will be adding some buttons by which you play tones, this in combination with the photosensor allows you to play through an octave.
For this example we will be using 3 buttons.
The buttons will play the following tones.
G, C and D.
Now with this added you can start playing some tunes and just try it out.
Check out Tones.rar for a sketch with all pitch values for the tones or look here :
I hope you enjoy/ enjoyed this little instrument, maybe experiment with it yourself and see what you can make of it. I eventually made a whole build around the concepts explored in this Instructible and produced an actual physical instrument.
Step 4: Extra Step : Adding Some Reverb.
Now, after trying it out for a little you must have noticed that the tone doesn't carry after the pressure sensor is released.
So let's build in a little reverb. I used a rotary potentiometer. This you can use to control the amount of reverb.
We have a be nice policy.
Please be positive and constructive.