Arduino Pro Mini MIDI USB CV PCB Build Guide

Here are the build notes for my Arduino Pro Mini MIDI USB CV PCB Design.

Warning! I strongly recommend using old or second hand equipment for your experiments.  I am not responsible for any damage to expensive instruments!

If you are new to electronics and microcontrollers, see the Getting Started pages.

Bill of Materials

  • Arduino Pro Mini USB MIDI Host CV PCB (GitHub link below)
  • Arduino Pro Mini (3V3/8MHz version)
  • Mini USB Host Shield 2.0
  • 1x H11L1
  • 1x MCP6232
  • Diodes: 1x 1N4148 or 1N914 signal diode; 2x BAT43 Schottky
  • Resistors: 10Ω, 33Ω, 1x 220Ω, 330Ω, 470Ω, 3x 1K, 2K7, 5K6, 2x 10K (*)
  • Ceramic Capacitors: 4x 100nF (*)
  • 1x 3.5mm stereo TRS
  • Either 2x 3.5mm stereo TRS OR 2x 5-pin, 180 degree MIDI DIN sockets
  • Pin headers
  • Optional: 2x 12-way pin header sockets
  • Optional: 1x 6-way DIP socket; 1x 8-way DIP socket

* The PCB shows the use of 2x 10nF and 2x 200Ω resistors for the PWM filter part, but 100nF and 1K work much better.

Optional: Power circuit

  • 7805 regulator
  • Electrolytic Capacitors: 1x 10uF, 1x100uF
  • Ceramic Capacitors: 1x 100nF
  • 1x SPST power switch 2.54mm pitch

Build Steps

Taking a typical “low to high” soldering approach, this is the suggested order of assembly:

  • Diodes
  • Resistors
  • DIP sockets (if used) and TRS sockets (if used).
  • Disc capacitors.
  • Switches (if used).
  • Jumper headers.
  • Electrolytic capacitors (if used).
  • DIN sockets (if used).
  • 7805 (if used).
  • Arduino + USB Host Shield (see notes below).

The Arduino Pro Mini and USB Host Shield need to be soldered together as a unit. If using header sockets, these will require longer header pins and will need soldering together as a single unit “off board”.

If not using sockets, normal pin-headers should suffice, in which case it is probably easier to solder the pin headers to the PCB and then add the USB Host shield, followed by the Pro Mini.

The USB Host shield requires a track cutting and a connection made from the Arduino’s VIN to the shields VBUS pad. See photos and discussion in the text.

Note: the PCB incorporates a capacitor on the CV PWM output to the TRS socket. This would be required if this was an audio signal to remove the DC bias. But as this is a CV output, the capacitor should be replaced with a simple wire link. More on that below.

Here are some build photos.

The two 220Ω resistors should be replaced with 1K instead.

If using MIDI TRS sockets, these should be added, along with the CV/Gate socket, next with the (optional) DIP sockets.

I’m going to use MIDI DIN sockets, so they will be left almost to last.

The MIDI on/off is required to disabled MIDI to allow sketch uploading to the Pro Mini. This can be replaced with 2×3 pin headers and jumpers, or if the Pro Mini will be removed for programming, even wire links.

I’m using a DPDT slider switch with a 2×3 2.54mm pitch.

The two 10nF capacitors should be replaced with 100nF capacitors instead.

If using 2x 12-way header sockets for the Arduino, these can be added at the same time as other pin headers next.

I’m planning on soldering my USB Host shield and Pro Mini directly to the board, so the best way to do that seems to be to add the headers to the board, as shown below, then I’ll add the shield and Pro Mini later.

The power circuitry is optional. This allows a 7-12V DC barrel jack (centre positive) to be used to create the required 5V for the Pro Mini and USB.

Alternatively, there is a 5V/GND direct jumper header that may be used instead. This should not be used to power the board if the regulator is fitted, but can be used as a 5V source if required.

Note: as already mentioned, when adding the electrolytic capacitors, the 10uF next to the CV TRS socket should be left out and replaced by a wire link.

The full photo below shows the capacitor present – I had to remove it!

The MIDI DIN sockets, if used, are the last component apart from the Arduino itself.

