Electronic Ergordica Build Guide

On this page, I’ll show you how to build an electronic Ergordica.

Please note this build guide is a work in progress and that it requires skill to complete. By accessing this build guide you agree not to hold me accountable for anything that might go wrong as per the terms and conditions of this site. If you have any suggestions, please let me know in the page comments.

Parts

Below is a list of parts needed to assemble an electronic Ergordica. Please note I’ve listed some alternate sources in case some parts are unavailable. I haven’t tested all these exact parts personally yet, so can’t guarantee perfect fits in all instances. For those without access to a 3D printer, you can send the CAD files to 3D Hubs or similar to get them made. Some of the links below are affiliate links and proceeds go to further Ergordica development at no extra cost to you.

Arduion Mega
Sensor Shield for Arduino Mega
Mouthpiece and Hose from Mugig Melodica or These 13.5mm Diameter Ones (Might be Slightly Undersized)
18 x Push Buttons for White Keys (Ideally Normally Closed), Alternative Source (Not Tested Yet)
14 x Push Buttons for Black Keys (Ideally Normally Closed), Alternative Source (Not Tested)
Dupont Wires or Wires of Your Choosing
2.5mm Heat Shrink Tubes Like Black in this Kit
220 Ohm Resistor Like in this Kit
Dupont Connections (This Kit also Has Good Crimping Tool)
MIDI 5-pin to USB Cable
MPVZ4006GW7U Pressure Sensor (Cheaper From Digi-Key)
4 X #6-32 X 1″ Machine Screw
4 X #6-32 Lock Nut
100 x #4 x 1/2″ Phillips Flat Head Tapping Screws or Use Screws From Melodica Spec’d Above
9V Battery Connector for Arduino (just one of many ways to power Arduino, such as Charge 4 Speaker listed in accessories section)
3D Printed PartsCreative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (ergordica invention is patent pending).
Arduino Code
Gummy Bears for Rewards Along the Way

Optional Accessories

A functional Ergordica can be built with the parts in the previous section. It will be essentially a MIDI instrument you can plug into a synth or computer via USB (or 5-pin MIDI if you put in a connector). Now if you want to build your Ergordica into a standalone electronic wind instrument, some accessory projects will be in upcoming posts, and I’ll list them here.

Tools

Below is a list of tools for the build.

  • Cordless Drill
  • Phillips Bits Various Sizes
  • Phillips Screw Driver
  • Wire Cutting and Stripping Tool
  • Needle Nose Pliers
  • Crimping Tool (comes with kit shown in parts section)
  • Wire wrapping tool or soldering iron
  • Hot Gun or Hair Drier (optional for shrinking shrink tubing)
  • Safety Glasses

Step 1: Acquire 3D Printed Parts

