# QT Py RP2040 USB to Serial MIDI Friends

## Overview

https://youtu.be/Ik_1kFg_URY

![](https://cdn-learn.adafruit.com/assets/assets/000/111/129/medium800/hacks_edited_P1330021.png?1650988466)

Did you know you can use a QT Py RP2040 as a USB to Serial MIDI converter? The QT Py RP2040, running CircuitPython code, receives MIDI messages over USB and then sends the messages out over serial UART. You can build small add-on boards, or friends, for TRS-A, TRS-B and DIN-5 MIDI out circuits that plug directly into the QT Py RP2040.

This concept was inspired by [Sandy Macdonald on Twitter](https://twitter.com/sandyjmacdonald/status/1516109671404347402). It makes for a compact and simple solution for interfacing hardware MIDI devices with USB.

The MIDI friend breakouts plug directly into a QT Py RP2040 with socket headers.

![hacks_edited_P1330027.png](https://cdn-learn.adafruit.com/assets/assets/000/111/130/medium640/hacks_edited_P1330027.png?1650988509)

Versions for TRS-A, TRS-B and DIN-5 MIDI connections are shown in this guide. You can choose which one to build depending on your hardware MIDI device.

![hacks_edited_P1330033.png](https://cdn-learn.adafruit.com/assets/assets/000/111/131/medium640/hacks_edited_P1330033.png?1650988554)

## TRS-A or TRS-B?

If you aren't sure which type of TRS connection your TRS MIDI device uses, you can [search for it on minimidi.world](https://minimidi.world/) to see if it uses TRS-A or TRS-B. TRS-A is currently the MIDI standard, but many devices out there have TRS-B sockets. The difference is that the 3V and TX serial connections are swapped on the audio jack.

![](https://cdn-learn.adafruit.com/assets/assets/000/111/132/medium800/hacks_edited_P1330028.png?1650988577)

## Prerequisite Guides and Resources
[Adafruit QT Py RP2040](https://learn.adafruit.com/adafruit-qt-py-2040)
[MIDI for Makers](https://learn.adafruit.com/midi-for-makers)
[minimidi.world Simplified Guide to TRS MIDI](https://minimidi.world/)
[TRS Stereo Jack Datasheet](https://cdn-shop.adafruit.com/product-files/1699/STX3120.pdf)
## Parts
### Adafruit QT Py RP2040

[Adafruit QT Py RP2040](https://www.adafruit.com/product/4900)
What a cutie pie! Or is it... a QT Py?&nbsp;This diminutive dev board comes with one of our new favorite chip, the RP2040. It's been made famous in the new [Raspberry Pi Pico](https://www.adafruit.com/pico) _and_ our [Feather...](http://www.adafruit.com/product/4884)

In Stock
[Buy Now](https://www.adafruit.com/product/4900)
[Related Guides to the Product](https://learn.adafruit.com/products/4900/guides)
![Video of hand holding a QT Py PCB in their hand. An LED glows rainbow colors.](https://cdn-shop.adafruit.com/product-videos/640x480/4900-06.jpg)

### Breadboard-Friendly 3.5mm Stereo Headphone Jack

[Breadboard-Friendly 3.5mm Stereo Headphone Jack](https://www.adafruit.com/product/1699)
Pipe audio in or out of your project with this very handy breadboard-friendly audio jack. It's a stereo jack with disconnect-switches on Left and Right channels as well as a center ground pin. You can use any 3.5mm stereo cable with this jack. The pins are on 0.1" spacing so it plugs...

In Stock
[Buy Now](https://www.adafruit.com/product/1699)
[Related Guides to the Product](https://learn.adafruit.com/products/1699/guides)
![Close-up of 3.5mm stereo headphone jack.](https://cdn-shop.adafruit.com/640x480/1699-00.jpg)

### Breadboard-friendly MIDI Jack (5-pin DIN)

[Breadboard-friendly MIDI Jack (5-pin DIN)](https://www.adafruit.com/product/1134)
To celebrate the 30th Anniversary of the invention of MIDI we're carrying these handy 5-pin MIDI jacks. They're what you see on the back of nearly every synthesizer and drum machine. These are nice sturdy jacks, and breadboard-friendly, with all the pins on 0.1" spacing for easy...

In Stock
[Buy Now](https://www.adafruit.com/product/1134)
[Related Guides to the Product](https://learn.adafruit.com/products/1134/guides)
![Breadboard-friendly MIDI Jack](https://cdn-shop.adafruit.com/640x480/1134-08.jpg)

### Bakelite Universal Perfboard Plates - Pack of 10

[Bakelite Universal Perfboard Plates - Pack of 10](https://www.adafruit.com/product/2670)
Make your next project as you imagine it with&nbsp;prototyping perfboards that can easily be cut with scissors like these **Bakelite Universal Perfboard Plates**!

We wanted a perfboard&nbsp;that was both customizable and durable and <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/2670)
[Related Guides to the Product](https://learn.adafruit.com/products/2670/guides)
![Angled shot of single Bakelite Universal Perfboard Plate.](https://cdn-shop.adafruit.com/640x480/2670-00.jpg)

### Super Scissors

[Super Scissors](https://www.adafruit.com/product/1599)
Save your scissors! Instead of using your nice shears (and dulling them) or wire cutters (not right for the job) - use these super scissors. They're meant for engineering/maker cutting jobs such as cutting plastic, leather, copper sheet/wire, even coaxial & ribbon cables. There's a...

In Stock
[Buy Now](https://www.adafruit.com/product/1599)
[Related Guides to the Product](https://learn.adafruit.com/products/1599/guides)
![Very strong looking scissors with comfy grip](https://cdn-shop.adafruit.com/640x480/1599-09.jpg)

### Pink and Purple Woven USB A to USB C Cable - 1 meter long

[Pink and Purple Woven USB A to USB C Cable - 1 meter long](https://www.adafruit.com/product/5153)
This cable is not only super-fashionable, with a woven pink and purple Blinka-like pattern, it's also made for USB C for our modernized breakout boards, Feathers, and more.&nbsp;&nbsp;[If you want something just like it but for Micro B, we...](https://www.adafruit.com/product/4111)

Out of Stock
[Buy Now](https://www.adafruit.com/product/5153)
[Related Guides to the Product](https://learn.adafruit.com/products/5153/guides)
![Angled shot of coiled pink and purple USB cable with USB A and USB C connectors.](https://cdn-shop.adafruit.com/640x480/5153-02.jpg)

### Part: 20-pin 0.1" Female Headers - Rainbow Color Mix - 5 pack
quantity: 1
Socket headers
[20-pin 0.1" Female Headers - Rainbow Color Mix - 5 pack](https://www.adafruit.com/product/4160)

### Part: Break-away 0.1" 36-pin strip male header - Blue - 10 pack
quantity: 1
Plug headers
[Break-away 0.1" 36-pin strip male header - Blue - 10 pack](https://www.adafruit.com/product/4150)

### Part: 10Ω Resistor
quantity: 1
10Ω resistor for TX connection
[10Ω Resistor](https://www.digikey.com/en/products/detail/yageo/CFR-25JB-52-10R/340)

### Part: 30Ω Resistor
quantity: 1
30Ω resistor for 3.3V connection
[30Ω Resistor](https://www.digikey.com/en/products/detail/yageo/CFR-25JB-52-30R/1526)

# QT Py RP2040 USB to Serial MIDI Friends

## Circuit Diagram

## DIN-5
![](https://cdn-learn.adafruit.com/assets/assets/000/111/112/medium800/hacks_USBtoSerial_-_DIN-5_bb.png?1650935128)

 **Data**

- Board **TX** to **10Ω resistor**
- **10Ω resistor** to **DIN-5 pin 5** (current sink)

**Ground**

- Board **GND** to **DIN-5 pin 2** (shield)

**Power**

- Board **3V** to **30Ω resistor**
- **30Ω resistor** to **DIN-5 pin 4** (current source)

## TRS-A
![](https://cdn-learn.adafruit.com/assets/assets/000/111/006/medium800/hacks_USBtoSerial_-_TRS-A_bb.png?1650898973)

 **Data**

- Board **TX** to **10Ω resistor**
- **10Ω resistor** to **TRS pin 5** (ring)

**Ground**

- Board **GND** to **TRS pin 1** (sleeve)

**Power**

- Board **3V** to **30Ω resistor**
- **30Ω resistor** to **TRS pin 2** (tip)

## TRS-B
![](https://cdn-learn.adafruit.com/assets/assets/000/111/007/medium800/hacks_USBtoSerial_-_TRS-B_bb.png?1650898981)

 **Data**

- Board **TX** to **10Ω resistor**
- **10Ω resistor** to&nbsp; **TRS pin 2** (tip)

**Ground**

- Board **GND** to **TRS pin 1** (sleeve)

**Power**

- Board **3V** to **30Ω resistor**
- **30Ω resistor** to **TRS pin 5** (ring)

# QT Py RP2040 USB to Serial MIDI Friends

## CircuitPython

[CircuitPython](https://github.com/adafruit/circuitpython) is a derivative of [MicroPython](https://micropython.org) designed to simplify experimentation and education on low-cost microcontrollers. It makes it easier than ever to get prototyping by requiring no upfront desktop software downloads. Simply copy and edit files on the **CIRCUITPY** drive to iterate.

## CircuitPython Quickstart

Follow this step-by-step to quickly get CircuitPython running on your board.

[Download the latest version of CircuitPython for this board via circuitpython.org](https://circuitpython.org/board/adafruit_qtpy_rp2040/)
 **Click the link above to download the latest CircuitPython UF2 file.**

Save it wherever is convenient for you.

![install_circuitpython_on_rp2040_RP2040_UF2_downloaded.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/655/medium640/install_circuitpython_on_rp2040_RP2040_UF2_downloaded.jpg?1618943202)

![](https://cdn-learn.adafruit.com/assets/assets/000/101/680/medium800/adafruit_products_QTRP_buttons.jpg?1618956837)

To enter the bootloader, hold down the **BOOT/**** BOOTSEL button**(highlighted in red above), and while continuing to hold it (don't let go!), press and release the**reset button**(highlighted in red or blue above).&nbsp;**Continue to hold the BOOT/BOOTSEL button until the RPI-RP2 drive appears!**

If the drive does not appear, release all the buttons, and then repeat the process above.

You can also start with your board unplugged from USB, press and hold the BOOTSEL button (highlighted in red above), continue to hold it while plugging it into USB, and wait for the drive to appear before releasing the button.

A lot of people end up using charge-only USB cables and it is very frustrating! **Make sure you have a USB cable you know is good for data sync.**

You will see a new disk drive appear called **RPI-RP2**.

&nbsp;

Drag the **adafruit\_circuitpython\_etc.uf2** file to **RPI-RP2.**

![install_circuitpython_on_rp2040_RP2040_bootloader_drive.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/656/medium640/install_circuitpython_on_rp2040_RP2040_bootloader_drive.jpg?1618943666)

![install_circuitpython_on_rp2040_RP2040_drag_UF2.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/657/medium640/install_circuitpython_on_rp2040_RP2040_drag_UF2.jpg?1618943674)

The **RPI-RP2** drive will disappear and a new disk drive called **CIRCUITPY** will appear.

That's it, you're done! :)

![install_circuitpython_on_rp2040_RP2040_CIRCUITPY.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/658/medium640/install_circuitpython_on_rp2040_RP2040_CIRCUITPY.jpg?1618943864)

## Safe Mode

You want to edit your **code.py** or modify the files on your **CIRCUITPY** drive, but find that you can't. Perhaps your board has gotten into a state where **CIRCUITPY** is read-only. You may have turned off the **CIRCUITPY** drive altogether. Whatever the reason, safe mode can help.

Safe mode in CircuitPython does not run any user code on startup, and disables auto-reload. This means a few things. First, safe mode _bypasses any code in_ **boot.py** (where you can set **CIRCUITPY** read-only or turn it off completely). Second, _it does not run the code in_ **code.py**. And finally, _it does not automatically soft-reload when data is written to the_ **CIRCUITPY** _drive_.

Therefore, whatever you may have done to put your board in a non-interactive state, safe mode gives you the opportunity to correct it without losing all of the data on the **CIRCUITPY** drive.

### Entering Safe Mode
To enter safe mode when using CircuitPython, plug in your board or hit reset (highlighted in red above). Immediately after the board starts up or resets, it waits 1000ms. On some boards, the onboard status LED (highlighted in green above) will blink yellow during that time. If you press reset during that 1000ms, the board will start up in safe mode. It can be difficult to react to the yellow LED, so you may want to think of it simply as a slow double click of the reset button. (Remember, a fast double click of reset enters the bootloader.)

### In Safe Mode

If you successfully enter safe mode on CircuitPython, the LED will intermittently blink yellow three times.

If you connect to the serial console, you'll find the following message.

```terminal
Auto-reload is off.
Running in safe mode! Not running saved code.

CircuitPython is in safe mode because you pressed the reset button during boot. Press again to exit safe mode.

Press any key to enter the REPL. Use CTRL-D to reload.
```

You can now edit the contents of the **CIRCUITPY** drive. Remember, _your code will not run until you press the reset button, or unplug and plug in your board, to get out of safe mode._

## Flash Resetting UF2

If your board ever gets into a really _weird_ state and CIRCUITPY doesn't show up as a disk drive after installing CircuitPython, try loading this 'nuke' UF2 to RPI-RP2. which will do a 'deep clean' on your Flash Memory. **You will lose all the files on the board** , but at least you'll be able to revive it! After loading this UF2, follow the steps above to re-install CircuitPython.

[Download flash erasing "nuke" UF2](https://cdn-learn.adafruit.com/assets/assets/000/101/659/original/flash_nuke.uf2?1618945856)
# QT Py RP2040 USB to Serial MIDI Friends

## Coding the QT Py RP2040 USB to Serial MIDI Friends

Once you've finished setting up your QT Py RP2040 with CircuitPython, you can access the code and necessary libraries by downloading the Project Bundle.

To do this, click on the **&nbsp;Download Project Bundle** &nbsp;button in the window below. It will download as a zipped folder.

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/QT_Py/QT_Py_RP2040_USB_to_Serial_MIDI_Friends/code.py

## Upload the Code and Libraries to the QT Py RP2040

After downloading the Project Bundle, plug your QT Py RP2040 into the computer's USB port with a known good USB data+power cable. You should see a new flash drive appear in the computer's File Explorer or Finder (depending on your operating system) called&nbsp; **CIRCUITPY**. Unzip the folder and copy the following items to the QT Py RP2040's&nbsp; **CIRCUITPY** &nbsp;drive.&nbsp;

- **lib** &nbsp;folder
- **code.py**

Your QT Py RP2040&nbsp; **CIRCUITPY&nbsp;** drive should look like this after copying the&nbsp; **lib** &nbsp;folder and the&nbsp; **code.py&nbsp;** file.

![circuitpy](https://adafruit.github.io/Adafruit_Learning_System_Guides/QT_Py_QT_Py_RP2040_USB_to_Serial_MIDI_Friends.png )

## How the CircuitPython Code Works

The code begins by importing the libraries. All of the MIDI message libraries are imported so that any incoming MIDI message type will be recognized.

```python
import usb_midi
import adafruit_midi
import board
import busio
import time
from adafruit_midi.control_change import ControlChange
from adafruit_midi.pitch_bend import PitchBend
from adafruit_midi.note_off import NoteOff
from adafruit_midi.note_on import NoteOn
from adafruit_midi.program_change import ProgramChange
```

This is followed by the MIDI setup. The QT Py RP2040's USB port is setup as the MIDI input and the UART pin is setup as the MIDI output. This means that MIDI messages are received over USB and sent out over UART.

```python
#  uart setup
uart = busio.UART(board.TX, board.RX, baudrate=31250)
#  midi channel setup
midi_in_channel = 1
midi_out_channel = 1
#  midi setup
#  USB is setup as the input
#  UART is setup as the output
midi = adafruit_midi.MIDI(
    midi_in=usb_midi.ports[0],
    midi_out=uart,
    in_channel=(midi_in_channel - 1),
    out_channel=(midi_out_channel - 1),
    debug=False,
)
```

In the loop, if a MIDI message is received it is stored as `msg`. That `msg` is then sent out over UART exactly as it is received. This allows for direct USB to UART MIDI communication.&nbsp;

```python
while True:
    msg = midi.receive()
    if msg is not None:
        midi.send(msg)
        print(msg)
```

# QT Py RP2040 USB to Serial MIDI Friends

## Assembly

![](https://cdn-learn.adafruit.com/assets/assets/000/111/009/medium800/hacks_edited_P1320905.png?1650900928)

## Cut the Bakelite Perfboard
You will need a piece of Bakelite perfboard that is 10 holes long by 10 holes wide. Use the white divider squares as a guide and mark your cut with a marker.

![hacks_edited_P1320908.png](https://cdn-learn.adafruit.com/assets/assets/000/111/010/medium640/hacks_edited_P1320908.png?1650900965)

Use a pair of Super Scissors to cut the perfboard on the lines that you marked.

![hacks_edited_P1320909.png](https://cdn-learn.adafruit.com/assets/assets/000/111/011/medium640/hacks_edited_P1320909.png?1650901077)

Warning: 

You'll need one 10 hole by 10 hole piece of perfboard for every MIDI friend. The piece will be slightly larger than the QT Py RP2040 to allow for enough room for the headers and TRS or DIN-5 jack.

![hacks_edited_P1320913.png](https://cdn-learn.adafruit.com/assets/assets/000/111/012/medium640/hacks_edited_P1320913.png?1650901140)

## Solder the QT Py RP2040's Headers
Cut two strips of socket headers that are each seven pins long.

![hacks_edited_P1320915.png](https://cdn-learn.adafruit.com/assets/assets/000/111/013/medium640/hacks_edited_P1320915.png?1650901458)

Warning: 

Solder the socket headers to the QT Py RP2040 so that the sockets are on the USB side. You may want to use a QT Py board with plug headers as a soldering jig.

![hacks_edited_P1320916.png](https://cdn-learn.adafruit.com/assets/assets/000/111/014/medium640/hacks_edited_P1320916.png?1650901529)

![](https://cdn-learn.adafruit.com/assets/assets/000/111/015/medium800/hacks_edited_P1320918.png?1650901600)

## Solder the MIDI Friend's Headers
Cut two strips of plug headers that are seven pins long. Plug them into the QT Py RP2040's socket headers as a soldering jig.

![hacks_edited_P1320921.png](https://cdn-learn.adafruit.com/assets/assets/000/111/016/medium640/hacks_edited_P1320921.png?1650902004)

Place the piece of perfboard with its solder pads facing up. Insert the plug headers into the perfboard so that their tips are visible, as shown in the picture.

![hacks_edited_P1320923.png](https://cdn-learn.adafruit.com/assets/assets/000/111/017/medium640/hacks_edited_P1320923.png?1650902086)

Since the Bakelite perfboard only has solder pads on one side, you will need to solder the headers at an angle from the side. Solder the headers in place.

![hacks_edited_P1320924.png](https://cdn-learn.adafruit.com/assets/assets/000/111/018/medium640/hacks_edited_P1320924.png?1650902191)

Once your headers are soldered you can solder a TRS-A, TRS-B or DIN-5 connector to the board.

![hacks_edited_P1320925.png](https://cdn-learn.adafruit.com/assets/assets/000/111/019/medium640/hacks_edited_P1320925.png?1650902273)

# QT Py RP2040 USB to Serial MIDI Friends

## Solder the DIN-5 MIDI Friend

Warning: 

## DIN-5 Jack
Insert the DIN-5 jack into the breakout board. Place the five connection pins in the center of the board. Solder the DIN-5 jack in place.

![hacks_edited_P1320997.png](https://cdn-learn.adafruit.com/assets/assets/000/111/113/medium640/hacks_edited_P1320997.png?1650936966)

![hacks_edited_P1320998.png](https://cdn-learn.adafruit.com/assets/assets/000/111/114/medium640/hacks_edited_P1320998.png?1650936992)

![hacks_edited_P1320999.png](https://cdn-learn.adafruit.com/assets/assets/000/111/115/medium640/hacks_edited_P1320999.png?1650937019)

## Data Signal
Insert a 10Ω resistor between the TX header pin and the DIN-5 jack's pin 5.

![hacks_edited_P1330001.png](https://cdn-learn.adafruit.com/assets/assets/000/111/116/medium640/hacks_edited_P1330001.png?1650937094)

Solder the resistor in place. Connect the resistor to the pins by bridging the solder connections.

![hacks_edited_P1330004.png](https://cdn-learn.adafruit.com/assets/assets/000/111/117/medium640/hacks_edited_P1330004.png?1650937202)

## GND Signal
Cut and strip a piece of wire for the ground connection.

![hacks_edited_P1330005.png](https://cdn-learn.adafruit.com/assets/assets/000/111/118/medium640/hacks_edited_P1330005.png?1650937242)

Insert the wire between the DIN-5's pin 2 and the GND header.

![hacks_edited_P1330007.png](https://cdn-learn.adafruit.com/assets/assets/000/111/119/medium640/hacks_edited_P1330007.png?1650937279)

Solder the wire in place. Connect the wire to the pins by bridging the solder connections.

![hacks_edited_P1330010.png](https://cdn-learn.adafruit.com/assets/assets/000/111/120/medium640/hacks_edited_P1330010.png?1650937316)

## 3V Signal
Insert a 30Ω resistor between the 3V header pin and the DIN-5 jack's pin 4.

![hacks_edited_P1330012.png](https://cdn-learn.adafruit.com/assets/assets/000/111/121/medium640/hacks_edited_P1330012.png?1650937396)

Solder the resistor in place. Connect the resistor to the DIN-5 jack's pin 4 by bridging the solder connections.

![hacks_edited_P1330014.png](https://cdn-learn.adafruit.com/assets/assets/000/111/122/medium640/hacks_edited_P1330014.png?1650937677)

Bend the remaining resistor leg so that it is next to the 3V header pin. Connect the resistor to 3V by bridging the solder connections.

![hacks_edited_P1330016.png](https://cdn-learn.adafruit.com/assets/assets/000/111/123/medium640/hacks_edited_P1330016.png?1650937532)

![hacks_edited_P1330017.png](https://cdn-learn.adafruit.com/assets/assets/000/111/124/medium640/hacks_edited_P1330017.png?1650937578)

And that completes your DIN-5 MIDI friend!

![hacks_edited_P1330018.png](https://cdn-learn.adafruit.com/assets/assets/000/111/125/medium640/hacks_edited_P1330018.png?1650937676)

# QT Py RP2040 USB to Serial MIDI Friends

## Solder the TRS-A MIDI Friend

Warning: 

## TRS Jack
Insert the TRS jack into the breakout board. Solder the TRS jack in place.

![hacks_edited_P1320966.png](https://cdn-learn.adafruit.com/assets/assets/000/111/056/medium640/hacks_edited_P1320966.png?1650912466)

![hacks_edited_P1320967.png](https://cdn-learn.adafruit.com/assets/assets/000/111/057/medium640/hacks_edited_P1320967.png?1650912515)

![hacks_edited_P1320968.png](https://cdn-learn.adafruit.com/assets/assets/000/111/058/medium640/hacks_edited_P1320968.png?1650912561)

## Data Signal
Insert a 10Ω resistor next to the TRS jack's pin 5 (tip).

![hacks_edited_P1320969.png](https://cdn-learn.adafruit.com/assets/assets/000/111/059/medium640/hacks_edited_P1320969.png?1650912621)

Solder the resistor in place. Connect the resistor to the TRS jack's pin 5 by bridging the solder connections.

![hacks_edited_P1320971.png](https://cdn-learn.adafruit.com/assets/assets/000/111/060/medium640/hacks_edited_P1320971.png?1650912676)

Cut and splice a piece of wire to connect the resistor to the TX header pin. Insert the wire onto the breakout board and solder it in place.&nbsp;

![hacks_edited_P1320972.png](https://cdn-learn.adafruit.com/assets/assets/000/111/061/medium640/hacks_edited_P1320972.png?1650912794)

![hacks_edited_P1320974.png](https://cdn-learn.adafruit.com/assets/assets/000/111/062/medium640/hacks_edited_P1320974.png?1650912824)

Complete the signal connection by bridging the wire's solder points to the TX pin and resistor.

![hacks_edited_P1320976.png](https://cdn-learn.adafruit.com/assets/assets/000/111/063/medium640/hacks_edited_P1320976.png?1650912872)

## GND Signal
Cut and strip a piece of wire for the ground connection.

![hacks_edited_P1320978.png](https://cdn-learn.adafruit.com/assets/assets/000/111/064/medium640/hacks_edited_P1320978.png?1650912907)

Insert the wire between the TRS jack's pin 1 (sleeve) and the GND header.

![hacks_edited_P1320981.png](https://cdn-learn.adafruit.com/assets/assets/000/111/065/medium640/hacks_edited_P1320981.png?1650913212)

Solder the wire in place. Connect the wire to the pins by bridging the solder connections.

![hacks_edited_P1320983.png](https://cdn-learn.adafruit.com/assets/assets/000/111/066/medium640/hacks_edited_P1320983.png?1650913068)

## 3V Signal
Insert a 30Ω resistor next to the TRS jack's pin 2 (ring).

![hacks_edited_P1320984.png](https://cdn-learn.adafruit.com/assets/assets/000/111/067/medium640/hacks_edited_P1320984.png?1650913470)

Solder the resistor in place. Connect the resistor to the TRS jack's pin 2 by bridging the solder connections.

![hacks_edited_P1320986.png](https://cdn-learn.adafruit.com/assets/assets/000/111/068/medium640/hacks_edited_P1320986.png?1650913204)

Cut and splice a piece of wire to connect the resistor to the 3V header pin. Insert the wire onto the breakout board and solder it in place.&nbsp;

![hacks_edited_P1320988.png](https://cdn-learn.adafruit.com/assets/assets/000/111/069/medium640/hacks_edited_P1320988.png?1650913261)

![hacks_edited_P1320990.png](https://cdn-learn.adafruit.com/assets/assets/000/111/070/medium640/hacks_edited_P1320990.png?1650913355)

Complete the signal connection by bridging the wire's solder points to the 3V pin and resistor.

![hacks_edited_P1320994.png](https://cdn-learn.adafruit.com/assets/assets/000/111/071/medium640/hacks_edited_P1320994.png?1650913446)

And that completes your TRS-A MIDI friend!

![hacks_edited_P1320995.png](https://cdn-learn.adafruit.com/assets/assets/000/111/072/medium640/hacks_edited_P1320995.png?1650913548)

# QT Py RP2040 USB to Serial MIDI Friends

## Solder the TRS-B MIDI Friend

Warning: 

## TRS Jack
Insert the TRS jack into the breakout board. Solder the TRS jack in place.

![hacks_edited_P1320946.png](https://cdn-learn.adafruit.com/assets/assets/000/111/043/medium640/hacks_edited_P1320946.png?1650910232)

![hacks_edited_P1320948.png](https://cdn-learn.adafruit.com/assets/assets/000/111/047/medium640/hacks_edited_P1320948.png?1650910831)

## Data Signal
Insert a 10Ω resistor between the TX header pin and the TRS jack's pin 2 (ring).

![hacks_edited_P1320949.png](https://cdn-learn.adafruit.com/assets/assets/000/111/044/medium640/hacks_edited_P1320949.png?1650910584)

Solder the resistor in place. Connect the resistor to the pins by bridging the solder connections.

![hacks_edited_P1320951.png](https://cdn-learn.adafruit.com/assets/assets/000/111/046/medium640/hacks_edited_P1320951.png?1650910797)

## GND Signal
Cut and strip a piece of wire for the ground connection.

![hacks_edited_P1320952.png](https://cdn-learn.adafruit.com/assets/assets/000/111/048/medium640/hacks_edited_P1320952.png?1650910864)

Insert the wire between the TRS jack's pin 1 (sleeve) and the GND header.

![hacks_edited_P1320954.png](https://cdn-learn.adafruit.com/assets/assets/000/111/049/medium640/hacks_edited_P1320954.png?1650910928)

Solder the wire in place. Connect the wire to the pins by bridging the solder connections.

![hacks_edited_P1320956.png](https://cdn-learn.adafruit.com/assets/assets/000/111/050/medium640/hacks_edited_P1320956.png?1650911020)

## 3V Signal
Insert a 30Ω resistor between the 3V header pin and the TRS jack's pin 5 (tip).

![hacks_edited_P1320958.png](https://cdn-learn.adafruit.com/assets/assets/000/111/051/medium640/hacks_edited_P1320958.png?1650911072)

Solder the resistor in place. Connect the resistor to the pins by bridging the solder connections.

![hacks_edited_P1320960.png](https://cdn-learn.adafruit.com/assets/assets/000/111/054/medium640/hacks_edited_P1320960.png?1650911300)

And that completes your TRS-B MIDI friend!

![hacks_edited_P1320962.png](https://cdn-learn.adafruit.com/assets/assets/000/111/055/medium640/hacks_edited_P1320962.png?1650911418)

# QT Py RP2040 USB to Serial MIDI Friends

## Usage

You can use the QT Py RP2040 with any application that supports USB MIDI, such as a USB MIDI host or a software DAW (digital audio workstation).

Plug your selected MIDI friend breakout into the QT Py RP2040 before plugging in any cables. Then, connect the QT Py RP2040 using a USB-C cable.&nbsp;

If you're using the QT Py RP2040 with a DAW, you'll want to setup a MIDI track and set the CircuitPython Audio device as a MIDI output. This will send the MIDI track out to the QT Py RP2040 so that your TRS or DIN-5 MIDI device can receive the data.

![hacks_abletonSetup.png](https://cdn-learn.adafruit.com/assets/assets/000/111/133/medium640/hacks_abletonSetup.png?1650989050)

Connect your MIDI friend breakout to the MIDI input jack on your hardware device.

![hacks_edited_P1330038.png](https://cdn-learn.adafruit.com/assets/assets/000/111/136/medium640/hacks_edited_P1330038.png?1650989335)

If you're using a TRS MIDI device, be sure to connect your device to the MIDI friend breakout with a stereo audio cable. If you aren't sure whether your hardware uses TRS-A or TRS-B, you can [search for it on minimidi.world](https://minimidi.world/).

![hacks_edited_P1330036.png](https://cdn-learn.adafruit.com/assets/assets/000/111/134/medium640/hacks_edited_P1330036.png?1650989169)

![hacks_edited_P1330037.png](https://cdn-learn.adafruit.com/assets/assets/000/111/135/medium640/hacks_edited_P1330037.png?1650989201)


## Featured Products

### Adafruit QT Py RP2040

[Adafruit QT Py RP2040](https://www.adafruit.com/product/4900)
What a cutie pie! Or is it... a QT Py?&nbsp;This diminutive dev board comes with one of our new favorite chip, the RP2040. It's been made famous in the new [Raspberry Pi Pico](https://www.adafruit.com/pico) _and_ our [Feather...](http://www.adafruit.com/product/4884)

In Stock
[Buy Now](https://www.adafruit.com/product/4900)
[Related Guides to the Product](https://learn.adafruit.com/products/4900/guides)
### Breadboard-Friendly 3.5mm Stereo Headphone Jack

[Breadboard-Friendly 3.5mm Stereo Headphone Jack](https://www.adafruit.com/product/1699)
Pipe audio in or out of your project with this very handy breadboard-friendly audio jack. It's a stereo jack with disconnect-switches on Left and Right channels as well as a center ground pin. You can use any 3.5mm stereo cable with this jack. The pins are on 0.1" spacing so it plugs...

In Stock
[Buy Now](https://www.adafruit.com/product/1699)
[Related Guides to the Product](https://learn.adafruit.com/products/1699/guides)
### Breadboard-friendly MIDI Jack (5-pin DIN)

[Breadboard-friendly MIDI Jack (5-pin DIN)](https://www.adafruit.com/product/1134)
To celebrate the 30th Anniversary of the invention of MIDI we're carrying these handy 5-pin MIDI jacks. They're what you see on the back of nearly every synthesizer and drum machine. These are nice sturdy jacks, and breadboard-friendly, with all the pins on 0.1" spacing for easy...

In Stock
[Buy Now](https://www.adafruit.com/product/1134)
[Related Guides to the Product](https://learn.adafruit.com/products/1134/guides)
### Bakelite Universal Perfboard Plates - Pack of 10

[Bakelite Universal Perfboard Plates - Pack of 10](https://www.adafruit.com/product/2670)
Make your next project as you imagine it with&nbsp;prototyping perfboards that can easily be cut with scissors like these **Bakelite Universal Perfboard Plates**!

We wanted a perfboard&nbsp;that was both customizable and durable and <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/2670)
[Related Guides to the Product](https://learn.adafruit.com/products/2670/guides)
### Super Scissors

[Super Scissors](https://www.adafruit.com/product/1599)
Save your scissors! Instead of using your nice shears (and dulling them) or wire cutters (not right for the job) - use these super scissors. They're meant for engineering/maker cutting jobs such as cutting plastic, leather, copper sheet/wire, even coaxial & ribbon cables. There's a...

In Stock
[Buy Now](https://www.adafruit.com/product/1599)
[Related Guides to the Product](https://learn.adafruit.com/products/1599/guides)
### Pink and Purple Woven USB A to USB C Cable - 1 meter long

[Pink and Purple Woven USB A to USB C Cable - 1 meter long](https://www.adafruit.com/product/5153)
This cable is not only super-fashionable, with a woven pink and purple Blinka-like pattern, it's also made for USB C for our modernized breakout boards, Feathers, and more.&nbsp;&nbsp;[If you want something just like it but for Micro B, we...](https://www.adafruit.com/product/4111)

Out of Stock
[Buy Now](https://www.adafruit.com/product/5153)
[Related Guides to the Product](https://learn.adafruit.com/products/5153/guides)
### 20-pin 0.1" Female Headers - Rainbow Color Mix - 5 pack

[20-pin 0.1" Female Headers - Rainbow Color Mix - 5 pack](https://www.adafruit.com/product/4160)
Female header is like the duct tape of electronics. It's great for connecting things together, soldering to perf-boards, sockets for wires or break-away header, etc. We go through these real fast, and thought that given how handy they are, we'd offer them in a pack of five!

Each...

In Stock
[Buy Now](https://www.adafruit.com/product/4160)
[Related Guides to the Product](https://learn.adafruit.com/products/4160/guides)
### Break-away 0.1" 36-pin strip male header - Blue - 10 pack

[Break-away 0.1" 36-pin strip male header - Blue - 10 pack](https://www.adafruit.com/product/4150)
In this world, nothing can be said to be certain, except we need headers, headers, and _more headers_!

Each pack contains ten blue&nbsp; **36-pin&nbsp;0.1" pitch break-away male headers.** &nbsp; These are a little extra special in that the plastic holding the pins...

In Stock
[Buy Now](https://www.adafruit.com/product/4150)
[Related Guides to the Product](https://learn.adafruit.com/products/4150/guides)

## Related Guides

- [Adafruit QT Py RP2040](https://learn.adafruit.com/adafruit-qt-py-2040.md)
- [Lemon Mechanical Keypad](https://learn.adafruit.com/qtpy-lemon-mechanical-keypad-macropad.md)
- [AS5600 Super Smooth Rotary Encoder](https://learn.adafruit.com/as5600-smooth-rotary-encoder.md)
- [USB Rotary Media Dial](https://learn.adafruit.com/usb-rotary-media-dial.md)
- [LED Noodle Lantern](https://learn.adafruit.com/led-noodle-lantern.md)
- [NeoKey Emoji Keyboard](https://learn.adafruit.com/neokey-emoji-keyboard.md)
- [LED Noodle Holiday Tree](https://learn.adafruit.com/led-noodle-tree.md)
- [Audio Synthesis with CircuitPython synthio](https://learn.adafruit.com/audio-synthesis-with-circuitpython-synthio.md)
- [How to Choose a Microcontroller](https://learn.adafruit.com/how-to-choose-a-microcontroller.md)
- [Owl IR TV Remote](https://learn.adafruit.com/owl-ir-tv-remote.md)
- [CircuitPython Trombone Champ Controller](https://learn.adafruit.com/circuitpython-trombone-champ-controller.md)
- [NeXT Bus Mouse to USB HID with CircuitPython](https://learn.adafruit.com/next-bus-mouse-to-usb-hid-with-circuitpython.md)
- [Adafruit CircuitPython Wii Classic Controller Library](https://learn.adafruit.com/adafruit-circuitpython-wii-classic-controller-library.md)
- [An Introduction to RP2040 PIO with CircuitPython](https://learn.adafruit.com/intro-to-rp2040-pio-with-circuitpython.md)
- [NeoPixel Menorah](https://learn.adafruit.com/neopixel-menorah.md)
- [USB MIDI Host2Host](https://learn.adafruit.com/usb-midi-host2host.md)
