RPi 400 MIDI and Audio PCB Design

Now I’ve got my Raspberry Pi 400 up and running I’ve built a MIDI and I2S audio add-on board for use with the GPIO.

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 and singled board computers, see the Getting Started pages.

The Circuit

The key features of this design are:

  • Raspberry Pi 40 pin GPIO header connection.
  • Powered via the RPi GPIO.
  • Includes 3V3 MIDI IN circuit using H11L1.
  • Includes proper buffered MIDI OUT and THRU using 74HCT14.
  • Includes I2S connection to a GY-PCM5102 module.
  • Includes optional I2C SSD1306 OLED 32×128 display.
  • Includes optional rotary encoder and buttons with debouncing capacitors.

The primary aim for this board is Raspberry Pi 400 MIDI and I2S audio DAC. But I thought it I was going that far then I would also include the options for a rotary encoder, buttons and display which would allow the board to be used as a MiniDexed user interface too.

PCB Design

The board will plug in behind the RPi 400, so the idea is to use a 90-degree angle GPIO connector. The board supports either TRS or DIN MIDI sockets.

To just be used as a MIDI interface, the following components are required – all shaded out components may be omitted.

The I2S Audio DAC section is highlighted in purple on the left hand side if that is wanted to be added to the MIDI or just used on its own. Note how the capacitor for the PCM5102 will be situated between the PCB and the PCM5102 itself. It will need folding down to be installed.

This is a now standard (for my blog) H11L1 MIDI IN circuit paired with a 74HCT14 (not the HC variant – it has to be the HCT version to support the level shifting required) based MIDI OUT section. There is also a hardware MIDI THRU port. As can be seen from the PCB the board will take either TRS or DIN MIDI sockets – footprints are included for both.

Note: This is designed to be used with a right-angle GPIO header for plugging into a Raspberry Pi 400. Should the board want to be used with a typical RPi, then the power pins are on the far right hand side of the board with 5V on the top row and 3V3 on the bottom row. The GPIO connector will “point upwards” so it really has limited use with a normal Pi as all the components would be on the underside of the board – i.e. between the PCB and the Pi… but electrically it would all work!

To use the board as a MiniDexed user interface then the buttons, rotary encoder and SSD1306 display, and associated capacitors, can be added. Note that the SSD1306 display will have to sit above the 74HCT14.

There is one error on the board. All the debouncing capacitors for the encoder and the switches are labelled “10p” when it should be “10n”. I’ve made that mistake before and it simply got copied over to this design too without me spotting it!

Closing Thoughts

I was tempted to try to make something a bit simpler that could be used with my Cyberdeck, but instead opted for this stand-along board.

Whilst I don’t see a lot of use for a RPi-400 based MiniDexed, I couldn’t really think of a reason not to include the additional components. Having to route the PCM5102 such that the jack was in a useful position meant I wasn’t able to make the board much smaller anyway.

Kevin

Leave a comment