I will be stacking the USB shield and Pro Mini, so the shield goes on next. Note: there is a track that requires cutting between the VBUS solder pad and the 2K2 resistor as shown below. Note, this track must not be cut between the USB socket and the VBUS pad…

Cutting this track removes the connection between the USB VBUS lines and VCC on the PCB, which is running at 3V3. Once cut, a wire can then be soldered between the VBUS pad and the pin that will eventually connect to the Pro Mini’s VIN pin as shown below.

At this point the Pro Mini can now be added on top. I’ve not used any additional spacers, simply relying on the existing solder on the pin headers (from the USB shield) and the presence of the patch wire to distance the board enough. The pin headers themselves weren’t long enough, for me, to add proper plastic spacers, so I didn’t.

Testing

I recommend performing the general tests described here: PCBs.

The sample application section below lists some sketches that will test the various functions of the board.

An oscilloscope can be used to check the voltage output from the PWM signal.

PCB Errata

There are the following issues with this PCB:

  • As already mentioned, there are two issues with the CV output circuit:
    • The electrolytic capacitor should be replaced with a wire link.
    • The 10nF and 220Ω resistors in the filter should be replaced with 100nF and 1K.

Enhancements:

  •  The CV and GATE signals are different levels at present. CV is 0-5V; GATE is 0-3.3V. Perhaps they ought both be 5V signals.

Find it on GitHub here.

Sample Applications

The following GPIO pins are used with this PCB:

D0/D1RX/TX for Serial MIDID2GATE outputD3PWM CV outputD9INT pin for USB Host shieldD10-D13SPI link to USB Host shield

Here are some applications to get started with.

Note: I found that serial MIDI would not work when powered via the programming header, presumably because my programmer was controlling RX/TX. To test MIDI the board had to be powered via the barrel jack or 5V directly.

Also recall that MIDI needs to be OFF in order to upload sketches.

For the last two, some minor code changes are required.

For toneMelody, the pin used need changing from pin 8 to pin 2 in the tone() and noTone() calls.

For the PWM output, the following configuration options must be set:

//#define FREQPOT A0
//#define PIN_9_PWM_OUTPUT 1 // Uses Timer 1
#define PIN_3_PWM_OUTPUT 1 // Uses Timer 2

In both the GATE and PWM test, it is actually possible to hook up a speaker via a stereo 3.5mm jack to the CV/GATE TRS socket.

WARNING: If you do this, the speaker will be receiving a 0-5V signal on either the L or R outputs (depending on the test). This is a lot more than a line input signal (which is typically +/- 0.8V) so do not hook this up to standard audio input.

Alternatively, just check the signals via the GATE/CV jumper header with an oscilloscope.

The PWM output should be 0-5V. The GATE output should be 0-3.3V.

Use as a USB to CV/GATE Converter

The CV/GATE TRS output follows the standard set for the Korg Volca Modular (see Korg Volca Notes).

I show how to use this as a USB MIDI interface for a CV/GATE synth here: USB MIDI to Serial and CV/GATE.

IMPORTANT: Do not use this board with your Korg Volcas unless you know what you are doing, are able to validate all signals prior to connection yourself, and happy with the very real possibility that the board might do something that damages the Volca.

I am not an electronics person and will not be responsible for damage to expensive or treasured equipment. I only use cheap or disposable equipment in my own projects.

Closing Thoughts

Adding that capacitor was a case of me running on “autopilot” I think, but that is a straightforward fix, so no real harm done.

At the end of the day, this whole board is a little niche, even by my standards.

But it seems to work well enough that I can get on with writing some proper firmware for it now.

Kevin

#arduinoProMini #cv #korg #midi #pcb #pwm #usbHost #usbHostMidi #volca

Here are the build notes for my Arduino Pro Mini MIDI USB HOST PCB.

Warning! I strongly recommend using old or second hand equipment for your experiments.  I am not responsible for any damage to expensive instruments!

If you are new to microcontrollers, see the Getting Started pages.

