Arduino MIDI Foot Controller

by Mark_McQ in Circuits > Arduino

9517 Views, 20 Favorites, 0 Comments

Arduino MIDI Foot Controller

38 - Jg6kFpD.jpg

I recently designed this MIDI controller to operate the phrase looper which is built into the Boss DD500 delay pedal. I control my whole guitar rig using a Behringer FCB MIDI board, and this allows me to change patches on the delay pedal in the effects loop, whilst switching amp channels at the same time.

The DD500 has a very basic looper function built in but one of the drawbacks of it is that when the looper is active, it’s controlled by the footswitches on the pedal. This means you can’t change patches on the pedal while the loop is active, as it’s essentially captured the functions of the footswitches. As I'm using MIDI, this limitation doesn’t exist, since it’s simply a physical issue. This did mean reserving 5 footswitches on my main MIDI controller for the looper though, and so I decided to build a separate controller for those.

My initial plan for this was to take a small Hammond enclosure and put 5 footswitches in and teach myself some basic Arduino coding. As I started to learn more and my code was working, it ended up motivating me to try more things and then it basically snowballed into something bigger.

Concepts

concept.jpg
papers.jpg

One of the early ideas was to just have 5 buttons in a row with status LEDs. This was fairly simple to mock-up on a breadboard with the Arduino. The addition of new features and hardware ended up being a process in which I was constantly designing and redesigning the physical layout on paper and building onto the breadboard project. Even with a lot of planning, a lot of the work on this was somewhat done on the fly at the start.

The 2 pictures above show the very first drawing I committed to paper, which kicked the idea off in the first place, followed by a month of notes made following that which shaped the physical and PCB layouts.

Breadboard Protoyping

3 - zdwbG1i.jpg
4 - cDvAQB4.jpg

The whole project was built on a breadboard and fully tested to make sure it fully functioned with the DD500 before any work started on housing it permanently. Some extra features were added in the code, which gave the controller some extra functions the DD500 lacked. These will be discussed more fully in the code section.

The pedal has 5 footswitches, 4 status LEDs, 5 I2C LCD screens and is controlled by an Arduino Nano Every. It gets power from a 9V guitar pedal PSU by way of a separate breakout box which carries that power over the MIDI cable using the 2 pins which are normally not used on a MIDI connector.

Fabrication

7 - xXgEY1F.jpg
9 - wpxEaUh.jpg
10 - zwx67VB.jpg

I looked at a lot of possible cases for housing the project, and even considered the idea of trying to bend my own case from sheets of aluminium. Eventually I settled on a Hammond enclosure which was just wide enough to house the 5 16X2 LCD screens I had chosen.

The footswitches were generic momentary soft-touch switches.

At this stage I decided to have custom mount screen bezels made to keep the front looking clean, as I would be cutting the screen holes by hand with a Dremel and knew there would likely be a few area which were less than perfect. I had these cut by a local design studio which does laser cutting, first as cardboard templates to make sure my sizes were all correct, and then in 3mm white acrylic for the final piece.

CAD Mock-up and Layout

1 - AlVa0fM.png
2 - UsBnN2L.png

From my paper sketches, I used Inkscape to lay all the physical components out and finalise the sizes and positions. I also came up with the screen mounting method at this point. In order to minimise the amount of visible bolts on the front, I decided to mount all the screens to some aluminium plates from the rear using stand-offs, and then I would only need 4 bolts per plate to fix them to the enclosure, which would also hold the screen bezels in place.

PCB Design

Schematic_DD500-Loop_Sheet-1_20191221210632.png
PCB_DD500_20191221210722.png
15 - QeE12qC.jpg
11 - xX045SV.jpg
12 - Exc0UGc.jpg
13 - RD80ixI.jpg
14 - f6yC9a3.jpg

To create the PCB, I made use of a website called EasyEDA. It features an editor environment in which you can draw a schematic of your components, turn it into a PCB layout, and then export it directly to JLCPCB to have made into boards. I had never done anything like this before, but they have an excellent guide on the site which explains how the editor works, and within an hour I had the board designed and ordered.

Some areas on the board were poorly designed at the time due to inexperience, such as using a single 5V rail for the screen power, for example, rather than giving each one a separate feed. Thankfully any voltage drops that occurred weren't enough to cause issues with the screens.

The boards arrived about 2 weeks later and thankfully worked
without any issues.

Screen Mounts

5 - uJhmBYc.jpg
6 - 1nzfFIp.jpg
8 - m6KIzeq.jpg

