# Bass MIDI Stomp Box

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/142/163/medium800/circuitpython_edited_P1490288.jpg?1769611746)

Bass MIDI pedals are a [really popular DIY music project](https://www.reddit.com/r/synthdiy/comments/s6eiae/diy_bass_midi_pedal_less_than_100_super_fun/). They're used to [control synths or other MIDI equipment](https://www.talkbass.com/threads/cygnus-midi-bass-pedal-conversion-project-1.938717/) with your feet while you're playing another instrument. Perfect for getting moody drones going during your solo shoegaze set. The build is housed in a pedal enclosure and uses a [Raspberry Pi Pico 2](https://www.adafruit.com/product/6006), running CircuitPython, plugged into a [Terminal PiCowbell](https://www.adafruit.com/product/5904) for easy wiring with the foot switches.

https://youtu.be/yGnurcBRh58

## Inspiration

This project was inspired by the [Basyn MIDI Adapter](https://www.worthpoint.com/worthopedia/basyn-midi-adapter-one-octave-bass-159882954). This [breakout kit](https://web.ncf.ca/ch865/keyboard/basspedal.html) is specially designed to let folks connect an organ pedal board to use over MIDI.

## Parts
Featured
### Raspberry Pi Pico 2 with Header

[Raspberry Pi Pico 2 with Header](https://www.adafruit.com/product/6328)
 **Raspberry Pi Pico 2 with Header** is Raspberry Pi Foundation's update to their popular RP2040-based Pico board,&nbsp;now built on **RP2350** : their new high-performance, secure microcontroller. With a higher core clock speed, double the on-chip SRAM (512KB),...

In Stock
[Buy Now](https://www.adafruit.com/product/6328)
[Related Guides to the Product](https://learn.adafruit.com/products/6328/guides)
![Angle Shot of the Raspberry Pi Pico 2 with Header.](https://cdn-shop.adafruit.com/640x480/6328-00.jpg)

Featured
### Adafruit Terminal PiCowbell for Pico with Pre-Soldered Sockets

[Adafruit Terminal PiCowbell for Pico with Pre-Soldered Sockets](https://www.adafruit.com/product/5907)
Ding dong! Hear that? It's the PiCowbell ringing, letting you know that the new **&nbsp;Adafruit Terminal PiCowbell** &nbsp;is finally in stock and ready to assist your&nbsp;[Raspberry Pi Pico](https://www.adafruit.com/product/4864)&nbsp;and&nbsp;<a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/5907)
[Related Guides to the Product](https://learn.adafruit.com/products/5907/guides)
![Angled Shot ](https://cdn-shop.adafruit.com/640x480/5907-02.jpg)

Featured
### MPM3610 5V Buck Converter Breakout - 21V In 5V Out at 1.2A

[MPM3610 5V Buck Converter Breakout - 21V In 5V Out at 1.2A](https://www.adafruit.com/product/4739)
This little buck converter based on the MPM3610 is a marvel, taking up to 21V input and providing a 5V output with up to 1.2A current. It's great for supplying power to popular 5V voltage circuits from a range of battery or power options. &nbsp;This chip provides up to 1.2 Amp load current...

In Stock
[Buy Now](https://www.adafruit.com/product/4739)
[Related Guides to the Product](https://learn.adafruit.com/products/4739/guides)
![MPM3610 5V Buck Converter Breakout Board](https://cdn-shop.adafruit.com/640x480/4739-04.jpg)

Featured
### Micro B Round Panel Mount Extension Cable - 30cm

[Micro B Round Panel Mount Extension Cable - 30cm](https://www.adafruit.com/product/4217)
If you need to add a panel-mount connection for USB Micro B,&nbsp; but don't have the time or ability to cut a custom oval or square hole, this **&nbsp;Round Panel Mount Extension Cable&nbsp;** is the easiest and fastest way to panel-ify your existing micro-B USB kit. The...

In Stock
[Buy Now](https://www.adafruit.com/product/4217)
[Related Guides to the Product](https://learn.adafruit.com/products/4217/guides)
![Angled shot of a Micro B Round Panel Mount Extension Cable - 30cm.](https://cdn-shop.adafruit.com/640x480/4217-03.jpg)

Featured
### Panel Mount 2.1mm DC barrel jack

[Panel Mount 2.1mm DC barrel jack](https://www.adafruit.com/product/610)
This power jack is designed to easily attach to a panel up to 8mm thick (0.315" or 5/16") and fit 2.1mm power plugs snugly and securely. Perfect for adding a power connector to your project enclosure. We like this jack in particular for its long body (so you can use it on thicker...

In Stock
[Buy Now](https://www.adafruit.com/product/610)
[Related Guides to the Product](https://learn.adafruit.com/products/610/guides)
![Angled Front Shot of the Panel Mount 2.1mm DC barrel jack.](https://cdn-shop.adafruit.com/640x480/610-08.jpg)

Featured
### Hook-up Wire Spool Set - 22AWG Stranded-Core - 6 x 25ft

[Hook-up Wire Spool Set - 22AWG Stranded-Core - 6 x 25ft](https://www.adafruit.com/product/3111)
This is a box of **six** &nbsp;25ft **&nbsp;** spools of **stranded-core** wire. Stranded-core wire is best used for wiring jigs where there's bending or movement expected. It also works well with terminal blocks. It's&nbsp;_not&nbsp;_great...

In Stock
[Buy Now](https://www.adafruit.com/product/3111)
[Related Guides to the Product](https://learn.adafruit.com/products/3111/guides)
![Hook-up Wire Spool Set in box with 6 colorful wires coming out](https://cdn-shop.adafruit.com/640x480/3111-02.jpg)

### Part: MIDI Jack
quantity: 1
DIN-5
[MIDI Jack](https://www.digikey.com/en/products/detail/switchcraft-inc/57GB5FX/1832316)

### Diffused 3mm LED Pack - 5 LEDs each in 5 Colors - 25 Pack

[Diffused 3mm LED Pack - 5 LEDs each in 5 Colors - 25 Pack](https://www.adafruit.com/product/4202)
Need some miniature indicators? We are big fans of these diffused LEDs. They are fairly bright, so they can be seen in daytime, and from any angle. They go easily into a breadboard and will add that extra zing to your project.

Now you can get a pack of 25 with 5 different...

In Stock
[Buy Now](https://www.adafruit.com/product/4202)
[Related Guides to the Product](https://learn.adafruit.com/products/4202/guides)
![scattered pile of multi colored unlit LEDs ](https://cdn-shop.adafruit.com/640x480/4202-00.jpg)

### Through-Hole Resistors - 220 ohm 5% 1/4W - Pack of 25

[Through-Hole Resistors - 220 ohm 5% 1/4W - Pack of 25](https://www.adafruit.com/product/2780)
ΩMG! You're not going to be able to resist these handy resistor packs!&nbsp;Well, axially, they&nbsp;do all of the resisting for you!

This is a **25 Pack of 220Ω Resistors.** More specifically, they are **carbon film** , through-hole...

In Stock
[Buy Now](https://www.adafruit.com/product/2780)
[Related Guides to the Product](https://learn.adafruit.com/products/2780/guides)
![Angled shot of 25 Through-Hole Resistors - 220 ohm 5% 1/4W.](https://cdn-shop.adafruit.com/640x480/2780-00.jpg)

### 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)

### 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)

### Multi-Colored Heat Shrink Pack - 3/32" + 1/8" + 3/16" Diameters

[Multi-Colored Heat Shrink Pack - 3/32" + 1/8" + 3/16" Diameters](https://www.adafruit.com/product/1649)
Heat shrink is the duct tape of electronics which I guess makes this heat shrink the colorful and exciting duct tape they sell&nbsp;at craft stores. &nbsp;This heat shrink comes in six different colors - red, blue, green, yellow, white and the traditional black.

Each pack contains ten...

Out of Stock
[Buy Now](https://www.adafruit.com/product/1649)
[Related Guides to the Product](https://learn.adafruit.com/products/1649/guides)
![Array of many colorful heatshrink tubes.](https://cdn-shop.adafruit.com/640x480/1649-00.jpg)

### Fully Reversible Pink/Purple USB A to micro B Cable - 1m long

[Fully Reversible Pink/Purple USB A to micro B Cable - 1m long](https://www.adafruit.com/product/4111)
This cable is not only super-fashionable, with a woven pink and purple Blinka-like pattern, it's also fully reversible! That's right, you will save _seconds_ a day by not having to flip the cable around.

First let's talk about the cover and over-molding. We got these...

In Stock
[Buy Now](https://www.adafruit.com/product/4111)
[Related Guides to the Product](https://learn.adafruit.com/products/4111/guides)
![Fully Reversible Pink/Purple USB A to micro B Cable](https://cdn-shop.adafruit.com/640x480/4111-02.jpg)

### Parts from Love My Switches

[Love My Switches](https://lovemyswitches.com/about-us/) is an independent guitar pedal part shop. A few of the parts in this build were sourced from them.

### Part: 1032L Looper Enclosure
quantity: 1
Black Powder Coat
[1032L Looper Enclosure](https://lovemyswitches.com/1032l-looper-enclosure-bare-aluminum-powder-coat/)

### Part: DPDT Latched Foot Switch
quantity: 1
Latching power switch
[DPDT Latched Foot Switch](https://lovemyswitches.com/dpdt-latched-foot-switch-low-profile-solder-lugs)

### Part: SPST Momentary Foot Switch
quantity: 14
Normally Open
[SPST Momentary Foot Switch](https://lovemyswitches.com/spst-momentary-foot-switch-normally-open-soft-touch)

### Part: 3mm Black Metal LED Bezel
quantity: 1
Status LED bezel
[3mm Black Metal LED Bezel](https://lovemyswitches.com/3mm-black-metal-led-bezel-bag-of-5)

## Tools

Here are a few tools that may not be in your toolbox that are useful for this project.

### Part: Center Punch Drill Tool
quantity: 1
For Drilling Enclosures
[Center Punch Drill Tool](https://lovemyswitches.com/center-punch-drill-tool-for-drilling-enclosures)

### Part: Step Drill Bit
quantity: 1
3-12mm Drill Bit for Drilling Enclosures
[Step Drill Bit](https://lovemyswitches.com/step-bit-3-12mm-drill-bit-for-drilling-enclosures)

### Part: Rocket Sockets
quantity: 1
Helps with tightening of various nuts for jacks
[Rocket Sockets](https://lovemyswitches.com/rocket-sockets-pedal-building-socket-set)

# Bass MIDI Stomp Box

## Circuit Diagram

![](https://cdn-learn.adafruit.com/assets/assets/000/142/120/medium800/circuitpython_basynMidiFritzPico_bb.jpg?1769538923)

Danger: The power supply is setup as a center negative supply for guitar pedals!

### MPM3610

- MPM3610 GND to DC jack center pin (black wire)
- MPM3610 Vin to DC jack side pin (red wire)
- MPM3610 5V to Pico 2 VSYS (orange wire)
- MPM3610 GND to Pico 2 GND (black wire)

### MIDI Jack

- MIDI jack pin 4 to 30 ohm resistor to Pico 2 3.3V (yellow wire)
- MIDI jack center pin to GND (black wire)
- MIDI jack pin 5 to 10 ohm resistor to Pico 2 GP0/TX (cyan wire)

### LED

- LED cathode to GND (black wire)
- LED anode to 220 ohm resistor to Pico 2 GP18 (pink wire)

### Power Switch

- Switch output to Pico 2 EN (purple wire)
- Switch GND to GND (black wire)

### Foot Switches

- Pico 2 GND to all foot switches GND (black wires)
- Switch 1 to Pico 2 GP2 (green wire)
- Switch 2 to Pico 2 GP3 (yellow wire)
- Switch 3 to Pico 2 GP4 (blue wire)
- Switch 4 to Pico 2 GP5 (white wire)
- Switch 5 to Pico 2 GP6 (green wire)
- Switch 6 to Pico 2 GP7 (yellow wire)
- Switch 7 to Pico 2 GP8 (blue wire)
- Switch 8 to Pico 2 GP9 (white wire)
- Switch 9 to Pico 2 GP10 (green wire)
- Switch 10 to Pico 2 GP11 (yellow wire)
- Switch 11 to Pico 2 GP12 (blue wire)
- Switch 12 to Pico 2 GP13 (white wire)
- Switch 13 to Pico 2 GP14 (green wire)
- Switch 14 to Pico 2 GP15 (yellow wire)

## Reverse Polarity Protection
To protect against reverse polarity for the DC jack power input, you can place a diode between the DC jack voltage output and Vin on the MPM3610.

![](https://cdn-learn.adafruit.com/assets/assets/000/142/168/medium640/hand_tools_Screenshot_2026-01-28_165515.png?1769687740)

Featured
### 1N4001 Diode - 10 pack

[1N4001 Diode - 10 pack](https://www.adafruit.com/product/755)
This here is a 10 pack of the classic 1N4001 power blocking diode. These are good for reverse polarity protection (put it between your DC power jack and circuitry to avoid a negative-voltage that would zap your delicate electronics), kickback protection (place across your solenoids, relays...

Out of Stock
[Buy Now](https://www.adafruit.com/product/755)
[Related Guides to the Product](https://learn.adafruit.com/products/755/guides)
![ 10 pack of 1N4001 Diodes](https://cdn-shop.adafruit.com/640x480/755-03.jpg)

# Bass MIDI Stomp Box

## Installing 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 working on your board.

[Download the latest version of CircuitPython for the Raspberry Pi Pico from circuitpython.org](https://circuitpython.org/board/raspberry_pi_pico2/)
 **Click the link above and download the latest UF2 file.**

Download and save it to your desktop (or wherever is handy).

![circuitpython_Cat_UF2_download.png](https://cdn-learn.adafruit.com/assets/assets/000/098/753/medium640/circuitpython_Cat_UF2_download.png?1611157944)

Start with your Pico unplugged from USB. Hold down the **BOOTSEL** button, and while continuing to hold it (don't let go!), plug the Pico into USB. **Continue to hold the BOOTSEL button until the RP2350 drive appears!**

If the drive does not appear, unplug your Pico and go through the above process again.

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

![](https://cdn-learn.adafruit.com/assets/assets/000/142/048/medium640/circuitpython_bootsel.jpg?1769442195)

You will see a new disk drive appear called **RP2350**.

&nbsp;

Drag the **adafruit\_circuitpython\_etc.uf2** file to **RP2350.**

![circuitpython_Cat_RPI-RP2_drive.png](https://cdn-learn.adafruit.com/assets/assets/000/098/756/medium640/circuitpython_Cat_RPI-RP2_drive.png?1611158210)

![circuitpython_Cat_drag_UF2.png](https://cdn-learn.adafruit.com/assets/assets/000/098/758/medium640/circuitpython_Cat_drag_UF2.png?1611158274)

The **RP2350** drive will disappear and a new disk drive called **CIRCUITPY** will appear.

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

![circuitpython_Cat_CIRCUITPY.png](https://cdn-learn.adafruit.com/assets/assets/000/098/759/medium640/circuitpython_Cat_CIRCUITPY.png?1611158312)

## Flash Resetting UF2

If your Pico 2 ever gets into a really&nbsp;_weird_ state and doesn't even show up as a disk drive when installing CircuitPython, try installing this 'nuke' UF2 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 nuking, re-install CircuitPython

[flash_nuke.uf2](https://cdn-learn.adafruit.com/assets/assets/000/132/526/original/rp2350_flash_nuke.uf2)
# Bass MIDI Stomp Box

## Code the Stomp Box

Once you've finished setting up your Pico 2 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 to your computer as a zipped folder.

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

## Upload the Code and Libraries to the Pico 2

After downloading the Project Bundle, plug your Pico 2 into your 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 Pico 2's&nbsp; **CIRCUITPY** &nbsp;drive.

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

Your Pico 2&nbsp; **CIRCUITPY** &nbsp;drive should look like this after copying the&nbsp; **lib** &nbsp;folder&nbsp;and&nbsp; **code.py&nbsp;** file:

![CIRCUITPY drive](https://adafruit.github.io/Adafruit_Learning_System_Guides/MIDI_Bass_Synth_Stomp_Box.png )

## How the CircuitPython Code Works

The code begins by initializing the status LED and UART for MIDI output.

```python
# status LED
led = DigitalInOut(board.GP18)
led.direction = Direction.OUTPUT
led.value = True

# UART MIDI
uart = busio.UART(board.GP0, board.GP1, baudrate=31250)
#  midi channel setup
midi_out_channel = 1
#  midi setup - UART out on GP0
midi = adafruit_midi.MIDI(
    midi_out=uart,
    out_channel=(midi_out_channel - 1),
)
```

### Foot Switches

All of the foot switches are passed to a&nbsp;`Keypad` object. The `notes` array has all of the MIDI note numbers that are assigned by default to the first 12 switches.

```python
# foot switches as keypad object
KEY_PINS = (
    board.GP2,
    board.GP3,
    board.GP4,
    board.GP5,
    board.GP6,
    board.GP7,
    board.GP8,
    board.GP9,
    board.GP10,
    board.GP11,
    board.GP12,
    board.GP13,
    board.GP14,
    board.GP15,
)
notes = [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59]
keys = keypad.Keys(KEY_PINS, value_when_pressed=False)
```

### Variables and States

A few variables and states are used in the loop.

- `MIN_NOTE` and `MAX_NOTE` denote the lowest and highest starting octaves for the foot switches
- `channel_num` is used to track the current MIDI channel number
- `pressed_channel` checks if the foot switch for changing the MIDI channel has been pressed
- `blink_count` tracks how many times the status LED has blinked
- `clock` and `blink_timer` are used for time keeping when blinking the LED

```python
# variables & states
MIN_NOTE = 24 # lowest starting octave
MAX_NOTE = 84 # highest starting octave
channel_num = midi.out_channel # track channel
pressed_channel = False # did we try to change the MIDI channel
blink_count = 0 # number of times the LED has blinked
clock = ticks_ms() # time keeping
blink_timer = 500 # blink interval (0.5 seconds)
```

### The Loop

In the loop,&nbsp;`keypad` events are monitored for the foot switch inputs. If any of the first 12 foot switches are pressed, then a MIDI note on message is sent and a note off message is sent when the switch is released. Foot switch 13 changes the MIDI channel number and foot switch 14 changes the octave of the notes that are being sent by the foot switches.

```python
while True:
    event = keys.events.get()
    if event:
        if event.pressed:
            if event.key_number == 12:
                # change MIDI channel
                channel_num = (channel_num + 1) % 16
                midi.out_channel = channel_num
                print(channel_num + 1)
                pressed_channel = True
                led.value = False
                blink_count = 0
                clock = ticks_ms()
            elif event.key_number == 13:
                # checks if transposing the first note (C) by 1 octave would exceed the MAX_NOTE
                # if it does, wraps the array down to start at MIN_NOTE
                # otherwise, transposes all notes up by one octave
                notes = [MIN_NOTE + (n - notes[0]) if notes[0] + 12 > MAX_NOTE
                                                   else n + 12 for n in notes]
            else:
                # otherwise send noteOn message
                midi.send(NoteOn(notes[event.key_number], 120))
        if event.released:
            if event.key_number < 12:
                midi.send(NoteOff(notes[event.key_number], 120))
```

If the MIDI channel changes, then the status LED blinks the number of the channel selected. For example, if you are on MIDI channel 5, then the LED will blink 5 times. This blinking is non-blocking thanks to the `ticks()` library. You can press any of the foot switches while the blinking is happening.

```python
if pressed_channel:
        # blink LED to show what MIDI channel we're on
        if ticks_diff(ticks_ms(), clock) > blink_timer:
            if not led.value:
                led.value = True
                blink_count += 1
            else:
                led.value = False
            clock = ticks_add(clock, blink_timer)
        # reset after blinking
        if blink_count == (channel_num + 1):
            pressed_channel = False
            blink_count = 0
            led.value = True
```

# Bass MIDI Stomp Box

## 3D Printing and Drill Templates

![](https://cdn-learn.adafruit.com/assets/assets/000/142/115/medium800/circuitpython_edited_P1490207.jpg?1769536720)

You can 3D print a mount for the PiCowbell that hooks onto the MIDI and DC jacks inside the enclosure. This secures all of the electronics inside of the enclosure.

[PiCowbell Mount .STL File Download](https://cdn-learn.adafruit.com/assets/assets/000/142/119/original/bass-synth-pico-mount.zip?1769537043)
The mount has mounting holes for the PiCowbell and the MPM3610. The rings slide over the DC and MIDI jacks.

![](https://cdn-learn.adafruit.com/assets/assets/000/142/116/medium640/circuitpython_edited_P1490209.jpg?1769536808)

### Drill Templates

The drill templates for the enclosure are available as both an .STL file that you can 3D print and an .SVG file that you can print out on paper. The templates align with the edges of the enclosure.

[Drill Templates Download](https://cdn-learn.adafruit.com/assets/assets/000/142/118/original/bass-synth-drill-templates.zip?1769537034)
![](https://cdn-learn.adafruit.com/assets/assets/000/142/117/medium800/circuitpython_edited_P1490071.jpg?1769536882)

# Bass MIDI Stomp Box

## Prep the Enclosure

![](https://cdn-learn.adafruit.com/assets/assets/000/141/936/medium800/circuitpython_edited_P1490071.jpg?1769111506)

The enclosure is a [1032L Looper Enclosure](https://lovemyswitches.com/1032l-looper-enclosure-bare-aluminum-powder-coat/) from Love My Switches. You'll drill out holes in the enclosure for the various switches and ports. You can print out the .DXF or .SVG drill templates, 3D print the .STL drill templates or use both to guide your drill. More information about the templates are available on the [3D Printing page in this guide.](https://learn.adafruit.com/midi-bass-synth-stomp-box/3d-printing)

### Bass MIDI Stomp Box - 3D Printing and Drill Templates

[Bass MIDI Stomp Box](https://learn.adafruit.com/midi-bass-synth-stomp-box)
[3D Printing and Drill Templates](https://learn.adafruit.com/midi-bass-synth-stomp-box/3d-printing-and-drill-templates)
In addition to the templates, you can use a [center punch](https://lovemyswitches.com/center-punch-drill-tool-for-drilling-enclosures/) to help make the drilling easier. For the actual drilling, you can use a hand drill or drill press. You'll want to use a small drill bit for the pilot holes and then a [step bit](https://lovemyswitches.com/step-bit-3-12mm-drill-bit-for-drilling-enclosures/) or [paddle bits](https://www.lowes.com/pd/Bosch-10-Piece-Assorted-Woodboring-Spade-Drill-Bit-Set/5003814551) for the larger holes.&nbsp;

## Prep the Templates
Cut out the paper drill templates around the main outline for each.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/937/medium640/circuitpython_edited_P1490075.jpg?1769111693)

## Enclosure Top
Line up the top template with the top of the enclosure. It helps to try and line up the rounded corners.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/938/medium640/circuitpython_edited_P1490076.jpg?1769111733)

To make sure the template is straight, you can use a straight edge along the center hole line to make sure its the same distance (about 0.75 inches) from the edge all the way across.

Once you're happy with the placement, use clear packing tape to secure it.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/939/medium640/circuitpython_edited_P1490079.jpg?1769111773)

If you're using the 3D printed template as well, you can align it with the holes and use blue tape to hold it down on the edge.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/940/medium640/circuitpython_edited_P1490082.jpg?1769111830)

Use a center punch and a mallet to mark out the center of each drill hole.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/941/medium640/circuitpython_edited_P1490083.jpg?1769111896)

![](https://cdn-learn.adafruit.com/assets/assets/000/141/942/medium640/circuitpython_edited_P1490085.jpg?1769111903)

Clamp the enclosure to a flat surface. Use your drill to drill a pilot hole in each of the holes. Then, use a step bit to drill out each hole to the correct size. All of the foot switch holes are 12 mm in diameter. The LED mounting hole is 6.5 mm in diameter.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/943/medium640/circuitpython_edited_P1490088.jpg?1769111935)

## Enclosure Side
Take the side drill template and line it up with the back edge of the enclosure. Use clear packing tape to secure it to the enclosure.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/944/medium640/circuitpython_edited_P1490090.jpg?1769112074)

Place the 3D printed template on top of the paper one, lining it up with the drill holes. Use painters tape to secure it to the enclosure.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/945/medium640/circuitpython_edited_P1490093.jpg?1769112141)

Clamp the enclosure to a flat surface. Use a center punch to mark the center of the holes.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/946/medium640/circuitpython_edited_P1490096.jpg?1769112223)

Yellow: You'll want to use eye protection for punching and drilling the case. Exercise caution with hands also. Be careful of the newly drilled holes, there can be sharp burrs which can cut.

Use a small drill bit to drill the pilot holes. Then use a step drill bit or paddle bit to fully drill the holes. Here are the diameters:

- DC Jack: 12.5 mm
- MIDI Jack: 16 mm
- MIDI Jack screws: 3.2 mm
- USB Panel Mount: 20.8 mm

![](https://cdn-learn.adafruit.com/assets/assets/000/141/947/medium640/circuitpython_edited_P1490098.jpg?1769112258)

Your enclosure is ready!

![](https://cdn-learn.adafruit.com/assets/assets/000/141/948/medium640/circuitpython_edited_P1490102.jpg?1769112287)

# Bass MIDI Stomp Box

## Soldering - Components

![](https://cdn-learn.adafruit.com/assets/assets/000/142/028/medium800/circuitpython_edited_P1490110.jpg?1769206261)

## Pico 2 and PiCowbell
Solder headers to the Pico 2 and the Terminal PiCowbell.

![](https://cdn-learn.adafruit.com/assets/assets/000/142/029/medium640/circuitpython_edited_P1490114.jpg?1769206309)

## MIDI Jack
Solder a 30 ohm resistor to pin 4 (current source) on the MIDI DIN-5 connector.

![](https://cdn-learn.adafruit.com/assets/assets/000/142/030/medium640/circuitpython_edited_P1490124.jpg?1769206388)

Solder a 10 ohm resistor to pin 5 (current sink) on the MIDI DIN-5 connector.

![](https://cdn-learn.adafruit.com/assets/assets/000/142/031/medium640/circuitpython_edited_P1490127.jpg?1769206549)

Solder a wire to each of the resistors. Solder a third wire to pin 2 (center pin) on the MIDI DIN-5 connector. The wires should be about 4 inches long.

![](https://cdn-learn.adafruit.com/assets/assets/000/142/033/medium640/circuitpython_edited_P1490131.jpg?1769206625)

Cover the solder joints with heat shrink.

![](https://cdn-learn.adafruit.com/assets/assets/000/142/034/medium640/circuitpython_edited_P1490135.jpg?1769206687)

## DC Jack

These wires should be about 3 inches long.

Danger: The power circuit is wired for a center negative power supply which are used by guitar pedals!

Solder a wire from the center pin on the DC jack to the GND pin on the MPM3610. The power circuit is wired for a **center negative power supply** which are used by guitar pedals!

![](https://cdn-learn.adafruit.com/assets/assets/000/142/035/medium640/circuitpython_edited_P1490137.jpg?1769206705)

Solder a wire from the sleeve pin on the DC jack to the Vin pin on the MPM3610.

![](https://cdn-learn.adafruit.com/assets/assets/000/142/036/medium640/circuitpython_edited_P1490139.jpg?1769206820)

Solder a wire to the 5V pin on the MPM3610.

![](https://cdn-learn.adafruit.com/assets/assets/000/142/037/medium640/circuitpython_edited_P1490141.jpg?1769206893)

## Power Switch

The latching switch used is this [DPDT latching switch](https://lovemyswitches.com/dpdt-latched-foot-switch-low-profile-solder-lugs/) from Love My Switches.

Solder a wire to pin 2 on the L side of the switch. Solder a wire to pin 3 on the L side of the switch. These wires should be about 4 inches long.

![](https://cdn-learn.adafruit.com/assets/assets/000/142/038/medium640/circuitpython_edited_P1490144.jpg?1769206937)

Cover the solder joints with heat shrink.

![](https://cdn-learn.adafruit.com/assets/assets/000/142/039/medium640/circuitpython_edited_P1490145.jpg?1769207002)

## LED
The LED mount has two parts: the main housing that the LED sits in and a small piece that has holes for each of the LED legs. This piece is inserted from the bottom of the housing to secure the LED in place.

![](https://cdn-learn.adafruit.com/assets/assets/000/142/040/medium640/circuitpython_edited_P1490184.jpg?1769207032)

Push a 3 mm LED into the mount housing.

![](https://cdn-learn.adafruit.com/assets/assets/000/142/041/medium640/circuitpython_edited_P1490188.jpg?1769207123)

Insert the LED legs into the holding piece for the mount and secure the LED by pushing the piece into the housing.

![](https://cdn-learn.adafruit.com/assets/assets/000/142/042/medium640/circuitpython_edited_P1490189.jpg?1769207173)

Solder a 220 resistor to the LED anode (the longer leg).

![](https://cdn-learn.adafruit.com/assets/assets/000/142/043/medium640/circuitpython_edited_P1490194.jpg?1769207462)

Solder a wire to the 220 ohm resistor.

![](https://cdn-learn.adafruit.com/assets/assets/000/142/044/medium640/circuitpython_edited_P1490195.jpg?1769207565)

Solder a wire to the LED cathode (the shorter leg). These wires should be about 5 inches long.

![](https://cdn-learn.adafruit.com/assets/assets/000/142/045/medium640/circuitpython_edited_P1490197.jpg?1769207632)

Apply heat shrink to the solder joints.

![](https://cdn-learn.adafruit.com/assets/assets/000/142/046/medium640/circuitpython_edited_P1490200.jpg?1769207747)

# Bass MIDI Stomp Box

## Soldering - Foot Switches

![](https://cdn-learn.adafruit.com/assets/assets/000/142/047/medium800/circuitpython_edited_P1490156.jpg?1769207983)

Insert and secure the first foot switch into the enclosure. You can use a 14 mm socket to tighten the nut.

![](https://cdn-learn.adafruit.com/assets/assets/000/142/062/medium640/circuitpython_edited_P1490158.jpg?1769524669)

The switch solder lugs should be facing parallel to the side of the enclosure.

![](https://cdn-learn.adafruit.com/assets/assets/000/142/063/medium640/circuitpython_edited_P1490160.jpg?1769524702)

Repeat this process for the remaining 13 switches.

![](https://cdn-learn.adafruit.com/assets/assets/000/142/064/medium640/circuitpython_edited_P1490167.jpg?1769524741)

![](https://cdn-learn.adafruit.com/assets/assets/000/142/065/medium640/circuitpython_edited_P1490169.jpg?1769524757)

All of the foot switches are going to share a ground connection. Run a short wire between the first two switches and solder the wire in place.

![](https://cdn-learn.adafruit.com/assets/assets/000/142/066/medium640/circuitpython_edited_P1490170.jpg?1769524774)

Continue this ground wire daisy chaining between all of the foot switches. At the fourteenth switch, run a longer ground wire that is about 4 inches in length. This wire will connect to the Pico 2 GND connection.

![](https://cdn-learn.adafruit.com/assets/assets/000/142/067/medium640/circuitpython_edited_P1490177.jpg?1769525211)

Each remaining solder lug on each foot switch will have a wire connected to a GPIO pin on the Pico 2. Start with the last switch with a wire that is about 3 inches long.

The wires that will be closer to the Pico 2 can be about 3 inches long and will gradually get longer the further away from the Pico 2. These should be about the length of the enclosure.

![](https://cdn-learn.adafruit.com/assets/assets/000/142/068/medium640/circuitpython_edited_P1490179.jpg?1769525289)

Continue soldering a wire to each of the foot switches to connect them to GPIO.

![](https://cdn-learn.adafruit.com/assets/assets/000/142/069/medium640/circuitpython_edited_P1490181.jpg?1769525372)

# Bass MIDI Stomp Box

## Terminal PiCowbell Wiring

![](https://cdn-learn.adafruit.com/assets/assets/000/142/082/medium800/circuitpython_edited_P1490204.jpg?1769532336)

This page goes over how all of the components screw into the terminal blocks on the PiCowbell. Some of the wiring can get a little tight as you get close to the end so take your time and pay attention to where your connections are going. Don't forget to reference the [circuit diagram](https://learn.adafruit.com/midi-bass-synth-stomp-box/circuit-diagram) too!

### Bass MIDI Stomp Box - Circuit Diagram

[Bass MIDI Stomp Box](https://learn.adafruit.com/midi-bass-synth-stomp-box)
[Circuit Diagram](https://learn.adafruit.com/midi-bass-synth-stomp-box/circuit-diagram)
Info: Some of the wiring can get a little tight towards the end so take your time.

## Foot Switches
Secure the Pico 2 to the 3D printed mount with M3 screws.

![](https://cdn-learn.adafruit.com/assets/assets/000/142/083/medium640/circuitpython_edited_P1490213.jpg?1769532356)

Primary: Secure all of the wires into the terminal blocks with a small screw driver.

Insert the foot switch ground wire to a Pico 2 GND (black wire).

![](https://cdn-learn.adafruit.com/assets/assets/000/142/085/medium640/circuitpython_edited_P1490215.jpg?1769532767)

Each foot switch will have its output connect with a GPIO on the Pico 2. You'll start with switches 13 and 14, which are the MIDI Channel and Octave switches.

- Switch 13 to GP14 (green wire)
- Switch 14 to GP15 (yellow wire)

![](https://cdn-learn.adafruit.com/assets/assets/000/142/087/medium640/circuitpython_edited_P1490219.jpg?1769532899)

Foot switches 9-12:

- Switch 9 to GP10 (green wire)
- Switch 10 to GP11 (yellow wire)
- Switch 11 to GP12 (blue wire)
- Switch 12 to GP13 (white wire)

![](https://cdn-learn.adafruit.com/assets/assets/000/142/088/medium640/circuitpython_edited_P1490222.jpg?1769533166)

Foot switches 5-8:

- Switch 5 to GP6 (green wire)
- Switch 6 to GP7 (yellow wire)
- Switch 7 to GP8 (blue wire)
- Switch 8 to GP9 (white wire)

![](https://cdn-learn.adafruit.com/assets/assets/000/142/089/medium640/circuitpython_edited_P1490225.jpg?1769533254)

Foot switches 1-4:

- Switch 1 to GP2 (green wire)
- Switch 2 to GP3 (yellow wire)
- Switch 3 to GP4 (blue wire)
- Switch 4 to GP5 (white wire)

![](https://cdn-learn.adafruit.com/assets/assets/000/142/090/medium640/circuitpython_edited_P1490226.jpg?1769533302)

That completes the foot switch wiring!

![](https://cdn-learn.adafruit.com/assets/assets/000/142/091/medium800/circuitpython_edited_P1490229.jpg?1769533334)

## Components

Next, you'll connect the components: the status LED, power switch, MIDI jack and DC jack.

### LED
Insert the LED mount into the LED cutout. Secure the mount with its nut.

![](https://cdn-learn.adafruit.com/assets/assets/000/142/094/medium640/circuitpython_edited_P1490230.jpg?1769533454)

![](https://cdn-learn.adafruit.com/assets/assets/000/142/096/medium640/circuitpython_edited_P1490233.jpg?1769533567)

Wire the LED to the Pico 2:

- LED cathode to GND (black wire)
- LED anode to GP18 (red wire)

![](https://cdn-learn.adafruit.com/assets/assets/000/142/097/medium640/circuitpython_edited_P1490236.jpg?1769533582)

### Power Switch
Insert the power switch into its cutout in the enclosure. Secure it with its nut.

![](https://cdn-learn.adafruit.com/assets/assets/000/142/100/medium640/circuitpython_edited_P1490234.jpg?1769534321)

![](https://cdn-learn.adafruit.com/assets/assets/000/142/101/medium640/circuitpython_edited_P1490235.jpg?1769534331)

Connect the power switch to the Pico 2:

- Switch L2 to ENable (white wire)
- Switch L3 to GND (black wire)

![](https://cdn-learn.adafruit.com/assets/assets/000/142/102/medium640/circuitpython_edited_P1490238.jpg?1769534365)

### DC Jack and MPM3610
Run the MPM3610 and the wires connected to the DC jack through the DC jack hole on the enclosure. Then, run the assembly through the DC jack nut and the smaller ring.

![](https://cdn-learn.adafruit.com/assets/assets/000/142/103/medium640/circuitpython_edited_P1490246.jpg?1769534684)

Secure the MPM3610 to the 3D printed mount with an M2.5 screw and nut.

![](https://cdn-learn.adafruit.com/assets/assets/000/142/104/medium640/circuitpython_edited_P1490242.jpg?1769534796)

Connect the following wires from the MPM3610 to the Pico 2:

- MPM3610 5V to VSYS (yellow wire)
- MPM3610 GND to GND (black wire)

![](https://cdn-learn.adafruit.com/assets/assets/000/142/105/medium640/circuitpython_edited_P1490243.jpg?1769534824)

### MIDI Jack
Insert the MIDI jack wires through the MIDI jack mounting hole. Run its wires through the ring on the 3D printed mount.

Connect the following wires to the Pico 2:

- MIDI jack pin 4 (current source) to 3.3V (red wire)
- MIDI jack pin 2/center pin to GND (black wire)

![](https://cdn-learn.adafruit.com/assets/assets/000/142/106/medium640/circuitpython_edited_P1490248.jpg?1769534887)

Finally connect the data pin from the MIDI jack to the Pico 2:

- MIDI jack pin 5 (current sink) to GP0/TX (green wire)

![](https://cdn-learn.adafruit.com/assets/assets/000/142/107/medium640/circuitpython_edited_P1490247.jpg?1769535009)

# Bass MIDI Stomp Box

## Assembly

Secure the MIDI jack with two M3 screws through its mounting holes.

![](https://cdn-learn.adafruit.com/assets/assets/000/142/108/medium640/circuitpython_edited_P1490251.jpg?1769535415)

Slide the rings on the 3D printed mount over the DC jack and MIDI jack. Secure the ring over the DC jack with the DC jack nut.

![](https://cdn-learn.adafruit.com/assets/assets/000/142/109/medium640/circuitpython_edited_P1490253.jpg?1769535450)

### USB Extension
Secure the USB micro B barrel jack to its mounting hole.

![](https://cdn-learn.adafruit.com/assets/assets/000/142/110/medium640/circuitpython_edited_P1490255.jpg?1769535490)

Plug the micro B USB extension cable into the Pico 2.

![](https://cdn-learn.adafruit.com/assets/assets/000/142/111/medium640/circuitpython_edited_P1490257.jpg?1769535526)

That finishes up all of the wiring!

![](https://cdn-learn.adafruit.com/assets/assets/000/142/112/medium800/circuitpython_edited_P1490258.jpg?1769535553)

### Close It Up
Grab the lid and screws that came with the enclosure.

![](https://cdn-learn.adafruit.com/assets/assets/000/142/113/medium640/circuitpython_edited_P1490261.jpg?1769535576)

Secure the lid with the four screws on the bottom of the main enclosure body.

![](https://cdn-learn.adafruit.com/assets/assets/000/142/114/medium640/circuitpython_edited_P1490265.jpg?1769535598)

# Bass MIDI Stomp Box

## Use

![](https://cdn-learn.adafruit.com/assets/assets/000/142/164/medium800/circuitpython_edited_P1490283.jpg?1769611756)

Warning: Remember the DC jack is wired for center negative guitar pedal power supplies!

There are two ways that you can power the stomp box:

1. USB micro B
2. 9V center negative guitar pedal power supply

After you choose your power method, plug in the box and then turn it on by pressing the power switch. You'll see the status LED turn on.

https://youtu.be/yGnurcBRh58

After powering up, plug in the MIDI jack to your favorite MIDI synth. The 12 foot switches give you an octave of notes to send. The two side buttons let you control the MIDI channel (first button) or the octave (second button).

## Going Further

Since this build is housed in a pedal enclosure, its super customizable to your needs for the pedal. You could also change the code to use USB MIDI instead of MIDI over UART. If you aren't looking to have MIDI accompany or harmonize with you, you could also change the code to output Control Change or other utility messages.


## Guide Products

### Raspberry Pi Pico 2 with Header

[Raspberry Pi Pico 2 with Header](https://www.adafruit.com/product/6328)
 **Raspberry Pi Pico 2 with Header** is Raspberry Pi Foundation's update to their popular RP2040-based Pico board,&nbsp;now built on **RP2350** : their new high-performance, secure microcontroller. With a higher core clock speed, double the on-chip SRAM (512KB),...

In Stock
[Buy Now](https://www.adafruit.com/product/6328)
[Related Guides to the Product](https://learn.adafruit.com/products/6328/guides)
### Adafruit Terminal PiCowbell for Pico with Pre-Soldered Sockets

[Adafruit Terminal PiCowbell for Pico with Pre-Soldered Sockets](https://www.adafruit.com/product/5907)
Ding dong! Hear that? It's the PiCowbell ringing, letting you know that the new **&nbsp;Adafruit Terminal PiCowbell** &nbsp;is finally in stock and ready to assist your&nbsp;[Raspberry Pi Pico](https://www.adafruit.com/product/4864)&nbsp;and&nbsp;<a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/5907)
[Related Guides to the Product](https://learn.adafruit.com/products/5907/guides)
### MPM3610 5V Buck Converter Breakout - 21V In 5V Out at 1.2A

[MPM3610 5V Buck Converter Breakout - 21V In 5V Out at 1.2A](https://www.adafruit.com/product/4739)
This little buck converter based on the MPM3610 is a marvel, taking up to 21V input and providing a 5V output with up to 1.2A current. It's great for supplying power to popular 5V voltage circuits from a range of battery or power options. &nbsp;This chip provides up to 1.2 Amp load current...

In Stock
[Buy Now](https://www.adafruit.com/product/4739)
[Related Guides to the Product](https://learn.adafruit.com/products/4739/guides)
### Micro B Round Panel Mount Extension Cable - 30cm

[Micro B Round Panel Mount Extension Cable - 30cm](https://www.adafruit.com/product/4217)
If you need to add a panel-mount connection for USB Micro B,&nbsp; but don't have the time or ability to cut a custom oval or square hole, this **&nbsp;Round Panel Mount Extension Cable&nbsp;** is the easiest and fastest way to panel-ify your existing micro-B USB kit. The...

In Stock
[Buy Now](https://www.adafruit.com/product/4217)
[Related Guides to the Product](https://learn.adafruit.com/products/4217/guides)
### Panel Mount 2.1mm DC barrel jack

[Panel Mount 2.1mm DC barrel jack](https://www.adafruit.com/product/610)
This power jack is designed to easily attach to a panel up to 8mm thick (0.315" or 5/16") and fit 2.1mm power plugs snugly and securely. Perfect for adding a power connector to your project enclosure. We like this jack in particular for its long body (so you can use it on thicker...

In Stock
[Buy Now](https://www.adafruit.com/product/610)
[Related Guides to the Product](https://learn.adafruit.com/products/610/guides)
### Hook-up Wire Spool Set - 22AWG Stranded-Core - 6 x 25ft

[Hook-up Wire Spool Set - 22AWG Stranded-Core - 6 x 25ft](https://www.adafruit.com/product/3111)
This is a box of **six** &nbsp;25ft **&nbsp;** spools of **stranded-core** wire. Stranded-core wire is best used for wiring jigs where there's bending or movement expected. It also works well with terminal blocks. It's&nbsp;_not&nbsp;_great...

In Stock
[Buy Now](https://www.adafruit.com/product/3111)
[Related Guides to the Product](https://learn.adafruit.com/products/3111/guides)
### Diffused 3mm LED Pack - 5 LEDs each in 5 Colors - 25 Pack

[Diffused 3mm LED Pack - 5 LEDs each in 5 Colors - 25 Pack](https://www.adafruit.com/product/4202)
Need some miniature indicators? We are big fans of these diffused LEDs. They are fairly bright, so they can be seen in daytime, and from any angle. They go easily into a breadboard and will add that extra zing to your project.

Now you can get a pack of 25 with 5 different...

In Stock
[Buy Now](https://www.adafruit.com/product/4202)
[Related Guides to the Product](https://learn.adafruit.com/products/4202/guides)
### Through-Hole Resistors - 220 ohm 5% 1/4W - Pack of 25

[Through-Hole Resistors - 220 ohm 5% 1/4W - Pack of 25](https://www.adafruit.com/product/2780)
ΩMG! You're not going to be able to resist these handy resistor packs!&nbsp;Well, axially, they&nbsp;do all of the resisting for you!

This is a **25 Pack of 220Ω Resistors.** More specifically, they are **carbon film** , through-hole...

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

## Related Guides

- [Adafruit Terminal PiCowbell for Pico](https://learn.adafruit.com/adafruit-terminal-picowbell-for-pico.md)
- [Breakbeat Breadboard](https://learn.adafruit.com/breakbeat-breadboard.md)
- [LED Reactive Light-Up Hockey Puck in MakeCode](https://learn.adafruit.com/led-hockey-puck.md)
- [Interactive Gift Box](https://learn.adafruit.com/interactive-custom-gift-box.md)
- [Computer Space Mini Arcade](https://learn.adafruit.com/computer-space-mini-arcade.md)
- [nOOds LED CV Signal Visualizers](https://learn.adafruit.com/noods-led-synth-cv-visualizers.md)
- [Adabot Toy Robot Friend](https://learn.adafruit.com/adabot-rp2040.md)
- [reef-pi Guide 7: Dosing Controller](https://learn.adafruit.com/reef-pi-guide-5-dosing-controller.md)
- [LED Shoji Lamp](https://learn.adafruit.com/led-shoji-lamp.md)
- [PyPortal Retro Cases](https://learn.adafruit.com/pyportal-retro-compys.md)
- [LED Trampoline](https://learn.adafruit.com/led-trampoline.md)
- [BLE Volume Knob with CircuitPython](https://learn.adafruit.com/bluetooth-le-hid-volume-knob-with-circuitpython.md)
- [A CircuitPython BLE Remote Control On/Off Switch](https://learn.adafruit.com/circuitpython-ble-remote-control-on-off.md)
- [How to Make Animated Graphics for Hologram Displays](https://learn.adafruit.com/how-to-make-animated-graphics-for-hologram-displays.md)
- [RGB Matrix Slot Machine](https://learn.adafruit.com/rgb-matrix-slot-machine.md)
- [CircuitPython Day 2020 Countdown Clock](https://learn.adafruit.com/circuitpython-day-2020-countdown-clock.md)
