eChanter ...‎ > ‎

Howto Build the eChanter - Version 3

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.


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.



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


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

  • Pressure Sensor - Finding a suitable pressure sensor has proven to be one of the most difficult parts of putting together this project! A few possibilities are listed in the Resources section at the end. The ideal sensor is filtered, amplified, takes a 5v input, and costs less than $15. The pressure range should be from 0in/H2O to around 40inH2O (or 0-1.45psi, or 0-9.96kPa). It's very unlikely to find a sensor with these exact ranges. Close and a little over is OK, just remember the broader the range, the less resolution, which means your eChanter will have lower sensitivity.


  • 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. I've used boost boards from and eBay.
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.


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

Parts List

 PART Qty Cost Supplier
 Arduino Nano
 1$15Amazon/Internet search
 Boost converter
 AAA Battery Holder
 *Header pins - 1 row x 40 pins
 *Header Connectors - 1 row x 8 pins
 *Header Connectors - 1 row x 7 pins 1
 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 hardware store
 #4 Metal Screws
hardware store
 #6 Metal Screws
hardware store
 Insulated wire
 ~8-10ft free use scrap
* optional


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.


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.

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.


There 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:
  • Capacitive touch - simple screws and wire, soldered screws, brass rod, and simple solder blobs.
  • Voltage divider touch pads

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 & Wire

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

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

Soldered Screws

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.


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.

Voltage Divider Touch Pad

[text here]


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:

Pressure Sensor

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

One thing to watch out for is the sensor packaging. There's no way around it, you have to check the datasheet. The MPC5010 sensors are offered as Unibody or Small Outline Package (SOP), in each packaging the pin functions are different! For example, MPXV5010GC7U would be a great sensor for our project. It's a SOP sensor, +5v input (Vss) on pin 2, Ground on pin 3, output signal (Vout) on pin 4.

MPXV5010GC7U Sensor

Audio output and filtering

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

With the HIFI mode audio there's no need for the low-pass filter.

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:


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.



Arduino IDE

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

eChanter Code

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

Mozzi Synth

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

Building and Uploading

Once everything is installed and unziped .....

  • Open the Mozzi config file [Arduino dir]/libraries/Mozzi/mozzi_config.h
  • If you're using HIFI mode, find the line that says AUDIO_MODE and make sure the section of code looks like this:

                    //#define AUDIO_MODE STANDARD
          //#define AUDIO_MODE STANDARD_PLUS
          #define AUDIO_MODE HIFI

  • Scroll down to AUDIO_RATE and make sure the section of code looks like this
                    //#define AUDIO_RATE 16384
          #define AUDIO_RATE 32768
  • Save mozzi_config.h

  • Start the Arduino IDE
  • Open the eChanter sketch from wherever it was unziped (echanter.ino is the main sketch)

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


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

  • Connect the Arduino
  • Select the board type from the Tools menu (eg Arduino nano)
  • Select the processor type from the Tools menu (eg ATMega 328)
  • 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, 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.


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!

Arduino web site and reference -
SparkFun -
Adafruit  -
RobotShop  -
Pololu -

Arduino Nano compatible (SainSmart Nano, available March 2015)