The first parts made were the screen mounts. I used 3mm aluminium for this and drilled holes for stand-offs. The dimensions were determined by laying everything out on the desk as I wanted the final pedal to be and measuring from the mounting holes on the screen PCBs. I also placed the footswitches with them to get the distances for those.

Once all the holes were drilled the screens were mounted and checked for squareness by holding a ruler against the flat bottom edges. Everything lined up so far.

Enclosure

16 - CR5lOGJ.jpg
17 - CaT2ync.jpg
18 - IYAfN5H.jpg
20 - Qhqzzp3.jpg
21 - 3OIH97w.jpg

Next up was modifying the case. The footswitches and LEDs were straightforward as they each simply required a 12mm and 5mm hole respectively.

The main bulk of the physical work came when cutting the screen holes out. I used a Dremel with some heavy-duty cutting discs, and various files to clean up the holes afterwards. This part took about 2 hours all in.

The enclosure I used was designed for industrial purposes and was made by bending a single piece of metal and spot welding the corners. This meant that some work would be required to clean these corners up by using car body filler to level the low spots and fill the gaps on the edge.

At this point the case was fully primed and I mocked up everything up just to see how it would look.

Uh-Oh

24 - lDgkZLc.jpg
25 - jneOlyA.jpg
23 - OJAqI2I.jpg

And then came the realisation that despite all my planning and measuring, I had made one HUGE error. I designed the board and case layout independently of each other. In my head, the board would sit almost flush against the top wall, with a short stand-off behind it. But there was absolutely no way this could possibly fit. And there was no space to put it to the side either. A huge oversight, but thankfully one which I was able to rectify since there was still a quite a bit of space between the screen mounts on the rear cover of the case. A few more holes drilled in the screen mounts and a couple of stand-offs, and we’re back in business, with just enough room to get the cover on.

Paint

27 - e77GtCz.jpg
28 - txGXien.jpg
29 - F2fMqCu.jpg
30 - C671ztj.jpg
36 - VV1AQIZ.jpg

Everything was disassembled again, and the case was painted Metallic Candy Red, followed by a few coats of lacquer. The case was left to cure for a week, although I discovered the lacquer was still slightly soft at this point when I was building everything up. A few small areas of the paint got damaged because of this. Something which I aim to avoid on my next project.

During this time, I had purchased a 3D printer, and decided to use it to make some washers for the footswitches, as the nylon ones I had bought had a horrible yellowish tint to them and were poorly sized.

Wiring

32 - U4VLnsf.jpg
33 - yDn5pC2.jpg
34 - dTVkapb.jpg
35 - w2CXEI3.jpg

The last part of physical assembly was to wire everything. Again, the issues with the case design/PCB design came up again and some of the header positions on the PCB meant crossing a lot of wires over each other, making things a little messier than I’d hoped.

The wires for the screens were bundled into sets of 4, and using heatshrink and braided wrap, made into one single piece.

Arduino Code

Arduino MIDI controller 1
Arduino MIDI controller 2

As a total beginner to Arduino coding, I was teaching myself as I went along. The code is probably the programming equivalent of a ‘long way around’ but I was pleased that it worked as intended.

The looper on the DD500 has 5 basic functions:

  • Looper on/Off
  • Record/Overdub/Play
  • Play recorded loop
  • Stop playback
  • Clear recorded loop

Each of those functions has a corresponding footswitch and, with the exception of the stop button, a status LED. The LCD screens also update with relevant information to show if the pedal is in recording, overdubbing or playback mode as well as what function each footswitch will do depending on what is happening at that time.

One other feature I added was to keep track of how many times the record/overdub feature was activated. This is kept track of in the code by incrementing an integer, which gets displayed on the ‘buffer’ screen, listing how many tracks are recorded. While the DD500 cannot erase individual tracks, I added this merely as a coding exercise to see if I could make it work.

There appears to be an issue uploading files to Instructables, and so I've put a copy of the code on Pastebin instead at:
https://pastebin.com/XBSXHut2

2 libraries were used in the code:

LiquidCrystal_I2C

FortySevenEffects MIDI library

Conclusion

31 - 3Pr05To.jpg
37 - fBuwvP1.jpg

One of the biggest things I take away from this project is that planning as much as you can ahead of time can avoid potential issues. The issues with my PCB mounting highlight the importance of this. Keeping good notes is also something I highly recommend. Without them, I may have encountered more issues than I had. I'm currently building my second MIDI controller and this time I've made greater efforts to streamline my code, and design my hardware around how the PCB should be mounted.