Using Embedded Electronics for Hardware Control Surface Design

Started by ghostdzog 7 years ago15 replieslatest reply 7 years ago144 views

Hi, I am fairly new to embedded electronics.

My primary interest in Embedded Electronics is because I am interested in designing/making and perhaps even manufacturing tactile hardware control surfaces (made from electronic components and incorporating embedded MCU such as ARM M range) that can interface with standard PC / MAC computers and be used to provide tactile control over software run on the computer, as well as provide visual feedback to the users of the hardware/software (via LED / LCDs etc).

This is a project that i am keen to develop, however, I do not come from a programming or electronics background but a music engineer / music producing / art background, so although i have done some basic training in electronics and programming, I feel a little lost when approaching this project because there are no books on the market that have been specifically written for this purpose. i.e. hardware control surface design and how to interface with PC/MAC.

I was hoping that someone would be able to help me start my project by recommending the right way to start.

I figured that my first objective would be to buy a half decent developer board.

As I am not presently designing for manufacturing purpose (so I dont need to buy the cheapest), I have decided to buy one of the Nucleo 144 boards by ST electronics. The reason why i have chosen this board is because it has a fair amount of i/o pins as well as potential for connecting to arduino Uno etc.

I wanted a board with as many free pins as possible so that i will not run out of digital and analog ins/out for how many devices that i want to connect. 

I know, there are many ways of getting around the lack of pins, however, as this is my first project, I wanted to make my life easy by buying a board with enough pins on it to accommodate my requirements.

Apart from buying the board, i was wondering if someone could recommend any learning materials on how to develop such a project. I was wondering if there are any books on the market that are specifically written to teach people to design and make control surfaces.

I also was wondering if anyone out there had written a book on how to interface the electronic control surfaces to a PC and to how to get the control surface to interface with software run on the PC/MAC.

I was wondering if there is a list of any resources that documents programs that have been created to help connect electronic control surface to various software via USB. For example I know that apps exist to translate or convert data received from a MIDI hardware control surface to a Digital Audio Workstation Application such as Apple's Logic Pro run on an Apple mac.

Would be grateful for any advice on this matter.

Kind regards


[ - ]
Reply by wyzarddocMarch 8, 2017


Before spending money on a development board buy an arduino mega and learn how to program. There have been many projects similar to what your proposing look up Thermin projects using arduino's. Build one or two arduino projects and then you will have a better idea of what your project will require. I would not make a decision on how many I/O input/outputs are available since you can multiplex these easily. To talk to an Apple you will need a usb or midi output from your device to electrically connect to the Apple, again check out Arudino.cc to get started. 

Good luck

[ - ]
Reply by ghostdzogMarch 8, 2017


thanks for your advice.

I will look into this.

Although i already know what i want to achieve from my first control surface.

So i have my first big project objectives. I am not so fussed about making noises with the control surface, more interested in getting a control surface with faders / rotary encoders / buttons / led's interface with a computer and control software.

Although i think you are right in that i need to cut the project up into smaller projects, i was just hoping that there would be some resources or books out there that would allow me to start on the project and develop it progressively. One stage at a time.

I ask as i know that i need to design the electronics for the device, plus program the MCU but also work out how to interface the device with the PC/software.

So 3 main areas that need to work together.

Thanks again

[ - ]
Reply by wyzarddocMarch 8, 2017

Hi Again;

After spending some time with the Arduino Mega I would suggest using the Beaglebone Black and a TFT touchscreen display or interface a Android tablet for the touchscreen interface then consider using mutiple BeagleBones for controlling the I/O. After some experience with the Arduino you will be able to define not only number of I/O connections but also the latency of these connections and MCU response time and if you need a real time operating system. Don't discount the Beaglebones and Raspberry Pi's some users have built supercomputers using up to 64 of these working together. You will also need to define the resolution (number of bits) you require for the A/D converters. You are starting on a journey so don't be in a big hurry enjoy the ride

[ - ]
Reply by ghostdzogMarch 8, 2017


Thanks again for your advice. I shall take a look.

Although just a quick question. Do i need to define the resolution for A/D converters if the device isn't inputting or outputting audio.

I am designing more of a control surface rather than a synthesizer, audio interface or device with sound chip that outputs sampled audio.


[ - ]
Reply by Tim WescottMarch 8, 2017

From the perspective of USB, you're describing a "Human Interface Device".  Keyboards, mice, touchpads, etc., are HIDs.

I would suggest that you find an evaluation board for a chip that provides an HID interface demo, and then hack the demo for the USB communications side.

With USB stuff, you're basically stuck with one of two things: pretend to be an existing HID (like a game controller or keyboard), or write some custom driver software for the PC side.

I would STRONGLY SUGGEST that you start by doing something small, that pretends to be a game controller.  Write your PC-side software using a game controller, then build your hardware control surface to look like a game controller, then check the integration.  Then grow from there.

Even though I'm a pro at this and have been doing stuff for 30 years, this is still the way that I'd approach something like this.  First get something working at all, then get what you want working "the wrong way", then get everything working the right way.

[ - ]
Reply by richyankeeMarch 8, 2017

Here are a couple of thoughts on you project.

You will want to connect via USB. That's the way control surfaces are normally conected to consumer grade DAWs. (like protools, reason, multitrackstudio etc.), so, you will want to build your device on a platform that includes a USB interface with a working driver.

For that reason alone, you should consider a dev board that comes with a USB stack (drivers) already working.

