MIDI Electronic Bagpipe
Arduino · FreeCAD · MIDI
This was my Final Degree Project for the Degree in Electronic, Robotics and Mechatronics Engineering, for which I was awarded the highest distinction (Matrícula de Honor). It consists of the design and construction of a MIDI electronic Galician bagpipe controller.
All project content is available in the repository: https://github.com/elcesarlokuelo/Gaita_electronica_MIDI
The goal was to create an electronic wind instrument that behaves as closely as possible to a real Galician bagpipe, allowing people interested in learning to do so without having to invest in a traditional instrument. The controller sends MIDI messages over USB to a synthesizer running on a computer, and also supports physical MIDI output via a 5-pin DIN connector for connection to external hardware synthesizers.
The project went through several hardware prototypes, progressively refining the sensor selection, circuit layout, and physical design. Each iteration informed the next — for example, two different capacitive sensing approaches (DIY CapSense circuits and TTP223 touch sensors) were evaluated and discarded before settling on the MPR121 module, which offered better reliability, lower pin usage, and cleaner I2C integration.
Hardware
The technical details are covered in the project report, available as a PDF in the repository above. As a summary of the main hardware components:
- Arduino UNO microcontroller: 8-bit microcontroller based on the ATmega328P. It is the most well-known Arduino model, offering an appropriate number of GPIOs for the project, sufficient memory, and broad compatibility with sensor modules.
- MPR121 Breakout V12 module: capacitive sensor controller with I2C interface. It features 12 electrode pins and allows capacitive sensing in any electronics project. On the software side, the Adafruit MPR121 library and the Wire library for I2C are used.
- HX710B absolute pressure sensor: offers a detection range of 0 to 40 KPa, sufficient for the project's needs. The sensor board includes the PSG010S sensor and a high-precision 24-bit A/D converter. There are no specific Arduino libraries for this sensor, but the Q2HX711.h library provides compatible functions.
- Other components: push buttons, a rotary encoder (EC-11) for volume control, an LCD1602 display for the user interface, a 5-pin MIDI female connector, PCB boards for the final assembly, and resistors of various values.
Software
The microcontroller was programmed in Arduino IDE using C++. MIDI communication was handled via USB
using Hairless MIDI Serial and LoopMIDI. Between those two softwares, I can translate the USB-serial
messages emmited by the Arduino into the baud rate and format expected by the MIDI protocol, and route
them to the synthesizer.
The synthesizer used for sound generation was Universal Piper,
a standalone bagpipe synthesizer with a library of 16 different bagpipe types including the Galician
bagpipe besides others like the Scottish or Irish, configurable via MIDI Control Change messages.
Mechanical Design
Parts were modelled in FreeCAD and printed in PLA using an Anycubic Kobra 2 printer. The 3D-printed enclosure houses all the electronics and keeps the controls accessible to the player, though the ergonomics leave room for improvement in future iterations.
boca_fol
Click and drag to rotate · Scroll to zoom