Bill of Materials

  • Arduino Pro Mini MIDI USB HOST PCB (GitHub link below).
  • EITHER: Arduino Pro Mini 3V3/8MHz version plus mini USB Host shield (see photo).
  • OR: Adafruit Trinket M0 plus “OTG” adaptor (see below).
  • 1x H11L1 optoisolator.
  • 1x 1N914 or 1N4148 signal diode.
  • 1×10Ω, 1×33Ω, 1×220Ω, 1×470Ω resistors.
  • 2x 100nF ceramic capacitors.
  • 1x 10uF electrolytic capacitor.
  • 1x 100uF electrolytic capacitor.
  • 1x 7805 regulator TO-220 format.
  • EITHER: 2x 5-pin MIDI DIN sockets (pcb mount, see photos for footprint)
  • OR: 2x 3.5mm stereo TRS sockets (pcb mount, see photos for footprint).
  • 2x 2.1mm barrel jack sockets (pcb mount, see photos for footprints).
  • 1x 6-pin DIP socket (optional).
  • 1x 3-pin slider switch (optional).
  • 2x jumpers.
  • Pin headers.
  • Pin header sockets for microcontroller (optional).

Build Steps

Taking a typical “low to high” soldering approach, this is the suggested order of assembly:

  • All resistors and diode.
  • DIP socket and TRS sockets (if used).
  • Disc capacitors.
  • Slider switch (2.54mm pitch connectors).
  • Jumper headers.
  • Pin header sockets for microcontroller (if used).
  • Barrel jack sockets.
  • Electrolytic capacitors.
  • 7805 regulator.
  • DIN sockets.
  • Microcontroller (see notes if using the Arduino Pro Mini).

Here are some build photos.

The capacitor within the footprint of the Arduino Pro Mini has to be mounted flat. Alternatively it could be mounted on the underside of the board.

If TRS sockets are required, these are added next.

Otherwise continue on with the other components in whatever order appears to make sense.

Adafruit Trinket M0 Version

If the Adafruit Trinket M0 is used that can be added directly into the appropriate sockets.

IMPORTANT: The Trinket requires power via one of its pins which overlaps with the footprint of the Arduino Pro Mini. This means that the following solder jumper must be soldered to make the link to the 5V in.

The Trinket itself should be mounted as shown below. The photos also show a “USB OTG” adaptor which will also be required.

Arduino Pro Mini Version

The Pro Mini needs connecting to the mini USB Host shield, but before that there is one patch required to the USB Host shield to allow it to support 5V USB operation.

As it comes, the USB VCC line is connected to the main power line of the USB Host shield, but as the shield runs at 3V3 volts, this means USB is also running at 3V3 volts. This apparently can work for many devices, but not all, but there is a way to support 5V operation when used with an Arduino Pro Mini as long as the Pro Mini is powered via its RAW input with a 5V supply. This is what I’m doing here.

To enable 5V option, a PCB trace has to be cut as shown below (just down and to the left of the first hole near the top of the board next to the USB socket).

Header pins link the two boards together, but they will also have to be used to connect to the main PCB. I’ve used normal sized header pins, but notice how they are soldered on “upside down” – i.e. the longer part of the pin is above the PCB and that is the side that is soldered on.

Then the VBUS pad/connector needs patching over to the pin to hook up to the RAW connection on the Pro Mini.

I’ve mounted the Arduino on top of the shield. If the Arduino hasn’t been programmed, then programming header pins will also be required.

Warning: If using a programmer with a slider switch to select between 5V and 3V3, the cheap ones (like the one I have) DO NOT change the VCC voltage – only the UART logic levels. For mine, I need to select 3V3 via the slider switch and then connect 5V to RAW not to the VCC programming input. Check the voltages prior to using if you’re not sure.

With no VCC/5V connection once the Arduino is installed I can only reprogram it if it is powered independently of the USB programming link – i.e. via the barrel jack.

Additional MIDI Indicator

Once I started testing it, I wanted to enable a MIDI LED. Usually I’d use the built-in LED for this, but that is on pin D13 which is in use for the SPI interface to the USB host shield.

Instead I soldered on an LED and 1K resistor between D2 and GND as shown below.

The anode (long leg) of the LED is soldered to D2 and the resistor is soldered between the LED and GND.

Testing

I recommend performing the general tests described here: PCBs.

