MIDI IN for the Raspberry Pi Pico

I was in need of another MIDI IN device, so I thought it would be useful to have another “pack” style interface that supported MIDI IN for new MIDI monitoring type projects.

You can see all the other DIY options for Pico MIDI interfaces here: DIY MIDI Interfaces.

IMG_5646

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

These are the key tutorials for the main concepts used in this project:

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

Parts list

  • Raspberry Pi Pico
  • Resistors: 220Ω, 470Ω, 4.7kΩ
  • 1N914 diode
  • 6N138 optoisolator and optional 8-pin DIP socket
  • 100nF ceramic capacitor
  • Pico “proto” board – I used the “Pico Proto” from Pimoroni
  • 5-pin DIN MIDI socket
  • female headers

The Circuit

Raspberry Pi Pico MIDI IN Pack_bb

This is a variation on the MIDI In for 3.3V Microcontrollers circuit.

I’m using the 6N138 optoisolator version, which strictly speaking, may or may not support 3.3V outputs (depending on what you read online).  But as it is used with both the Teensy MIDI library and for Deftaudio’s MIDI boards, I figure it will be good enough for me. I suggest you try it out with your specific 6N138 before soldering everything together just to be sure.

I’ve built it up using a “Pico Proto” from Pimoroni.  In terms of build notes:

  • I’ve only soldered on two 5-pin female headers.
  • … which leaves me room to super-glue and hot-glue gun an appropriate MIDI socket to the other end of the proto board.
  • All components apart from the capacitor are soldered to what on initial inspection looks like the “bottom” of the board as it is the side with the visible copper tracks rather than the silk-screen printed side.  But this is necessary if it is to be used in the right orientation with the Pico.
  • This is only wired up for the UART 0 RX pin. I did think about adding some resistors and a jumper to allow a MIDI TX socket too, but I didn’t bother in the end.
  • The capacitor is added after soldering in the 8-pin DIP package (or socket). It is overlaid, rather than pushed “through holes”.
  • I didn’t bother with an 8-pin DIP socket myself, but it might be prudent to use one.  See how you go.

Here are some build photos.  Most links and components are soldered on first – in fact, all apart from the GND link to the DIP socket. Then the 6N138 is fixed in and the capacitor added on the underside, using the leg of the capacitor to make that final GND link.  Finally the two 5-pin female headers are added.

I wanted to be able to fix on the MIDI socket.  I did think about using a TRS socket instead, but stayed with a 5-pin DIN in the end.

I removed all pins apart from the two I need (pins 4 and 5).  Then I super-glued the socket to the board, as it is one of those sockets with a large plastic casing with a bit of a “ridge” around the edge to allow several of them to inter-lock. Once in place, I reinforced it with hot glue.

The Code

There is no code associated with this project, but you can see I tested it (above) with my Pico Unicorn MIDI Visualiser.

Closing Thoughts

I don’t know yet how robust the glued-in socket will be, but in principle this will be really useful for projects that require a simple MIDI IN port.

Kevin

One thought on “MIDI IN for the Raspberry Pi Pico

  1. Hi, this is Lawrence from WIZnet.

    Your Blog, it was so awesome and great idea to gether 3 types of level for for maker’s skills.

    I read the projects and it was readly good contents for makers.

    I am looking for makers have RP2040 experiences and invite them WIZnet contest 2022.

    This contest is for maker looking for ethernet solution and spread many applications for them.

    I think if you ,like maker influencer, join this contest, it will be so honor for the contest.

    The contest prize is quite high and I think it is not hard for you to get the 1st prize.

    You already have had many experiences with RP2040 and made many projects with it.

    I hope you share the great reference for many makers on this contest.

    https://maker.wiznet.io/wiznet-ethernet-hat-contest/

    Thank you for reading this comment.

    I hope you have a great end of this year and early happy new year 🙂

    Thank you,

    Lawrence

    Like

Leave a comment