Close
0%
0%

USB MIDI Breath Controller

Cheap DIY solution to turn blown air into a MIDI signal sent through arduino's USB to any computer

Similar projects worth following
This device is designed to work as a cheap plug-and-play USB breath controller, inspired by Yamaha BC3, which is discontinued and doesn't work with computers out of the box.

Intended use:
Connect this controller and any midi keyboard to your computer. Route the inputs in your favourite DAW and open a breath-controller compatible VST plugin such as SWAM's, which simulate expressive and well-articulated wind instruments combining the inputs from the keyboard and the breath controller. Demo songs in the video in details.

  • 1 × MPVZ4006GW7U Sensors / Pressure, Force
  • 1 × Arduino UNO/MEGA with 16U2 OR 8U2 chip
  • 1 × Perfboard
  • 1 × Melodica hose
  • 10 × Male header pins

View all 8 components

  • 1
    Loading the software on the Arduino

    For this project we'll need an Arduino Mega or UNO that has either a 16U2 or a 8U2 chip for USB communication. I'm using a Mega with a 16U2 chip. Many chinese manufacturers use a cheaper one on their arduinos, but only these work with the firmware we will be flashing in order for the computers to recognize our Arduino as a MIDI device without any tinkering.

    Before flashing, we will upload the code that will translate the input from the pressure sensor into a midi signal:

    https://github.com/andreykramer/MIDIBreathController/blob/master/MIDIV3.ino

    MIDI library required: https://github.com/FortySevenEffects/arduino_midi_library


    To flash HIDUINO onto the board you download the Atmel Flip software, put your arduino in DFU mode (here's how's it done with an arduino Mega, note that you may need to solder a couple of header pins if yours doesn't come with them already installed)

    Then click on your arduino on the device manager, and install the corresponding driver to it. You will find them inside the flip installation. Open FLIP, click the chip icon, select  your chip, click the usb icon, open the connection, press file -> load hex file and load the HIDUINO firmware (choose the appropiate file from the list). Then just click run and your Arduino will be recognized as a midi device the next time you plug it into any computer.

  • 2
    Assembling the PCB

    The hardware part of this build is pretty straightforward. It's mainly a shield for the Arduino consisting of a perfboard, a MPVZ4006GW7U pressure sensor (reads from 0 to 0.87 psi, from what my research has revealed it's the optimal range for capturing human blow), a melodica hose (that luckily for us just fits right onto the sensor and is sold separately) and, optionally (explained in step 3), three capacitors. The connection diagram looks like this:


    And  I believe the actual layout of the pcb will vary depending on the Arduino board, but mine looks like this:


    The header pins on the right aren't connected to anything and just serve stability purposes.
  • 3
    [Optional] The decoupling circuit

    The manufacturer of the sensor recommends to add three capacitors to the circuit in this fashion to decouple the power supply and filter out some noise from the readings

    Why am I saying it's optional? Because experimentally, the noise reduction attained is neglegible as the arduino resolution on the analog pins is pretty low, and MIDI protocol has only 7 bits which is an even lower resolution. A change in a few mV won't affect the functioning of the breath controller.

View all 4 instructions

Enjoy this project?

Share

Discussions

rebwar-sarwar wrote 07/27/2021 at 10:52 point

Hi every one, sorry about my english, i uploaded the sketch to my Arduino Uno V3, but im getting :

exit status 1 Error compiling for board Arduino Uno.

I have already installed Midi library...
Whats the problem? please....

Best regard

  Are you sure? yes | no

patrik wrote 12/03/2020 at 18:17 point

Where can I buy these parts? I mean the two main electronic components. All I find online either dont ship to Europe or the min amount they sell is too high. Any tip would be appreciated. 

  Are you sure? yes | no

sebastien.tosi wrote 09/09/2020 at 17:53 point

Hi Andrey, very nice project! I will try to build it. Is there a way to avoid flashing the Arduino but still make it operates as a MIDI device (even if it needs some configuration before every use)? This would be good for testing. If not, how can you update the code on the Arduino once flashed (for instance to debug)?

  Are you sure? yes | no

Andrey Kramer wrote 09/10/2020 at 07:16 point

Hi, thank you! You can just send the midi signals via serial port and then use some software to create a virtual MIDI device that reads from it. This link may be of help:

https://sites.google.com/site/bharatbhushankonka/home/diy-midi-over-usb-using-arduino-uno

Once you flash HIDUINO you can't modify the code loaded into the arduino without reflashing back to stock again. Had to do it more times than I'm willing to admit.

  Are you sure? yes | no

sebastien.tosi wrote 09/10/2020 at 07:29 point

Thanks for the link! It sounds like a good alternative for debugging. Another idea might be to use a Due or a board with 2 USB ports, would that work? It however seems that these boards all are 3.3 V, which might be an issue with this sensor.

  Are you sure? yes | no

tavasti wrote 04/06/2020 at 10:27 point

'Need 16U2 or a 8U2 chip for USB communication'

Is it so that 32u4 won't work?

  Are you sure? yes | no

jacob wrote 03/14/2019 at 20:42 point

Cool, but it's just a hack. I own one of these and it doesn't cost much more than building this project...

https://www.tecontrol.se/products/usb-midi-breath-controller

  Are you sure? yes | no

tavasti wrote 04/06/2020 at 10:29 point

From where you will get that cheaper? For me it says 120€+VAT, which is much higher price than cost of this project.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates