eChanter ...‎ > ‎

Build the eChanter - Version 1.0



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.



INTRODUCTION


There'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:

  1. "Open Design" that can be made by anyone with basic electronics skills
  2. Costs less than $100US in materials
  3. Use minimal number of components
  4. Use the Arduino platform for software control
  5. Produce a reasonable quality sound output using bagpipe audio samples

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 ....




  Obligatory Safety Warning 

  Here it is:

Always take adequate safety precautions.

Using tools can be dangerous - serious injuries may result. 

You make an eChanter entirely at your own risk.

Techniques described here may be dangerous and may caused physical injury, and in extreme cases potentially death.

This document simply describes techniques the author has used in the past.

The document does not advocate the use of the described techniques.

Attempts to duplicate any techniques described by the author  are made entirely at your own risk.




MATERIALS & TOOLS


Chanter

  • Body - 1/2 PVC sprinkler riser pipe, 12" long
  • Cap - 1/2 PVC threaded cap
  • Sole - 2" pop-up sprinkler body
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

  • Sensors - #6 metal screws, either 3/8" or 1/2" long

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.

  • Arduino - Smaller is better! In this build we'll be using an ExtraCore (pictured on the anti-static bag). We'll also show pictures using an Arduino Nano.
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. For a handfully at a time, my current choice is the ExtraCore.

Power

  • Boost Power Converter - the boost board is in the photo, still inside the anti-static bag. It takes the power from a single battery and boosts it to a steady 5v supply for the Arduino.
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.

  • Battery holder for a single AAA (you may need something else if not using a boost converter)

Misc. components

  • Headphone jack
  • A switch (we're using one like this)
  • Headers and crimp pins
  • Lots of insulated wire! Telephone wire and network cable wire works great, but can break easily. These days I use 24g stranded wire, but any type of insulated wire between 24g and 20g should be OK.
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

  • Drill, 1/16" and 3/16" drill bits
  • Wire cutter and wire stripper (scissors will work)
  • Small pliers
  • Soldering Iron, solder, flux

PRE-BUILD PLANNING

This 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 HOLES

There 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:

 High A High G
 F E DC BLow A
 71mm 90mm111mm 137mm 159mm 180mm 209mm 244mm

Remember the High A sensor goes on the back side, all the other sensors go down the front.


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 the screws will be flush with the surface, drill the counter sinks as well.


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.


WIRES & SCREW SENSORS

Cut 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 permenantly 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.


ROD SENSORS

The 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, then soldered to a length of 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.

CONNECTING IT TOGETHER

So 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:
  1. Solder header pins to Arduino
  2. Connect the boost power regulator
  3. Connect switch
  4. Connect sensor wires to arduino
  5. Connect power wires to Arduino
  6. Connect headphone wires to Arduino
  7. Install headphone jack

And here's the circuit to wire:





Solder header pins
If 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 regulator
I 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 switch
It 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 wires
The sensor wires go to the following Arduino pins:

HIGH A   ->    digital pin 2

HIGH G   ->    digital pin 3

F        ->    digital pin 4

E        ->    digital pin 5

D        ->    digital pin 6

C        ->    digital pin 7

B        ->    digital pin 8

LOW A    ->    digital pin 9


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 wires
Power 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 wires
Mark the wire for ground, then connect the marked ground wire to the Ground on the Arduino, connect the other wire to Arduino digital pin 11.

Install headphone jack
The 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 relief
This 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]

PROGRAMMING

The latest code is available from the Chanter SourceForge project pages. Download these 3 files and save them somewhere convenient


If you don't have the Arduino development environment, that needs to be downloaded from here and installed.

Once the software is ready
  • Start the Arduino development environment
  • Open the eChanter sketch from wherever it was unziped (echanter.pde is the main sketch)
  • Connect the Arduino
  • Select the board type from the Tools menu (the ExtraCore programs like an Arduino Uno)
  • Select the Serial port from the Tools menu
  • Upload the sketch

That's it. Assuming the sensors and speaker are connected to the Arduino, the eChanter should be working!

A Word About Programmers
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, then upload the sketch.

Other boards need a separate programmer. The programmers are pretty standard, but the boards are all a little different! The ExtraCore is pretty straightforward though. Using a typical serial programmer, connecting these pins to the programmer should enable programming with auto-reset:

Programmer RX    ->    ExtraCore RX

Programmer TX    ->    ExtraCore TX

Programmer 5v    ->    ExtraCore Vin

Programmer Grnd  ->    ExtraCore Grnd

Programmer Reset ->    ExtraCore Reset



FINAL STEPS

Carefully 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!



CONCLUSION

At 16MHz, the Arduino/ATMega168 and the newer ATMega328 boards are plenty fast enough to sample the sensors for normal playing. The screw sensors and brass rod touch sensors all work well, and signal noise is minimal. The software implements a "first untouched sensor produces a note" which means the software is only polling for closed-fingering playing. Naturals, p'brock notes, slides and trills can't be played - only limitations for anything other than light music.

Obvious improvements to the system could include:
  • Open fingering
  • Proximity sensing
  • Better sound output (eg. higher sample rate)
  • Polyphony
  • Output line level amplification
  • Low-pass filtering
  • Shielded sensor wires
  • More conductive touch pads
  • Touch pad sensitivity settings
  • An eChanter Arduino shield

As a first version, the system works surprisingly well. It is very easy to make, and at a cost of about $40 (not including the donor pipe chanter), it's well within the cost goal.



PARTS LIST


 PART Qty Cost Supplier
 ExtraCore Arduino
 1$15RuggedCircuits.com
 Boost converter
 1$6
Pololu.com
 AAA Battery Holder
 1$1
Pololu.com
 Header pins - 1 row x 40 pins
1
$1
Pololu.com
 Header Connectors - 1 row x 8 pins
1
 Pololu.com
 Header Connectors - 1 row x 7 pins 1 Pololu.com
 Slide switch
 1 $3Radio Shack
 Headphone jack
 1 $2 Radio Shack
 1/2" x 12" long PVC Sprinkler Riser pipe 1$2
hardware store
 2" pop-up Sprinkler body
 1 $3hardware store
1/2" threaded PVC pipe cap
 1
 $1 hardware store
 #4 Metal Screws
3
$0.30
hardware store
 #6 Metal Screws
 5
$0.50
hardware store
 Insulated wire
 ~8-10ft free use scrap
   $34.80 

Comments