It is worth checking the operation of the 5V power supply independently.

It may also be worthwhile checking the operation of the USB host functionality on the microcontroller prior to fixing to the board.

PCB Errata

There are the following issues with this PCB:

  • The silkscreen for the on/off switch implies (to me) that up is “off”, but up is actually “on”. I’d either label it as OFF/ON or reroute the traces to match.

Enhancements:

  •  A slightly better arrangement for the MIDI sockets could be on opposite sides of the board. This could allow for a MIDI and power IN on one side and MIDI and power OUT on the other. However, if used standalone, then actually having them side-by-side possibly makes more sense anyway.
  • I can’t use the on-board LED for indications as that is on D13 which is required for the SPI link to the host board, so incorporating an additional LED would be useful.
  • It might also be useful to have a RAW/5V IN header for direct powering of the board, especially when programming in situ.

Find it on GitHub here.

Sample Applications

The Arduino can be programmed using the following:

The Trinket can be used with the following:

Closing Thoughts

In the video at the start of this post you can see my board being used to power and drive (over MIDI) my Shruthi, which to be honest, was the main reason for making it!

Now I just need to make a couple of neat, custom MIDI and power cables to link the two together.

Kevin

https://diyelectromusic.com/2024/07/25/arduino-pro-mini-midi-usb-host-pcb-build-guide/

#arduinoProMini #midi #pcb #shruthi #trinket #usbHost #usbHostMidi

Arduino Pro Mini MIDI USB HOST PCB Design

I’ve finally decided to create a PCB for my Mini USB-MIDI to MIDI USB Host MIDI converter based on an Arduino Pro Mini and a Mini USB Host Shield. Whilst I was at it, I’ve also included…

Simple DIY Electronic Music Projects

I’ve finally decided to create a PCB for my Mini USB-MIDI to MIDI USB Host MIDI converter based on an Arduino Pro Mini and a Mini USB Host Shield.

Whilst I was at it, I’ve also included an option to support the USB-MIDI to MIDI Revisited build based on an Adafruit Trinket M0.

Warning! I strongly recommend using old or second hand equipment for your experiments.  I am not responsible for any damage to expensive instruments!

If you are new to microcontrollers, see the Getting Started pages.

The Circuit

This essentially provides a 3V3 Arduino Pro Mini or Trinket M0 serial MIDI interface with a built-in power regulator to generate a 5V supply. Both the Arduino Pro Mini and Trinket M0 have a “RAW” power input, but unlike many 5V microcontroller dev boards, these only accept up to around 6V.

In order to support MIDI USB host functionality, the Arduino Pro Mini requires a mini USB Host shield (see photos in the build guide, these are readily available online); the Trinket M0 can support it directly using a simple USB OTG adaptor.

I’ve include power in and out sockets to allow power “pass through” if used with another device.

PCB Design

The board will support either the 3V3 Pro Mini or the Trinket M0, so an overlapping footprint is provided for them both.

One complication is that the Trinket’s power pin overlaps with a standard IO pin when used with a Pro Mini. I’ve solved that by including a solder bridge between that pin and 5V. The default is unbridged, so set for the Pro Mini.

Pin headers for jumpers have been provided to disable the UART RX/TX from the MIDI circuit to allow for programming, although programming will be a lot easier with the devices removed from the board anyway – especially as the Pro Mini requires an external programmer.

I’m still struggling with a sensible footprint for an on/off switch, but I’ve picked one that I think matches some switches I have on order!

The footprint allows for either TRS or serial DIN MIDI sockets.

Closing Thoughts

I’m hopeful this will work ok as both variants of the board have been shown to work in proto-board or breadboard projects in the past.

Kevin

https://diyelectromusic.com/2024/07/25/arduino-pro-mini-midi-usb-host-pcb-design/

#arduinoProMini #midi #pcb #trinket #usbHost #usbHostMidi

Mini USB-MIDI to MIDI

This is essentially a remake of my Simple USB-MIDI to MIDI but using a mini MIDI Host Shield and an Arduino Pro Mini, which I’ve not used before, with a home-made MIDI out interface to m…

Simple DIY Electronic Music Projects