DAWs communicate with control devices through MIDI. That is a protocol or language for musical instrument control. You will need to implement MIDI messages (to receive and interpret from the DAW and to send to the DAW).

Are you a C programmer, or C++? If not, you may have a steep learning curve. However, with a Beagelbone or Raspberry Pi (or something like that) you may be able to do most of the work in a language like Python. It could be easier for you to learn enough programming to make use of teh builtin libraries for i/o etc. in Python.

But before I would do anything else, I would design the system. To do that, start with the exact and complete functionality that you seek to develop. Identify all the operations you need to perform (ie: using a slider to increase the output of a channel. This involves several MIDI messages by itself - selecting the channel, setting the outout level, displaying the level or the change of level etc. etc.)

I think your idea is a good one and  very achievable if you are serious about learning the technologies and applying yourself to the problem.

It won't be simple or easy until you start breaking it down, The design is teh place to begin. From there, you will need to make choices and each on ewill involve questions. 

There seem to b eplenty of engineers on this board to answer the questions and it may create some interesting exchanges also, good for everybody :)


[ - ]
Reply by ghostdzogMarch 8, 2017


Thanks for your advice Rich.

I am sure I can work something out.

I am learning C for the project. I have quite a few books embedded C programming. The MCU's which i want to use, use C and Assembly.

Will look into what you have suggested.

It sounds interesting.


[ - ]
Reply by fabateraMarch 8, 2017

That is exactly what has to be done. 

I've made a simple one-tamborine-piece midi drum interfacing with Finale score software. I think it is the basic idea of what you are looking for. So I can say this is how you must start your project. 

[ - ]
Reply by richyankeeMarch 8, 2017

Tell me more. You can email me at richl at realtime-eng.com.


[ - ]
Reply by fabateraMarch 8, 2017

As was almost sleeping typing in my phone and my english is not so good, I don't know if I was clear. 

What I mean in my comment above is: Rich said the same steps I took some years ago to make a "midi tamborine to Finale score software" project. 

Just to be more clear this is a tambourine here in Brazil :) ->  tamborim

As the result of this project I could play the tambourine and see, in real time, the scores appearing in the computer screen.

I also used old MIDI PORT (GAME PORT) to communicate, so I had to implement the Windows driver. Doing that, Windows could recognize my tambourine as a Midi Device and send the MIDI notes to Finale Score Software.

As I said I think that is the basic idea for what ghostdzog is trying to do.




[ - ]
Reply by LaszloMarch 8, 2017


Don't wanna be mean here, really not, please reconsider this humongous task :)

First of all, evaluate the task :) nothing is impossible, its just a matter of time.. that being said, do you have 1-5 years do achieve this project?

It will take you even more, since you don't really have the software/hardware background for it, and you will probably not work full time on it.

The second issue, if I understood it correctly, you want to build a touch control panel for an existing application.

Question: why don't you use a touch screen laptop or a larger touch screen to control all the gizmos on the app? I mean the easiest way to interface something with the app's is to emulate a mouse/touch screen, like said use a big touch screen and you are done.

Other solution is to directly interface to these application, if they provide some sort of API, you will need to write a driver for your control device(hardware) to interface with the PC/MAC/Linux(on linux might be even possible), and another bridge application which will actually connect the driver with the DAW software.

Don't forget, these DAW's might not provide an open API, it is very dependent on their implementation.

While the first option will set you back with maybe 1K$, the second one, if you want to have a general working solution will need a team of 2-3 people(who actually know what they are doing) and at least 1 year of hard work...

Underestimation is the number one source of frustration. Set your goals so that you can actually reach them.

All the best,

[ - ]
Reply by Bob11March 8, 2017

A control surface is really just the application of basic embedded system concepts. Switches can be read by I/O ports, lamps lit by the same I/O ports (usually driven by offboard latches to provide more current, particularly if there are lots of lamps), and potentiometers/faders can be read by ADC converters which are onboard most development boards. You would then use the development board's communication devices (typically a serial port, USB I/F, or Ethernet) to talk with the workstation. Standard protocols exist for some interfaces (like USB A/V class drivers), while you typically have to roll your own or use a manufacturer's I/F for a serial port. However, a serial I/F is also usually easier to start with for beginner rather than a USB class driver. Network I/Fs are the most flexible, but also require a good working knowledge of network protocols.

For someone with little electronics background the devil is in the details. Knowing that switches need debouncing, understanding that LEDs are driven with current not voltage, stuff like that. I recommend you look into the large number of Maker books that are on the market now that discuss electronic design. They are typically written from the beginner/hobbyist perspective and will help bring you up to speed on what you need to learn. LEDs and switches work in basically the same way whether they're on a lightsaber or a control surface. There are also a number of free online resources available including the ones on this website. Check out Silicon Labs Maker's Guide to the IoT for example. Good luck!

[ - ]
Reply by ghostdzogMarch 8, 2017

Hi Bob,

Thanks for some excellent advice. 

i will check out the book you recommend.



[ - ]
Reply by fabateraMarch 8, 2017

Check this out !

"Both kids and professional musicians can explore the science of sound, make sweet beats and create instruments with this award-winning modular synthesizer. Co-designed with world-renowned electronic music maker KORG."

[ - ]
Reply by ghostdzogMarch 8, 2017


thanks for the info.

Although, I am more interested in the developing tactile control surfaces that interface with computers so that they can be used to control the software run on the computers.

I am presently interested in all sorts of control surfaces and the programming for the various protocols that they use to communicate to the computer. I.e. MIDI and USB etc.

But sure, the synth kits are a lot of fun.