|All News -> Projects|
|Written by Jeff Ledger|
|Tuesday, 15 November 2011 15:08|
Convert a child's toy to a digitial instrument with breath/blow sensor.
Ok, first.. Yes, this isn't really a "flute", It's actually a "recorder", but this project will allow it to make sounds like a flute, recorder, or even weird space noises. Kids love this project!
We'll turn a $1.00 recorder into an electric instrument complete with breath "blow" sensor!
A Propeller Platform running some synthesizer code provides the sound for this fun instrument.
You'll have a choice of converting the instrument to become fully electronic, or adding synth features to the existing instrument.
Here's what you'll need
We are going to create two different circuits for our instrument.
The switch circuit for our four tact "finger" switches, and a piezo circuit for our breath "blow" sensor.
The Connecting Cable:
You'll need to obtain some wire for seven connection points between the instrument and the Propeller Platform.
In my version of the project, I used some twisted pair network cable with the ends cut off.
* Note: if you use twisted pair cable as I have, you will want to reduce the resistors on the tact switches from 10k to 1.2k as the cable will have some internal resistance of it's own.
A Child's Recorder:
Start by obtaining an inexpensive child's recorder from your local dollar discount store.
I found this one for $1.00 at the local Dollar General
Recorder+ or Fully Electronic Instrument:
It's Decision Time!
At this point, you've got a choice...
1) Recorder+ You could attach the tact switches between the finger holes of the recorder. Doing this will allow the recorder to work as it was designed with the switches being available for electric sounds and effects.
2) Fully Electric Instrument In our design, I filled each of the finger holes down the front of the recorder with hot glue, then attached the tact switches over four of the original holes.
Adding the breath "blow" switch:
Using hot glue, attach the Piezo Transducer to the end of your instrument. This will act as the breath or "blow" switch giving you an additional trigger.
Preparing the switches:
Using some solder, tin the switch connections ahead of time to make it easier to attach the wire.
The power side of the switches:
Carefully solder one of the wires connecting to each of the pins on one side of the switches. This line with be the 3v power side of each of the tact switches. Be careful to connect to only the pin you prepared ahead of time.
Connecting the switch wires:
Using four other wires, solder each line to other side of each of the tact switches.
The code code I used was:
Connecting the Piezo Transducer:
Connect the black and red wires of the Peizo Transducer. I used some black tape to hold everything in place.
The "pull down" resistors:
Each switch uses a resistor tied to ground as a "pull down". These resistors keep the switches from floating states.
Starting at P1, Insert and solder the 10k resistors into the Protoplus Module as shown.
Skip P0, P2, P4, P6, and P8 leaving plenty of room for each resistor.
(Reminder: If you used twisted pair, you may want to substitute P1,P3,P5 & P7 with 1.2k resistors)
Adding the ground wire:
Add a wire from the one side of the resistors to GND.
Connecting the switches to the ProtoPlus:
Strip and tin the other side of your cable. Insert the other side of the switch connections into the ProtoPlus as shown.
Connecting the Piezoelectric to the ProtoPlus:
Now connect the two wires coming from the Piezo Transducer as shown below.
Also, connect the ORANGE wire to V33 (3.3v)
Build the rest of the ProtoPlus Module:
It's time to build the rest of the ProtoPlus Module.
Installing the Test Software:
Time to install some software!
Playing the Electric Flute:
Once you are seeing good results from the test program, download the "Electric Flute" program and extract it.
The audio magic behind "Electric Flute" is a synthesizer program running on the Propeller Platform called, SIDCOG.