Deprecated: Assigning the return value of new by reference is deprecated in /home/nicholas/public_html/ggnew/components/libraries/cmslib/spframework.php on line 101
Deprecated: Assigning the return value of new by reference is deprecated in /home/nicholas/public_html/ggnew/components/libraries/cmslib/spframework.php on line 644 Bananaphone: A Touch Capacitance Synth
Turn your Quickstart and Eight Bananas into a Synth!
I was recently inspired by a Kickstart project which used Bananas as sensors to control a video game on a PC. I've done some video game controls using the Propeller in the past, but I thought this would make an interesting synthesizer project.
Introducing: Bananaphone: A Touch Capacitance Synth
Make a connection from each of the Propeller's P0-P7 I/O pins to the stem of each banana using the aligator clip jumper wires.
I used a Gadget Gangster QuickTerminal to make my connections to the Propeller Quickstart, but you could just as easily plug jumper wires into the Quickstart's P0-P7 I/O.
You'll also need to hook a 220ohm resistor to P11. This will become our audio out connection to the amplified speaker. Connect one side of the speaker to the 220ohm resistor, the other side to Ground. Using a single resistor as an audio output will be a little noisy, but will work fine for the purposes of this project.
STEP 2
Theory of operation:
The Propeller measures the R/C time constant determined by the resistor (internal on the Quickstart) and the capacitance on the connection point. When you bring your finger close to the connection point (the banana), the capacitance increases and therefore the R/C time constant increases.
The circuit is called: R/C Decay.
Resistor / Capacitor discharge circuits are an easy way to read resistive & capacitive sensors.
Here's how the circuit works; flip the propeller pin to an output to charge up the capacitor. Then flip it to an input and count how long it takes for the capacitor to discharge. The time it takes to discharge is relates to the position of the potentiometer.
Here's what the discharge looks like
R/C decay is an easy way to read sensors that vary resistance, like photoresistors, potentiometers, thermocouples, gas sensors, and force sensors. A few devices vary capacitance (touch sensors, some humidity sensors), so you can read them by keeping the resistor constant and putting the sensor in the place of the capacitor.
STEP 3
Open the file, "bananaphone_synth.spin" from the archive and send it to the Propeller using F10.
Depending on the length of your jumper wires, and the ripeness of the bananas, you may need to adjust line #36
Buttons.start(_CLKFREQ / 7000)
If you hear tones without touching the "keys", simply increase the 7000, stepping by 1000 until your Bananas respond correctly.
This is a fun afternoon project that my kids loved playing with,