Whether you are printing the parts yourself or ordering them from 3D Hubs or similar, the FDM process with PLA material works fine and is the cheapest option. You can probably get by with 300 μm layer height, though I haven’t tested this myself. The two parts that need printing are:

  • Bottom Cover
  • Button Pan
  • FDM Printing the parts requires some kind of support material. The trick though is that the blow tube has to be clear of any support material. This isn’t a problem if dissolvable support material is used. But if the support material is the print material, then a modifier has to be used to ensure no support is built inside the blow tube. This can be done via the support region modifiers. For support material, I like to set interface layers to 0. The printer I use is a Prusa MK3S which is excellent for the price.

    Step 2: Attach Arduino and Sensor Shield to Button Pan

    In case you are unfamiliar with Arduinos, they are basically a microcontroller (small computer) that can be easily programmed (code is provided in parts section) and with handy access to the inputs and outputs. The sensor shield plugs into the Arduino to better arrange the inputs/outputs for hooking up sensors and, handily, also switches, which we will be using a lot of.

    Once you have the sensor shield plugged into the Arduino, attach both to the button pan via the #6-32 x 1″ screws and locking nuts. Note you might have to drill out the the holes in the button pan a bit.

    Step 3: Prepare All Button Assemblies

    To keep the cost down, I went with basic push buttons (normally closed) available on Amazon. I prefer normally closed because the switch toggles with the slightest touch rather than full depression. I also like that these switches come with quick connect terminals, so no soldering.

  • For each switch, cut about 5″ wire (stripped ~2mm either side) for each terminal (Contrary to convention, I use either both red or both black depending on whether it is a red or black button)
  • Using the crimping tool, attach the quick connect terminals to the wires and then attach to the switches
  • Slide on the heat shrink tubing (~3/4″)
  • Using the crimping tool, attach the Dupont terminals to the other ends of the wires. Slide the terminals into three hole Dupont connector housings (leave center hole unused)
  • Use a heat gun or hair drier to shrink the tubing
  • Repeat these steps for 32 button assemblies (18 red, 14 black, or other colors)
  • This is the most time consuming step. I suggest doing a couple button assemblies from start to finish to get the hang of it then switch to an assembly line approach. Some good music or audio book plus Gummy Bears for reward will make it an enjoyable experience 🙂

    Step 4: Attach Button Assemblies

    It’s time to install all of the switches. First connect them all to the button pan as shown in the images below. Some of them are fairly tight together so you might want to use needle nose pliers to tighten the nut. Next, plug the Dupont connectors into the correct pins on the Arduino sensor shield also shown in the images below.

    Labeling Ergordica buttons by note and Arduino pins (P)

    Step 5: Prepare and Attach Pressure Sensor

    In this step you need to connect wires to pins of the pressure sensor. I did this via a perf board and a bit of solder. I think an easier way would be with a wire wrapping tool.

  • Cut three wires to about ~6″ long and strip the ends (~2mm per side, or more on one side if using wire wrap). The wires should be red, black, and another color if you happen to have one
  • Connect the wires to the pressure sensor (see pinout of pressure sensor in image below): red to pin 2 (Vs), black to pin 3 (Gnd), and the remaining wire to pin 4 (Vout)
  • Connect other ends of the wires to Dupont terminals
  • Insert the Dupont terminals into a three hole Dupont connector body (black to ground hole (should have triangle marking), red to middle hole, and remaining wire to third hole)
  • Plug the pressure sensor into the receiver in the button pan. This might require removal of excess plastic around the hole edge or tape on the sensor to get a snug fit
  • Plug the Dupont connector into the row of pins for A0 (Analogue 0) on the Arduino sensor shield (make sure ground (black) lines up with the ground pin on the sensor shield)
  • Step 6: Prepare and Attach MIDI to USB Cable

    The MIDI to USB cable allows you to plug your electronic Ergordica directly into a computer or synth via a USB port. But if your computer or synth already has a way of accepting 5-pin MIDI, then you might want to save a few bucks and some effort and put in a 5-pin MIDI connector instead.

    If going with the MIDI cable I spec’d, then you can do the following steps to hook it up (note that you could take a different approach if you want to preserve the cable):

  • Cut three wires to about ~6″ long and strip the ends (~2mm). The wires should be red, black, and another color if you happen to have one
  • Find the 5-pin connector labelled “IN”, cut it’s cable at about halfway to the circuit box, stripping the cables (~2mm each)
  • Connect your red wire to the green wire on the MIDI cable, your black wire to the red wire on the MIDI cable, and your remaining wire to the black wire on the MIDI cable (make connections by twist and tape, solder, or Dupont terminals)
  • Cut your red wire halfway along it’s length and add in the 220 ohm resistor (I found two female Dupont terminals and heat shrink to work well here)
  • Have the three unused ends of your wires go into a three hole Dupont connector (black to ground, red to middle hole, and remaining wire to third hole)
  • Connect Dupont connector to the row for pin 1 on the Arduino sensor shield (black lines up with ground)
  • Seat the case of the MIDI cable circuit board in the Ergordica button pan as shown below, leaving the USB end trailing out
  • Step 7: Attach Bottom Cover

    Attach the bottom cover either using the #4 x 1/2″ screws or the screws holding the Mugig Melodica together. You will have to compress all of the wires a fair bit. It helps to collapse them all in the same direction, preferably in the direction away from the mouthpiece.

    Step 8: Connect 9V

    Power the Arduino using a 9V battery and the spec’d 9V battery connector. I’m eventually going to design a back cover to contain the battery and wires, but for now you will have to be creative. I’ll also discuss longer lasting power solutions at a later point.

    Step 9: Program Board

    In this step, you’ll program your Arduino board. If you’ve never used an Arduino before, you might have a look at the getting started guide. The basic steps are as follows:

  • Plug the Arduino into your computer via the supplied USB A to B cable
  • Download the Arduino IDE
  • Install the Control Surface and Pushbutton libraries
  • Load the electronic Ergordica Arduino code onto the board
  • Step 10: Attach Mouthpiece or Hose

    Plug in the mouthpiece or hose. Note that I designed the electronic Ergordica to use the same mouthpiece and hose that work for the acoustic Ergordica, which come from a Mugig Melodica. If you don’t want to buy the entire Mugig Melodica, you could just get the standalone 13.5mm diameter mouthpiece and hose I linked to, but they might be a tad small and require some tape to get a snug fit.

    Step 11: Plug your Ergordica into a Computer or Synth

    Use the USB side of your USB to MIDI cable to plug into a computer or synth. If you’re looking for a simple and free program to test with, you could use Virtual Piano MIDI Keyboard.

    As I mentioned earlier on, I’ll be adding guides for accessories like how to hook up a speaker and use a smartphone as a synth so you can have a totally standalone electronic Ergordica rather than just MIDI instrument as you created in this build.

    That’s it!

    So, what did you think? I know it’s a kind of challenging build. If you have any suggestions on how to improve it or any related thoughts at all, please tell in the comments below.

    Leave a comment

    Your email address will not be published.

    This site uses Akismet to reduce spam. Learn how your comment data is processed.