Introduction
A couple of years ago I was gifted an Arduino starter kit and was having fun doing some of the small projects that were documented in the booklet that came with it. Soon, I felt I wanted to do a "real" project, one that wasn't just a prototype on a breadboard, but something soldered down and nicely packed into a real product. I googled for cool dyi electronics projects and soon discovered a youtube video where someone made their own custom MIDI controller using a Teensy microcontroller. I was into electronic music production myself and so I was immediately was intrigued by the project and wanted to make my own version of it.
Prototyping and ideation phase
After watching a YouTube video, I was inspired by the product featured but wanted to create something more professional-looking, avoiding the typical DIY aesthetic. During my experimentation with the Arduino starter kit, I particularly enjoyed working with motors and the satisfaction of making things move through code. This led me to discover motorized linear and rotary potentiometers, electronics components that are specifically made for audio mixing consoles. I really wanted to put some of these into my MIDI controller.
MIDI Controller design
I designed a layout featuring five channel strips — vertical sections resembling those on a mixing console — each equipped with a motorized linear potentiometer and a motorized rotary potentiometer. The goal was to map these channel strips to multiple remote parameters in my DAW Ableton Live. Additionally, the controller would include a channel selection feature, allowing the motorized pots to automatically adjust and reflect the corresponding parameter values in the software when switching between channels.
Besides the 5 reassignable channel strips, I wanted a 14-segment display to be able to display the currently selected channel of the MIDI controller, then 2 buttons for incrementing and decrementing the channel, and a global section with 6 additional rotary encoders. This global section would be used for effects such as reverb, filters, delays and similar.
The teensy microcontroller
At the heart of this project lies the Teensy microcontroller. It is a custom USB development board, designed by Paul Stoffregen and Robin Coon. It is the perfect starting point for this specific project, because it is quite powerful in terms of its computing resources and very versatile in terms of its interface. For my project, the most important feature of the Teensy is that it supports native USB, allowing it to emulate various USB devices, e.g. MIDI. This allows me to just plug the microcontroller into my music production computer via USB, and it will be recognized as a USB MIDI device.
Development
The next step was to order all of those components, then prototype the circuit on a very large breadboard, write the software and test the basic functionalities. This was a very long iterative process that was challenging, due to hardware software interactions I did so far not face in my software-only projects.
The software and the circuit were developed in parallel, always testing the circuit with the software and making sure it behaved as expected. When I had a base circuit setup that worked for most of the features I wanted, I soldered that down on THT boards. I didnt bother getting an actual custom PCB made for this project, because I was not going to build multiple. In hindsight, it would probably have been worth considering that, because soldering every connection manually is both very labor intensive as well as error prone.
Challenges of motors
Incorporating motorized potentiometers introduced several challenges, both mechanical and electrical. Motorized pots require a separate power supply for the motors, which adds complexity to the circuit design.
On the software side, controlling the motors precisely required implementing a feedback mechanism to ensure the pots reached the correct positions without overshooting. This was achieved by reading the position of the potentiometer and adjusting the motor output in real time. Balancing smooth motor movement with responsive updates was another hurdle, particularly when multiple motors needed to move simultaneously to reflect parameter changes in the DAW.
With the rotary pots, I had trouble finding ones that suited my needs. I needed ideally motorized 10 Ohms linear DC pots. I couldn't find a very good match, in the end, the best ones I found had a logarithmic resistance profile, which required me to map the values on the software side to get a linear response, which wasn't always very accurate. They also were very slow to react, it took them several seconds to reach their target position and they exhibited some physical inertia to their movement which was ridiculously hard to control. So in the end, I decided to drop the rotary motors and just use conventional rotary pots with a linear resistance. I am still a little bummed out by this outcome, just because there are less things moving now. But in terms of functionality, I implemented a pickup mechanism that worked very well (no signal is being sent via midi until the encoder is moved past the previously stored value) and it didn't feel like anything was really missing in the end.
Front plate and mounting
To achieve a professional look, I designed the front plate in CAD software and had it fabricated from anodized aluminum by a company called Schaeffer AG. The plate was laser-cut and engraved to precisely match the layout of the components, ensuring that the potentiometers, encoders, and buttons were securely mounted and aligned.
Behind the front plate, I fixed the board with the teensy and the IC sockets to the back wall. Careful attention was given to cable management, as the compact design left little room for excess wiring. This process was one of the most rewarding aspects of the build, as it brought the project closer to a polished, finished product.
Software challenges
Programming the Teensy to handle multiple layers of functionality was another significant challenge. The MIDI controller had to manage communication with the DAW, motor control for the potentiometers, and real-time updates to LEDs and the 14 segment display. Ensuring all of this ran smoothly required writing efficient code and leveraging the Teensy's processing power effectively.
The first version was written in the Arduino IDE, simply because the setup of the Teensy was very easy that way. The Teensy comes with a loader software that integrates with this IDE, so building and deploying becomes a no-brainer. However the Arduino IDE is very cumbersome to work with, if a project grows past a certain scope. In the version I used back when I developed this project, everything had to be in one file and there was hardly any syntax highlighting beyond function names. There is no refactoring functionality and code navigability is limited as well. I still managed to build the entire controller using these tools, and have a first version running with that code.
After a while, I updated the DAW and ran into issues with my MIDI controller. It was no longer updating correctly, seemed to have random glitches. After I had excluded any electronical issues, I knew I had to go back and look into the software again. In the meantime, I had grown quite a lot as a software engineer and I could not get myself to go back and work this out in the Arduino IDE. I wanted to use the tools that I had grown fond of. So I decided to do a complete software rewrite, in C++ using platformio in VSCode. It was a lot more work to set everything up, but in the end, being able to model the components in my hardware as software component felt so relieving that I knew my efforts were totally worth it - I could finally structure the code much more cleanly and wasn't frightened of going back to working on that codebase again.
After the rewrite, the MIDI controller was working fine again. I didn't really invest any time or energy into actual bugfixing, just simply doing a full rewrite seemed to also have solved the issues that I was previously facing.
Final state and remaining issues
The final result was a clean, stylish and functional MIDI controller that added a tactile, motorized element to my music production workflow. The motorized linear faders performed well, and the integration with Ableton Live made controlling parameters intuitive and satisfying. The global section worked as intended, providing a powerful set of tools for shaping sound in real time.
Even today, years after having finished this project, I still like the outcome of this project very much. It is also one of the rare projects I actually managed to finish.