All software code may be used under the terms of the GPLv3 license. All circuits may be used under the terms of the Creative Commons Attribution-ShareAlike 3.0 Unported License. INTRODUCTIONThere's a lot of electronic bagpipe development going on right now, ranging from DIY projects like Frankenpipe, to commercial products vPipes and ePipe. These electronic bagpipes look and sound great, but the commercial products range from a few $100 to $5000, and the non-commercial published projects typically lack enough information for a DIYer to reproduce the design. The eChanter aims to bridge the gap between the commercial products and the DIY projects, while meeting five basic goals:
The eChanter is a project that can be assembled by anyone who can solder; the eChanter body can be a piece of PVC pipe or an old pipe chanter, the sensors can be a simple as metal screws, bits of copper or brass rod, and the software is adapted from other Arduino projects. In keeping with the open source concept, I strongly encourage others to make an eChanter, improve it, and contribute their improvements and ideas to the project. .... If you can solder, you can make an eChanter .... MATERIALS & TOOLSChanter
ALTERNATIVES: 1/2 PVC pipe and slip fittings work great for the chanter body, top and sole. CPVC pipe has a slightly smaller diameter and may be more comfortable for some people. For those who don't like the look of the sprinkler body, 2 slip connectors end-to-end make a decent 'sole' long enough for the electronics. Then again, if the electronics are small enough, there's no need for a 'sole'. PVC can also be heated and stretched into a long taper like a real pipe chanters. And of course, it's possible to use a real pipe chanter and simply cram the electronics inside! Electronics
ALTERNATIVE : Small pieces of copper or brass rod, outside diameter appropriate for the holes. For example, if using an old pipe chanter, 3/16" OD rod is OK. If using an old Practice Chanter, 1/8" OD rod is probably the largest diameter that will work on the top tone holes without redrilling.
ALTERNATIVES: Basically any Arduino (or compatible) running at 16MHz or faster should work. Boards like the ExtraCore, Arduino Stamp, DorkBoard, RBBB and Arduino Minis are all small and cheap, but require an additional programmer. On the other hand, the USB programmable boards like the Arduino Nano cost a little more, but are small enough for the eChanter and don't require additional tools. For a one-off, an Arduino Nano is a good choice.
Power
ALTERNATIVES: Once again, there are many alternatives! The easiest to implement is to use a 5v power regulator (like this one from Radio Shack) and a single 9v battery.
Misc. components
ALTERNATIVE: Using headers and crimp pins is the easiest way to connect wires to the Arduino - basically buy an Arduino with headers pre-soldered, then crimp the pins into the sensor wires, insert the pins into the connector and slot the connector onto the Arduino. It's really simple! But for those who want a really really small build, sensor wires can be soldered directly to an Arduino, saving space and components. Tools
Parts List
PRE-BUILD PLANNINGThis build is using PVC sprinkler parts, but already mentioned, there are many alternatives. The 1st choice will likely be PVC or an old chanter. If it's going to be PVC, then the next choice is probably follow this build with sprinkler parts, or use pipe and custom PVC parts. Lets run through some of the alternatives.PVC Sprinkler parts This is the easiest by far - just follow the build! The only real choice is to put the sprinkler body at the top, like a cap, or at the bottom, like a sole. PVC pipe This isn't much different from using sprinkler parts, but the variety of couplings gives more scope for customizing. One of the easiest changes is to glue two MALE-MALE 3/4" slip coupling together to make a long 'sole' or a long 'top' for the electronics. Use a 3/4"->1/2" bushing to connect the pieces. Another possibility is to use a large diameter pipe cap as a wide, shallow sole, and install all the electronics inside. A cover can be DIY'd from a scrap of thin plywood, a bit of acrylic, or even glue soaked cardboard! Old Chanter The problem with using an old chanter will most likely be "Where do the electronics go?" And if it's a pipe chanter, there's no top! The most often used solutions have been, 1) to stuff the smallest Arduino possible inside the end of the chanter, then to install a custom sole for the battery and other electronics, 2) put all the electronics inside a custom top, and finally, 3) stuff the Arduino in the bottom and the battery and headphone jack in a custom top. Completely custom With this kind of Open Source/Open Design project, the limitations are the imagination. Seriously. I've made an eChanter inside two different Micarta chanter bodies, both DIY Micarta. The first was made from strips of epxoy saturated T-shirt wrapped around a paper cone. The second was made from epoxy saturated newsprint, again wrapped around a paper cone. One day I'll make one from paper mache wrapped on a paper cone, then finish it off with a coats of yellow wood glue (it all cures together like a rock!!) How the Build Changes If not following the build, the major change will likely be which end the electronics are installed at, which impacts the angle of the sensor wire holes. Beyond that, the basics remain pretty much the same. SENSOR HOLESThere are several steps here, all pretty straightforward:Mark a center line down one side of the pipe, then mark a center line on the other side, exactly opposite of the first line. Make sure the lines are straight! These lines will determine the center point for each sensor hole. Mark the positions for each sensor screw. The distance from the top for each screw is:
Remember the High A sensor goes on the back side, all the other sensors go down the front. At this point a little forward thinking is required. If you're going to use no-solder screw and wire sensors just follow these directions: If the screws will be flush with the surface, drill the counter sinks first. Drill 1/16" holes for screws and wires. The hole for the wire is angled down towards the end where the Arduino will be, and the pilot hole for the screw should be vertical: If you're going to use rod sensors or soldered screw sensors, then you're most likely using an old PC or doing something completely custom. No problem. For an old PC just make sure the tone holes are large enough for the sensors to fit - I usually drill them all out to 3/16" and everything is good. Countersinking is a little tougher and you're sort-of on your own with that, sorry. FWIW, when I make wooden PC's I use a dremmel and a metal grinding bit to create an oval countersink which the #6 screws fit into quite nicely. When all drilled, the countersink version looks like this .... make sure the lines are straight! ALTERNATIVE: if using screw sensors with an old pipe chanter or practice chanter, fill the holes with thickened epoxy, or glue wooden plugs into the tone holes, then when everything is dry drill the wire and pilot holes, countersink if desired. SENSORSThere are so many choices for sensors. Over the course of about 5 years, I've tried everything from IR sensors to simple capacitive touch sensors. Other electronic instrument projects have used aq huge variety of materials including light sensors, photodiodes, and pushbuttons.In the eChanter build docs, we'll go over a few basic types of sensor you can use:
Feel free to roll your own sensors The eChanter recognizes a pin as touched when it goes LOW. How that pin toggles from HIGH to LOW and back again is entirely up to the builder! Screws & WireCut pieces of wire for each sensor hole. The wires should long enough to go from the hole, through the eChanter body AND the sole, with about 1" - 1 1/2" of slack wire at each end. Label each wire at the end that will connect to the Arduino - it'll save serious headaches later!At this point I like to connect the screw sensors. I use either 3/8" or 1/2" long screws, #4 size for the High A, High G and D finger positions, #6 size screws for the rest. Strip the ends of the wire sticking through the sensor hole and bend the exposed wire into a "U" shape. Install the screw sensor, wrapping the wire around the screw from left to right. As the screw gets close to the chanter body, push any excess wire into the body, making sure the wire is still wrapped around the screw. At this point I like to run the pair of wires for the headphone jack. In the photo below, they are the two wires sticking out at the top. ALTERNATIVE:
If the Arduino will be glued down or permanently left inside the
chanter body (or cap, or sole) it's actually easier to leave the sensors
off until after final assembly. By leaving the sensors off until the
end, excess wire can be pulled back through the eChanter body, making it
much easier to install the electronics. Brass RodThe original eChanter was built inside an old pipe chanter and used small pieces of 3/16" diameter brass rod for sensors, each about 1/4" long, soldered to solid copper wires pulled out of network cable. The advantage of this method is that the sensors can be smoothed and shaped.This sensor type was originally fit into the chanter holes by wrapping the outside of each sensor with duct tape until the sensor fit, then the tape/sensor combo was superglued in place. The second version superglued each sensor inside a piece of polypropylene tubing (refrigerator water line) . The sensors don't fit in a standard sized tube, and the tubes don't fit in most chanter tone holes, so the pipe needs to be heat formed to fit. I stretch it to size. In a nutshell, poly tubing can be permanently shaped by heating it (it'll turn clear when the heat is just right), then stretched, bent, twisted, etc., and held in place until cool. My method is probably pretty dangerous, so you really shouldn't try it .... but what I do is open the window, turn on a stove-top gas burner (or a light a candle), slowly and evenly spin the middle of a 6-8 inch piece of tubing over the heat until it turns clear, then gently stretch the clear section to about 2 1/2 times it length, and finally hold it until it turns back to the original cloudy white color. Whatever method you use to get the right sized tubing, cut it into pieces a little shorter than each sensor. When the sensor is pushed into the tube the top of the sensor should be slightly above the tubing like the picture above. Finally, feed the wires through the chanter body, wedge the sensor/tube combo into the tone hole, then superglue it in place. A Note on Soldering & Brass It's a good idea to put flux on each surface to be soldered. The flux burns off with the heat of the soldering iron, cleaning the surface as it burns off. Solder bonds much better to a clean surface, so it's a good idea to use flux as "standard practice." Soldering to brass is difficult. I've found the best results are when the brass is hot enough to melt the solder, and I generally use enough solder to form a "blob" that covers the entire surface. In order to attach wire to the brass, I put the solder "blob" on the brass and let it cool. Then I melt the solder "blob" a second time, stick the wire into the melted "blob" and hold the wire in place until the "blob" cools. This type of sensor is pretty straightforward - just solder the wire directly to the screw. Make sure to use loads of flux! This is the type of sensor I use most of the time. It's easy to make, dirt cheap, and works well with an old PC. [INSERT PHOTO] ALTERNATIVE: Split rivets also work pretty well. Solder Blobs! haven't tried these but they sound promising! Basically, you feed the wires into the holes, leaving a small section of bare wire in the hole, dam the bottom of the hole (playdough ought to work), then fill the hole with solder. When the solder has cooled it can be filed and smoothed ... flush is probably best.[INSERT PHOTO} CONNECTING IT TOGETHERSo far so good .... get out the soldering iron 'cause here we go!The 'standard' built uses the sprinkler parts and has the electronics at the bottom. If you're doing something different, the basic approach should be the same, but the various pieces will (obviously) go in different places. So, here are the steps to follow, order is not all that critical:
And here's the circuit to wire:Pressure SensorEach pressure sensor is slightly different there is no universal circuit, but each sensor should have a datasheet with a circuit diagram. The circuits are usually pretty straightforward, +5v, Ground, usually requiring a few capacitors and resistors.Here's the circuit for the MPX5010 series sensors, a typically available pressure sensor from DigiKey for about $12.50: Let's face it, basic Arduino audio is buzzy. Fortunately that's easy to fix with an 2 component audio filter. While an audio filter is optional, it's highly recommended! This filter circuit is taken from the Mozzi Synth pages and will do the job nicely. If you can't find a 1% tolerance resistor then do a bit of experimenting with what's on hand. The values of the resistor and capacitor determine the frequencies that pass through the filter to the output line - a resistor below 220 will allow to broad a frequency band to pass and you may hear 'buzz,' higher than 300 and you may filter out some of the audio you want. Use your ear and best judgement. Solder header pinsIf the Arduino didn't have pre-soldered header pins, now is the time to solder those on. This is completely optional. To get the smallest footprint possible, skip using header pins and connectors and simply solder all the wires directly to the board.Connect the boost regulatorI like to solder the boost regulator to the battery holder wires, solder on 5v and Ground wires for the Arduino (use leads about 6" long and trim excess later), then epoxy or hot glue the booster to the back of the holder, like this:Connect switchIt really doesn't matter if the switch is on the supply wire or the ground wire, but it makes sense to me to switch the supply wire. Whichever way you choose, cut 1 wire a few inches away from the boost converter, strip the ends, then solder them to the slide switch terminals.Connect sensor wiresThe sensor wires go to the following Arduino pins:HIGH A -> digital pin 12 HIGH G -> digital pin 8 F -> digital pin 7 E -> digital pin 6 D -> digital pin 5 C -> digital pin 4 B -> digital pin 3 LOW A -> digital pin 2 In this build the sensor wires are soldered to the ends of pins on a female header connector like this: ALTERNATIVE: Use crimp style wire terminals and the matching female header connector and avoid the soldering. Connect power wiresPower wires are soldered onto the female connector pins just like the sensor wires:Vcc (5v in) -> Vcc on Arduino (could be labeled Vin) Ground -> Ground on Arduino Connect headphone wiresMark the wire for ground, then connect the marked ground wire to the Ground on the Arduino, connect the other wire to Arduino digital pin 9. That's enough to get going, but I HIGHLY recommend using 'HIFI' mode, which uses pins 9 and 10, and is wired like this:http://sensorium.github.io/Mozzi/learn/output/ With the HIFI mode audio there's no need for the low-pass filter. Install headphone jackThe eChanter produces mono sound, so to hear left and right sound on the headphones, the left and right connections on the headphone jack need to be connected together. For the Radio Shack part used here, just solder pins 3 and 4 together with a short bit of wire, then connect one of the pins to pin 1 (the ground wire), and the other wire to pin 5. Here's the circuit diagram from the package:And here's what it looks like all connected together: [PIC] Strain reliefThis last step is optional, but it's often a good idea to put some epoxy or hot glue on the wires where they are connected to pins or boards. This provides some strain relief, so that when the wires are pushed, pulled or twisted the solder connections don't easily break.[PIC] PROGRAMMINGArduino IDEIf you don't have the Arduino Development Environment (IDE) installed, that's probably the 1st thing to do. As of Feburary 2015, the version being used is 1.5.8. Version 1.6.1 should be OK but has not been tested. Here's the URL: http://arduino.cc/en/Main/Software eChanter CodeThe latest code is available from the eChanter SourceForge Files page. Download and Unzip the file that starts with "LATEST." It should include everything you need.The latest eChanter code should include a ZIP file of the correct Mozzi Synth library. To install it, simply unzip the archive to the Arduino directory [arduino install dir]/libraries If for some reason there are problems with unzipping Mozzi, eChanter uses Mozzi version 2014-08-09-14:15 which you can get it directly from the web at http://sensorium.github.io/Mozzi/ Building and UploadingOnce everything is installed and unziped .....
//#define AUDIO_MODE STANDARD
#define AUDIO_RATE 32768
At this point there are a few things that can be changed in the config file. To edit the file click on the 'echanter_config' file tab in the Arduino IDE. If you did not use captouch style sensors change the line #define CAPTOUCH true to #define CAPTOUCH false If you did use captouch style sensors, then at some point you may want to change the 6 on this line #define CAPTOUCH_TRIGGER 6 to something a little higher or lower, depending on how the finger detection works for you. For me, 6 is a good trigger level, but 8 also works OK. Finally, it is possible to build a PC eChanter, or a GHB eChanter by changing INSTRUMENT. For a PC eChanter #define INSTRUMENT PC and for a GHB eChanter #define INSTRUMENT GHB Moving on ....
Programming a USB Arduino board is really easy - connect the USB cable, install the FTDI drivers (which should happen automatically anyway), select the board, the serial port, the processor, then upload the sketch. Other boards need a separate programmer. The programmers are pretty standard, but the boards are all a little different! If in doubt, contact the vendor. Most of them really do want to help you out and see you be successful. FINAL STEPSCarefully push the wires into the pipe,fit the Arduino into the sprinkler body, fit the on/off switch into the sprinkler body, fit the battery and holder into the sole, glue everything down, screw on the 'cap' .... All done! Enjoy playing your new eChanter. Here's a quick tune played on the eChanter made during this build doc ... sticky fingers and missed birls and all! RESOURCES Arduino web site and reference - www.arduino.cc SparkFun - www.sparkfun.com Adafruit - www.adafruit.com RobotShop - www.robotshop.com Pololu - www.pololu.com Arduino Nano compatible (SainSmart Nano, available March 2015) http://www.amazon.com/SainSmart-Nano-v3-0-Compatible-Arduino/dp/B00761NDHI Pressure Sensor (MPX5010 Series) at DigiKey http://www.digikey.com/product-detail/en/MPXV5010GC7U/MPXV5010GC7U-ND/412949 http://www.freescale.com/files/sensors/doc/data_sheet/MPX5010.pdf |
eChanter ... >