Software apps and online services
Hand tools and fabrication machines
This tutorial teaches you how to make the world’s smallest (and probably only) capacitance-piezo-buzzer ukulele.
* Bean Loader
* Arduino IDE
* LightBlue Bean
- Four 1M ohm resistors
- One 1k ohm resistor
- A piezo buzzer
- Solid wire
- Some 1/4” plywood
- Two tiny screws
- Wood glue
- Heat shrink tubing
- Paint (optional)
- Laser cutter
- Soldering iron
- Wire stripper
- A small brush
Build the Ukulele
A ukulele is an instrument from Hawaii that looks like a small guitar with four nylon strings. Our strings will be made of wire and work by measuring the capacitance and then play the corresponding tone on a piezo buzzer. The ukulele itself is made of laser cut plywood. This is what the final result will sound like:Step 1: Get the parts
Step 2: Solder the piezo buzzer
Solder the piezo buzzer’s legs on the columns below pin 1 and 2. Make sure that the buzzer is centered on the perf board as below, otherwise it won’t fit in the ukulele. Bend one of the legs so that it connects to pin 4. Solder the other leg to the 1k ohm resistor and then solder it to ground.
To measure the capacitance, we need to use resistors. One end of the resistor is the string, and the other end will be connected to our common “send pin”, pin 5 on the Bean. Pin 5 will be connected to all of our strings.
Take the four 1M ohm resistors and put them through pin 0-3 on the back of the Bean. Make sure that none of the legs touch the leg of the piezo buzzer. Put the other leg of the resistor through the holes along the border of the Bean.
Flip the Bean so that you have the front forward. The legs that come out on the right side of the perf board all need to be connected to pin 5. Take the bottom leg and bend it so that it goes through pin 5 and touching all the legs on the way. Solder it to pin 5 and to the other resistor’s legs.
Cut the legs sticking out on the side of the perf board, but keep the ones coming out of pin 0-3! We need these to connect to the strings.
The person playing the ukulele will need to be connected to ground so we will have two sets of strings: one set that measures the capacitance, and one set that is connected to ground. The “ground strings” are on the neck of the ukulele, and the “tone strings” are the ones on the body of the ukulele.
We will make all the strings out of wire. Cut four strings that are about 3 inches long each. Use the wire stripper to take off the plastic insulation.
To solder the resistor leg to the wire, put a drop of solder on each of them, put them together and heat it up with the solder iron. Attach one wire to each of the resistor legs and then insulate with heat shrink tubing.
Take the plywood and use a laser cutter to cut out the three ukulele parts. Each laser cutter works a bit differently so make sure that you’re using one that you know how to handle. Download the SVG and Illustrator file.
The black areas need to be rastered at different depths, this is approximately how thick the finished cut should be:
This is optional but it sure does look a lot nicer when it’s painted a bit. We used an oil-based paint with the color walnut.
Take the Bean and pull the “tone strings” through the bottom holes of the front of the ukulele. Then pull them back trough the holes just above the sound hole.
Make sure that the piezo buzzer is placed correctly in the sound hole. Pull the strings through the bottom holes on the Bean’s perf board and solder them there.
The “ground strings” are the ones that will go on the neck of the ukulele and that will connect the ukulele player to the same ground as the Bean.
Cut two wires about 6 inches long each and one that is 2 inches. Strip the insulation.
Bend the two longer ones in the middle and wrap them around the shorter wire and solder them there. Insulate the shorter wire with heat shrink tubing.
Solder one of the ends of the shorter wire to GND on the Bean. Solder the other end to the perf board to make sure that it stays in place and them pull them through the holes at the beginning of the neck of the ukulele.
Pull them through the holes on the head of the ukulele and fasten them by pushing them through the hole of the string on the same side, where a small notch has been rastered.
Use the wood glue to put the front of the ukulele together with the middle part. The back part won’t be glued, only fastened with screws so that you can change the batteries on the Bean.
Put in the screws and the ukulele is all set!
Upload this code to your Bean and get ready to blow everybody’s mind with your new mini capacitance-piezo-buzzer ukulele!
How the Sketch Works
*Line 1-2: include the capacitive sensor library from Arduino.
*Line 3-8: we define a macro. The compiler can then substitute the token string for each occurrence in the source file.
*Line 3: the common 'send' pin for all strings.
*Line 4: pin is connected to the piezo buzzer.
*Line 5: capacitive reading that triggers a note.
*Line 6: number of strings on ukulele.
*Line 8: we assign the capacitive sensor to pin 5.
*Line 10: GPIO pin 0 - 3 will be capacitive. We assign those strings as such and store it in an array.
*Line 14-16: is the setup function. This function is executed only once during the duration of the program. For each item in the array, we recalibrate the values.
*Line 18: we assign pin 4 and an output.
*Line 21: is the loop function. This function is executed multiple times.
*Line 22-28: we iterate of the strings as check the threshold of the capacitive sensor. If it is above the threshold, we play a tone. We delay 100ms, and then turn the tone off.
*Line 29: Bean sleeps for 100ms
Having trouble with this guide? Reach out to BeanTalk to get directed feedback from our developers and community!