How to Make a Basic Ultrasensor Keyboard Prototype With Arduino
Introduction: How to Make a Basic Ultrasensor Keyboard Prototype With Arduino
For this Instructable, I have made a primitive musical soundboard using an ultra sensor as a keyboard. Here I will show you the basic steps on how to create such a device yourself. Later on, in December, I will demonstrate to you how to make a more complex or soldered version of this soundboard with the Arduino.
Supplies
What You Need (some examples of the materials are demonstrated above):
* Wooden board to make the keyboard sturdy, approximately 27cm x 32cm is wide enough.
* One passive buzzer
* One ultrasonic (HC-SR04) sensor module
* 1-2 breadboards
* Approximately 5-10 woodscrews
* Approximately 2-3 male-to-male wires
* 4 female-to-male or Dupont wires
* One Arduino
* 6-12 woodscrews
Other Basic Materials
* ruler (preferably one that measures in cm or mm)
* pencil and/or pen
* tape
* screwdriver
BONUS:
* 1 RGB led
* 4 more male-to-male wires
* Possibly 3 220 Ω resistors.
Code requirements:
* Arduino Libraries “pitches,” “SR04.h”
* Buzzer Code
MOST IMPORTANT REQUIREMENTS:
* Patience
* Self-confidence
* Self-love
* tenacity
Step 1: Setting Up the Board
The first thing you would want to do is set down your wooden board. Then place your Arduino, Ultrasensor, and breadboard in a way that they are accessible and close to one another, yet spacious enough for the Keyboard. As you can see with my finished prototype, I originally intended to have more components in my project, which is why mine is so spacious, but due to time constraints and issues with the button switches, I had to remove those components. Oh well, it's just a prototype in this stage; less is more, I suppose. Will probably add them later on in December.
Anyway, I recommend you arrange your board like this, as you can see above in the diagram.
Step 2: Drawing the Notes
The next step of this process would be to measure the sides of your wooden board. The first thing to do is make a mark 6-8 cm away from the ultra sensor. The next thing to do is after you make after your first mark is make an additional 2 cm marks all the way to the end as seen in the diagram above. Say, if you plan to have eleven notes, draw twelve lines. 769
If you plan more, do more, but make sure they're at least 2 cm apart, otherwise you would have to reprogram your prototype later on.
Important note:
It would also probably help if you mark some distance that is even numbered so it would be easier to program later on.
Step 3: Securing the Board
After you place your components in a way you prefer, mark over them with a pencil or pen. Then use the woodscrews and screw them into the holes on the side of the Arduino (if you don't get it yet, those little protruding holes on the side of your Arduino are for woodscrews) and the soundboard. Since this is a prototype and it doesn't need to be too fancy, you can use tape, another wooden block, or even glue if you so choose to secure the ultra sensor. For my prototype, I used tape. Just make sure that the ultra sensor has a clear area and is not blocked by the tape, a woodscrew, etc. You can refer to the diagram with the black dots, each black dot signifies a woodscrew, which gives you a general idea of where to place your screws.
If you want to, you can even take off the adhesive strip and attach the breadboard to the wood, but I wouldn't recommend that if you plan to use that breadboard again.
Important note:
When it comes the wood you have and the material,the minimum number of screws needed to secure your Arduino would be two, the minimum number of woodscrews for the breadboard would be four. You can add more if you wish, but its already secure as is. That is the number I went with for my prototype.
Step 4: Wiring the Ultrasensor
Now, this is the fun part. The first thing you want to do is wire your ultra sensor to the Arduino. Now, its time to get your female-to-male wires. With these pins, connect one to The Echo slot so the pin goes into pin 11, and the trigger pin goes into pin 12. 259