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
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
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.
Here is the recommended audio circuit if you want to reduce the noise and put this project into long term use:
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
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.
Step 5: Ok, Bananas Are Cool..but...
Here's some ideas:
- Replace the bananas with Playdough
- Replace the bananas with cups of water
- Replace the bananas with conductive paint
Instead of controlling an audio synthesizer, the propeller can easily control a connected computer, or even devices in the home.